/* ===========================
   CONTENITORE CENTRALE
   =========================== */

.page-container {
    width: 100%;
    padding-left: 40px;
    padding-right: 40px;
}

/* ===========================
   BLOCCO PRODOTTO
   =========================== */

.product-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
}

/* ===========================
   IMMAGINE — VERSIONE PULITA
   =========================== */

.product-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: none;
    padding: 0;
    box-shadow: none;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* ===========================
   INFO
   =========================== */

.product-info {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 30px;
    border-radius: 14px;
}

.product-title {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 10px;
}

.rating-stars {
    font-size: 22px;
    color: #ffcc00;
    margin-bottom: 15px;
}

.product-description {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 25px;
    color: #eee;
}

.price {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* BOTTONE */
.buy-btn {
    background: #007bff;
    color: #fff;
    padding: 14px 26px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
    display: inline-block;
    margin-bottom: 20px;
}

.buy-btn:hover {
    background: #005fcc;
}

/* PAYPAL */
.paypal-box {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
}

/* VENDITORE */
.seller-box {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    display: inline-block;
    color: #fff;
}

/* ===========================
   SEZIONE SOTTO
   =========================== */

.product-bottom {
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    padding: 40px 20px;
    margin-top: 40px;
    border-radius: 20px;
    color: #fff;
}

.product-bottom h2 {
    margin-bottom: 20px;
}

.product-bottom p,
.product-bottom li {
    color: #ddd;
}

/* ===========================
   RESPONSIVE — TABLET
   =========================== */

@media (max-width: 992px) {
    .product-box {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
    }
    .product-title { font-size: 30px; }
    .price { font-size: 28px; }
    .product-info { padding: 25px; }
}

/* ===========================
   RESPONSIVE — MOBILE
   =========================== */

@media (max-width: 768px) {
        .page-container {
        width: 100%;
        padding-left: 40px;
        padding-right: 40px;
    }

    .product-box {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 25px;
        border-radius: 16px;
    }
    .product-title { font-size: 26px; text-align: center; }
    .rating-stars { font-size: 20px; text-align: center; }
    .product-description { font-size: 16px; line-height: 1.6; }
    .price { font-size: 26px; text-align: center; }
    .buy-btn {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 16px;
    }
    .product-info {
        padding: 20px;
        border-radius: 12px;
    }
    .product-bottom {
        padding: 30px 15px;
        margin-top: 30px;
        border-radius: 16px;
    }
}

/* ===========================
   RESPONSIVE — SMALL MOBILE
   =========================== */

@media (max-width: 480px) {
    .product-title { font-size: 22px; }
    .price { font-size: 22px; }
    .buy-btn { padding: 10px 18px; font-size: 15px; }
    .product-info { padding: 18px; }
}

/* ===========================
   SIDEBAR
   =========================== */

.category-sidebar {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
    padding: 20px;
    border-radius: 14px;
    color: #fff;
    height: fit-content;
    z-index: 9999;
}

.category-sidebar h3 {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 700;
}

.category-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    text-decoration: none;
    transition: 0.2s;
}

.category-sidebar a:hover {
    background: rgba(255,255,255,0.15);
}

/* ===========================
   MARKETPLACE RESPONSIVE FIX
   =========================== */

.market-layout {
    display: flex;
    gap: 30px;
}

@media (max-width: 992px) {
    .market-layout {
        flex-direction: column;
    }
}

/* ===========================
   FILTRI
   =========================== */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-bar select,
.filter-bar input {
    background: rgba(255,255,255,0.20);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    padding: 10px;
    border-radius: 10px;
    min-width: 180px;
}

.filter-bar select:focus,
.filter-bar input:focus {
    background: rgba(30, 30, 30, 0.3);
    border-color: #fff;
    color: #fff;
    outline: none;
}

.filter-bar input::placeholder {
    color: #ccc;
}

/* ===========================
   GRIGLIA PRODOTTI
   =========================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.product-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 25px;
    border-radius: 14px;
    backdrop-filter: blur(6px);
    color: #fff;
    transition: 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.category-badge {
    display: inline-block;
    background: #007bff;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 10px;
}

.product-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.product-desc {
    font-size: 15px;
    color: #ddd;
    margin-bottom: 15px;
    min-height: 60px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
}

/* ===========================
   RESPONSIVE PAGINA PRODOTTO
   =========================== */

@media (max-width: 992px) {
    .product-box {
        grid-template-columns: 1fr !important;
    }
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.product-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 25px;
    border-radius: 14px;
    backdrop-filter: blur(6px);
    color: #fff;
    transition: 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.product-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* GRID PRODOTTI */
.product-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 30px !important;
}

/* CARD */
.product-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 25px;
    border-radius: 14px;
    backdrop-filter: blur(6px);
    color: #fff;
    transition: 0.2s;
}

/* IMMAGINI */
.product-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* SIDEBAR MOBILE */
@media(max-width: 900px) {

    .market-layout {
        flex-direction: column !important;
    }

    .category-sidebar {
        position: fixed;
        top: 0;
        left: -260px;
        width: 260px;
        height: 100vh;
        background: rgba(0,0,0,0.85);
        backdrop-filter: blur(8px);
        padding: 20px;
        border-right: 1px solid rgba(255,255,255,0.15);
        transition: left 0.3s ease;
        z-index: 9999;
    }

    .category-sidebar.open {
        left: 0;
    }

    .category-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.55);
        backdrop-filter: blur(3px);
        z-index: 9998;
    }

    .category-overlay.show {
        display: block;
    }
}

.page-title {
    color: #fff !important;
    text-shadow: 0 0 6px rgba(255,255,255,0.4);
}

.page-subtitle {
    color: #fff !important;
    opacity: 0.9;
}

/* Nasconde il bottone categorie nel desktop */
.category-toggle {
    display: none;
}

/* Mostra il bottone categorie SOLO nel mobile */
@media (max-width: 900px) {
    .category-toggle {
        display: block;
    }
}

.page-bg.market-page {
    color: #ffffff;
}

.page-bg.market-page a,
.page-bg.market-page h1,
.page-bg.market-page h2,
.page-bg.market-page h3,
.page-bg.market-page p,
.page-bg.market-page span {
    color: #ffffff !important;
}

.page-bg.market-page .pagination .page-link {
    color: #ffffff;
}

.page-container .form-control {
    padding: 4px 8px !important;
    font-size: 13px !important;
    height: 32px !important;
}

.page-container textarea.form-control {
    padding: 6px 8px !important;
    font-size: 13px !important;
    height: auto !important;
}
