/* =============================================
   BulkyBook Premium Home Page - Modern Redesign
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Cinzel:wght@400;600;700&display=swap');

:root {
    --primary-gold: #C9963F;
    --light-gold: #E8B86D;
    --dark-gold: #A67938;
    --bronze: #8B6F47;
    --cream: #FDF8F0;
    --metal-black: #1A1A2E;
    --forest-green: #1B4332;
    --forest-dark: #0d2b1e;
    --forest-mid: #2D6A4F;
    --surface: #FFFFFF;
    --surface2: #F8F9FA;
    --text-primary: #1A1A2E;
    --text-secondary: #6C757D;
    --text-muted: #ADB5BD;
    --border-light: rgba(201, 150, 63, 0.2);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-gold: 0 8px 32px rgba(201, 150, 63, 0.25);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #F4F6F9;
    color: var(--text-primary);
}

/* =============================================
   STICKY HEADER
   ============================================= */
header {
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
}

/* Mobile nav collapse background and scrollable area */
@media (max-width: 991px) {

    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        background: #0d2316 !important;
        padding: 0 16px 12px;
        border-top: 1px solid rgba(201, 150, 63, 0.2);
        margin-left: -16px;
        margin-right: -16px;
        max-height: calc(100vh - 140px);
        /* Leave room for header/search */
        overflow-y: auto;
    }

    /* Custom scrollbar for mobile menu */
    .navbar-collapse::-webkit-scrollbar {
        width: 4px;
    }

    .navbar-collapse::-webkit-scrollbar-thumb {
        background: var(--primary-gold);
        border-radius: 4px;
    }
}

/* =============================================
   HERO BANNER SECTION
   ============================================= */
.hero-banner {
    position: relative;
    background: linear-gradient(150deg, #071a0f 0%, #1B4332 40%, #0d2b1e 75%, #111c15 100%);
    padding: 70px 0 60px;
    overflow: hidden;
    margin-bottom: 0;
    margin-left: -15px;
    margin-right: -15px;
    margin-top: -17px;
    border-bottom: 2px solid rgba(201, 150, 63, 0.3);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -10%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(201, 150, 63, 0.18) 0%, transparent 65%);
    pointer-events: none;
}

.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -5%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(45, 106, 79, 0.35) 0%, transparent 65%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(201, 150, 63, 0.15);
    border: 1px solid rgba(201, 150, 63, 0.4);
    color: var(--light-gold);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

.hero-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 16px;
    line-height: 1.2;
    letter-spacing: 1px;
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary-gold), var(--light-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 36px;
    font-weight: 400;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Search */
.hero-search-wrapper {
    max-width: 580px;
    margin: 0 auto 40px;
    position: relative;
    z-index: 3;
}

.hero-search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(16px);
    border: 1.5px solid rgba(201, 150, 63, 0.5);
    border-radius: 50px;
    padding: 6px 6px 6px 24px;
    transition: var(--transition);
}

.hero-search-box:focus-within {
    border-color: var(--primary-gold);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px rgba(201, 150, 63, 0.15);
}

.hero-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 400;
    padding: 8px 0;
    font-family: 'Inter', sans-serif;
}

.hero-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.hero-search-btn {
    background: linear-gradient(135deg, var(--primary-gold), var(--dark-gold));
    color: white;
    border: none;
    border-radius: 40px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.hero-search-btn:hover {
    background: linear-gradient(135deg, var(--dark-gold), var(--primary-gold));
    box-shadow: 0 4px 20px rgba(201, 150, 63, 0.5);
    transform: scale(1.03);
    color: white;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
    position: relative;
}

.hero-stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--light-gold);
    line-height: 1;
    margin-bottom: 4px;
}

.hero-stat-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.hero-stat+.hero-stat::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 15%;
    height: 70%;
    width: 1px;
    background: rgba(255, 255, 255, 0.15);
}

/* =============================================
   MOBILE SEARCH (below hero on mobile)
   ============================================= */
.mobile-search-bar {
    display: none;
    padding: 4px 0 12px 0;
    /* Reduced top gap significantly */
    background: #152B22;
    /* Matches navbar */
    border-bottom: 1px solid rgba(201, 150, 63, 0.2);
    margin-left: -15px;
    margin-right: -15px;
    box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.1);
}

.mobile-search-input-group {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 30px;
    overflow: hidden;
    padding: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(201, 150, 63, 0.4);
}

.mobile-search-icon {
    padding-left: 14px;
    padding-right: 8px;
    color: #6c757d;
    font-size: 1rem;
}

.mobile-search-input-group input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #111;
    font-size: 1rem;
    padding: 8px 0;
    font-family: 'Inter', sans-serif;
}

.mobile-search-input-group input::placeholder {
    color: #555;
    font-style: normal;
    font-weight: 500;
}

.mobile-search-btn {
    background: linear-gradient(135deg, var(--primary-gold), var(--dark-gold));
    color: white;
    border: none;
    border-radius: 30px;
    padding: 8px 16px;
    /* Slightly reduced horizontal padding */
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
    flex-shrink: 0;
    /* Prevents button from being crushed on small screens */
    white-space: nowrap;
    /* Forces text to stay on one line */
}

.mobile-search-btn:active {
    transform: scale(0.97);
}

@media (max-width: 991px) {
    .mobile-search-bar {
        display: block;
    }

    .hero-banner .desktop-search {
        display: none;
    }
}

/* =============================================
   SECTION TITLE STYLE
   ============================================= */
.section-header {
    text-align: center;
    margin-bottom: 36px;
    position: relative;
}

.section-header .section-pill {
    display: inline-block;
    background: linear-gradient(135deg, rgba(27, 67, 50, 0.10), rgba(27, 67, 50, 0.05));
    border: 1px solid rgba(27, 67, 50, 0.35);
    color: #1B4332;
    padding: 5px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.section-header h2 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--metal-black);
    margin-bottom: 0;
    letter-spacing: 0.5px;
}

.section-header .section-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
}

.section-header .section-line span {
    display: block;
    height: 2px;
    width: 50px;
    background: linear-gradient(to right, transparent, #1B4332);
    border-radius: 2px;
}

.section-header .section-line span:last-child {
    background: linear-gradient(to left, transparent, #1B4332);
}

.section-header .section-line i {
    color: #1B4332;
    font-size: 0.85rem;
}

/* =============================================
   SHOP BY CATEGORY
   ============================================= */
.category-section {
    padding: 28px 15px 8px;
    background: var(--surface);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-left: -15px;
    margin-right: -15px;
}

.category-scroll-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 16px;
    padding: 8px 16px 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-gold) #f1f1f1;
    justify-content: flex-start;
}

@media (min-width: 768px) {
    .category-scroll-container {
        justify-content: center;
        flex-wrap: wrap;
        overflow-x: visible;
        gap: 20px;
        padding: 0 0 8px;
    }
}

.category-scroll-container::-webkit-scrollbar {
    height: 4px;
}

.category-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.category-scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary-gold);
    border-radius: 10px;
}

.category-scroll-item {
    flex: 0 0 auto;
    width: 100px;
}

@media (min-width: 768px) {
    .category-scroll-item {
        width: 120px;
    }
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 12px 8px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.category-card:hover {
    background: rgba(27, 67, 50, 0.06);
    transform: translateY(-4px);
}

.category-img-wrapper {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    overflow: hidden;
    border: 2.5px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    background: var(--cream);
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .category-img-wrapper {
        width: 90px;
        height: 90px;
    }
}

.category-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover .category-img-wrapper {
    border-color: #1B4332;
    box-shadow: 0 0 0 4px rgba(27, 67, 50, 0.15), var(--shadow-sm);
}

.category-card:hover .category-img-wrapper img {
    transform: scale(1.1);
}

.category-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.3;
    margin: 0;
}

.category-count {
    font-size: 0.70rem;
    color: #2D6A4F;
    font-weight: 500;
    margin-top: 3px;
    text-align: center;
}

/* =============================================
   PRODUCT SECTIONS
   ============================================= */
.products-section {
    padding: 16px 0 48px;
}

.products-section:nth-child(even) {
    background: var(--surface);
}

.products-section:nth-child(odd) {
    background: var(--surface2);
}

/* Hot Deals */
.hot-deals-section {
    background: linear-gradient(135deg, #fdf9f0 0%, #fff 100%);
    border-top: 3px solid var(--primary-gold);
}

/* =============================================
   PRODUCT CARDS - Modern Design
   ============================================= */
/* Make each Bootstrap column a flex container so the card inside stretches */
.col-lg-3.col-md-6.col-sm-6 {
    display: flex;
}

.product-card-wrapper {
    padding: 12px;
    margin-bottom: 8px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.product-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-gold);
    border-color: rgba(201, 150, 63, 0.3);
}

.product-image-container {
    position: relative;
    overflow: hidden;
    background: var(--cream);
    aspect-ratio: 4/3.5;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

.product-card:hover .product-image {
    transform: scale(1.07);
}

/* =============================================
   MISSING IMAGE PLACEHOLDER
   ============================================= */
.missing-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(201, 150, 63, 0.08), rgba(27, 67, 50, 0.04));
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover .missing-image-placeholder {
    background: linear-gradient(135deg, rgba(201, 150, 63, 0.15), rgba(27, 67, 50, 0.08));
}

.missing-image-text {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: rgba(27, 67, 50, 0.4);
    text-align: center;
    padding: 20px;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--dark-gold), var(--forest-green));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.8;
    transition: var(--transition);
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.6);
}

.product-card:hover .missing-image-text {
    opacity: 1;
    transform: scale(1.05);
}

.missing-image-placeholder::before {
    content: '\f434';
    /* Box icon or similar */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 7rem;
    color: rgba(201, 150, 63, 0.05);
    pointer-events: none;
    transition: var(--transition);
}

.product-card:hover .missing-image-placeholder::before {
    color: rgba(201, 150, 63, 0.1);
    transform: translate(-50%, -50%) scale(1.1);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #1B4332, #2D6A4F);
    color: #E8B86D;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.70rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(27, 67, 50, 0.35);
}

.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    z-index: 2;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.wishlist-btn:hover {
    background: #fee;
    color: #e74c3c;
    transform: scale(1.12);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.25);
}

/* Quick overlay on hover */
.product-image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 46, 0.0);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card:hover .product-image-overlay {
    background: rgba(26, 26, 46, 0.08);
}

.product-card-body {
    padding: 16px 18px 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category-tag {
    font-size: 0.70rem;
    font-weight: 600;
    color: #1B4332;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.product-title {
    color: var(--text-primary);
    font-size: 0.98rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.45;
    /* Fixed height for exactly 2 lines so all cards align */
    height: 2.9em;
    min-height: 2.9em;
    max-height: 2.9em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-subtitle {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-bottom: 12px;
    font-weight: 500;
    /* Fixed height for 1 line so author row is always same height */
    height: 1.4em;
    min-height: 1.4em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-divider {
    height: 1px;
    background: linear-gradient(to right, var(--border-light), transparent);
    margin: 12px 0;
}

.price-section {
    margin-top: auto;
}

.original-price {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.original-price strike {
    text-decoration: line-through;
    font-weight: 500;
}

.current-price {
    color: #1B4332;
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 6px;
    line-height: 1;
}

.currency {
    font-size: 1rem;
    font-weight: 700;
}

.discount-badge {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
}

.free-delivery-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.73rem;
    color: #27ae60;
    font-weight: 600;
    background: rgba(39, 174, 96, 0.08);
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: 4px;
}

.product-actions {
    margin-top: 14px;
}

.btn-add-cart-custom {
    background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 100%);
    color: white !important;
    border: 1px solid rgba(201, 150, 63, 0.35);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: 0.3px;
    width: 100%;
    cursor: pointer;
}

.btn-add-cart-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 67, 50, 0.45);
    color: #E8B86D !important;
    background: linear-gradient(135deg, #152B22 0%, #1B4332 100%);
    border-color: rgba(201, 150, 63, 0.7);
}

.btn-add-cart-custom i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.btn-add-cart-custom:hover i {
    transform: translateX(2px);
}

/* Product Image link */
.product-image-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
    height: 100%;
}

/* =============================================
   SECTION LABELS / BADGES
   ============================================= */
.hot-deals-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    font-size: 0.70rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.hot-deals-badge i {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.top-sales-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #1B4332, #2D6A4F);
    color: #E8B86D;
    font-size: 0.70rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* =============================================
   SEARCH STYLES (legacy - kept for fallback)
   ============================================= */
.search-input,
#SearchId,
#SearchIdMobile {
    background: transparent !important;
    color: #fff !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.search-input::placeholder,
#SearchIdMobile::placeholder,
#SearchId::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
}

.search-input:focus,
#SearchId:focus {
    background: transparent !important;
    color: #fff !important;
}

#SearchIdMobile {
    color: var(--text-primary) !important;
}

#SearchIdMobile::placeholder {
    color: var(--primary-gold) !important;
}

.search-container {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50px;
    padding: 3px;
    border: 1.5px solid rgba(201, 150, 63, 0.5);
    transition: var(--transition);
}

.search-container:focus-within {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 4px rgba(201, 150, 63, 0.15);
}

.search-btn {
    background: linear-gradient(135deg, var(--primary-gold), var(--dark-gold)) !important;
    color: white !important;
    border: none !important;
    border-radius: 40px;
    width: 40px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    transition: var(--transition);
    outline: none !important;
    box-shadow: none !important;
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(201, 150, 63, 0.4) !important;
    color: white !important;
}

.search-btn i {
    color: white !important;
}

/* =============================================
   BLINK ANIMATION (discount badge)
   ============================================= */
@keyframes blink-multi-color {
    0% {
        background: #E74C3C;
        transform: scale(1);
    }

    25% {
        background: #8E44AD;
        transform: scale(1.05);
    }

    50% {
        background: #E67E22;
        transform: scale(1);
        color: #fff;
    }

    75% {
        background: #E74C3C;
        transform: scale(1.05);
    }

    100% {
        background: #E74C3C;
        transform: scale(1);
    }
}

.blink-active {
    animation: blink-multi-color 2.5s infinite ease-in-out;
    font-weight: 700;
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 4px;
    color: white !important;
}

/* =============================================
   SCROLL TO TOP BUTTON
   ============================================= */
.scroll-buttons {
    position: fixed;
    bottom: 28px;
    right: 24px;
    z-index: 9999;
}

.scroll-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-gold), var(--dark-gold));
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.scroll-btn:hover {
    transform: scale(1.12) translateY(-3px);
    box-shadow: 0 8px 24px rgba(201, 150, 63, 0.5);
    background: linear-gradient(135deg, var(--dark-gold), var(--primary-gold));
}

/* =============================================
   PREMIUM MODAL
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&display=swap');

.premium-modal {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    border: 2px solid var(--primary-gold);
    box-shadow: 0 0 60px rgba(201, 150, 63, 0.4);
    border-radius: 20px;
}

.text-gold {
    color: var(--primary-gold) !important;
}

.text-light-gold {
    color: var(--light-gold) !important;
}

.divider-custom {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary-gold), transparent);
    width: 80%;
    margin: 0 auto;
}

.btn-premium-gold {
    background: linear-gradient(135deg, var(--primary-gold), var(--dark-gold));
    color: white;
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    box-shadow: var(--shadow-gold);
}

.btn-premium-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(201, 150, 63, 0.55);
    color: white;
    background: linear-gradient(135deg, var(--dark-gold), var(--primary-gold));
}

.ramadan-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* =============================================
   FOOTER LINKS
   ============================================= */
.footer-links a {
    color: rgba(255, 255, 255, 0.68);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-gold);
    transform: translateX(4px);
}

.footer-links i {
    color: var(--primary-gold) !important;
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--primary-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-btn:hover {
    background: var(--primary-gold);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(201, 150, 63, 0.4);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .hero-banner {
        padding: 50px 0 40px;
    }

    .hero-stats {
        gap: 24px;
    }

    .hero-stat+.hero-stat::before {
        left: -12px;
    }

    .product-card-wrapper {
        padding: 8px;
    }

    .products-section {
        padding: 32px 0;
    }

    .category-section {
        padding: 28px 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        letter-spacing: 0;
    }

    .hero-stats {
        gap: 16px;
    }

    .hero-stat+.hero-stat::before {
        display: none;
    }
}

/* Sidebar styles (legacy) */
.mobile-menu-toggle {
    display: none;
}

.sidebar-wrapper {
    position: sticky;
    top: 20px;
}

.fa-facebook {
    background: #3B5998;
    color: white;
}

.categories-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.categories-header {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--dark-gold) 100%);
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-primary-gold {
    background: linear-gradient(135deg, var(--primary-gold), var(--dark-gold));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 10px 24px;
    transition: var(--transition);
}

.btn-primary-gold:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
    color: white;
}

/* =============================================
   IMAGE LOADING OPTIMIZATIONS
   ============================================= */

/* Skeleton shimmer — shown while image is loading */
@keyframes shimmer {
    0% {
        background-position: -600px 0;
    }

    100% {
        background-position: 600px 0;
    }
}

.img-skeleton-container {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 600px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: 4px;
}

.product-image {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    visibility: visible;
}

.product-image.loaded {
    opacity: 1;
}

/* Loaded state for any image */
.loaded {
    opacity: 1 !important;
}

/* Category images fade in too */
.category-img-wrapper img {
    opacity: 0;
    transition: opacity 0.35s ease;
}

.category-img-wrapper img.loaded,
.category-img-wrapper img:not(.img-skeleton) {
    opacity: 1;
}

/* Removed content-visibility: auto */

/* Optimize image rendering quality */
.product-image,
.category-img-wrapper img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* =============================================
   JQUERY UI AUTOCOMPLETE — PREMIUM OVERRIDE
   ============================================= */
.ui-autocomplete {
    background: #fff !important;
    border: 1px solid rgba(201, 150, 63, 0.2) !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14) !important;
    padding: 6px 0 !important;
    z-index: 99999 !important;
    max-height: 320px !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 150, 63, 0.3) transparent;
    font-family: 'Inter', sans-serif !important;
    margin-top: 6px !important;
}

.ui-autocomplete::-webkit-scrollbar {
    width: 4px;
}

.ui-autocomplete::-webkit-scrollbar-track {
    background: transparent;
}

.ui-autocomplete::-webkit-scrollbar-thumb {
    background: rgba(201, 150, 63, 0.3);
    border-radius: 4px;
}

.ui-menu-item {
    padding: 0 !important;
    border: none !important;
}

.ui-menu-item-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 16px !important;
    font-size: 0.87rem !important;
    color: #222 !important;
    cursor: pointer !important;
    transition: background 0.18s !important;
    font-family: 'Inter', sans-serif !important;
    border: none !important;
    outline: none !important;
}

.ui-menu-item-wrapper:hover,
.ui-menu-item-wrapper.ui-state-active,
.ui-state-focus {
    background: linear-gradient(90deg, rgba(201, 150, 63, 0.08), rgba(201, 150, 63, 0.04)) !important;
    color: #A67C52 !important;
    border: none !important;
    outline: none !important;
    border-radius: 0 !important;
}

.ui-menu-item-wrapper::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: rgba(201, 150, 63, 0.5);
    font-size: 0.7rem;
    flex-shrink: 0;
}

/* Separator between items */
.ui-menu-item+.ui-menu-item .ui-menu-item-wrapper {
    border-top: 1px solid #f5f5f5 !important;
}

/* Remove jQuery UI default ugly styles */
.ui-helper-reset,
.ui-widget {
    font-family: 'Inter', sans-serif !important;
}

.ui-widget-content {
    border: none !important;
}

.ui-corner-all {
    border-radius: 14px !important;
}

/* =============================================
   MOBILE SEARCH BAR — PREMIUM REDESIGN
   ============================================= */
.mobile-search-bar {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.mobile-search-bar form {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 8px 14px;
}

.mobile-search-bar input[type="text"] {
    flex: 1;
    height: 42px;
    border: 1.5px solid rgba(201, 150, 63, 0.25) !important;
    border-right: none !important;
    border-radius: 22px 0 0 22px !important;
    padding: 0 16px !important;
    font-size: 0.88rem !important;
    color: #222 !important;
    background: #fafafa !important;
    outline: none !important;
    font-family: 'Inter', sans-serif !important;
    box-shadow: none !important;
}

.mobile-search-bar input[type="text"]:focus {
    border-color: var(--primary-gold) !important;
    background: #fff !important;
}

.mobile-search-bar button[type="submit"] {
    height: 42px;
    min-width: 80px;
    background: linear-gradient(135deg, #C9963F, #A67C52) !important;
    border: none !important;
    border-radius: 0 22px 22px 0 !important;
    color: #fff !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    padding: 0 18px !important;
    cursor: pointer;
    font-family: 'Inter', sans-serif !important;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.mobile-search-bar button[type="submit"]:hover {
    opacity: 0.88;
}

/* Remove Bootstrap input-group overrides for mobile */
.mobile-search-bar .input-group {
    display: contents !important;
}

/* =============================================
   FORCE VISIBLE TEXT IN SEARCH INPUTS
   ============================================= */
#SearchId,
#SearchIdMobile {
    color: #1a1a2e !important;
    -webkit-text-fill-color: #1a1a2e !important;
    caret-color: #C9963F !important;
}

#SearchId::placeholder,
#SearchIdMobile::placeholder {
    color: #aaa !important;
    -webkit-text-fill-color: #aaa !important;
    opacity: 1;
}


/* =============================================
   PREMIUM MOBILE NAV — CSS ONLY ENHANCEMENT
   Targets Bootstrap collapse on mobile only
   ============================================= */
@media (max-width: 991.98px) {

    /* The collapsed panel */
    #navbarColor02 {
        background: linear-gradient(160deg, #1c1409 0%, #2a1f0e 60%, #1a1200 100%) !important;
        border-top: 3px solid #C9963F;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
        border-radius: 0 0 16px 16px;
        padding: 8px 6px 14px !important;
        margin: 0 -1px;
    }

    /* Every nav-link inside the mobile nav */
    #navbarColor02 .nav-link {
        color: #e8d5b7 !important;
        font-family: 'Cinzel', serif !important;
        font-size: 0.84rem !important;
        letter-spacing: 0.8px !important;
        padding: 12px 18px !important;
        border-radius: 8px !important;
        margin: 2px 4px !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        border-left: 3px solid transparent;
        transition: all 0.22s ease !important;
    }

    /* Hover / active state */
    #navbarColor02 .nav-link:hover,
    #navbarColor02 .nav-link.active {
        background: rgba(201, 150, 63, 0.12) !important;
        color: #C9963F !important;
        border-left-color: #C9963F !important;
        padding-left: 22px !important;
    }

    /* Dropdown toggle arrow color fix */
    #navbarColor02 .dropdown-toggle::after {
        border-top-color: #C9963F;
        margin-left: auto;
    }

    /* Dropdown menu inside collapse */
    #navbarColor02 .dropdown-menu {
        background: rgba(0, 0, 0, 0.35) !important;
        border: none !important;
        border-radius: 10px !important;
        margin: 4px 8px 8px !important;
        padding: 4px 0 !important;
        box-shadow: none !important;
    }

    #navbarColor02 .dropdown-item {
        color: #c8b08a !important;
        font-size: 0.82rem !important;
        padding: 9px 18px 9px 28px !important;
        border-radius: 6px !important;
        margin: 1px 4px !important;
        transition: all 0.18s ease !important;
        border-left: 2px solid transparent !important;
    }

    #navbarColor02 .dropdown-item:hover {
        background: rgba(201, 150, 63, 0.15) !important;
        color: #C9963F !important;
        border-left-color: #C9963F !important;
    }

    /* User links (login/register/profile) in mobile nav */
    #navbarColor02 .navbar-nav.d-lg-none {
        border-bottom: 1px solid rgba(201, 150, 63, 0.2);
        margin-bottom: 8px !important;
        padding-bottom: 6px !important;
    }

    #navbarColor02 .navbar-nav.d-lg-none .nav-link,
    #navbarColor02 .navbar-nav.d-lg-none a {
        color: #e8d5b7 !important;
        font-size: 0.84rem !important;
        padding: 10px 18px !important;
        border-radius: 8px !important;
        margin: 2px 4px !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        transition: all 0.2s ease !important;
        border-left: 3px solid transparent !important;
        text-decoration: none !important;
    }

    #navbarColor02 .navbar-nav.d-lg-none .nav-link:hover,
    #navbarColor02 .navbar-nav.d-lg-none a:hover {
        background: rgba(201, 150, 63, 0.12) !important;
        color: #C9963F !important;
        border-left-color: #C9963F !important;
    }

    /* Login/Register buttons inside mobile nav */
    #navbarColor02 .btn {
        border-radius: 24px !important;
        font-size: 0.82rem !important;
        padding: 7px 20px !important;
        font-weight: 600 !important;
    }

    #navbarColor02 .btn-outline-light,
    #navbarColor02 .btn-warning {
        background: linear-gradient(135deg, #C9963F, #A67C52) !important;
        border: none !important;
        color: #fff !important;
    }

    /* Dropdown divider */
    #navbarColor02 .dropdown-divider {
        border-color: rgba(201, 150, 63, 0.2) !important;
    }
}