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

:root {
    --primary: #0f172a;        /* Navy Ocean */
    --primary-light: #1e293b;
    --accent: #b45309;         /* Gold Accent */
    --accent-hover: #92400e;
    --accent-light: #fef3c7;
    --bg-warm: #faf8f5;        /* Sand Cream */
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --whatsapp-green: #25d366;
    --whatsapp-green-hover: #128c7e;
    --promo-red: #ef4444;
    --promo-red-hover: #dc2626;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 20px 40px -15px rgba(15, 23, 42, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-warm);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* RTL Support Helper */
body.rtl {
    direction: rtl;
}

a {
    text-decoration: none;
    color: inherit;
}

button, input, select, textarea {
    font-family: inherit;
}

/* Layout Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Navbar */
header {
    background: rgba(250, 248, 245, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: var(--transition-smooth);
}

header.scrolled {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.navbar {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: var(--accent-light);
    color: var(--accent);
    padding: 4px 8px;
    border-radius: 4px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Language Button */
.lang-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.lang-btn:hover {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.02);
}

/* Hero Section */
.hero {
    padding-top: 140px;
    padding-bottom: 60px;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 80% 20%, #fef3c7 0%, var(--bg-warm) 60%);
    min-height: 85vh;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    color: var(--accent);
    background: var(--accent-light);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 52px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--primary);
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-cta {
    display: flex;
    gap: 16px;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    padding: 16px 32px;
    border-radius: 30px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(180, 83, 9, 0.15);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    padding: 16px 32px;
    border-radius: 30px;
    font-weight: 600;
    border: 1px solid var(--primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.hero-image-container {
    position: relative;
    height: 520px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transition: var(--transition-smooth);
}

.hero-image-container:hover img {
    transform: scale(1.05);
}

/* Category Filter Bar */
.filter-bar {
    padding: 40px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.filter-chips {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    width: 100%;
    max-width: 800px;
}

.filter-chip {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.filter-chip.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.filter-chip:hover:not(.active) {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.02);
}

/* Promotions Chip styling */
.filter-chip.promo-chip.active {
    background: var(--promo-red) !important;
    color: #ffffff !important;
    border-color: var(--promo-red) !important;
}

.filter-chip.promo-chip:hover:not(.active) {
    background: rgba(239, 68, 68, 0.05) !important;
    border-color: var(--promo-red) !important;
}

.search-box {
    position: relative;
    width: 320px;
}

@media (max-width: 991px) {
    .filter-chips {
        max-width: 100%;
    }
    .search-box {
        width: 100%;
    }
}

.search-box input {
    width: 100%;
    padding: 12px 18px;
    padding-left: 45px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

body.rtl .search-box input {
    padding-left: 18px;
    padding-right: 45px;
}

.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.1);
}

.search-box svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

body.rtl .search-box svg {
    left: auto;
    right: 16px;
}

/* Products Grid */
.products-section {
    padding: 60px 0;
}

.section-header {
    margin-bottom: 40px;
    text-align: center;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 16px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

/* Product Card */
.product-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    border: 1px solid rgba(15, 23, 42, 0.03);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

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

.product-image {
    height: 380px;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

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

.product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    z-index: 2;
}

body.rtl .product-badge {
    left: auto;
    right: 16px;
}

.product-badge.promo {
    background: linear-gradient(135deg, var(--promo-red) 0%, #b91c1c 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.product-card-details {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.3;
    height: 48px; /* Fixed height for 2 lines of text */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 44px;
}

.product-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.05);
}

.price-container {
    display: flex;
    flex-direction: column;
}

.old-price {
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}

.price-tag {
    font-weight: 700;
    font-size: 16px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 4px;
}

.price-tag.promo {
    color: var(--promo-red);
}

@keyframes pulse-btn-blue {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(15, 23, 42, 0.35);
    }
    70% {
        transform: scale(1.04);
        box-shadow: 0 0 0 8px rgba(15, 23, 42, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(15, 23, 42, 0);
    }
}

.btn-card-buy {
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-smooth);
    animation: pulse-btn-blue 2.5s infinite; /* Pulsating buy button */
}

.product-card:hover .btn-card-buy {
    background: var(--accent);
    animation: none;
}

/* Modals (Split Layout Product details & Direct Checkout) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
    padding: 20px;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 1050px;
    height: 90vh;
    max-height: 850px;
    border-radius: 30px;
    box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: var(--transition-smooth);
}

@media (max-width: 991px) {
    .modal-container {
        height: 90vh;
        max-height: 90vh;
        overflow-y: auto;
    }
}

.modal-overlay.open .modal-container {
    transform: translateY(0) scale(1);
}

.btn-close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 100;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.rtl .btn-close-modal {
    right: auto;
    left: 20px;
}

.btn-close-modal:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Rich Details Modal Split Grid */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    height: 100%;
    min-height: 0; /* Enable inner scrolling for grid children */
}

@media (max-width: 991px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
}

/* Left Side: Media Gallery */
.modal-media-gallery {
    padding: 30px;
    background: #f8fafc;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 0; /* Enable inner shrinking */
}

body.rtl .modal-media-gallery {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

@media (max-width: 991px) {
    .modal-media-gallery {
        padding: 20px;
        height: auto;
        border-right: none;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
    }
}

.modal-main-display {
    width: 100%;
    height: 480px;
    border-radius: 20px;
    overflow: hidden;
    background: #e2e8f0;
    box-shadow: var(--shadow-premium);
    position: relative;
}

@media (max-width: 991px) {
    .modal-main-display {
        height: 350px;
    }
}

.modal-main-display img, .modal-main-display video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-main-display video {
    object-position: center;
}

.modal-thumbnails-strip {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.modal-thumbnail {
    width: 72px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: var(--transition-smooth);
    background: #e2e8f0;
    flex-shrink: 0;
    position: relative;
}

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

.modal-thumbnail.active {
    border-color: var(--accent);
    opacity: 1;
}

.modal-thumbnail:hover {
    opacity: 1;
}

/* Video Thumbnail overlay */
.modal-thumbnail.video-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1;
}

.modal-thumbnail.video-btn::after {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-play"><polygon points="6 3 20 12 6 21 6 3"/></svg>');
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* Right Side: Product Details & Checkout Form */
.modal-checkout-section {
    padding: 40px;
    overflow-y: auto;
    height: 100%;
    min-height: 0; /* Allow the flex panel to shrink and scroll */
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (max-width: 991px) {
    .modal-checkout-section {
        padding: 24px;
        height: auto;
        overflow-y: visible;
    }
}

.modal-product-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
    margin-bottom: 12px;
}

.modal-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.modal-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--accent);
}

.modal-price.promo {
    color: var(--promo-red);
}

.modal-old-price {
    font-size: 18px;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 500;
}

.delivery-badge-modal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    background: #d1fae5;
    color: #065f46;
    padding: 6px 14px;
    border-radius: 30px;
    margin-left: 12px;
}

body.rtl .delivery-badge-modal {
    margin-left: 0;
    margin-right: 12px;
}

/* Size / Options selectors */
.modal-options-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.options-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.options-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.option-select-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    min-width: 65px; /* Uniform width for all options */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.option-select-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.option-select-btn:hover:not(.active) {
    border-color: var(--primary);
}

/* Tabs: Description, Livraison */
.modal-tabs-container {
    border-bottom: 1px solid var(--border-color);
}

.modal-tabs-header {
    display: flex;
    gap: 20px;
}

.modal-tab-btn {
    background: none;
    border: none;
    padding-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
}

.modal-tab-btn.active {
    color: var(--primary);
}

.modal-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

.modal-tab-content {
    padding: 16px 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Direct Checkout Form inside Modal */
.checkout-form-container {
    background: var(--bg-warm);
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 20px;
    padding: 20px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.01);
}

.checkout-form-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkout-form-title svg {
    color: var(--whatsapp-green);
}

.checkout-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 768px) {
    .checkout-grid-2 {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 12px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 5px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    background: #ffffff;
    transition: var(--transition-smooth);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.1);
}

.form-group textarea {
    height: 60px;
    resize: none;
}

@keyframes pulse-btn-wa {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.btn-submit-checkout-wa {
    width: 100%;
    background: var(--whatsapp-green);
    color: #ffffff;
    border: none;
    padding: 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.15);
    animation: pulse-btn-wa 2s infinite; /* Pulsating green checkout button */
}

.btn-submit-checkout-wa:hover {
    background: var(--whatsapp-green-hover);
    transform: translateY(-2px);
    animation: none;
}

/* Floating WhatsApp Button */
.floating-wa-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--whatsapp-green);
    color: #ffffff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.3);
    cursor: pointer;
    z-index: 99;
    transition: var(--transition-smooth);
}

body.rtl .floating-wa-btn {
    left: auto;
    right: 30px;
}

.floating-wa-btn:hover {
    background: var(--whatsapp-green-hover);
    transform: translateY(-5px) scale(1.05);
}

/* Footer */
footer {
    background: var(--primary);
    color: #ffffff;
    padding: 60px 0 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-brand h4 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.footer-brand p {
    color: #94a3b8;
    max-width: 320px;
    font-size: 14px;
    margin-bottom: 20px;
}

.footer-links h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #ffffff;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #94a3b8;
    font-size: 14px;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 4px;
}

body.rtl .footer-links a:hover {
    padding-left: 0;
    padding-right: 4px;
}

.footer-contact h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-contact p {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #64748b;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    .hero-content h1 {
        font-size: 38px;
    }
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-cta {
        justify-content: center;
    }
    .hero-image-container {
        height: 320px;
    }
}

@media (max-width: 768px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-end; /* Bottom sheet style */
    }
    
    .modal-container {
        height: 90vh;
        height: 90dvh; /* Dynamic viewport height to prevent browser bar cut-off */
        max-height: 90vh;
        max-height: 90dvh;
        border-radius: 24px 24px 0 0;
        overflow-y: auto !important; /* Explicitly force scrollbar on container */
        transform: translateY(100%) scale(1); /* Slide from bottom */
    }
    
    .modal-overlay.open .modal-container {
        transform: translateY(0) scale(1);
    }
    
    .btn-close-modal {
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    /* Mobile Form and Layout optimizations for better spacing & sizes */
    .modal-checkout-section {
        padding: 16px 16px 60px 16px !important; /* Extra bottom padding so scroll has room for WhatsApp button! */
        gap: 16px !important;
    }

    .modal-product-header h2 {
        font-size: 20px !important;
        margin-bottom: 6px !important;
    }

    .modal-price {
        font-size: 22px !important;
    }

    .option-select-btn {
        padding: 6px 10px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
        min-width: 55px !important;
    }

    .product-title {
        height: 38px !important; /* Enforce uniform mobile grid title heights */
    }

    .checkout-form-container {
        padding: 14px !important;
        border-radius: 16px !important;
    }

    .checkout-form-title {
        font-size: 15px !important;
        margin-bottom: 10px !important;
    }

    .form-group {
        margin-bottom: 10px !important;
    }

    .form-group label {
        font-size: 12px !important;
        margin-bottom: 3px !important;
    }

    .form-group input {
        padding: 10px 12px !important;
        font-size: 13px !important;
        border-radius: 10px !important;
    }

    .btn-submit-checkout-wa {
        padding: 12px 16px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
        margin-top: 6px !important;
    }
}

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: 1fr 1fr; /* 2-column grid on mobile */
        gap: 12px;
    }
    
    .product-card {
        border-radius: 16px;
    }
    
    .product-image {
        height: 220px; /* shorter image for 2-column mobile layout */
    }
    
    .product-card-details {
        padding: 12px;
        gap: 8px;
    }
    
    .product-title {
        font-size: 14px;
        height: 38px;
        overflow: hidden;
        margin-bottom: 2px;
    }
    
    .product-desc {
        display: none; /* hide description in catalog grid on mobile */
    }
    
    .product-meta-row {
        padding-top: 8px;
    }
    
    .price-tag {
        font-size: 14px;
    }
    
    .old-price {
        font-size: 11px;
    }
    
    .btn-card-buy {
        padding: 8px 12px;
        font-size: 11px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .navbar {
        height: 70px;
    }
    .hero {
        padding-top: 100px;
        padding-bottom: 30px;
    }
    .logo {
        font-size: 20px;
    }
    .logo span {
        font-size: 9px;
        letter-spacing: 1.5px;
    }
    .hero-content h1 {
        font-size: 30px;
    }
    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
    .filter-bar {
        padding: 16px 0;
    }
    .modal-main-display {
        height: 280px;
    }
    .modal-media-gallery {
        padding: 12px;
    }
    .modal-checkout-section {
        padding: 16px;
    }
    .checkout-form-container {
        padding: 16px;
    }
}

/* Page routing views */
.hidden {
    display: none !important;
}

#productView {
    padding: 30px 0 60px 0;
    background: #ffffff;
    min-height: 75vh;
}

.product-page-container {
    max-width: 1100px;
    margin: 0 auto;
}

.back-navigation {
    margin-bottom: 24px;
    padding: 0 16px;
}

.btn-back {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.btn-back svg {
    transition: transform 0.2s ease;
}

.btn-back:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.btn-back:hover svg {
    transform: translateX(-4px);
}

body.rtl .btn-back svg {
    transform: scaleX(-1);
}

body.rtl .btn-back:hover svg {
    transform: scaleX(-1) translateX(-4px);
}

/* Render layout in full page flow */
#productView .product-detail-grid {
    height: auto;
    min-height: auto;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}

#productView .modal-media-gallery {
    height: auto;
    min-height: auto;
}

#productView .modal-checkout-section {
    height: auto;
    min-height: auto;
    overflow-y: visible;
}

@media (max-width: 991px) {
    #productView .product-detail-grid {
        border: none;
        box-shadow: none;
        border-radius: 0;
    }
}
