/*
Theme Name: BooksDZ Premium
Theme URI: https://booksdz.com
Author: BooksDZ Team
Description: Un thème e-commerce moderne à 3 niveaux (Inspiré de LivresMédicauxAlger).
Version: 2.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=Josefin+Sans:wght@300;400;600;700&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    --primary-color: #111111;
    --bordeaux: #800020;
    --bordeaux-hover: #5a0016;
    --gold: #d4af37;
    --bg-color: #fdf8f3;
    --bg-warm: #faf5ee;
    --gold-light: #f5ecd4;
    --border-color: #e2e8f0;
    --text-color: #333333;
    --text-light: #64748b;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Josefin Sans', sans-serif;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--bordeaux); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--bordeaux-hover); }

.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* --- 3-Tier Header --- */
.top-promo-banner { background: #000; color: #fff; text-align: center; font-size: 0.85rem; padding: 8px 0; letter-spacing: 1px; }
.top-promo-banner i { color: var(--gold); margin-right: 8px; }

.main-header { background: #fff; padding: 25px 0; border-bottom: 1px solid #f0f0f0; }
.header-container { display: flex; align-items: center; justify-content: space-between; gap: 40px; }

.site-branding a { display: flex; align-items: center; gap: 10px; color: var(--primary-color); }
.logo-icon { font-size: 2.2rem; color: var(--bordeaux); }
.logo-text { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 700; text-transform: uppercase; line-height: 1; }
.logo-text span { color: var(--gold); }

.header-contact { display: flex; align-items: center; gap: 15px; }
.header-contact i { font-size: 2rem; color: var(--bordeaux); }
.contact-text { display: flex; flex-direction: column; }
.support-title { font-size: 0.8rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; }
.support-phone { font-size: 1.1rem; font-weight: 700; color: var(--primary-color); }

/* --- Bottom Navigation --- */
.bottom-nav { background: var(--bordeaux); color: #fff; position: relative; z-index: 100; }
.nav-container { display: flex; align-items: center; justify-content: space-between; gap: 40px; }

.categories-menu-trigger {
    background: var(--bordeaux-hover); padding: 18px 30px; cursor: pointer; display: flex; align-items: center; gap: 15px;
    font-weight: 600; text-transform: uppercase; letter-spacing: 1px; transition: var(--transition); white-space: nowrap;
}
.categories-menu-trigger:hover { background: #000; }
.categories-menu-trigger i { font-size: 1.2rem; }

.header-search { flex: 1; max-width: 700px; width: 100%; }
.header-search form { display: flex; border: 2px solid #fff; border-radius: 30px; overflow: hidden; background: #fff; }
.header-search input { flex: 1; padding: 12px 25px; border: none; outline: none; font-family: var(--font-body); font-size: 1rem; color: var(--primary-color); }
.header-search input::placeholder { color: var(--text-light); }
.header-search button { background: var(--gold); color: #000; border: none; padding: 0 25px; cursor: pointer; transition: var(--transition); font-size: 1.1rem; }
.header-search button:hover { background: #c5a02c; }

.header-user-actions { display: flex; align-items: center; gap: 25px; white-space: nowrap; }
.action-btn { color: #fff; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; font-weight: 500; font-family: var(--font-body); text-transform: uppercase; font-size: 0.85rem;}
.action-btn:hover { color: var(--gold); }
.header-cart-btn { position: relative; }
.cart-count {
    position: absolute; top: -10px; right: -15px; background: var(--gold); color: #000; font-size: 0.75rem; font-weight: 700;
    width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* --- Off-Canvas Categories Drawer --- */
.mobile-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 998; opacity: 0; visibility: hidden; transition: var(--transition); }
.mobile-overlay.active { opacity: 1; visibility: visible; }

.categories-drawer {
    position: fixed; top: 0; left: -350px; width: 350px; height: 100vh; background: #fff; z-index: 999;
    box-shadow: var(--shadow-lg); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); overflow-y: auto;
}
.categories-drawer.active { transform: translateX(350px); }

.drawer-header {
    background: var(--bordeaux); color: #fff; padding: 25px; display: flex; justify-content: space-between; align-items: center;
}
.drawer-header h3 { color: #fff; margin: 0; font-size: 1.2rem; display: flex; align-items: center; gap: 10px; font-family: var(--font-body); text-transform: uppercase; letter-spacing: 1px;}
.close-drawer { background: transparent; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

.drawer-menu { list-style: none; padding: 0; margin: 0; }
.drawer-menu li { border-bottom: 1px solid #f0f0f0; }
.drawer-menu a { display: block; padding: 18px 25px; color: var(--text-color); font-weight: 600; font-size: 1rem; transition: var(--transition); }
.drawer-menu a:hover { color: var(--bordeaux); background: #fafafa; padding-left: 30px; }
.drawer-menu .cat-item-none { padding: 18px 25px; color: var(--text-light); }

/* Nested Categories (Simple accordion for now) */
.drawer-menu ul.children { display: none; background: #f9f9f9; }
.drawer-menu li.expanded > ul.children { display: block; }
.drawer-menu ul.children a { padding-left: 40px; font-size: 0.95rem; font-weight: 500; }
.drawer-menu li.cat-parent > a::after { content: '\f107'; font-family: 'Font Awesome 6 Free'; font-weight: 900; float: right; transition: transform 0.3s; }
.drawer-menu li.cat-parent.expanded > a::after { transform: rotate(180deg); }

/* --- Mobile Adjustments --- */
.mobile-menu-btn, .mobile-cart-icon { display: none; }

@media (max-width: 1024px) {
    .top-promo-banner { display: none; }
    .header-contact { display: none; }
    .bottom-nav { display: none; }
    
    .mobile-menu-btn { display: block; font-size: 1.5rem; color: var(--primary-color); cursor: pointer; }
    .mobile-cart-icon { display: block; position: relative; font-size: 1.5rem; color: var(--primary-color); }
    .mobile-cart-icon .cart-count {
        position: absolute; top: -8px; right: -8px; background: var(--bordeaux); color: #fff; font-size: 0.7rem; font-weight: 700;
        width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    }
    
    .header-container { flex-wrap: wrap; justify-content: space-between; padding: 15px 20px; gap: 15px; }
    .site-branding { order: 2; margin: 0 auto; }
    .mobile-menu-btn { order: 1; }
    .mobile-cart-icon { order: 3; }
    .header-search { order: 4; flex: 0 0 100%; max-width: 100%; margin-top: 10px; }
}

/* --- WooCommerce Product Grid --- */
.site-wrapper { padding-top: 40px; }
.woocommerce ul.products { 
    display: grid; 
    grid-template-columns: repeat(5, 1fr); 
    gap: 30px; 
    list-style: none; 
    margin: 0; 
    padding: 0; 
}

.woocommerce ul.products li.product { 
    background: linear-gradient(145deg, #ffffff, #fdfaf7); 
    padding: 22px; 
    border-radius: 16px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04); 
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    text-align: center;
    position: relative;
    border: 1px solid rgba(212,175,55,0.15);
    width: 100% !important;
    margin: 0 !important;
    overflow: hidden;
}
.woocommerce ul.products li.product:hover { 
    box-shadow: 0 20px 50px rgba(128,0,32,0.12), 0 8px 20px rgba(0,0,0,0.08); 
    transform: translateY(-6px); 
    border-color: rgba(212,175,55,0.35);
}
.woocommerce ul.products li.product::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bordeaux), var(--gold));
    opacity: 0;
    transition: opacity 0.3s ease;
}
.woocommerce ul.products li.product:hover::before { opacity: 1; }

/* Images Container to force uniform heights */
.woocommerce ul.products li.product > a.woocommerce-LoopProduct-link {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    margin-bottom: 15px;
}
.woocommerce ul.products li.product a img { 
    object-fit: contain; 
    width: 100%; 
    height: 250px; /* Fixed height to ensure all cards align perfectly */
    margin-bottom: 15px; 
    transition: transform 0.5s ease;
}
.woocommerce ul.products li.product:hover a img {
    transform: scale(1.05);
}

/* Titles */
.woocommerce ul.products li.product .woocommerce-loop-product__title { 
    font-size: 1.05rem; 
    font-family: var(--font-heading); 
    font-weight: 700; 
    color: var(--primary-color); 
    margin: 0 0 15px; 
    line-height: 1.4;
    /* Line Clamp to max 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

/* Prices */
.woocommerce ul.products li.product .price { 
    color: #fff;
    font-weight: 700; 
    font-size: 1.1rem; 
    margin-bottom: 0; 
    display: inline-block;
    margin-top: auto;
    background: linear-gradient(135deg, var(--bordeaux), #a0002a);
    padding: 6px 16px;
    border-radius: 50px;
    box-shadow: 0 3px 10px rgba(128,0,32,0.25);
}

/* Modern Buttons */
.loop-action-buttons { 
    display: flex; 
    flex-direction: row; 
    gap: 10px; 
    margin-top: auto;
}
.woocommerce ul.products li.product .button {
    flex: 1;
    background: transparent; 
    color: var(--primary-color); 
    border: 2px solid var(--border-color); 
    padding: 10px 5px; 
    border-radius: 6px;
    font-size: 0.8rem; 
    text-transform: uppercase; 
    font-weight: 700; 
    letter-spacing: 0.5px; 
    cursor: pointer; 
    transition: var(--transition);
}
.woocommerce ul.products li.product .button.btn-buy-now { 
    background: var(--bordeaux); 
    color: #fff;
    border-color: var(--bordeaux);
}
.woocommerce ul.products li.product .button:hover { 
    background: #000; 
    color: #fff; 
    border-color: #000;
}
.woocommerce ul.products li.product .button.btn-buy-now:hover {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

/* Responsive Grid */
@media (max-width: 1200px) {
    .woocommerce ul.products { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}
@media (max-width: 992px) {
    .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); }
    .woocommerce ul.products li.product a img { height: 220px; }
}
@media (max-width: 768px) {
    .woocommerce ul.products { grid-template-columns: 1fr; gap: 15px; }
    .woocommerce ul.products li.product { padding: 15px; }
    .loop-action-buttons { flex-direction: column; gap: 8px; }
    .woocommerce ul.products li.product .button { padding: 12px 5px; }
    .woocommerce ul.products li.product a img { height: 180px; }
    .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 1rem; }
}

/* --- Footer --- */
.site-footer { background: #fff; border-top: 1px solid var(--border-color); padding: 80px 0 0; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 60px; margin-bottom: 60px; }
.footer-brand h3 { font-size: 2.5rem; margin-bottom: 20px; font-family: var(--font-heading); color: var(--primary-color); }
.footer-brand p { color: var(--text-light); }
.footer-widget h4 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 25px; color: var(--primary-color); }
.footer-widget ul { list-style: none; }
.footer-widget ul li { margin-bottom: 12px; }
.footer-widget ul li a { color: var(--text-light); }
.footer-widget ul li a:hover { color: var(--bordeaux); }
.footer-bottom { border-top: 1px solid var(--border-color); padding: 25px 0; background: #f8fafc; }
.bottom-inner { display: flex; justify-content: space-between; align-items: center; color: var(--text-light); font-size: 0.9rem; }
@media (max-width: 768px) { .bottom-inner { flex-direction: column; gap: 15px; text-align: center; } }

/* --- Single Product Page (Premium Redesign) --- */
.single-product-wrapper {
    background: linear-gradient(180deg, #fdf8f3 0%, #ffffff 40%);
    padding: 40px 0 60px;
}
.product-layout-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin: 0 auto;
    align-items: start;
}

/* Colonne gauche : image + formulaire empilés */
.product-left-col {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: sticky;
    top: 20px;
    align-self: start;
}

/* Colonne droite : infos */
.product-details-section {
    padding: 10px 0;
}

/* Image Presentation */
.product-gallery-section {
    /* Not sticky anymore — parent .product-left-col is sticky */
}
.product-image-frame {
    background: linear-gradient(145deg, #fdf5e8, #f5ead5);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(128,0,32,0.10), 0 8px 25px rgba(0,0,0,0.07);
    border: 1px solid rgba(212,175,55,0.2);
    text-align: center;
}
.main-product-image { 
    width: 100%;
    max-width: 340px;
    height: auto; 
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.18);
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-block;
}
.main-product-image:hover {
    transform: scale(1.03) translateY(-6px);
}

/* Product Details */
.product-details-section { 
    padding: 10px 0; 
}
.product-title { 
    font-size: 3rem; 
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px; 
    color: var(--primary-color); 
}
.product-price { 
    font-size: 2.2rem; 
    color: var(--bordeaux); 
    font-weight: 800; 
    margin-bottom: 25px; 
    display: inline-block;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    width: 100%;
}
.product-short-description { 
    font-size: 1.15rem; 
    color: var(--text-light); 
    margin-bottom: 40px; 
    line-height: 1.8; 
}

/* Express Checkout Form Box (High Conversion Card) */
.express-checkout-box { 
    background: linear-gradient(160deg, #ffffff 0%, #fdfaf7 100%);
    padding: 40px; 
    border-radius: 20px; 
    box-shadow: 0 25px 60px rgba(0,0,0,0.10), 0 4px 15px rgba(128,0,32,0.05);
    border: 1px solid rgba(212,175,55,0.25);
    margin-top: 30px;
    position: relative;
}
.express-checkout-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bordeaux), var(--gold), var(--bordeaux));
    border-radius: 20px 20px 0 0;
}
.express-checkout-box .checkout-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    gap: 8px;
}
.checkout-secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac;
    color: #166534;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}
.checkout-secure-badge i { font-size: 0.85rem; }
.express-checkout-box h3 { 
    margin: 0; 
    font-size: 1.7rem; 
    font-family: var(--font-heading); 
    color: var(--primary-color); 
    text-align: center;
    font-weight: 700;
}

.form-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    margin-bottom: 25px; 
}
.form-row { 
    margin-bottom: 0; 
}
.form-row.full { 
    grid-column: span 2; 
}
.form-row label { 
    display: block; 
    margin-bottom: 10px; 
    font-weight: 700; 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    color: var(--text-light); 
}
.form-row input, .form-row select { 
    width: 100%; 
    padding: 15px 18px; 
    border: 1.5px solid #e2e8f0; 
    border-radius: 12px; 
    font-family: inherit; 
    font-size: 1rem; 
    background: #fafafa;
    transition: all 0.3s ease; 
    color: var(--primary-color);
    appearance: auto;
}
.form-row input:focus, .form-row select:focus { 
    border-color: var(--bordeaux); 
    outline: none; 
    background: #fff; 
    box-shadow: 0 0 0 4px rgba(128, 0, 32, 0.08), 0 2px 8px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}
.form-row input::placeholder { color: #b0bec5; font-style: italic; }

.order-summary { 
    background: linear-gradient(135deg, var(--gold-light), #fdf8f0);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 14px;
    padding: 22px 25px; 
    margin: 25px 0; 
}
.summary-line { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 12px; 
    color: var(--text-light); 
    font-size: 1rem;
    align-items: center;
}
.summary-line span:last-child { font-weight: 700; color: var(--text-color); }
.summary-line.total { 
    font-size: 1.4rem; 
    color: var(--primary-color); 
    font-weight: 900; 
    margin-top: 15px; 
    margin-bottom: 0; 
    padding-top: 15px;
    border-top: 2px solid rgba(212,175,55,0.4);
}
.summary-line.total span:last-child {
    color: var(--bordeaux);
    font-size: 1.6rem;
}

.btn-checkout { 
    width: 100%; 
    padding: 22px; 
    background: linear-gradient(135deg, #8b0022 0%, var(--bordeaux) 50%, #a0002a 100%);
    color: #fff; 
    border: none; 
    border-radius: 50px; 
    font-size: 1.2rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    box-shadow: 0 12px 30px rgba(128,0,32,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}
.btn-checkout::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-checkout:hover { 
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(128,0,32,0.45);
}
.btn-checkout:hover::after { opacity: 1; }

.trust-badges-product { 
    display: flex; 
    justify-content: space-around; 
    gap: 12px; 
    margin-top: 22px; 
    color: var(--text-color); 
    font-size: 0.78rem; 
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.trust-badges-product div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    flex: 1;
    padding: 14px 10px;
    border-radius: 12px;
    background: #f8f4ef;
    border: 1px solid rgba(212,175,55,0.2);
    transition: var(--transition);
}
.trust-badges-product div:hover {
    background: var(--gold-light);
    border-color: rgba(212,175,55,0.5);
    transform: translateY(-2px);
}
.trust-badges-product i {
    color: var(--bordeaux);
    font-size: 1.5rem;
}

/* Long description */
.product-long-description {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #f0f0f0;
}
.product-long-description h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 30px;
}

@media (max-width: 992px) {
    .product-layout-grid { 
        grid-template-columns: 1fr; 
        gap: 50px; 
    }
    .product-gallery-section {
        position: static;
    }
    .form-grid { 
        grid-template-columns: 1fr; 
    }
    .form-row.full { 
        grid-column: span 1; 
    }
    .express-checkout-box {
        padding: 25px;
    }
    .trust-badges-product {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
}

/* --- Breadcrumb --- */
.woocommerce .woocommerce-breadcrumb {
    padding: 15px 20px;
    font-size: 0.88rem;
    color: var(--text-light);
    margin: 0;
}

/* --- Product title area premium --- */
.product-details-section .product-title {
    font-size: 2.6rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #111111 60%, var(--bordeaux));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 18px;
}
.product-details-section .product-price {
    font-size: 2rem;
}

/* --- Image frame glow on hover --- */
.product-image-frame:hover {
    box-shadow: 0 35px 90px rgba(128,0,32,0.18), 0 12px 35px rgba(0,0,0,0.1);
}

/* --- Product meta badges --- */
.product-short-description ul {
    padding-left: 0;
    list-style: none;
}
.product-short-description ul li {
    padding: 8px 14px;
    margin-bottom: 8px;
    background: #f8f4ef;
    border-left: 3px solid var(--bordeaux);
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    color: var(--text-color);
}
.product-short-description ul li strong {
    color: var(--bordeaux);
}

/* --- Shop page hero strip --- */
.woocommerce-products-header {
    background: linear-gradient(135deg, #111 0%, var(--bordeaux) 100%);
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 40px;
    color: #fff;
    text-align: center;
}
.woocommerce-products-header h1 {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin: 0;
}

/* --- Pagination premium --- */
.woocommerce-pagination ul {
    list-style: none;
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 50px 0;
    padding: 0;
}
.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
}
.woocommerce-pagination ul li a:hover {
    background: var(--bordeaux);
    color: #fff;
    border-color: var(--bordeaux);
}
.woocommerce-pagination ul li span.current {
    background: var(--bordeaux);
    color: #fff;
    border-color: var(--bordeaux);
}

/* --- Mobile product layout --- */
@media (max-width: 992px) {
    .product-layout-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
    .product-left-col { position: static; }
    .product-gallery-section { position: static; }
    .product-image-frame { padding: 20px; }
    .product-details-section .product-title { font-size: 1.8rem; -webkit-text-fill-color: #111; }
    .single-product-wrapper { padding: 20px 0 40px; }
    .express-checkout-box { padding: 20px; border-radius: 14px; }
    .btn-checkout { font-size: 1rem; padding: 18px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-row.full { grid-column: span 1; }
    .trust-badges-product { gap: 8px; }
    .trust-badges-product div { padding: 10px 8px; font-size: 0.7rem; }
}

/* --- Scrollbar premium --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--bordeaux); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--bordeaux-hover); }

/* === Formulaire Arabe (RTL) === */
[dir="rtl"].express-checkout-box {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    text-align: right;
}
[dir="rtl"] .checkout-header { direction: rtl; }
[dir="rtl"] .checkout-secure-badge { font-family: 'Tajawal', sans-serif; }
[dir="rtl"] h3 {
    font-family: 'Tajawal', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
}
[dir="rtl"] .form-row label {
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
}
[dir="rtl"] .form-row input,
[dir="rtl"] .form-row select {
    font-family: 'Tajawal', sans-serif;
    text-align: right;
    direction: rtl;
}
[dir="rtl"] .order-summary { font-family: 'Tajawal', sans-serif; direction: rtl; }
[dir="rtl"] .summary-line span { font-family: 'Tajawal', sans-serif; }
[dir="rtl"] .btn-checkout {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 1px;
}
[dir="rtl"] .trust-badges-product { font-family: 'Tajawal', sans-serif; }
[dir="rtl"] .trust-badges-product div { font-size: 0.9rem; letter-spacing: 0; }
