/* =========================================
   1. THEME VARIABLES & RESET
   ========================================= */
:root {
    --primary-maroon: #5D001E;
    --secondary-gold: #C5A059;
    --gold-gradient: linear-gradient(45deg, #b88a44, #e6c785, #b88a44);
    --bg-cream: #FDFBF7;
    --text-dark: #2c2c2c;
    --white: #ffffff;
    --gray-light: #f1f2f6;
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.05);
    --shadow-hover: 0 10px 25px rgba(0,0,0,0.1);
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased; /* Smoother fonts on Mac/iOS */
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .font-cinzel {
    font-family: 'Cinzel', serif;
}

a {
    text-decoration: none;
    transition: 0.3s;
}

/* =========================================
   2. UTILITIES & BUTTONS
   ========================================= */
.text-maroon { color: var(--primary-maroon) !important; }
.text-gold { color: var(--secondary-gold) !important; }
.bg-maroon { background-color: var(--primary-maroon) !important; }
.bg-cream { background-color: var(--bg-cream) !important; }
.ls-2 { letter-spacing: 2px; }

/* Custom Gold Button */
.btn-gold {
    background: var(--gold-gradient);
    background-size: 200% auto;
    color: var(--primary-maroon);
    font-weight: 700;
    border: none;
    padding: 12px 35px;
    transition: 0.5s;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    border-radius: 4px;
}

.btn-gold:hover {
    background-position: right center;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.4);
}

.btn-gold:active {
    transform: scale(0.98); /* Click effect */
}

/* =========================================
   3. NAVBAR & HEADER
   ========================================= */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow-soft);
    padding: 10px 0;
    transition: all 0.3s ease;
    z-index: 1050 !important; /* Always on top */
}

/* --- LOGO SIZE CONTROL (STRICT) --- */

/* 1. Desktop Size */
.navbar-brand img {
    height: 50px !important;      /* Fixed height for Desktop */
    width: auto !important;       /* Maintain aspect ratio */
    max-width: 150px !important;  /* Prevent it from getting too wide */
    object-fit: contain;          /* Ensure the whole logo fits */
    display: block;
}

/* 2. Mobile Size (Smaller to fit next to search bar) */
@media (max-width: 991px) {
    .navbar-brand img {
        height: 35px !important;  /* Smaller height for Mobile */
        width: auto !important;
    }
    
    /* Ensure the link container doesn't stretch */
    .navbar-brand {
        flex-shrink: 0;
        margin-right: 5px;
    }
}
.nav-link {
    color: var(--text-dark);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin: 0 8px;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary-gold);
}

/* Underline Animation */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--secondary-gold);
    transition: width 0.3s;
}

.nav-link:hover::after { width: 100%; }

/* Desktop Search Bar Styling */
.search-form .input-group {
    border: 1px solid #ddd;
    border-radius: 50px; /* Pill shape */
    overflow: hidden;
    padding: 2px;
    transition: 0.3s;
}
.search-form .input-group:focus-within {
    border-color: var(--secondary-gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}
.search-form input { border: none; box-shadow: none !important; }
.search-form button { border: none; }

/* Dropdowns */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-hover);
    border-radius: 8px;
    margin-top: 10px;
    z-index: 9999 !important;
}

/* =========================================
   4. HERO CAROUSEL
   ========================================= */
.carousel-item {
    height: 90vh; 
    min-height: 600px;
    position: relative;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}

.hero-caption {
    position: absolute;
    top: 75%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #C5A059;
    width: 100%; 
    padding: 20px;
    z-index: 2; 
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 5rem); 
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
    color: #C5A059;
} 

.hero-subtitle {
    font-family: 'Lato', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    margin-bottom: 25px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: white;
}

/* =========================================
   5. CATEGORIES (Circular)
   ========================================= */
.category-section {
    padding: 60px 0;
    text-align: center;
}

.category-card {
    display: inline-block;
    text-align: center;
    cursor: pointer;
    margin-bottom: 15px;
}

.cat-img-wrapper {
    width: 160px; height: 160px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 2px solid var(--secondary-gold);
    padding: 4px;
    background: white;
    transition: transform 0.3s;
}

.cat-img-inner {
    width: 100%; height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

.cat-img-inner img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.category-card:hover .cat-img-wrapper { transform: scale(1.05); border-color: var(--primary-maroon); }
.category-card:hover .cat-img-inner img { transform: scale(1.1); }

.cat-title {
    font-weight: 700;
    color: var(--primary-maroon);
    font-size: 1rem;
    margin-top: 10px;
}

/* =========================================
   6. PRODUCT CARDS & GRID
   ========================================= */
.product-card {
    background: white;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    box-shadow: var(--shadow-soft);
}

.product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.badge-offer {
    position: absolute;
    top: 10px; left: 10px;
    background: var(--primary-maroon);
    color: var(--secondary-gold);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    border-radius: 2px;
}

.product-img-box {
    position: relative;
    overflow: hidden;
    padding-top: 133%; /* 3:4 Aspect Ratio (Portrait) */
    width: 100%;
    background-color: #f9f9f9;
}

.product-img-box img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover; /* Ensures image fills box */
    transition: transform 0.6s;
}

.product-card:hover .product-img-box img { transform: scale(1.08); }

/* Action Buttons */
.card-actions {
    position: absolute;
    bottom: -60px; 
    left: 0; width: 100%;
    background: rgba(255,255,255,0.95);
    padding: 10px;
    display: flex; justify-content: center; gap: 10px;
    transition: bottom 0.3s ease;
    backdrop-filter: blur(4px);
}

.product-card:hover .card-actions { bottom: 0; }

.action-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #ddd;
    color: var(--text-dark);
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
    cursor: pointer;
}
.action-btn:hover {
    background: var(--primary-maroon);
    color: white;
    border-color: var(--primary-maroon);
}

/* Pricing */
.price-section {
    display: flex; align-items: baseline; gap: 8px;
    margin-top: 5px;
}
.final-price { color: var(--primary-maroon); font-weight: 700; font-size: 1.1rem; }
.original-price { text-decoration: line-through; color: #999; font-size: 0.85rem; }

/* =========================================
   7. PAGE: SHOP & FILTERS
   ========================================= */
.page-header {
    background: linear-gradient(rgba(93, 0, 30, 0.85), rgba(93, 0, 30, 0.85)), url('../img/hero3.jpg');
    background-size: cover;
    background-position: center;
    padding: 50px 0;
    color: white;
    text-align: center;
    margin-bottom: 30px;
}

.filter-sidebar {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    z-index: 1; /* Keep below navbar */
}

/* =========================================
   8. FOOTER
   ========================================= */
footer {
    background-color: var(--primary-maroon);
    color: #e0e0e0;
    padding-top: 60px;
}
.footer-logo { color: var(--secondary-gold); font-size: 2rem; }
.social-icon {
    width: 40px; height: 40px;
    border: 1px solid var(--secondary-gold);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--secondary-gold);
    margin-right: 10px;
    transition: 0.3s;
}
.social-icon:hover { background: var(--secondary-gold); color: var(--primary-maroon); }

/* =========================================
   9. AUTH PAGES (Login/Register)
   ========================================= */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}
.auth-image-side {
    background: url('../img/hero2.jpg') no-repeat center center;
    background-size: cover;
    width: 50%;
    position: relative;
    display: none;
}
.auth-image-side::before {
    content: ''; position: absolute; inset: 0; background: rgba(93, 0, 30, 0.4); 
}
.auth-form-side {
    width: 100%;
    background: var(--bg-cream);
    display: flex; flex-direction: column; justify-content: center;
    padding: 40px;
}
.auth-box { max-width: 450px; margin: 0 auto; width: 100%; }

@media (min-width: 992px) {
    .auth-image-side { display: block; }
    .auth-form-side { width: 50%; }
}

/* =========================================
   10. MOBILE OPTIMIZATIONS (Consolidated)
   ========================================= */

/* --- TABLETS & MOBILE (Below 991px) --- */
@media (max-width: 991px) {
    
    /* 1. COMPACT HEADER (Logo + Search + Icons) */
    .navbar .container-fluid {
        display: flex; align-items: center; flex-wrap: nowrap; gap: 10px; padding: 10px 15px;
    }
    
    .navbar-brand { margin-right: 0; padding: 0; flex-shrink: 0; }
    .navbar-brand img { height: 35px !important; }

    /* The Inline Mobile Search Bar */
    .mobile-inline-search { flex-grow: 1; min-width: 0; }
    
    .mobile-inline-search .input-group {
        background: var(--gray-light);
        border-radius: 20px;
        padding: 0 10px;
        border: 1px solid transparent;
        transition: 0.2s;
    }
    .mobile-inline-search .input-group:focus-within {
        background: #fff;
        border-color: var(--secondary-gold);
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    .mobile-inline-search input {
        border: none; background: transparent; font-size: 0.85rem; padding: 8px 5px;
        box-shadow: none !important;
    }
    .mobile-inline-search button {
        border: none; background: transparent; padding: 0 5px; color: #666;
    }

    .mobile-icons { flex-shrink: 0; display: flex; align-items: center; gap: 15px; }
    .navbar-toggler { border: none; padding: 0; }

    /* Fix Mobile Menu Dropdown Background */
    .navbar-collapse {
        background: white;
        padding: 15px;
        border-radius: 0 0 15px 15px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        position: absolute;
        top: 100%; left: 0; right: 0;
        z-index: 1000;
        margin-top: 0;
        border-top: 1px solid #f0f0f0;
    }
}

/* --- MOBILE PHONES (Below 768px) --- */
@media (max-width: 768px) {

    /* 1. Hero Section */
    .carousel-item { height: 65vh; min-height: 400px; }
    .hero-caption { width: 95%; top: 75%; padding: 10px; }
    .hero-title { font-size: 2rem; margin-bottom: 10px; }
    .btn-gold { padding: 10px 25px; font-size: 0.85rem; }

    /* 2. Instagram-Style Horizontal Scroll */
    .mobile-scroll-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 15px;
        padding: 5px 5px 15px 5px;
        justify-content: flex-start !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .mobile-scroll-container::-webkit-scrollbar { display: none; }
    
    .mobile-scroll-container .col-md-2 { flex: 0 0 auto; width: 90px; } /* Fixed width item */
    
    .cat-img-wrapper {
        width: 75px; height: 75px;
        margin-bottom: 5px;
        border-width: 1.5px;
    }
    .cat-title { font-size: 0.75rem; }

    /* 3. Product Grid (2 Column) */
    .col-6 { padding-left: 6px; padding-right: 6px; } /* Tight Grid */
    
    .product-card {
        box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* Stronger shadow on mobile */
    }

    .product-img-box { padding-top: 125%; }

    /* Always show actions at bottom of card on mobile */
    .card-actions {
        bottom: 8px !important;
        padding: 4px;
        border-radius: 50px;
        width: auto;
        left: 50%;
        transform: translateX(-50%);
        gap: 12px;
        background: rgba(255,255,255,0.9);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    .action-btn { width: 32px; height: 32px; font-size: 0.8rem; }

    .card-body { padding: 10px 8px !important; }
    .product-title { font-size: 0.85rem; margin-bottom: 2px; }
    .final-price { font-size: 1rem; }

    /* 4. Spacing Cleanups */
    section { padding: 30px 0 !important; }
    .section-title { font-size: 1.4rem; margin-bottom: 15px; }
    
    /* Login Page Mobile */
    .auth-form-side { padding: 30px 20px; }
}

/* =========================================
   LOGO SIZE FIX (Add this to styles.css)
   ========================================= */

/* 1. Desktop Logo Size */
.navbar-brand img {
    height: 50px !important; /* Forces fixed height */
    width: auto !important;  /* Keeps the shape correct (doesn't stretch) */
    object-fit: contain;     /* Ensures the whole logo is visible */
    margin-right: 10px;      /* Space between logo and text */
}

/* 2. Mobile Logo Size (Smaller) */
@media (max-width: 991px) {
    .navbar-brand img {
        height: 35px !important; /* Smaller on mobile to fit search bar */
    }
}

/* =========================================
   15. PROFILE AVATAR & BADGES
   ========================================= */
.profile-avatar {
    width: 35px; 
    height: 35px;
    background-color: var(--primary-maroon); /* Maroon Background */
    color: var(--secondary-gold); /* Gold Letter */
    border: 1px solid var(--secondary-gold);
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-weight: 700;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    transition: 0.3s;
}

.profile-avatar:hover {
    background-color: var(--secondary-gold);
    color: var(--primary-maroon);
    transform: scale(1.1);
}

/* Role Badge (Admin/Staff) */
.role-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-left: 5px;
    vertical-align: middle;
}
.badge-admin { background-color: #5D001E; color: #FFD700; border: 1px solid #FFD700; }
.badge-staff { background-color: #2c3e50; color: white; }

/* Dropdown Header Info */
.user-info-header {
    padding: 10px 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 5px;
    background-color: #f9f9f9;
}

/* =========================================
   16. HOMEPAGE ENHANCEMENTS (Large Cards)
   ========================================= */

/* Category Banners */
.category-banner {
    position: relative;
    border-radius: 4px; /* Slight curve */
    overflow: hidden;
}

.category-banner img {
    transition: transform 0.6s ease;
    width: 100%;
}

/* Dark Gradient Overlay for readability */
.cat-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(93, 0, 30, 0.9) 0%, rgba(93, 0, 30, 0) 60%);
    opacity: 0.9;
    transition: opacity 0.3s;
}

.category-banner:hover img {
    transform: scale(1.05); /* Zoom effect */
}

.category-banner:hover .cat-overlay {
    opacity: 1; /* Darken slightly on hover */
}

/* Launch Timer Styling */
#launch {
    background: #4a0018; /* Slightly darker maroon for contrast */
}

/* Feature Icons */
.fa-2x {
    font-size: 2.5rem;
    margin-bottom: 15px;
}