@import 'site-variables.css';

/* 
  Global Layout & Reset 
*/
body {
    font-family: var(--font-family-base);
    color: var(--color-text-primary);
    background-color: var(--color-background);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex: 1;
}

/* 
  Typography Utilities & Overrides
*/
h1, h2, h3, h4, h5, h6, .navbar-brand, .heading-font {
    font-family: var(--font-family-heading);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--color-primary);
}

.navbar-brand {
    padding: 0;
}

.navbar-brand img {
    max-height: 36px;
    width: auto;
}

.fw-medium {
    font-weight: 500 !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

.text-muted {
    color: var(--color-text-muted) !important;
}

.text-subtle {
    color: var(--color-text-subtle) !important;
}

.text-accent {
    color: var(--color-accent) !important;
}

/* Font Sizing & Spacing Utilities (Replacing Inline Styles) */
.text-sm {
    font-size: 0.875rem !important;
}

.text-xs {
    font-size: 0.75rem !important;
}

.text-xxs {
    font-size: 0.65rem !important;
}

.text-price {
    font-size: 0.8rem !important;
}

.tracking-wide {
    letter-spacing: 0.05em !important;
}

.lh-15 {
    line-height: 1.5 !important;
}

/* 
  Background & Surface Utilities 
*/
.bg-background {
    background-color: var(--color-background) !important;
}

.bg-surface {
    background-color: var(--color-surface) !important;
}

.bg-surface-alt {
    background-color: var(--color-surface-alt) !important;
}

.bg-primary {
    background-color: var(--color-primary) !important;
    color: #fff;
}

.bg-accent {
    background-color: var(--color-accent) !important;
    color: #fff;
}

/* Fractional Spacing & Utility Helpers */
.p-0-5 { padding: 0.125rem !important; }
.py-0-5 { padding-top: 0.125rem !important; padding-bottom: 0.125rem !important; }
.px-0-5 { padding-left: 0.125rem !important; padding-right: 0.125rem !important; }

.p-1-5 { padding: 0.375rem !important; }
.py-1-5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }
.px-1-5 { padding-left: 0.375rem !important; padding-right: 0.375rem !important; }

.me-0-5 { margin-right: 0.125rem !important; }
.ms-0-5 { margin-left: 0.125rem !important; }
.mx-0-5 { margin-left: 0.125rem !important; margin-right: 0.125rem !important; }

.me-1-5 { margin-right: 0.375rem !important; }
.ms-1-5 { margin-left: 0.375rem !important; }
.mx-1-5 { margin-left: 0.375rem !important; margin-right: 0.375rem !important; }

.gap-0-5 { gap: 0.125rem !important; }
.gap-1-5 { gap: 0.375rem !important; }

.shadow-xs { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important; }

/* Layout Utilities */
.hero-section {
    min-height: 75vh;
}

.hero-slide {
    min-height: 600px;
    height: 75vh;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 420px;
    }

    .hero-slide {
        min-height: auto;
        /*min-height: 420px;
        height: auto;*/
    }
}

/* Carousel & Scroll Utilities */
.carousel-nav-btn {
    width: 38px;
    height: 38px;
}

.scroll-snap-x {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.product-carousel-item {
    width: 280px;
    scroll-snap-align: start;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.footer-text-max {
    max-width: 300px;
}

.ratio-3x4 {
    aspect-ratio: 3 / 4;
}

.ratio-4x5 {
    aspect-ratio: 4 / 5;
}

.ratio-16x9 {
    aspect-ratio: 16 / 9;
}

.object-fit-cover {
    object-fit: cover;
}

/* Line Clamp Utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Carousel Circular Dots Indicator */
.carousel-indicators-dots button {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    margin: 0 5px !important;
    border: none !important;
    background-color: #ffffff !important;
    opacity: 0.5 !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
}

.carousel-indicators-dots button.active {
    opacity: 1 !important;
    background-color: var(--color-accent, #c5a982) !important;
}

/* Product Gallery Carousel Controls (PDP) */
.product-carousel-control {
    width: 44px !important;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#productGalleryCarousel:hover .product-carousel-control {
    opacity: 0.9;
}

.product-carousel-control:hover {
    opacity: 1 !important;
}

.carousel-control-icon-wrapper {
    width: 32px !important;
    height: 32px !important;
    background-color: rgba(255, 255, 255, 0.92) !important;
    color: var(--color-primary, #212529) !important;
    transition: background-color 0.2s ease, transform 0.15s ease !important;
}

.carousel-control-icon-wrapper:hover {
    background-color: rgba(255, 255, 255, 0.92) !important;
    transform: none !important;
}

.carousel-control-icon-wrapper i {
    font-size: 0.75rem !important;
    line-height: 1 !important;
}

@media (max-width: 768px) {
    .product-carousel-control {
        opacity: 0.75;
    }
}

/* Image Hover Zoom Utility */
.hover-zoom-container {
    overflow: hidden;
}

.hover-zoom-container img {
    transition: transform 0.7s ease;
}

.hover-zoom-container:hover img {
    transform: scale(1.05);
}

/* Video Overlay Play Button */
.video-play-btn {
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.video-play-btn:hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, 0.7) !important;
}

.video-play-btn-inner {
    width: 56px;
    height: 56px;
    backdrop-filter: blur(4px);
    cursor: pointer;
}


/* Custom Nav styling */
.nav-link {
    font-weight: 500;
    color: var(--color-text-primary);
}

.nav-link:hover {
    color: var(--color-accent);
}

/* Product Detail & Cart Custom Styles */
.min-vh-80 {
    min-height: 80vh;
}

.w-auto-inline {
    width: auto !important;
}

.w-100px {
    width: 100px;
}

.max-w-100px {
    max-width: 100px;
}

.h-56px {
    height: 56px;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.cursor-pointer {
    cursor: pointer;
}

.cursor-zoom-in {
    cursor: zoom-in;
}

.transform-origin-center {
    transform-origin: center;
}





/* =============================================
   Responsive Fixes
   ============================================= */

/* Prevent any child element from breaking out of viewport */
/* Product Detail: action row (Add to Cart + Buy Now) */
.product-action-row {
    min-height: 48px;
}

.product-action-row .btn-action-add-to-cart,
.product-action-row .btn-action-buy-now {
    flex: 1 1 0% !important;
    width: 0 !important;
    white-space: nowrap;
}

/* Product Detail: Mobile Sticky Bottom Action Bar */
.mobile-pdp-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

.pdp-sticky-btn {
    height: 46px;
    flex: 1 1 0% !important;
    width: 0 !important;
    white-space: nowrap;
}

.pdp-sticky-icon-btn {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

@media (max-width: 767.98px) {
    .pdp-mobile-padding-bottom {
        padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* Cart: ensure column header widths match the data columns */
.cart-col-product {
    flex: 0 0 50%;
    max-width: 50%;
}

.cart-col-price {
    flex: 0 0 16.66%;
    max-width: 16.66%;
}

.cart-col-qty {
    flex: 0 0 16.66%;
    max-width: 16.66%;
}

.cart-col-total {
    flex: 0 0 16.66%;
    max-width: 16.66%;
}

/* =============================================
   Site Header (sticky, full-bleed)
   ============================================= */
.site-header {
    /* Ensure header always sits above sticky order summary and any overlays */
    z-index: 1030;
    background: var(--bs-white, #fff);
}

/* =============================================
   Sticky Order Summary (Cart & Checkout)
   Offset top = header height (~100px on desktop, ~80px on mobile)
   ============================================= */
.cart-summary-sticky {
    /* Sits below header z-index so it scrolls under when needed */
    position: sticky;
    top: 100px;
    z-index: 100;
}

/* On mobile the aside stacks below the form — disable sticky so it
   flows naturally with the page and doesn't obscure content */
@media (max-width: 991.98px) {
    .cart-summary-sticky {
        position: static;
        top: auto;
    }
}

/* =============================================
   Sticky Product Filter Sidebar
   Keeps filter visible while scrolling product catalog
   with independent vertical scrolling if filters exceed viewport.
   ============================================= */
.filter-sidebar-sticky {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 90;
}

/* Custom subtle scrollbar for the filter sidebar */
.filter-sidebar-sticky::-webkit-scrollbar {
    width: 4px;
}
.filter-sidebar-sticky::-webkit-scrollbar-track {
    background: transparent;
}
.filter-sidebar-sticky::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}
.filter-sidebar-sticky::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* =============================================
   Overflow / Horizontal Scroll Prevention
   Use overflow-x: clip on body (NOT hidden) — "hidden" creates a new scroll
   container which silently breaks position: sticky on ALL descendants.
   "clip" prevents the scrollbar without creating a scroll container.
   ============================================= */


/* Flex children that contain text must be able to shrink below their content size */
.min-w-0 {
    min-width: 0;
}








/* ========================================================================= */
/* UTILITY CLASSES (Replaced Inline Styles) */
/* ========================================================================= */
.min-vh-custom {
    min-height: calc(100vh - 150px);
}

.max-w-500 {
    max-width: 500px;
}

.max-w-550 {
    max-width: 550px;
}

.max-w-600 {
    max-width: 600px;
}

.h-200 {
    height: 200px;
}

.h-240 {
    height: 240px;
}

.h-500 {
    height: 500px;
}

.min-h-200 {
    min-height: 200px;
}

.min-h-250 {
    min-height: 250px;
}

.sticky-top-100 {
    top: 100px;
}

.avatar-50 {
    width: 50px;
    height: 50px;
}

.product-thumb-sm {
    width: 50px;
    height: 60px;
}

.fs-4rem {
    font-size: 4rem;
}

.bg-gradient-dark-bottom {
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.offcanvas-search {
    height: auto;
    max-height: 100vh;
}

/* Background Images */
.bg-image-maroon {
    background-image: url('/assets/images/maroon_saree.jpg');
    background-size: cover;
    background-position: center;
}

.bg-image-peach {
    background-image: url('/assets/images/peach_saree.jpg');
    background-size: cover;
    background-position: center;
}

.bg-image-product4 {
    background-image: url('/assets/images/product-4.jpg');
    background-size: cover;
    background-position: center;
}

.hero-home {
    background: url('/assets/images/green_saree.jpg') center/cover no-repeat;
}

.hero-about {
    background: url('/assets/images/product-4.jpg') center/cover no-repeat;
    min-height: 400px;
}

.bg-image-green {
    background-image: url('/assets/images/green_saree.jpg');
    background-size: cover;
    background-position: center;
}


/* ========================================================================= */
/* ACCOUNT DASHBOARD */
/* ========================================================================= */
#account-tabs .nav-link {
    color: var(--color-text-muted);
    border-left: 3px solid transparent;
    border-radius: 0;
    transition: all 0.2s ease;
}

#account-tabs .nav-link:hover {
    color: var(--color-primary);
    background-color: var(--color-surface);
}

#account-tabs .nav-link.active {
    color: var(--color-primary);
    background-color: var(--color-surface);
    border-left-color: var(--color-primary);
    font-weight: 700 !important;
}

/* ========================================================================= */
/* MYNTRA-INSPIRED CLEAN NAVIGATION MENU WITH THEME HOVER BORDER */
/* ========================================================================= */
@media (min-width: 992px) {
    /* Navbar height and flex alignment */
    .site-header .navbar {
        height: 70px;
        position: relative;
    }

    .site-header .navbar > .container,
    .site-header #mainNav,
    .site-header #mainNav .navbar-nav {
        height: 100%;
        display: flex;
        align-items: center;
    }

    /* Top-level menu item container fills full navbar height */
    .site-header .navbar-nav .nav-item {
        height: 100%;
        display: flex;
        align-items: center;
        position: relative;
    }

    /* Top-level link with 2.5px transparent bottom border */
    .site-header .navbar-nav .nav-link {
        height: 100%;
        display: inline-flex;
        align-items: center;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        font-weight: 500;
        letter-spacing: 0.04em;
        color: var(--color-text-primary);
        border-bottom: 2.5px solid transparent;
        transition: color 0.15s ease, border-color 0.15s ease;
        text-decoration: none;
    }

    /* Hover and Active State: Theme-Color bottom border */
    .site-header .navbar-nav .nav-item:hover > .nav-link,
    .site-header .navbar-nav .nav-link.active,
    .site-header .navbar-nav .nav-item.active > .nav-link {
        color: var(--color-primary);
        border-bottom-color: var(--color-primary);
    }

    /* Rotate chevron slightly on hover */
    .site-header .navbar-nav .nav-item:hover > .nav-link .bi-chevron-down {
        transform: rotate(180deg);
        transition: transform 0.2s ease;
    }

    /* Simple, Compact White Dropdown Directly Below Header */
    .site-header .navbar-nav .nav-item.dropdown .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 240px;
        background-color: var(--color-background);
        border: 1px solid var(--color-border);
        border-top: none;
        border-radius: 0 0 var(--radius-sm, 4px) var(--radius-sm, 4px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
        padding: 0.5rem 0;
        margin: 0;
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(4px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
        pointer-events: none;
        z-index: 1050;
    }

    /* Smooth Fade-in on Hover */
    .site-header .navbar-nav .nav-item.dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Child Links: Clean, vertically stacked links with comfortable spacing */
    .site-header .dropdown-menu .dropdown-item {
        padding: 0.5rem 1.25rem;
        font-size: 0.85rem;
        font-weight: 500;
        color: var(--color-text-primary);
        background: transparent;
        transition: color 0.15s ease, background-color 0.15s ease;
    }

    .site-header .dropdown-menu .dropdown-item:hover,
    .site-header .dropdown-menu .dropdown-item.active {
        color: var(--color-primary);
        background-color: var(--color-surface);
        font-weight: 600;
    }
}