/* ============================================
   BATIK KHULDY - MODERN RESPONSIVE DESIGN
   ============================================ */

:root {
    /* Primary Colors */
    --primary-color: #1E3A5F;
    --primary-dark: #0F2542;
    --primary-light: #2D4A7A;
    --primary-bg: #FAF8F3;
    
    /* Secondary Colors */
    --secondary-color: #E8E3D8;
    --secondary-light: #F5F2EB;
    --secondary-dark: #D4CFC4;
    
    /* Accent Colors */
    --accent-color: #D4AF37;
    --accent-light: #E8C547;
    --accent-dark: #B8941F;
    
    /* Neutral Colors */
    --white: #FFFFFF;
    --text-dark: #1E3A5F;
    --text-light: #6B7280;
    --border: #E8E3D8;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(30, 58, 95, 0.08);
    --shadow-md: 0 4px 16px rgba(30, 58, 95, 0.12);
    --shadow-lg: 0 8px 32px rgba(30, 58, 95, 0.16);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 80px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main content wrapper - create a flex spacer before footer */
body::after {
    content: '';
    flex: 1 0 auto;
    order: 999;
}

/* Ensure footer is always at bottom */
.footer-simple {
    order: 1000;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h5 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h6 { font-size: clamp(1rem, 1.5vw, 1.25rem); }

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition-base);
}

a:hover {
    color: var(--accent-color);
}

/* ============================================
   NAVBAR - FIXED & RESPONSIVE
   ============================================ */

.navbar,
nav.navbar,
.navbar.navbar-expand-lg,
.navbar.navbar-light,
#main-navbar,
nav#main-navbar,
nav#main-navbar.navbar,
nav#main-navbar.navbar-expand-lg,
nav#main-navbar.navbar-light,
nav#main-navbar.fixed-top {
    background: rgba(250, 248, 243, 0.98) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1030 !important;
    transition: var(--transition-base);
    margin: 0 !important;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
}

.navbar .container {
    max-width: 1400px;
}

.navbar-brand {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.navbar-logo {
    height: 60px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    transition: var(--transition-base);
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(30, 58, 95, 0.08);
}

/* ============================================
   HERO SECTION - MODERN
   ============================================ */

.hero-section-modern {
    position: relative;
    width: 100%;
    margin-top: -80px;
    padding-top: 80px;
    overflow: hidden;
}

.hero-section-modern .carousel {
    height: 600px;
}

.hero-slide-content {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 10s ease;
}

.hero-slide-content:hover .hero-image {
    transform: scale(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.7) 0%, rgba(30, 58, 95, 0.4) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-text {
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: var(--spacing-md);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    color: var(--white) !important;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-bottom: var(--spacing-lg);
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-hero {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent-color);
    color: var(--white);
    font-weight: 600;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
    transition: var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-hero:hover {
    background: var(--accent-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(212, 175, 55, 0.5);
    color: var(--white);
}

.hero-section-modern .carousel-control-prev,
.hero-section-modern .carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: var(--transition-base);
}

.hero-section-modern .carousel-control-prev:hover,
.hero-section-modern .carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.4);
    opacity: 1;
}

.hero-section-modern .carousel-indicators {
    bottom: 30px;
}

.hero-section-modern .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    margin: 0 5px;
}

.hero-section-modern .carousel-indicators button.active {
    background: var(--white);
    border-color: var(--white);
}

/* ============================================
   FEATURES SECTION - MODERN
   ============================================ */

.features-section-modern {
    padding: var(--spacing-xl) 0;
    background: var(--primary-bg);
}

.feature-card-modern {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}


.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    transition: var(--transition-base);
}

.feature-card-modern:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

.feature-card-modern h5 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.feature-card-modern p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* ============================================
   CATEGORIES SECTION - MODERN
   ============================================ */

.categories-section-modern {
    padding: var(--spacing-xl) 0;
    background: var(--white);
}

.categories-section-modern .position-relative {
    padding: 0 3rem;
}

.categories-section-modern .carousel {
    position: relative;
    width: 100%;
}

.categories-section-modern .carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Desktop: Show carousel items properly */
@media (min-width: 768px) {
    .categories-section-modern .carousel-inner {
        overflow: visible;
    }
}

/* Carousel Indicators for Categories */
.categories-section-modern .carousel-indicators {
    bottom: -50px;
    margin-bottom: 0;
}

.categories-section-modern .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(30, 58, 95, 0.3);
    border: 2px solid rgba(30, 58, 95, 0.5);
    margin: 0 5px;
    opacity: 1;
    transition: all 0.3s ease;
}

.categories-section-modern .carousel-indicators button.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.2);
}

.categories-section-modern .carousel-indicators button:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
}

/* Ensure Bootstrap carousel works - Don't override Bootstrap's default behavior */

/* Desktop: Category slider row - 4 categories per slide */
@media (min-width: 768px) {
    .categories-section-modern .category-slider-row {
        display: flex;
        flex-wrap: wrap;
        margin-left: -0.75rem;
        margin-right: -0.75rem;
    }
    
    .categories-section-modern .category-slider-row .col-lg-3 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        flex: 0 0 25%;
        max-width: 25%;
    }
    
    .categories-section-modern .category-slider-row .col-md-4 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .categories-section-modern .category-slide-item {
        margin-bottom: 0;
    }
}

.category-carousel-prev,
.category-carousel-next {
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.9;
    transition: var(--transition-base);
    top: 50%;
    transform: translateY(-50%);
}

.category-carousel-prev {
    left: -20px;
}

.category-carousel-next {
    right: -20px;
}

.category-carousel-prev:hover,
.category-carousel-next:hover {
    background: var(--accent-color);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.category-carousel-prev .carousel-control-prev-icon,
.category-carousel-next .carousel-control-next-icon {
    filter: brightness(0) invert(1);
    width: 20px;
    height: 20px;
}

.section-header-modern {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title-modern {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.category-card-modern {
    display: block;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    height: 100%;
}

.category-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.category-image-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.category-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card-modern:hover .category-image-wrapper img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
    display: flex;
    align-items: flex-end;
    padding: var(--spacing-md);
}

.category-count {
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    background: rgba(212, 175, 55, 0.9);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
}

.category-info {
    padding: var(--spacing-md);
}

.category-info h4 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0;
}

/* Desktop: Hide mobile category section and show desktop category */
@media (min-width: 768px) {
    .categories-section-modern {
        display: none !important;
    }
    
    /* Desktop: Show category section below hero */
    .categories-section-desktop {
        display: block;
        padding: var(--spacing-xl) 0;
        background: var(--primary-bg); /* Match theme background */
    }
    
    .categories-grid-desktop {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* MD: 2 columns */
        gap: var(--spacing-md); /* Add gap between cards */
    }
    
    .category-card-desktop {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        background: var(--white);
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border: 1px solid var(--border);
        position: relative;
        text-decoration: none;
        color: inherit;
    }
    
    .category-card-desktop:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-color);
    }
    
    .category-image-wrapper-desktop {
        flex-shrink: 0;
        height: 300px; /* Same as product card image height */
        position: relative;
        overflow: hidden;
        background: var(--secondary-light);
    }
    
    .category-image-wrapper-desktop img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .category-card-desktop:hover .category-image-wrapper-desktop img {
        transform: scale(1.1);
    }
    
    .category-info-desktop {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: var(--spacing-md);
        background: var(--white);
        position: relative;
        z-index: 2;
        min-height: auto;
    }
    
    .category-info-desktop h4 {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-dark);
        margin: 0;
        text-align: center;
        transition: color 0.3s ease;
        letter-spacing: 0.5px;
    }
    
    .category-card-desktop:hover .category-info-desktop h4 {
        color: var(--primary-color);
    }
}

/* LG (992px+): 3 columns */
@media (min-width: 992px) {
    .categories-grid-desktop {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* XL (1200px+): 4 columns */
@media (min-width: 1200px) {
    .categories-grid-desktop {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile: Hide desktop category section */
@media (max-width: 767px) {
    .categories-section-desktop {
        display: none !important;
    }
}

/* ============================================
   PRODUCTS SECTION - MODERN
   ============================================ */

.products-section-modern {
    padding: var(--spacing-xl) 0;
}

.bg-light-section {
    background: var(--primary-bg);
}

.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition-base);
}

.btn-view-all:hover {
    background: var(--accent-color);
    color: var(--white);
    transform: translateX(5px);
}

/* ============================================
   PRODUCT CARD - MODERN
   ============================================ */

.product-card {
    margin-bottom: var(--spacing-md);
}

.product-card .card {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card .card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--secondary-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-base);
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-card .card-body {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
    min-height: 3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .card-title:hover {
    color: var(--primary-color);
}

.product-card .text-muted {
    font-size: 0.85rem;
    margin-bottom: var(--spacing-sm);
}

.product-card .fw-bold.text-primary {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.product-card .btn {
    margin-top: auto;
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition-base);
}

.product-card .btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* ============================================
   BUTTONS - MODERN
   ============================================ */

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ============================================
   FOOTER - SIMPLE
   ============================================ */

.footer-simple {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--white);
    padding: var(--spacing-md) 0 var(--spacing-sm);
    margin-top: auto; /* Push footer to bottom */
    flex-shrink: 0; /* Don't shrink footer */
    width: 100%;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    width: 100%;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo {
    height: 35px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.footer-store-name {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-xs);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    font-size: 0.85rem;
    transition: var(--transition-base);
    padding: 0.25rem 0.5rem;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-social-shops {
    display: flex;
    gap: var(--spacing-xs);
    justify-content: center;
}

.footer-social-shops a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: var(--transition-base);
    font-size: 1rem;
}

.footer-social-shops a:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    color: var(--white);
}

.footer-copyright {
    text-align: center;
    padding-top: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.footer-copyright p {
    margin: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
}

/* Desktop (992px - 1399px) */
@media (max-width: 1399px) {
    .hero-section-modern .carousel {
        height: 550px;
    }
    
    .hero-slide-content {
        height: 550px;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    body {
        padding-top: 70px;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-logo {
        height: 50px;
        max-width: 150px;
    }
    
    .hero-section-modern .carousel {
        height: 450px;
    }
    
    .hero-slide-content {
        height: 450px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .category-image-wrapper {
        height: 250px;
    }
    
    .categories-section-modern .position-relative {
        padding: 0 2rem;
    }
    
    .category-carousel-prev {
        left: -10px;
    }
    
    .category-carousel-next {
        right: -10px;
    }
    
    .category-carousel-prev,
    .category-carousel-next {
        width: 40px;
        height: 40px;
    }
    
    .product-image {
        height: 250px;
    }
    
    .section-header-modern {
        flex-direction: column;
        text-align: center;
    }
}

/* Mobile (576px - 767px) */
/* Mobile: Keep original category card style */
@media (max-width: 767px) {
    .categories-section-modern {
        background: linear-gradient(to bottom, var(--primary-bg) 0%, rgba(250, 248, 243, 0.5) 100%);
    }
    
    .categories-section-modern .section-title-modern {
        color: var(--text-dark);
    }
    
    .categories-section-modern .section-subtitle {
        color: var(--text-light);
    }
    
    .categories-section-modern .category-card-modern {
        background: var(--white);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm);
    }
    
    .categories-section-modern .category-overlay {
        display: flex !important;
    }
    
    .categories-section-modern .category-count {
        display: block !important;
    }
    
    .categories-section-modern .category-info {
        background: var(--white);
        padding: var(--spacing-md);
    }
    
    .categories-section-modern .category-info h4 {
        color: var(--text-dark);
        font-size: 1.5rem;
        text-transform: none;
    }
}

@media (max-width: 767px) {
    body {
        padding-top: 60px;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-logo {
        height: 45px;
        max-width: 120px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem !important;
        font-size: 0.9rem;
    }
    
    .hero-section-modern .carousel {
        height: 400px;
    }
    
    .hero-slide-content {
        height: 400px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn-hero {
        padding: 0.75rem 2rem;
        font-size: 0.9rem;
    }
    
    .features-section-modern,
    .categories-section-modern,
    .products-section-modern {
        padding: var(--spacing-lg) 0;
    }
    
    .feature-card-modern {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
    
    .feature-icon i {
        font-size: 2rem;
    }
    
    .category-image-wrapper {
        height: 200px;
    }
    
    .categories-section-modern .position-relative {
        padding: 0 1.5rem;
    }
    
    /* Mobile: Force 1 category per slide - Show only first category in each slide */
    .categories-section-modern .category-slider-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        margin: 0 !important;
    }
    
    .categories-section-modern .category-slide-item {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    /* Hide additional categories in same slide on mobile */
    .categories-section-modern .category-slide-item:not(:first-child) {
        display: none !important;
    }
    
    /* Ensure carousel works properly on mobile */
    .categories-section-modern .carousel-inner {
        overflow: hidden;
    }
    
    .category-carousel-prev {
        left: -5px;
    }
    
    .category-carousel-next {
        right: -5px;
    }
    
    .category-carousel-prev,
    .category-carousel-next {
        width: 35px;
        height: 35px;
    }
    
    .product-image {
        height: 220px;
    }
    
    /* Mobile: Ensure products are 2 columns */
    .products-section-modern .row .col-sm-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .product-card .card-title {
        font-size: 1rem;
        min-height: 2.5rem;
    }
    
    .section-title-modern {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
}

/* Small Mobile (max-width: 575px) */
@media (max-width: 575px) {
    body {
        padding-top: 55px;
    }
    
    .navbar-logo {
        height: 40px;
        max-width: 100px;
    }
    
    .hero-section-modern .carousel {
        height: 350px;
    }
    
    .hero-slide-content {
        height: 350px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .btn-hero {
        padding: 0.6rem 1.5rem;
        font-size: 0.85rem;
    }
    
    .hero-section-modern .carousel-control-prev,
    .hero-section-modern .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    .feature-card-modern {
        padding: var(--spacing-sm);
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
    }
    
    .feature-icon i {
        font-size: 1.5rem;
    }
    
    .category-image-wrapper {
        height: 180px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-card .card-body {
        padding: var(--spacing-sm);
    }
    
    .product-card .card-title {
        font-size: 0.95rem;
    }
    
    .product-card .fw-bold.text-primary {
        font-size: 1.25rem;
    }
    
    .section-title-modern {
        font-size: 1.5rem;
    }
    
    .footer-simple {
        padding: var(--spacing-sm) 0 0.5rem;
        margin-top: var(--spacing-md);
    }
    
    .footer-content {
        gap: var(--spacing-xs);
        padding-bottom: var(--spacing-xs);
    }
    
    .footer-main {
        gap: var(--spacing-xs);
    }
    
    .footer-logo {
        height: 30px;
    }
    
    .footer-store-name {
        font-size: 1rem;
    }
    
    .footer-links {
        gap: 0.25rem;
    }
    
    .footer-links a {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
    
    .footer-social-shops {
        gap: 0.5rem;
    }
    
    .footer-social-shops a {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .footer-copyright {
        padding-top: var(--spacing-xs);
        font-size: 0.75rem;
    }
}

/* ============================================
   UTILITIES
   ============================================ */

.text-primary {
    color: var(--primary-color) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}

.bg-primary {
    background: var(--primary-color) !important;
}

.bg-light {
    background: var(--primary-bg) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   CART BADGE
   ============================================ */

#cart-count {
    position: absolute !important;
    top: -12px !important;
    right: -12px !important;
    min-width: 22px !important;
    height: 22px !important;
    padding: 0.3rem 0.6rem !important;
    font-size: 0.7rem !important;
    line-height: 1.2 !important;
    z-index: 10000 !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.5) !important;
    border: 2.5px solid white !important;
    font-weight: 700 !important;
    background: #EF4444 !important;
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Related Products - Mobile 2 columns */
@media (max-width: 767px) {
    .related-products .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .related-products .col-6 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .related-products .product-card {
        margin-bottom: 1rem;
    }
}

/* ============================================
   PRODUCT DETAIL - SIZE & VARIANT SELECTION
   ============================================ */

/* Size Selection Buttons */
.size-option {
    position: relative;
    cursor: pointer;
}

.size-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    min-width: 60px;
    text-align: center;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.size-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30, 58, 95, 0.1), transparent);
    transition: left 0.5s ease;
}

.size-btn:hover::before {
    left: 100%;
}

.size-btn:hover {
    border-color: var(--primary-color);
    background: rgba(30, 58, 95, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.15);
}

.size-option input[type="radio"]:checked + .size-btn {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.3);
    transform: translateY(-2px) scale(1.05);
}

.size-option input[type="radio"]:checked + .size-btn::before {
    display: none;
}

.size-stock-info {
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Color/Variant Selection Buttons */
.color-option {
    position: relative;
    cursor: pointer;
}

.color-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    min-width: 80px;
    text-align: center;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.color-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: left 0.5s ease;
}

.color-btn:hover::before {
    left: 100%;
}

.color-btn:hover {
    border-color: var(--accent-color);
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.color-option input[type="radio"]:checked + .color-btn {
    background: var(--accent-color);
    color: var(--white);
    border-color: var(--accent-color);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px) scale(1.05);
}

.color-option input[type="radio"]:checked + .color-btn::before {
    display: none;
}

.variant-stock-info {
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Disabled state for out of stock */
.size-option input[type="radio"]:disabled + .size-btn,
.color-option input[type="radio"]:disabled + .color-btn {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--secondary-light);
    border-color: var(--border);
    position: relative;
}

.size-option input[type="radio"]:disabled + .size-btn::after,
.color-option input[type="radio"]:disabled + .color-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--text-light);
    transform: translateY(-50%) rotate(-5deg);
}

.size-option input[type="radio"]:disabled + .size-btn:hover,
.color-option input[type="radio"]:disabled + .color-btn:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
}

.size-option input[type="radio"]:disabled + .size-btn::before,
.color-option input[type="radio"]:disabled + .color-btn::before {
    display: none;
}

/* Selected Variant Info Card */
#selected-variant-info {
    animation: slideDown 0.3s ease-out;
}

#selected-variant-info .alert {
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow-sm);
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.05) 0%, rgba(212, 175, 55, 0.05) 100%);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Label Styling */
.product-detail-section label.form-label {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-detail-section label.form-label .text-danger {
    color: var(--accent-color) !important;
    font-size: 1.2rem;
}

/* Selection Container */
.product-detail-section .d-flex.flex-wrap.gap-2 {
    gap: 0.75rem !important;
}

/* Custom Modal Styles */
#customConfirmModal .modal-content,
#customAlertModal .modal-content {
    border-radius: 1rem;
    overflow: hidden;
}

#customConfirmModal .modal-icon,
#customAlertModal .modal-icon {
    animation: modalIconBounce 0.5s ease-out;
}

@keyframes modalIconBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#customConfirmModal .modal-body,
#customAlertModal .modal-body {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#customConfirmModal .btn,
#customAlertModal .btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 120px;
}

#customConfirmModal .btn:hover,
#customAlertModal .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#customConfirmModal .btn-close,
#customAlertModal .btn-close {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

#customConfirmModal .btn-close:hover,
#customAlertModal .btn-close:hover {
    opacity: 1;
}

/* Modal backdrop animation */
.modal-backdrop {
    animation: backdropFadeIn 0.3s ease-out;
}

@keyframes backdropFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.5;
    }
}
