/*
 * File: wwwroot/css/site.css
 */

/* =================================== */
/* --- IMPOSTAZIONI GLOBALI & FONT --- */
/* =================================== */
body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    background-color: #fff;
}

body.bg-white-override {
    background-color: #ffffff;
}


/* ================== */
/* --- HEADER --- */
/* ================== */


header {
    position: sticky;
    top: 0;
    z-index: 1030; /* Un z-index alto per stare sopra a tutto. 1030 č lo standard di Bootstrap per i navbar. */
    background-color: #ffffff; /* Sfondo solido obbligatorio per non far vedere il contenuto che scorre dietro */
}

.navbar {
    padding: 0.8rem 1rem;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 1px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

    .navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
        color: #0d6efd;
    }

.search-form .form-control {
    border-radius: 20px 0 0 20px;
    border-right: none;
}

.search-form .btn {
    border-radius: 0 20px 20px 0;
}

.search-form .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}



/* =========================== */
/* --- HOME PAGE - HERO BANNER --- */
/* =========================== */
.hero-banner {
    position: relative;
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('/Images/HOME.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

    .hero-banner::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.4);
    }

.hero-content {
    position: relative;
    z-index: 2;
}

    .hero-content h1 {
        font-size: 3.5rem;
        font-weight: 700;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    }

    


/* ================================= */
/* --- PAGINA CATALOGO --- */
/* ================================= */
.sidebar-filters {
    padding: 20px 15px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    position: sticky;
    top: 20px;
}

    .sidebar-filters h4 {
        font-weight: 600;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }

.filter-section .filter-title {
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    padding: 8px 0;
}

    .filter-section .filter-title i {
        transition: transform 0.3s ease;
    }

    .filter-section .filter-title[aria-expanded="false"] i {
        transform: rotate(-90deg);
    }

.filter-section ul.filter-list li a {
    display: block;
    padding: 5px 0;
    color: #343a40;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    font-size: 0.9rem;
    border-radius: 4px;
}

    .filter-section ul.filter-list li a:hover {
        color: #0d6efd;
        background-color: #f8f9fa;
    }

    .filter-section ul.filter-list li a.active {
        font-weight: 600;
        color: #0d6efd;
    }

.filter-list-scrollable {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 10px;
}

    .filter-list-scrollable::-webkit-scrollbar {
        width: 5px;
    }

    .filter-list-scrollable::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .filter-list-scrollable::-webkit-scrollbar-thumb {
        background: #cccccc;
        border-radius: 5px;
    }

        .filter-list-scrollable::-webkit-scrollbar-thumb:hover {
            background: #aaaaaa;
        }

#active-filters-bar {
    background-color: #fff;
    border: 1px solid #dee2e6;
    padding: 1rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    background-color: #e9ecef;
    border-radius: 20px;
    color: #212529;
}

    .filter-pill .remove-filter {
        margin-left: 8px;
        border: none;
        background: transparent;
        padding: 0;
        font-size: 1.2rem;
        line-height: 1;
        cursor: pointer;
        opacity: 0.6;
        transition: opacity 0.2s;
    }

        .filter-pill .remove-filter:hover {
            opacity: 1;
        }

#clear-all-filters {
    margin-left: auto;
    font-size: 0.85rem;
}

.product-card {
    background-color: #fff;
    border: 1px solid #e9ecef;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

    .product-card:hover {
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        transform: translateY(-5px);
    }

    .product-card .card-body {
        padding: 1rem;
        text-align: left;
    }

    .product-card .card-title {
        font-size: 1rem;
        font-weight: 500;
        margin-bottom: 0.25rem;
    }

    .product-card .card-text {
        font-size: 0.9rem;
        color: #6c757d;
    }

    .product-card .card-price {
        font-size: 1.1rem;
        font-weight: 600;
        color: #212529;
    }

/* ========================= */
/* --- SEZIONE MOBILE --- */
/* ========================= */
#mobile-filter-trigger {
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
}

.offcanvas-body .sidebar-filters {
    padding: 0 !important;
    border: 0 !important;
    position: static !important;
}

/* ===================== */
/* --- PAGINATION --- */
/* ===================== */
.pagination-container {
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

#page-info {
    font-size: 0.9rem;
}

.pagination {
    margin-bottom: 0;
}

.page-link {
    color: #212529;
    background-color: #fff;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease-in-out;
}

    .page-link:hover {
        background-color: #f8f9fa;
        color: #000;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    .page-link:focus {
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    }

.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #212529;
    border-color: #212529;
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* ============= */
/* --- FOOTER (LIGHT) --- */
/* ============= */
.footer-light {
    background-color: #ffffff;
    color: #6c757d;
    font-size: 0.9rem;
    padding-top: 4rem;
    padding-bottom: 2rem;
    border-top: 1px solid #e9ecef;
}

    .footer-light h5 {
        color: #212529;
        font-weight: 600;
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        margin-bottom: 1.5rem;
    }

    .footer-light .footer-link {
        color: #6c757d;
        text-decoration: none;
        display: inline-block;
        margin-bottom: 0.6rem;
        transition: color 0.3s ease;
    }

        .footer-light .footer-link:hover {
            color: #0d6efd;
            text-decoration: none;
        }

        .footer-light .footer-link i {
            margin-right: 10px;
            width: 20px;
            text-align: center;
        }

    .footer-light hr {
        border-color: #e9ecef;
    }

    .footer-light .form-label {
        color: #212529;
        font-weight: 500;
    }

.copyright-text {
    font-size: 0.85rem;
    color: #adb5bd;
}

/* ========================= */
/* --- MEDIA QUERIES & RESPONSIVE --- */
/* ========================= */
@media (max-width: 991.98px) {
    .navbar-nav {
        padding-top: 1rem;
    }

    .d-flex.align-items-center {
        flex-direction: column;
        align-items: flex-start !important;
        margin-top: 1rem;
    }

    .search-form {
        width: 100%;
        margin-bottom: 1rem;
        margin-right: 0 !important;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .footer-light {
        text-align: center;
    }

        .footer-light .text-md-end {
            text-align: center !important;
            margin-top: 1rem;
        }

    .hero-banner {
        position: relative;
        height: 55vh;
        display: flex;
        align-items: center;
        justify-content: center;
        background-image: url('/Images/HOME.png');
        background-size: cover;
        background-position: bottom;
        background-attachment: unset;
    }
}


/* ======================================= */
/* --- AGGIUNTE: PRODUCT DETAIL PAGE --- */
/* ======================================= */

/* Colonna destra "sticky" per seguire lo scroll delle immagini */
.product-info-sticky {
    position: -webkit-sticky; /* Per Safari */
    position: sticky;
    top: 120px; /* Distanza dal top, per non finire sotto l'header. Regola se necessario. */
}

.product-brand {
    font-weight: 500;
    letter-spacing: 1px;
}

.product-title {
    font-weight: 600;
    font-size: 2rem; /* Pių grande per dare importanza */
}

.product-price {
    font-weight: 500;
}

/* --- Stile per il selettore taglie --- */
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Spazio tra i box delle taglie */
}

.size-option input[type="radio"] {
    display: none; /* Nasconde il pallino del radio button */
}

.size-option label {
    display: block;
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    min-width: 50px; /* Larghezza minima per un aspetto uniforme */
    transition: all 0.2s ease;
}

/* Stile quando si passa il mouse sopra una taglia disponibile */
.size-option input[type="radio"]:not(:disabled) + label:hover {
    border-color: #212529;
    background-color: #f8f9fa;
}

/* Stile della taglia selezionata */
.size-option input[type="radio"]:checked + label {
    border-color: #212529;
    background-color: #212529;
    color: #fff;
    font-weight: 500;
}

/* Stile delle taglie non disponibili */
.size-option input[type="radio"]:disabled + label {
    background-color: #f8f9fa;
    color: #ced4da;
    border-color: #e9ecef;
    cursor: not-allowed;
    text-decoration: line-through; /* Sbarra il testo */
}


/* --- Stile per il bottone di acquisto --- */
#add-to-cart-btn {
    padding: 0.8rem;
    font-size: 1.1rem;
    font-weight: 500;
}

    #add-to-cart-btn:disabled {
        background-color: #6c757d;
        border-color: #6c757d;
    }

/* --- Stile per i dettagli in accordion --- */
.accordion-button {
    font-weight: 500;
    padding: 1rem ; 
}

    .accordion-button:not(.collapsed) {
        color: #000;
        background-color: transparent;
        box-shadow: none;
    }

    .accordion-button:focus {
        box-shadow: none;
        border-color: rgba(0,0,0,.125);
    }

.accordion-body ul {
    margin: 0;
    padding-left: 0.5rem;
}



.social-section-v3 {
    padding: 4rem 0;
    background-color: #fcfcfc;
    border-top: 1px solid #eee;
}

.social-title {
    font-family: var(--font-main);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 600;
    font-size: 1.1rem;
}

/* CARD INSTAGRAM SIMULATA */
.insta-feed-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Altezza uniforme */
    display: flex;
    flex-direction: column;
}

    .insta-feed-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    }

.insta-header {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f5f5f5;
}

.insta-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #1a1a1a; /* Placeholder avatar */
}

.insta-handle {
    font-family: var(--font-main);
    font-size: 0.8rem;
    font-weight: 600;
    color: #1a1a1a;
}

.insta-image-wrapper {
    position: relative;
    padding-top: 100%; /* Aspect Ratio 1:1 Quadrato */
    overflow: hidden;
}

    .insta-image-wrapper img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

.insta-feed-card:hover .insta-image-wrapper img {
    transform: scale(1.03);
}

/* LISTA PRODOTTI CORRELATI (SHOP THE LOOK) */
.shop-the-look-list {
    padding: 15px;
    background: #fff;
    flex-grow: 1; /* Riempie lo spazio */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.shop-label {
    font-family: var(--font-main);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    margin-bottom: 10px;
    display: block;
}

.mini-product-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-bottom: 8px;
    padding: 6px;
    border-radius: 4px;
    transition: background 0.2s;
}

    .mini-product-item:hover {
        background-color: #f4f4f4;
    }

    .mini-product-item:last-child {
        margin-bottom: 0;
    }

.mini-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    margin-right: 10px;
    border: 1px solid #eee;
}

.mini-info {
    display: flex;
    flex-direction: column;
}

.mini-name {
    font-family: var(--font-main);
    font-size: 0.75rem;
    color: #1a1a1a;
    font-weight: 500;
    line-height: 1.1;
}

.mini-price {
    font-family: var(--font-main);
    font-size: 0.7rem;
    color: #6c757d;
}

/* CARD GIFT CARD SPECIALE */
.gift-card-tile {
    height: 100%;
    background-color: #1a1a1a; /* Sfondo scuro elegante */
    color: #fff;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid #1a1a1a;
}

    .gift-card-tile img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.6; /* Immagine scura */
        transition: opacity 0.3s, transform 0.5s;
    }

.gift-card-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.3); /* Cornice sottile interna */
    margin: 1rem;
    background: rgba(0,0,0,0.2); /* Leggero overlay */
    backdrop-filter: blur(2px);
}

.gift-card-title {
    font-family: var(--font-main);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.gift-card-cta {
    font-family: var(--font-main);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border-bottom: 1px solid #fff;
    padding-bottom: 3px;
}

.gift-card-tile:hover img {
    opacity: 0.4;
    transform: scale(1.05);
}

/* AGGIORNAMENTO: Gestione Video/Reel */
.insta-image-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Taglia il video per riempire il quadrato senza deformarlo */
    z-index: 1;
}

/* Icona "Reel" in alto a destra per far capire che č un video */
.reel-icon-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    z-index: 2;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 2px 5px;
    backdrop-filter: blur(2px);
}

/* Stile Popup Spedizione */
#shippingModal .modal-content {
    font-family: 'Montserrat', sans-serif;
}

#shippingModal .form-select:focus {
    border-color: #f16b6b;
    box-shadow: none;
}

#shippingModal .btn-dark {
    background-color: #212529;
    border: none;
    transition: all 0.3s ease;
}

#shippingModal .btn-dark:hover {
    background-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#shippingModal .modal-title {
    color: #212529;
}

/* Overlay pių scuro per dare importanza al popup */
.modal-backdrop.show {
    opacity: 0.8;
}

/* Stile tasto X di Bootstrap */
#shippingModal .btn-close {
    opacity: 1;
    background-size: 12px;
    padding: 1.5rem;
}

#shippingModal .btn-close:focus {
    box-shadow: none;
}

/* Tasto Annulla/Chiudi secondario */
#shippingModal .btn-outline-secondary {
    border-color: #dee2e6;
    color: #6c757d;
    transition: all 0.3s ease;
}

#shippingModal .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    color: #212529;
    border-color: #212529;
}

.search-form .form-control {
    transition: width 0.4s ease-in-out;
    width: 180px;
}

.search-form .form-control:focus {
    width: 250px;
}

@media (max-width: 991px) {
    .search-form .form-control {
        width: 100%; /* Su mobile occupa tutto lo spazio */
    }
}

.search-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85); /* Sfondo bianco semi-trasparente */
    backdrop-filter: blur(8px); /* Effetto sfocato moderno */
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999; /* Sopra a tutto, anche alla navbar */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-overlay-content {
    animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* Container centrato all'80% per desktop (Coerente con le altre pagine) */
@media (min-width: 992px) {
    .container {
        max-width: 80% !important;
    }
}

.insta-post-card {
    transition: transform 0.3s ease;
    border-radius: 4px;
}

.insta-post-card:hover {
    transform: translateY(-5px);
}

/* Overlay per il link a Instagram al passaggio mouse */
.insta-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-decoration: none;
}

.insta-media-box:hover .insta-hover-overlay {
    opacity: 1;
}

/* Icona Reel in alto a destra */
.reel-badge-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.8);
    color: #000;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 0.7rem;
    z-index: 2;
}

/* Effetto sui prodotti correlati */
.mini-look-item {
    transition: background-color 0.2s;
}

.mini-look-item:hover {
    background-color: #fafafa;
}

.mini-look-item:last-child {
    border-bottom: none !important;
}

/* Impedisce all'immagine di rimpicciolirsi o spostarsi */
.mini-look-item img {
    flex-shrink: 0; 
    object-fit: cover;
}

/* Gestisce il blocco di testo in modo che non vada mai sotto */
.mini-look-item .overflow-hidden {
    flex-grow: 1;
    min-width: 0; /* Fondamentale per far funzionare il text-truncate in flexbox */
}

/* Opzionale: limita la caption di instagram a 2 righe per non occupare troppo spazio su mobile */
.insta-post-card .p-3 > .text-uppercase {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: 1.8rem; /* Altezza fissa per allineare le card */
}

/* Forza l'allineamento orizzontale anche su schermi strettissimi */
.mini-look-item {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

.Montserrat {
    font-family: 'Montserrat', sans-serif;
}