/* ==========================================
   1. GLOBAL RESET & DESIGN SYSTEM
   ========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --text-color: #1e293b;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --badge-bg: #ef4444;
    --transition-speed: 0.3s;

    /* Featured-products variables now point to the shared ones (no duplicates) */
    --fp-primary: var(--primary-color);
    --fp-primary-hover: var(--primary-dark);
    --fp-bg-card: var(--white);
    --fp-bg-badge: var(--badge-bg);
    --fp-border: var(--border-color);
    --fp-dark: #0f172a;
    --fp-gray-muted: #64748b;
    --fp-star: #f59e0b;
    --fp-radius-lg: 16px;
    --fp-radius-sm: 8px;
    --fp-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --fp-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --fp-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-color);
}

body.no-scroll {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

[hidden] {
    display: none !important;
}

/* Keyboard focus (accessibility) */
:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.55);
    outline-offset: 2px;
}

/* ==========================================
   2. NAVBAR STYLES
   ========================================== */
.main-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 75px;
}

.navbar-logo a {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-color);
}

.navbar-logo a span {
    color: var(--primary-color);
}

.navbar-search {
    flex: 0 1 550px;
    margin: 0 32px;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2px;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-box input {
    width: 100%;
    height: 40px;
    border: none;
    background: transparent;
    padding: 0 16px;
    font-size: 14px;
    color: var(--text-color);
    outline: none;
}

.search-box input::placeholder {
    color: #94a3b8;
}

.search-btn {
    height: 40px;
    width: 48px;
    border: none;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: background-color var(--transition-speed);
}

.search-btn:hover {
    background-color: var(--primary-dark);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-item {
    display: block;
    padding: 8px;
    border-radius: 50%;
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

.action-item:hover {
    background-color: var(--bg-light);
}

.icon-badge-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-badge-container i {
    font-size: 22px;
    color: var(--text-color);
    transition: color var(--transition-speed);
}

.action-item:hover i {
    color: var(--primary-color);
}

.badge-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: var(--badge-bg);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
    line-height: 1;
}

/* ==========================================
   3. HERO SECTION STYLES
   ========================================== */
.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    padding: 60px 0;
    width: 100%;
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    gap: 48px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-subtitle {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.hero-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-color);
    margin-bottom: 24px;
}

.hero-description {
    font-size: 16px;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    transition: all var(--transition-speed);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--white);
    border-color: var(--text-color);
    transform: translateY(-2px);
}

.hero-banner {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.floating-badge {
    position: absolute;
    bottom: 30px;
    left: -20px;
    background-color: var(--white);
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    animation: float 3s ease-in-out infinite;
}

.badge-discount {
    font-size: 15px;
    font-weight: 700;
    color: var(--badge-bg);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ==========================================
   4. CATEGORIES SECTION STYLES
   ========================================== */
.categories-section {
    padding: 80px 0;
    background-color: var(--white);
    width: 100%;
}

.categories-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.categories-section .section-header {
    text-align: center;
    margin-bottom: 48px;
}

.categories-section .section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.categories-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.categories-section .section-subtitle {
    font-size: 15px;
    color: #64748b;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
}

.category-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
}

.category-icon-wrapper {
    width: 64px;
    height: 64px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    transition: all var(--transition-speed) ease;
}

.category-icon-wrapper i {
    font-size: 24px;
    color: var(--text-color);
    transition: color var(--transition-speed) ease;
}

.category-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
}

.category-items-count {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

.category-card:hover,
.category-card.active-category {
    transform: translateY(-8px);
    background-color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.08);
}

.category-card:hover .category-icon-wrapper,
.category-card.active-category .category-icon-wrapper {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

.category-card:hover .category-icon-wrapper i,
.category-card.active-category .category-icon-wrapper i {
    color: var(--white);
}

/* ==========================================
   5. FEATURED PRODUCTS SECTION STYLES
   ========================================== */
.featured-products {
    padding: 80px 0;
    background-color: #f8fafc;
}

.featured-products .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.featured-products .section-header {
    margin-bottom: 48px;
}

.text-center {
    text-align: center;
}

.featured-products .section-subtitle {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--fp-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.featured-products .section-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--fp-dark);
    margin-bottom: 12px;
}

.section-description {
    font-size: 1rem;
    color: var(--fp-gray-muted);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.6;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.product-card {
    background-color: var(--fp-bg-card);
    border-radius: var(--fp-radius-lg);
    border: 1px solid var(--fp-border);
    overflow: hidden;
    box-shadow: var(--fp-shadow-sm);
    transition: var(--fp-transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--fp-shadow-hover);
    border-color: transparent;
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background-color: #f1f5f9;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: var(--fp-radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
}

.badge-sale { background-color: var(--fp-bg-badge); }
.badge-hot { background-color: #f59e0b; }
.badge-new { background-color: #10b981; }

.product-actions {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--fp-transition);
}

.product-card:hover .product-actions,
.product-card:focus-within .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.92);
    border: none;
    color: var(--fp-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: var(--fp-transition);
}

.action-btn:hover {
    background-color: var(--fp-primary);
    color: #ffffff;
    transform: scale(1.1);
}

.action-btn.active-fav {
    color: #ef4444;
}

/* Must come AFTER .active-fav so the heart stays visible on the blue hover background */
.action-btn.active-fav:hover {
    color: #ffffff;
}

.product-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.75rem;
    color: var(--fp-gray-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 6px;
}

.product-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--fp-dark);
    margin-bottom: 8px;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.stars {
    color: var(--fp-star);
    font-size: 0.875rem;
    letter-spacing: 1px;
}

.reviews-count {
    font-size: 0.75rem;
    color: var(--fp-gray-muted);
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.product-price {
    display: flex;
    flex-direction: column;
}

.current-price {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--fp-dark);
}

.old-price {
    font-size: 0.8rem;
    color: var(--fp-gray-muted);
    text-decoration: line-through;
}

.btn-add-to-cart {
    background-color: #f1f5f9;
    color: var(--fp-dark);
    border: none;
    padding: 10px 14px;
    border-radius: var(--fp-radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--fp-transition);
}

.btn-add-to-cart:hover {
    background-color: var(--fp-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-add-to-cart:active {
    transform: translateY(0);
}

/* Shown for a moment after clicking "Add" (replaces the old inline styles) */
.btn-add-to-cart.is-added,
.btn-add-to-cart.is-added:hover {
    background-color: #10b981;
    color: #ffffff;
}

.empty-products-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--fp-gray-muted);
    font-size: 1rem;
}

/* Loading / error state of the products grid */
.products-status {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 20px;
    color: var(--fp-gray-muted);
    font-size: 1rem;
    text-align: center;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.retry-btn {
    padding: 10px 22px;
    border: none;
    border-radius: var(--fp-radius-sm);
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

.retry-btn:hover {
    background-color: var(--primary-dark);
}

/* ==========================================
   6. PROMOTIONAL BANNER
   ========================================== */
.promo-banner {
    padding: 80px 24px; /* side padding added so the blue box never touches the screen edge */
    background: var(--bg-light);
}

.promo-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 24px;
    overflow: hidden;
    color: #fff;
}

.promo-content {
    flex: 1;
}

.promo-badge {
    display: inline-block;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.promo-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.promo-title span {
    color: #FFD54F;
}

.promo-description {
    max-width: 500px;
    font-size: 16px;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 35px;
}

.promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #fff;
    color: #2563eb;
    border-radius: 10px;
    font-weight: 700;
    transition: 0.3s;
}

.promo-btn:hover {
    transform: translateY(-3px);
    background: #f8fafc;
}

.promo-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.promo-image img {
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    transition: 0.4s;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.promo-image img:hover {
    transform: scale(1.05);
}

/* ==========================================
   7. FOOTER
   ========================================== */
.site-footer {
    background-color: var(--fp-dark);
    color: #cbd5e1;
    padding: 64px 24px 0;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
}

.footer-logo span {
    color: #60a5fa;
}

.footer-brand p {
    margin-top: 14px;
    max-width: 340px;
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-col h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    font-size: 0.95rem;
    transition: color var(--transition-speed);
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 0 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ==========================================
   8. CART / WISHLIST DRAWER
   ========================================== */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(420px, 100%);
    background: var(--white);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s 0.3s;
}

.drawer.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.3s ease, visibility 0s;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.drawer-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--fp-dark);
}

.drawer-close,
.modal-close {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--fp-dark);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.drawer-close:hover,
.modal-close:hover {
    background: var(--primary-color);
    color: var(--white);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 24px;
}

.drawer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    height: 100%;
    min-height: 240px;
    color: var(--fp-gray-muted);
    text-align: center;
}

.drawer-empty i {
    font-size: 40px;
    color: #cbd5e1;
}

.drawer-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.drawer-item img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    background: #f1f5f9;
    flex-shrink: 0;
}

.drawer-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drawer-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--fp-dark);
    line-height: 1.3;
}

.drawer-item-price {
    font-weight: 800;
    color: var(--primary-color);
}

.qty-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--fp-dark);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.qty-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.qty-value {
    min-width: 20px;
    text-align: center;
    font-weight: 700;
}

.remove-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background-color var(--transition-speed);
}

.remove-btn:hover {
    background: #fee2e2;
}

.drawer-add-btn {
    align-self: flex-start;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: var(--fp-radius-sm);
    background: #f1f5f9;
    color: var(--fp-dark);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--fp-transition);
}

.drawer-add-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.drawer-add-btn.is-added,
.drawer-add-btn.is-added:hover {
    background: #10b981;
    color: var(--white);
}

.drawer-footer:not(:empty) {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
}

.drawer-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.drawer-total strong {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--fp-dark);
}

.drawer-checkout {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

.drawer-checkout:hover {
    background: var(--primary-dark);
}

/* ==========================================
   9. QUICK VIEW MODAL
   ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s 0.25s;
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0s;
}

.modal {
    position: relative;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    overflow: auto;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(16px) scale(0.98);
    transition: transform 0.25s ease;
}

.modal-overlay.is-open .modal {
    transform: none;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
}

.qv-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.qv-image {
    background: #f1f5f9;
    min-height: 340px;
}

.qv-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qv-info {
    padding: 40px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qv-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--fp-dark);
    line-height: 1.3;
}

.qv-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.qv-price .current-price {
    font-size: 1.6rem;
}

.qv-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
}

.qv-add {
    flex: 1;
    justify-content: center;
    padding: 14px 18px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.95rem;
}

.qv-add:hover {
    background: var(--primary-dark);
}

.qv-fav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--fp-radius-sm);
    background: var(--white);
    color: var(--fp-dark);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.qv-fav:hover {
    border-color: var(--primary-color);
}

.qv-fav.active-fav {
    color: #ef4444;
    border-color: #ef4444;
}

/* ==========================================
   10. TOAST
   ========================================== */
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 20px);
    max-width: calc(100% - 32px);
    padding: 12px 20px;
    border-radius: 10px;
    background: var(--fp-dark);
    color: var(--white);
    font-size: 0.9rem;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    z-index: 1400;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ==========================================
   11. RESPONSIVE MEDIA QUERIES
   ========================================== */
/* Touch screens have no hover, so always show the heart / quick-view buttons */
@media (hover: none) {
    .product-actions {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .navbar-container {
        height: auto;
        padding: 16px;
        flex-wrap: wrap;
        gap: 16px;
    }

    .navbar-search {
        order: 3;
        flex: 1 1 100%;
        margin: 0;
    }

    .search-box input, .search-btn {
        height: 38px;
    }

    .hero-section {
        padding: 40px 0;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-actions {
        justify-content: center;
    }

    .image-wrapper {
        max-width: 400px;
    }

    .floating-badge {
        left: 10px;
        bottom: 20px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .featured-products .section-title {
        font-size: 1.875rem;
    }

    .promo-container {
        flex-direction: column;
        text-align: center;
        padding: 40px;
    }

    .promo-description {
        margin: 0 auto 30px;
    }

    .promo-image img {
        max-width: 400px;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .categories-section {
        padding: 60px 0;
    }

    .categories-section .section-title {
        font-size: 28px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 700px) {
    .qv-body {
        grid-template-columns: 1fr;
    }

    .qv-image {
        min-height: 0;
        aspect-ratio: 1 / 1;
    }

    .qv-info {
        padding: 24px 20px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .promo-banner {
        padding: 48px 16px;
    }

    .promo-title {
        font-size: 34px;
    }

    .promo-container {
        padding: 30px 20px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 12px;
        gap: 12px;
    }

    .navbar-logo a {
        font-size: 20px;
    }

    .navbar-actions {
        gap: 10px;
    }

    .icon-badge-container i {
        font-size: 20px;
    }

    .badge-count {
        min-width: 16px;
        height: 16px;
        font-size: 10px;
        top: -6px;
        right: -10px;
    }

    .hero-section {
        padding: 32px 0;
    }

    .hero-container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-description {
        font-size: 14px;
        margin-bottom: 28px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .hero-btn {
        width: 100%;
        justify-content: center;
    }

    .categories-section {
        padding: 48px 0;
    }

    .categories-container {
        padding: 0 16px;
    }

    .categories-section .section-header {
        margin-bottom: 32px;
    }

    .categories-section .section-title {
        font-size: 24px;
    }

    .categories-section .section-subtitle {
        font-size: 13px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-card {
        padding: 24px 12px;
        border-radius: 12px;
    }

    .category-icon-wrapper {
        width: 54px;
        height: 54px;
        margin-bottom: 12px;
    }

    .category-icon-wrapper i {
        font-size: 20px;
    }

    .category-name {
        font-size: 14px;
    }

    .drawer-header,
    .drawer-body,
    .drawer-footer:not(:empty) {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Respect users who turn animations off in their device settings */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}