/* --- CSS Reset & Variables --- */
@font-face {
    font-family: 'Rabar_021';
    src: url('../fonts/Rabar_021.ttf') format('truetype');
}

:root {
    /* Colors - Deep Navy, Gold Accents, Clean White */
    --clr-navy: #0A192F;
    --clr-navy-light: #112240;
    --clr-gold: #D4AF37;
    --clr-gold-hover: #F2D06B;
    --clr-white: #FFFFFF;
    --clr-gray-light: #F8F9FA;
    --clr-gray-medium: #E2E8F0;
    --clr-gray-dark: #64748B;
    --clr-text-main: #334155;

    /* Layout */
    --header-height: 80px;

    /* Typography (Defaults set to Rabar_021 for Kurdish/Arabic, updated via JS for EN) */
    --font-heading: 'Rabar_021', sans-serif;
    --font-body: 'Rabar_021', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--clr-text-main);
    background-color: var(--clr-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Push main content below the fixed header */
main {
    padding-top: var(--header-height);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

/* --- Utilities --- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-gold {
    color: var(--clr-gold);
}

.text-white {
    color: var(--clr-white);
}

.bg-navy {
    background-color: var(--clr-navy);
}

.text-center {
    text-align: center;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-weight: 700;
    font-family: var(--font-body);
    text-align: center;
    cursor: pointer;
    border: none;
    border-radius: 2px;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--clr-gold);
    color: var(--clr-navy);
}

.btn-primary:hover {
    background-color: var(--clr-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: var(--clr-navy);
    border: 1px solid var(--clr-gray-medium);
    width: 100%;
}

.btn-outline:hover {
    background-color: var(--clr-navy);
    color: var(--clr-white);
    border-color: var(--clr-navy);
}

/* --- Base Layout (Mobile First) --- */

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background-color: var(--clr-navy);
    transition: padding var(--transition-normal), background-color var(--transition-normal), box-shadow var(--transition-normal);
    padding: 1.25rem 0;
}

.header.scrolled {
    padding: 1rem 0;
    background-color: rgba(10, 25, 47, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--clr-white);
    position: relative;
    z-index: 1002;
    padding-bottom: 5px;
    /* Offset for Cairo */
}

.nav-menu {
    display: none;
}

/* Search Bar (Mobile/Base) */
.search-container {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1004;
}

.search-container .search-input {
    display: none;
    /* Hidden on mobile by default */
}

/* Language Selector */
.lang-selector {
    position: relative;
    display: inline-block;
    z-index: 1003;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--clr-white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem;
    transition: color var(--transition-fast);
}

.lang-btn:hover {
    color: var(--clr-gold);
}

.lang-menu {
    position: absolute;
    top: 100%;
    inset-inline-end: 0;
    min-width: 140px;
    background: var(--clr-white);
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    display: none;
    flex-direction: column;
    padding: 0.5rem 0;
}

.lang-selector:hover .lang-menu {
    display: flex;
}

.lang-menu li a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--clr-navy);
    font-size: 0.9rem;
    transition: background var(--transition-fast);
    text-align: start;
}

.lang-menu li a:hover {
    background-color: var(--clr-gray-light);
    color: var(--clr-gold);
}

/* Category Dropdown (Desktop) */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    min-width: 220px;
    background: var(--clr-white);
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    display: none;
    flex-direction: column;
    padding: 0.5rem 0;
    z-index: 1005;
    border-top: 3px solid var(--clr-gold);
}

.nav-dropdown:hover .dropdown-menu {
    display: flex;
}

.dropdown-menu li a {
    display: block;
    padding: 0.6rem 1.25rem;
    color: var(--clr-navy);
    font-size: 0.95rem;
    transition: background var(--transition-fast), color var(--transition-fast), padding-inline-start var(--transition-fast);
    text-align: start;
    font-family: var(--font-body);
}

.dropdown-menu li a:hover {
    background-color: var(--clr-gray-light);
    color: var(--clr-gold);
    padding-inline-start: 1.5rem;
}

/* Category Dropdown (Mobile) */
.mobile-dropdown-holder {
    display: flex;
    flex-direction: column;
}

.mobile-dropdown-menu {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding-inline-start: 1.25rem;
    margin-top: 0.75rem;
    border-inline-start: 2px solid rgba(255, 255, 255, 0.1);
}

.mobile-dropdown-holder.open .mobile-dropdown-menu {
    display: flex;
}

.mobile-dropdown-menu li a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.15rem;
    font-family: var(--font-heading);
    padding: 0.4rem 0;
    display: block;
    transition: color var(--transition-fast), padding-inline-start var(--transition-fast);
}

.mobile-dropdown-menu li a:hover {
    color: var(--clr-gold);
    padding-inline-start: 0.5rem;
}

.mobile-toggle {
    display: block;
    background: transparent;
    border: none;
    color: var(--clr-white);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1002;
    position: relative;
}

.action-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1001;
}

.icon-link {
    font-size: 1.25rem;
    position: relative;
    color: var(--clr-white);
}

.icon-link:hover {
    color: var(--clr-gold);
}

.cart-icon {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    inset-inline-end: -10px;
    background-color: var(--clr-gold);
    color: var(--clr-navy);
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--clr-navy);
    z-index: 999;
    padding: 6rem 0 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-nav-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-search-wrapper {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    margin-bottom: 2rem;
    width: 100%;
}

.mobile-search-wrapper .search-input {
    background: transparent;
    border: none;
    color: var(--clr-white);
    padding: 0.5rem;
    outline: none;
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
}

.mobile-search-wrapper .search-btn {
    background: transparent;
    border: none;
    color: var(--clr-white);
    cursor: pointer;
    font-size: 1.2rem;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-link {
    font-family: var(--font-heading);
    font-size: 2rem;
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-link.active {
    color: var(--clr-gold);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background-color: var(--clr-navy-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 1.5rem;
    text-align: center;
}

/* No overlay pseudo-element — clean, flat design */

.hero-content {
    width: 100%;
    max-width: 800px;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--clr-white);
    margin-bottom: 1rem;
    /* No text-shadow — clean flat design */
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--clr-gray-medium);
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero-btn {
    display: inline-block;
}

.hero-image {
    display: none;
}

/* Hero Responsive */
@media (max-width: 768px) {
    .hero {
        min-height: 60vh;
        padding: 3rem 1rem;
    }
    .hero-title {
        font-size: 1.75rem;
    }
    .hero-subtitle {
        font-size: 0.95rem;
    }
}

/* Featured Products Section */
.featured-section {
    padding: 5rem 1.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    color: var(--clr-navy);
    font-weight: 700;
    margin-bottom: 1rem;
}

.divider {
    height: 3px;
    width: 60px;
    background-color: var(--clr-gold);
    margin: 0 auto 3rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    /* Reduced gap for mobile */
}

/* Product Card */
.product-card {
    background: var(--clr-white);
    border-radius: 8px;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    border: 1px solid var(--clr-gray-medium);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image-wrapper,
.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* 1:1 square aspect ratio */
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background-color: var(--clr-gray-light);
    flex-shrink: 0;
}

.product-image {
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform var(--transition-slow);
}

/* Abstract placeholders */
.placeholder-img-1 {
    background: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
    border-bottom: 1px solid var(--clr-gray-medium);
}

.placeholder-img-2 {
    background: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);
    border-bottom: 1px solid var(--clr-gray-medium);
}

.placeholder-img-3 {
    background: linear-gradient(to right, #ece9e6, #ffffff);
    border-bottom: 1px solid var(--clr-gray-medium);
}

.placeholder-img-4 {
    background: linear-gradient(to top, #dfe9f3 0%, white 100%);
    border-bottom: 1px solid var(--clr-gray-medium);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-actions {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 1;
}

/* Product Badges */
.product-badges {
    position: absolute;
    top: 0.75rem;
    inset-inline-start: 0.75rem;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    z-index: 2;
}

.badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: inline-block;
}

.badge-new {
    background: var(--clr-gold);
    color: var(--clr-navy);
}

.badge-hot {
    background: #e11d48;
    color: var(--clr-white);
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--clr-white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    color: var(--clr-text-main);
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.action-btn:hover {
    background-color: var(--clr-gold);
    color: var(--clr-navy);
}

.product-info {
    padding: 1rem 1.5rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.85rem;
    letter-spacing: 0;
    /* Changed for Arabic/Kurdish */
    color: var(--clr-gray-dark);
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 600;
}

.product-name {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--clr-navy);
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--clr-text-main);
    margin-bottom: 1rem;
}

/* Push Add to Cart button to the bottom of the card */
.product-info .btn,
.product-info .add-to-cart-btn {
    margin-top: auto;
}

/* Footer Menu */
.footer {
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 1.25rem;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--clr-white);
}

.social-links a:hover {
    background-color: var(--clr-gold);
    color: var(--clr-navy);
}

.footer-heading {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--clr-white);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: color var(--transition-fast), padding var(--transition-fast);
}

.footer-links a:hover {
    color: var(--clr-gold);
    padding-inline-start: 5px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-form input {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
    color: var(--clr-white);
    border-radius: 2px;
    outline: none;
    font-family: var(--font-body);
}

.newsletter-form input:focus {
    border-color: var(--clr-gold);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
}

.footer-bottom .container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    text-align: center;
}

.legal-links {
    display: flex;
    gap: 1.5rem;
}

.legal-links a:hover {
    color: var(--clr-white);
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulseBg {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.1) translate(5%, 5%);
    }
}

/* ==========================================
   PRODUCT DETAIL MODAL
   ========================================== */
.product-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 25, 47, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    padding: 1rem;
}

.product-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.product-modal {
    background: var(--clr-white);
    border-radius: 16px;
    max-width: 950px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s cubic-bezier(.22, .68, 0, 1.1);
}

.product-modal-overlay.active .product-modal {
    transform: scale(1) translateY(0);
}

.product-modal-close {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(10, 25, 47, 0.08);
    color: var(--clr-navy);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    z-index: 10;
}

.product-modal-close:hover {
    background: var(--clr-navy);
    color: var(--clr-white);
    transform: rotate(90deg);
}

.product-modal-body {
    display: flex;
    flex-direction: column;
}

.product-modal-image {
    width: 100%;
    min-height: 300px;
    background-size: cover;
    background-position: center;
    background-color: var(--clr-gray-light);
    border-radius: 16px 16px 0 0;
    position: relative;
}

.product-modal-badges {
    position: absolute;
    top: 1rem;
    inset-inline-start: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-modal-badges .badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.product-modal-details {
    padding: 1.75rem 1.5rem 2rem;
}

.product-modal-category {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--clr-gray-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

.product-modal-name {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--clr-navy);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-modal-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--clr-gold);
    margin-bottom: 1rem;
}

.product-modal-price span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--clr-gray-dark);
    margin-inline-start: 0.25rem;
}

.product-modal-description {
    font-size: 0.95rem;
    color: var(--clr-text-main);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    max-height: 120px;
    overflow-y: auto;
}

.product-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.product-modal-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--clr-gray-dark);
    background: var(--clr-gray-light);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
}

.product-modal-meta-item i {
    color: var(--clr-navy);
    font-size: 0.8rem;
}

.product-modal-meta-item .in-stock {
    color: #16a34a;
    font-weight: 600;
}

.product-modal-meta-item .in-stock i {
    color: #16a34a;
}

.product-modal-meta-item .out-of-stock {
    color: #dc2626;
    font-weight: 600;
}

.product-modal-meta-item .out-of-stock i {
    color: #dc2626;
}

.product-modal-qty {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.product-modal-qty label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--clr-navy);
}

.qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--clr-gray-medium);
    border-radius: 8px;
    overflow: hidden;
}

.qty-controls button {
    width: 38px;
    height: 38px;
    border: none;
    background: var(--clr-gray-light);
    color: var(--clr-navy);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.qty-controls button:hover {
    background: var(--clr-navy);
    color: var(--clr-white);
}

.qty-controls input {
    width: 48px;
    height: 38px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--clr-navy);
    -moz-appearance: textfield;
    appearance: textfield;
    outline: none;
}

.qty-controls input::-webkit-inner-spin-button,
.qty-controls input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-modal-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-add-cart {
    flex: 1;
    min-width: 180px;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 10px;
    background: var(--clr-navy);
    color: var(--clr-white);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-cart:hover {
    background: var(--clr-gold);
    color: var(--clr-navy);
    transform: translateY(-2px);
}

.btn-wishlist-modal {
    padding: 0.85rem 1.25rem;
    border: 2px solid var(--clr-gray-medium);
    border-radius: 10px;
    background: transparent;
    color: var(--clr-navy);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.25s, color 0.25s, background 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-wishlist-modal:hover {
    border-color: #e11d48;
    color: #e11d48;
    background: rgba(225, 29, 72, 0.05);
}

/* ---- Desktop modal layout ---- */
@media screen and (min-width: 768px) {
    .product-modal-body {
        flex-direction: row;
    }

    .product-modal-image {
        width: 45%;
        min-height: 480px;
        border-radius: 16px 0 0 16px;
        flex-shrink: 0;
    }

    html[dir="rtl"] .product-modal-image {
        border-radius: 0 16px 16px 0;
    }

    .product-modal-details {
        flex: 1;
        padding: 2rem 2.25rem;
        overflow-y: auto;
        max-height: 90vh;
    }

    .product-modal-name {
        font-size: 2rem;
    }
}

/* --- Tablet and Up (min-width: 768px) --- */
@media screen and (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom .container {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Hide header icons on mobile & style mobile search icon */
@media screen and (max-width: 991px) {

    #profile-link,
    .icon-link[aria-label="Purchase History"],
    .icon-link[title="Purchase History"] {
        display: none !important;
    }

    .search-container .search-btn {
        background: transparent;
        border: none;
        color: var(--clr-white);
        cursor: pointer;
        font-size: 1.25rem;
        padding: 0.4rem;
        transition: color var(--transition-fast);
    }

    .search-container .search-btn:hover {
        color: var(--clr-gold);
    }
}

/* --- Desktop and Up (min-width: 992px) --- */
@media screen and (min-width: 992px) {
    .mobile-toggle {
        display: none;
        /* Hide hamburger */
    }

    /* Hide mobile menu items on desktop if they were added to specific nav */
    .mobile-only {
        display: none !important;
    }

    .nav-menu {
        display: flex;
        flex-grow: 1;
        justify-content: center;
    }

    .nav-list {
        display: flex;
        gap: 2.5rem;
    }

    /* RTL safe underline animation for nav links */
    .nav-link {
        font-size: 0.95rem;
        font-weight: 600;
        text-transform: uppercase;
        position: relative;
        padding-bottom: 0.25rem;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        inset-inline-start: 0;
        width: 0;
        height: 2px;
        background-color: var(--clr-gold);
        transition: width var(--transition-normal);
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 100%;
    }

    .search-container {
        display: flex;
        align-items: center;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        padding: 0.25rem 1rem;
        margin-inline-end: 1rem;
        transition: background-color var(--transition-fast);
    }

    .search-container:focus-within {
        background-color: rgba(255, 255, 255, 0.2);
    }

    .search-container .search-input {
        display: block;
        background: transparent;
        border: none;
        color: var(--clr-white);
        padding: 0.5rem;
        outline: none;
        width: 180px;
        font-family: var(--font-body);
        font-size: 0.9rem;
        transition: width var(--transition-normal);
    }

    .search-container .search-input::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }

    .search-container .search-input:focus {
        width: 220px;
    }

    .search-container .search-btn {
        background: transparent;
        border: none;
        color: var(--clr-white);
        cursor: pointer;
        font-size: 1rem;
        transition: color var(--transition-fast);
    }

    .search-container .search-btn:hover {
        color: var(--clr-gold);
    }

    .action-icons {
        gap: 1.5rem;
    }

    .hero {
        flex-direction: row;
        padding-top: 0;
        padding-bottom: 0;
        text-align: start;
    }

    .hero::before {
        background: radial-gradient(circle at 70% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 60%);
    }

    .hero-content {
        flex: 1;
        padding: 0 4rem;
        max-width: 600px;
        text-align: start;
        margin-inline-start: max(0px, calc((100vw - 1280px) / 2));
    }

    .hero-title {
        font-size: 4.5rem;
        line-height: 1.1;
    }

    .hero-image {
        display: flex;
        flex: 1;
        height: 100vh;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    /* Abstract Shape for Desktop Hero Image Placeholder */
    .hero-abstract {
        width: 80%;
        height: 80%;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
        border: 1px solid rgba(212, 175, 55, 0.3);
        border-radius: 20px 100px 20px 100px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
        position: relative;
        overflow: hidden;
        transform: rotate(5deg);
        transition: transform var(--transition-slow);
    }

    .hero-abstract::after {
        content: '';
        position: absolute;
        top: -50%;
        inset-inline-start: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
        animation: pulseBg 10s infinite alternate linear;
    }

    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .product-actions {
        opacity: 0;
        transform: translateX(10px);
        transition: all var(--transition-normal);
    }

    html[dir="rtl"] .product-actions {
        transform: translateX(-10px);
    }

    .product-card:hover .product-actions {
        opacity: 1;
        transform: translateX(0);
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
        gap: 3rem;
    }
}

/* ==========================================
   ADVANCED PAGE BUILDER BLOCKS
========================================== */

/* 1. Category Circles */
.category-circles-wrapper {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 1rem 0 2rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
}
.category-circles-wrapper::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
}
.cat-circle-item {
    scroll-snap-align: start;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    min-width: 100px;
    transition: transform var(--transition-fast);
}
.cat-circle-item:hover {
    transform: translateY(-5px);
}
.cat-circle-img-wrap {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--clr-gray-medium);
    border: 3px solid transparent;
    transition: border-color var(--transition-fast);
    box-shadow: var(--shadow-sm);
}
.cat-circle-item:hover .cat-circle-img-wrap {
    border-color: var(--clr-gold);
}
.cat-circle-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cat-circle-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--clr-navy);
}

/* 2. Flash Sale Countdown */
.flash-sale-block {
    background: linear-gradient(135deg, #e63946, #b01c27);
    color: var(--clr-white);
    padding: 3rem 0;
    border-radius: 12px;
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
}
.flash-sale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.flash-sale-title {
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.countdown-timer {
    display: flex;
    gap: 0.8rem;
}
.cd-box {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    padding: 0.8rem;
    min-width: 65px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.cd-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}
.cd-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-top: 0.3rem;
    opacity: 0.9;
}
.flash-products {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
}
.flash-products .product-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: var(--clr-white);
    color: var(--clr-text-main);
}
.flash-products::-webkit-scrollbar {
    height: 6px;
}
.flash-products::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.5);
    border-radius: 4px;
}

/* 3. Shoppable Image (Hotspots) */
.shoppable-wrapper {
    position: relative;
    width: 100%;
    margin: 3rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 16/9;
}
.shoppable-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hotspot-dot {
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: var(--clr-white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--clr-gold);
}
.hotspot-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--clr-gold);
    opacity: 0.5;
    animation: hotspotPulse 2s infinite ease-out;
}
@keyframes hotspotPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}
.hotspot-tooltip {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--clr-white);
    color: var(--clr-navy);
    padding: 0.8rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-lg);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.hotspot-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--clr-white);
}
.hotspot-dot:hover .hotspot-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 4. Product Carousel */
.product-slider-container {
    padding: 3rem 0;
}

/* ==========================================
   8. Hero Slider
   ========================================== */
.hero-slider {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 450px;
    max-height: 800px;
    overflow: hidden;
    background-color: var(--clr-navy);
    touch-action: pan-y pinch-zoom;
}

.hero-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    z-index: 2;
}

.hero-slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    user-select: none;
    -webkit-user-drag: none;
}

.hero-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    padding: 2rem 1.25rem 4rem;
    height: 100%;
    box-sizing: border-box;
}

.hero-slide-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 5vw, 4.5rem);
    font-weight: 700;
    color: var(--clr-white);
    margin-bottom: 0.5rem;
    line-height: 1.2;
    max-width: 900px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-slide-subtitle {
    font-size: clamp(0.85rem, 2.5vw, 1.35rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    max-width: 700px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-slide-content .btn {
    font-size: clamp(0.8rem, 2vw, 1rem);
    padding: 0.65rem 1.5rem;
}

/* Arrow buttons */
.hero-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: rgba(10, 25, 47, 0.4);
    backdrop-filter: blur(4px);
    color: var(--clr-white);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.hero-slider-arrow:hover {
    background: var(--clr-gold);
    border-color: var(--clr-gold);
    color: var(--clr-navy);
    transform: translateY(-50%) scale(1.1);
}

.hero-slider-prev { left: 1.5rem; }
.hero-slider-next { right: 1.5rem; }

html[dir="rtl"] .hero-slider-prev { left: auto; right: 1.5rem; }
html[dir="rtl"] .hero-slider-next { right: auto; left: 1.5rem; }

/* Dot indicators */
.hero-slider-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 0.6rem;
}

.hero-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
}

.hero-slider-dot.active {
    background: var(--clr-gold);
    border-color: var(--clr-gold);
    transform: scale(1.25);
}

.hero-slider-dot:hover {
    border-color: var(--clr-white);
    background: rgba(255, 255, 255, 0.3);
}

/* ---- Responsive Hero Slider ---- */

/* Tablet */
@media (min-width: 768px) {
    .hero-slide-content {
        justify-content: center;
        padding: 3rem 2rem 5rem;
    }
}

/* Desktop */
@media (min-width: 992px) {
    .hero-slider { height: 85vh; min-height: 550px; }
    .hero-slide-content { padding: 4rem 3rem 6rem; }
}

/* Mobile */
@media (max-width: 767px) {
    .hero-slider {
        height: 55vh;
        min-height: 300px;
        max-height: 500px;
    }

    .hero-slide-content {
        justify-content: flex-end;
        padding: 1rem 1rem 3.5rem;
    }

    .hero-slide-title {
        font-size: clamp(1.3rem, 6vw, 1.8rem);
        margin-bottom: 0.35rem;
    }

    .hero-slide-subtitle {
        font-size: clamp(0.78rem, 3vw, 0.95rem);
        margin-bottom: 1rem;
        line-height: 1.4;
    }

    .hero-slide-content .btn {
        font-size: 0.8rem;
        padding: 0.5rem 1.2rem;
    }

    .hero-slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
        border-width: 1.5px;
    }
    .hero-slider-prev { left: 0.5rem; }
    .hero-slider-next { right: 0.5rem; }

    .hero-slider-dots { bottom: 0.75rem; gap: 0.5rem; }
    .hero-slider-dot { width: 9px; height: 9px; }
}

/* Very small phones */
@media (max-width: 380px) {
    .hero-slider { height: 50vh; min-height: 260px; }
    .hero-slide-content { padding: 0.75rem 0.75rem 3rem; }
    .hero-slider-arrow { display: none; }
}
/* ==========================================
   9. Home Banner (Promotion Banner)
   ========================================== */
.home-banner {
    width: 100%;
    /* Default to 400px if variable is missing */
    height: var(--banner-height, 400px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--clr-white);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    padding: 0 1.5rem;
}

.home-banner-content {
    position: relative;
    z-index: 2;
    background: rgba(10, 25, 47, 0.4);
    padding: 2rem 3rem;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.home-banner-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    color: var(--clr-gold);
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.home-banner-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.25rem);
    opacity: 0.95;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
    margin: 0;
    max-width: 800px;
}

@media (max-width: 767px) {
    .home-banner {
        /* Scale down the height proportionally for smaller screens but keep a minimum functional height */
        height: calc(var(--banner-height, 400px) * 0.65);
        min-height: 180px;
    }

    .home-banner-content {
        padding: 1.5rem 1rem;
    }
}

.product-slider-wrapper {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.product-slider-wrapper::-webkit-scrollbar {
    display: none;
}
.product-slider-wrapper .product-card {
    flex: 0 0 calc(25% - 1.5rem);
    min-width: 250px;
    scroll-snap-align: start;
}

/* 5. Brand Slider */
.brand-slider-container {
    padding: 3rem 0;
    background: var(--clr-gray-light);
    border-top: 1px solid var(--clr-gray-medium);
    border-bottom: 1px solid var(--clr-gray-medium);
    overflow: hidden;
    margin: 2rem 0;
}
.brand-track {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: max-content;
    animation: scrollLogos 30s linear infinite;
}
.brand-track:hover {
    animation-play-state: paused;
}
.brand-logo-wrap {
    flex: 0 0 auto;
    height: 60px;
    width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.brand-logo-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.5);
    transition: all var(--transition-normal);
}
.brand-logo-wrap:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}
@keyframes scrollLogos {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 6. Trust Badges */
.trust-badges-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2.5rem 0;
    margin: 2rem 0;
    border-top: 1px solid var(--clr-gray-medium);
    border-bottom: 1px solid var(--clr-gray-medium);
}
.trust-badge-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.tb-icon {
    font-size: 2.2rem;
    color: var(--clr-gold);
}
.tb-text h4 {
    font-size: 1.1rem;
    color: var(--clr-navy);
    margin-bottom: 0.2rem;
}
.tb-text p {
    font-size: 0.9rem;
    color: var(--clr-gray-dark);
}

/* 7. Video Hero */
.video-hero-block {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}
.video-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.6);
    z-index: -1;
}
.video-hero-content {
    text-align: center;
    color: var(--clr-white);
    max-width: 800px;
    padding: 0 2rem;
    z-index: 1;
}
.video-hero-content h2 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.video-hero-content .btn {
    font-size: 1.2rem;
    padding: 1rem 3rem;
}

/* Responsive adjustments for advanced blocks */
@media (max-width: 768px) {
    .shoppable-wrapper {
        aspect-ratio: 4/5;
    }
    .video-hero-block {
        height: 60vh;
    }
    .video-hero-content h2 {
        font-size: 2.5rem;
    }
    .flash-sale-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================= */
/* Category Circles (Enhanced Mobile & Shape) */
/* ========================================= */
.category-circles-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1.5rem;
    justify-content: center;
    text-align: center;
}
@media (max-width: 600px) {
    .category-circles-wrapper {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 1rem;
    }
}
.cat-circle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--clr-text-main);
    transition: transform 0.3s ease;
    cursor: pointer;
}
.cat-circle-item:hover {
    transform: translateY(-5px);
}
.cat-circle-img-wrap {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: #f4f4f4;
    border: 2px solid var(--clr-gold);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1/1; /* Enforce strict perfect circle */
}
@media (max-width: 600px) {
    .cat-circle-img-wrap {
        width: 80px;
        height: 80px;
    }
}
.cat-circle-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; /* Double enforce */
    transition: transform 0.4s ease;
}
.cat-circle-item:hover .cat-circle-img {
    transform: scale(1.1);
}
.cat-circle-label {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--clr-navy);
}
