/* ==========================================================================
   Mashla Bazar — Master Theme & Design System
   Authentic Indian Spices & Traditional Specialties
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&display=swap');

:root {
    --color-primary: #8A1C14;
    --color-primary-hover: #70150e;
    --color-primary-light: rgba(138, 28, 20, 0.08);
    --color-secondary: #D97706;
    --color-accent: #0F5132;
    --color-bg: #FCFBF7;
    --color-card: #FFFFFF;
    --color-text: #1F2937;
    --color-muted: #6B7280;
    --color-button: #8A1C14;
    --color-header-bg: #FFFFFF;
    --color-footer-bg: #1A1817;
    --color-badge: #B91C1C;
    --border-radius-base: 12px;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-royal: 'Cinzel', serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 6px 24px rgba(138, 28, 20, 0.06);
    --shadow-hover: 0 14px 32px rgba(138, 28, 20, 0.12);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Body */
body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 60px; /* Space for mobile sticky bottom bar */
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

h1, h2, h3, h4, h5, h6, .font-serif {
    font-family: var(--font-heading);
    color: var(--color-text);
    font-weight: 700;
}

.brand-font {
    font-family: var(--font-royal);
    letter-spacing: 1px;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--color-primary-hover);
}

/* Top Announcement Bar */
.announcement-bar {
    background: linear-gradient(90deg, #6c120c 0%, #8A1C14 50%, #6c120c 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 0;
    letter-spacing: 0.3px;
}

/* Navbar & Header */
.main-header {
    background-color: var(--color-header-bg);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1020;
    transition: var(--transition-smooth);
}

.brand-logo-text {
    font-family: var(--font-royal);
    font-size: 22px;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-logo-icon {
    width: 34px;
    height: 34px;
    fill: var(--color-secondary);
}

.search-container {
    position: relative;
    max-width: 500px;
    width: 100%;
}

.search-input {
    border-radius: 50px;
    padding-left: 42px;
    padding-right: 45px;
    border: 1.5px solid #e5e7eb;
    background-color: #f9fafb;
    font-size: 14px;
    transition: var(--transition-smooth);
}

.search-input:focus {
    background-color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-light);
}

.search-icon-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-muted);
    pointer-events: none;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
    margin-top: 8px;
    z-index: 1050;
    display: none;
    max-height: 420px;
    overflow-y: auto;
}

.search-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #f3f4f6;
    transition: var(--transition-smooth);
}

.search-item:hover {
    background-color: var(--color-primary-light);
}

.search-item-img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
}

/* Nav Links */
.nav-link-custom {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    padding: 8px 14px;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.nav-link-custom:hover, .nav-link-custom.active {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
}

/* Buttons & Badges */
.btn-primary-custom {
    background-color: var(--color-button);
    border-color: var(--color-button);
    color: #fff;
    font-weight: 600;
    border-radius: var(--border-radius-base);
    padding: 10px 22px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(138, 28, 20, 0.2);
}

.btn-primary-custom:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(138, 28, 20, 0.3);
}

.btn-outline-custom {
    border: 1.5px solid var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
    border-radius: var(--border-radius-base);
    padding: 8px 18px;
    background: transparent;
    transition: var(--transition-smooth);
}

.btn-outline-custom:hover {
    background-color: var(--color-primary);
    color: #fff;
    transform: translateY(-1px);
}

/* Hero Section */
.hero-slider {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.hero-slide {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 60px 40px;
}

.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(26, 24, 23, 0.88) 0%, rgba(26, 24, 23, 0.65) 50%, rgba(26, 24, 23, 0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 620px;
}

.hero-tag {
    display: inline-block;
    background: rgba(217, 119, 6, 0.25);
    border: 1px solid #D97706;
    color: #FBBF24;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.hero-title {
    font-size: 42px;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 16px;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 17px;
    color: #e5e7eb;
    margin-bottom: 25px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero-slide {
        min-height: 380px;
        padding: 40px 20px;
    }
    .hero-title {
        font-size: 28px;
    }
    .hero-subtitle {
        font-size: 14px;
    }
}

/* Category Grid Card */
.category-card {
    background: #fff;
    border-radius: var(--border-radius-base);
    padding: 18px 12px;
    text-align: center;
    border: 1px solid #f0ece6;
    transition: var(--transition-smooth);
    display: block;
    box-shadow: var(--shadow-subtle);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: #D97706;
}

.category-img-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background: #fdf6ec;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #fde68a;
    transition: var(--transition-smooth);
}

.category-card:hover .category-img-wrapper {
    transform: scale(1.08);
    border-color: #D97706;
}

.category-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

/* Product Card — Luxury Indian Spice Card */
.product-card {
    background: var(--color-card);
    border-radius: var(--border-radius-base);
    border: 1px solid #f0ece6;
    box-shadow: var(--shadow-subtle);
    transition: var(--transition-smooth);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: #e5d8c8;
}

.product-thumb-wrapper {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: #fbf9f5;
    overflow: hidden;
}

.product-thumb-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-thumb-img {
    transform: scale(1.06);
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.badge-discount {
    background-color: var(--color-badge);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-organic {
    background-color: var(--color-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}

.wishlist-btn-floating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    color: #9ca3af;
    transition: var(--transition-smooth);
    z-index: 3;
    cursor: pointer;
}

.wishlist-btn-floating:hover, .wishlist-btn-floating.active {
    color: #e11d48;
    background: #fff;
    transform: scale(1.1);
}

.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-region-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.product-title:hover {
    color: var(--color-primary);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #f59e0b;
    margin-bottom: 10px;
}

.rating-count {
    color: var(--color-muted);
    font-size: 11px;
}

.product-weight-badge {
    font-size: 12px;
    color: #4b5563;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 12px;
    width: fit-content;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 12px;
}

.current-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-primary);
}

.mrp-price {
    font-size: 13px;
    color: #9ca3af;
    text-decoration: line-through;
}

/* =========================================================
   LUXURY REFERENCE PRODUCT CARD SYSTEM (Matching User Design)
   ========================================================= */
.ref-product-card {
    background: #FFFFFF;
    border: 1px solid #EFEAE3;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    padding: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.28s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ref-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    border-color: #DFD7CC;
}

.ref-thumb-wrapper {
    position: relative;
    width: 100%;
    height: 190px;
    background: #FAF7F2;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.ref-thumb-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.ref-thumb-img {
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
    transition: transform 0.4s ease;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.08));
}

.ref-product-card:hover .ref-thumb-img {
    transform: scale(1.06);
}

/* Discount Badge: Dark Maroon / Wine Square */
.ref-badge-discount {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #4B271F;
    color: #FFFFFF;
    padding: 4px 6px;
    border-radius: 4px;
    text-align: center;
    line-height: 1.1;
    z-index: 3;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.ref-discount-num {
    display: block;
    font-size: 11px;
    font-weight: 700;
}

.ref-discount-lbl {
    display: block;
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Veg Dot Symbol */
.ref-veg-mark {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    border: 1.5px solid #2E7D32;
    border-radius: 3px;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.ref-veg-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2E7D32;
    display: block;
}

/* Floating Wishlist Button */
.ref-wishlist-btn {
    position: absolute;
    top: 30px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #9CA3AF;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 3;
    transition: all 0.2s ease;
}

.ref-wishlist-btn:hover, .ref-wishlist-btn.active {
    color: #E11D48;
    background: #FFFFFF;
    transform: scale(1.1);
}

/* Terracotta ADD Button */
.ref-add-container {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ref-btn-add {
    background: #B46927;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 6px;
    border: none;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ref-btn-add:hover {
    background: #98551C;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(180, 105, 39, 0.35);
    color: #FFFFFF;
}

.ref-options-count {
    font-size: 10px;
    color: #78716C;
    margin-top: 2px;
    font-weight: 500;
    text-align: center;
}

/* Product Info Area */
.ref-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ref-origin-circle {
    border: 1px solid #C49869;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9.5px;
    font-weight: 700;
    color: #8C592C;
    background: #FAF7F2;
    margin-bottom: 6px;
}

.ref-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #2D1F1D;
    line-height: 1.35;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 36px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ref-title:hover {
    color: #B46927;
}

.ref-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #8C592C;
    margin-bottom: 4px;
}

.ref-star {
    color: #8C592C;
}

.ref-rating-count {
    color: #8C592C;
    font-weight: 500;
}

.ref-savings {
    color: #8A1C14;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    min-height: 18px;
}

.ref-variant-select {
    border: 1px solid #D6CEC5;
    border-radius: 6px;
    background-color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    width: 80px;
    color: #374151;
    cursor: pointer;
}

.ref-price-section {
    margin-top: auto;
}

.ref-price-pill {
    background: #FAF2E6;
    border: 1px solid #EFE0CC;
    border-radius: 6px;
    padding: 3px 10px;
    font-weight: 700;
    font-size: 15px;
    color: #2E1E17;
    display: inline-block;
}

.ref-mrp-price {
    font-size: 12px;
    color: #9E9E9E;
    text-decoration: line-through;
    margin-top: 3px;
}

.save-percent {
    font-size: 12px;
    font-weight: 700;
    color: #166534;
}

/* Slide-Over Cart Drawer */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.cart-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 440px;
    height: 100%;
    background: #fff;
    z-index: 1070;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-drawer.open {
    right: 0;
}

.cart-drawer-header {
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-drawer-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
}

.free-shipping-bar {
    background: #fdf6ec;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    margin-bottom: 15px;
}

.shipping-progress {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
}

.shipping-progress-fill {
    height: 100%;
    background: #166534;
    transition: width 0.4s ease;
}

/* Quantity Stepper */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.qty-btn {
    border: none;
    background: #f9fafb;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    color: var(--color-text);
    transition: var(--transition-smooth);
}

.qty-btn:hover {
    background: #e5e7eb;
}

.qty-input {
    width: 40px;
    height: 32px;
    border: none;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    outline: none;
}

/* Cart Drawer Recommendations & Variant Pills */
.rec-var-pill {
    transition: all 0.2s ease;
    border-color: #d1d5db;
    color: #4b5563;
    font-weight: 500;
}

.rec-var-pill:hover,
.rec-var-pill.active {
    background-color: #1f2937 !important;
    border-color: #1f2937 !important;
    color: #ffffff !important;
}

.rec-add-btn {
    transition: all 0.2s ease;
}

.rec-add-btn:hover {
    background-color: #8A1C14 !important;
    border-color: #8A1C14 !important;
    color: #ffffff !important;
}

/* Trust Badges Section */
.trust-badge-item {
    text-align: center;
    padding: 20px 15px;
    background: #fff;
    border-radius: var(--border-radius-base);
    border: 1px solid #f0ece6;
    transition: var(--transition-smooth);
}

.trust-badge-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-subtle);
}

.trust-icon {
    font-size: 32px;
    color: var(--color-primary);
    margin-bottom: 12px;
}

/* Product Detail Page Gallery & Zoom */
.product-main-gallery-img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #f0ece6;
    box-shadow: var(--shadow-subtle);
    cursor: zoom-in;
}

.variant-btn-pill {
    padding: 8px 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.variant-btn-pill.active, .variant-btn-pill:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
}

/* Sticky Mobile Bottom Navigation */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 1030;
}

.mobile-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #4b5563;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
}

.mobile-bottom-item.active, .mobile-bottom-item:hover {
    color: var(--color-primary);
}

.mobile-bottom-icon {
    font-size: 18px;
    margin-bottom: 2px;
}

@media (min-width: 992px) {
    .mobile-bottom-bar {
        display: none;
    }
}

/* Footer Styling */
.main-footer {
    background-color: var(--color-footer-bg);
    color: #d1d5db;
    padding-top: 60px;
    padding-bottom: 30px;
    font-size: 14px;
}

.footer-heading {
    font-family: var(--font-royal);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.footer-link {
    color: #9ca3af;
    display: block;
    margin-bottom: 10px;
    transition: var(--transition-smooth);
}

.footer-link:hover {
    color: #fde68a;
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid #2d2a29;
    padding-top: 25px;
    margin-top: 45px;
    font-size: 13px;
    color: #6b7280;
}
