/* ============================================
   public/css/home.css
   Styles exclusive to the Home page
   ============================================ */

/* ============================================
   NAVBAR GLASS OVERRIDE
   ============================================ */
.navbar.navbar-glass {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.3s ease;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    /* background-image removed — image is now an inline <picture> element
       so the browser preload scanner can fetch it immediately as the LCP
       element. CSS background-images are invisible to the preload scanner. */
    background-color: #f5f5f7;   /* placeholder shown while image loads */
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    padding: 10rem 0;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
}

/* Full-bleed background image — replaces the old CSS background-image */
.hero-section-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-section-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    display: block;
}

/* Content sits above the background image */
.hero-section > .container {
    position: relative;
    z-index: 2;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
    pointer-events: none;
}

.collection-badge {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e5e7;
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: 0.03em;
    margin-bottom: 1.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    cursor: default;
}

.collection-badge:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    color: #1d1d1f;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #6e6e73;
    font-weight: 400;
    max-width: 560px;
    margin: 0 0 2.25rem;
    line-height: 1.6;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    font-weight: 800;
    color: #1d1d1f;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

/* ============================================
   CATEGORY CARDS
   ============================================ */
.category-card {
    display: block;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    max-height: 300px;
    text-decoration: none;
    background: #f0f0f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Keyboard navigation accessibility focus state */
.category-card:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 4px;
    border-radius: 24px;
}

@media (max-width: 991px) {
    .category-card:focus-visible {
        border-radius: 16px;
    }
}

/* Subtle hover effect for desktop only (>=992px) */
@media (min-width: 992px) {
    .category-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
    }

    .category-card:hover img {
        transform: scale(1.04);
    }
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1.25rem 1.25rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
    /* Removed explicit bottom border-radius to let parent's overflow:hidden do the clipping cleanly */
}

.category-overlay h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ============================================
   CATEGORY RAIL WRAPPER & MOBILE HORIZONTAL SCROLL
   ============================================ */
.category-rail-wrapper {
    position: relative;
    width: 100%;
}

@media (max-width: 767.98px) {

    /* Flex-rail setup for categories on mobile */
    #homeCategories {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: 12px;
        /* buffer space for focus ring outlines and drop shadows */
        scrollbar-width: none;
        /* Hide scrollbar Firefox */
        -ms-overflow-style: none;
        /* Hide scrollbar IE/Edge */
        gap: 12px;
        scroll-behavior: smooth;
        box-sizing: border-box;
        scroll-padding-left: 16px;
        scroll-padding-right: 16px;
        margin-top: 0;
        margin-bottom: 0;
    }

    #homeCategories::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar Webkit */
    }

    /* Override Bootstrap column styles on mobile rail */
    #homeCategories>[class*="col-"] {
        flex: 0 0 145px;
        width: 145px;
        max-width: 145px;
        padding-left: 0;
        padding-right: 0;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        margin-top: 0;
    }

    #homeCategories .category-card {
        width: 100%;
        aspect-ratio: 3 / 4;
        border-radius: 16px;
    }

    /* Mobile spacer element to anchor scroll padding on Safari */
    #homeCategories .rail-spacer {
        flex: 0 0 4px;
        width: 4px;
        height: 1px;
        visibility: hidden;
        pointer-events: none;
    }

    /* Premium mobile-only View All card */
    #homeCategories .view-all-card {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: #f5f5f7 !important;
        border: 1.5px dashed #d2d2d7;
        height: 100%;
        text-align: center;
        text-decoration: none;
        box-shadow: none;
        transition: border-color 0.2s ease, background-color 0.2s ease;
    }

    #homeCategories .view-all-card:active {
        background: #e8e8ed !important;
    }

    #homeCategories .view-all-card:focus-visible {
        border-color: #0066cc;
        outline: none;
    }

    #homeCategories .view-all-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    #homeCategories .view-all-icon {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.15rem;
        color: #1d1d1f;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        transition: transform 0.25s ease;
    }

    #homeCategories .view-all-card span {
        font-size: 0.82rem;
        font-weight: 700;
        color: #1d1d1f;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    #homeCategories .category-overlay {
        padding: 1.25rem 0.875rem 0.875rem;
    }

    #homeCategories .category-overlay h3 {
        font-size: 0.875rem;
        font-weight: 700;
        letter-spacing: 0.01em;
    }
}

/* ============================================
   PRODUCT CARDS
   ============================================ */
.product-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Product Image Wrapper */
.product-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #f5f5f7;
    border-radius: 14px;
    margin: 8px 8px 0 8px;
}

.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.03);
}

/* Badge */
.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-dark {
    background: #1d1d1f;
    color: #fff;
}

.badge-white {
    background: #fff;
    color: #1d1d1f;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

/* Floating Actions (Wishlist + Cart) */
.floating-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1d1f;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.action-btn:hover {
    background: #1d1d1f;
    color: #fff;
    transform: scale(1.1);
}

/* Product Info */
.product-info {
    padding: 1rem 1rem 1.1rem;
}

.product-category {
    font-size: 0.72rem;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.product-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 6px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.rating-star {
    color: #f4a200;
    font-size: 0.75rem;
}

.product-rating span {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1d1d1f;
}

.review-count {
    font-size: 0.72rem !important;
    font-weight: 400 !important;
    color: #86868b !important;
}

/* Product Bottom Row */
.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.product-price {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1d1d1f;
    letter-spacing: -0.02em;
}

.product-price-old {
    font-size: 0.8rem;
    font-weight: 500;
    color: #86868b;
    text-decoration: line-through;
}

/* Color Swatches */
.product-colors {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* ============================================
   LOADING SKELETONS
   ============================================ */
.skeleton-card {
    pointer-events: none;
    border-color: rgba(0, 0, 0, 0.03) !important;
    background: #fff !important;
    box-shadow: none !important;
}

.skeleton-pulse {
    animation: skeleton-loading 1.4s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* ============================================
   SEASON CLEARANCE - ROUNDED PARALLAX CARD
   ============================================ */
.parallax-section {
    padding: 3rem 0;
}

.parallax-card {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 3 / 1;
    background-image: url('../images/user/boutique-banner.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.03),
        0 8px 20px rgba(0, 0, 0, 0.06),
        0 20px 48px rgba(0, 0, 0, 0.1);
}

.parallax-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.45) 100%);
}

.parallax-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 3.25rem 2rem;
    /* compact vertical rhythm */
    max-width: 580px;
    width: 100%;
}

.parallax-eyebrow {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.60);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50px;
    padding: 6px 18px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: rgba(255, 255, 255, 0.06);
}

.parallax-title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    /* refined — not oversized */
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin-bottom: 0.75rem;
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.45);
}

.parallax-subtitle {
    font-size: clamp(0.875rem, 1.6vw, 1rem);
    color: rgba(255, 255, 255, 0.70);
    font-weight: 400;
    letter-spacing: 0.01em;
    margin-bottom: 2rem;
    line-height: 1.65;
}

.parallax-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    border: 1.5px solid rgba(255, 255, 255, 0.65);
    border-radius: 50px;
    padding: 14px 36px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease,
        transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.parallax-cta:hover {
    background: #fff;
    color: #1d1d1f;
    border-color: #fff;
    transform: translateY(-2px);
}

.parallax-cta i {
    font-size: 0.85rem;
    transition: transform 0.25s ease;
}

.parallax-cta:hover i {
    transform: translateX(5px);
}

/* ============================================
   FEATURED COLLECTION (50/50 Asymmetric Grid)
   ============================================ */
.featured-editorial-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    min-height: auto;
    background: #f5f5f7;
    display: flex;
    align-items: flex-end;
    padding: 1.25rem 1rem;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    text-decoration: none;
    height: 100%;
}

.featured-editorial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}

.featured-editorial-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.featured-editorial-card:hover img {
    transform: scale(1.03);
}

.featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.15) 60%, transparent 100%);
    z-index: 1;
}

.featured-content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.featured-eyebrow {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.25rem;
    display: inline-block;
}

.featured-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.featured-subtitle {
    display: none;
}

.featured-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    padding-bottom: 1px;
    transition: border-color 0.2s ease;
}

.featured-link:hover {
    border-color: #fff;
}

.featured-link i {
    transition: transform 0.2s ease;
}

.featured-editorial-card:hover .featured-link i {
    transform: translateX(4px);
}



/* ============================================
   WHY CHOOSE US
   ============================================ */
.why-choose-us-card {
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 2.25rem 1.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    height: 100%;
}

.why-choose-us-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.05);
}

.why-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1d1f;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}

.why-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.why-desc {
    font-size: 0.82rem;
    color: #86868b;
    line-height: 1.5;
    margin: 0;
}



/* ============================================
   RESPONSIVE TWEAKS & MEDIA QUERIES
   ============================================ */
@media (max-width: 991px) {
    .hero-section {
        padding: 5rem 0 4.5rem;
        background-position: right center; /* Slide the model to the side */
        min-height: 380px;
    }

    .hero-subtitle {
        margin: 0 auto 2.25rem;
    }

    .category-card {
        border-radius: 16px;
    }

    .product-card {
        border-radius: 16px;
    }

    /* Disable fixed background attachment on mobile for smooth performance */
    .parallax-card {
        background-attachment: scroll;
        aspect-ratio: 21 / 8;
    }

    .parallax-section {
        padding: 3rem 0;
    }

    .featured-supporting-card {
        padding: 2.25rem;
    }
}

@media (max-width: 768px) {
    .floating-actions {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 767px) {
    .parallax-card {
        aspect-ratio: 16 / 7;
    }

    .parallax-section {
        padding: 3rem calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    }
}

@media (max-width: 576px) {
    .parallax-card {
        border-radius: 20px;
        aspect-ratio: 4 / 3;
    }

    .parallax-content {
        padding: 2.5rem 1.5rem;
        margin: 1rem;
    }

    .product-info {
        padding: 0.75rem 0.85rem 1rem;
    }

    .product-title {
        font-size: 0.875rem;
    }

    .product-price {
        font-size: 0.9rem;
    }

    .action-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }


}