/* ==========================================================================
   TAIBA STATIONERY - STYLES RESPONSIVE (AR / RTL)
   responsive_ar.css  — À charger APRÈS style_ar.css

   Paliers :
   1400px → desktop large
   1250px → cache select catégorie
   1200px → laptops étroits
   1100px → features 2×2
   992px  → hamburger + tablette
   768px  → tablette portrait
   600px  → gros mobile
   480px  → mobile standard
   361px  → petit mobile
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. RÈGLES GLOBALES
   -------------------------------------------------------------------------- */
img { max-width: 100%; height: auto; }

.header-container,
.nav-container { flex-wrap: wrap; }

.lang-switcher,
.header-cart-wrapper,
.account-dropdown,
.logo { flex-shrink: 0; }

.header-actions { flex-shrink: 0; }

.header-center,
.search-container,
.search-box,
.search-box input[type="text"] { min-width: 0; }

.search-cat-select { min-width: 0; flex-shrink: 1; }

.btn-hamburger { order: -1; }


/* --------------------------------------------------------------------------
   ≤ 1400px
   -------------------------------------------------------------------------- */
@media (max-width: 1400px) {

    .header-center { max-width: 480px; margin: 0 15px; gap: 10px; }
    .header-actions { gap: 14px; }
    .lang-switcher { gap: 3px; padding: 2px; }
    .lang-btn { padding: 4px 10px; font-size: 0.75rem; }
}


/* --------------------------------------------------------------------------
   ≤ 1250px — cache le select catégorie dans la recherche
   -------------------------------------------------------------------------- */
@media (max-width: 1250px) {

    .search-cat-select { display: none; }
    .search-box input[type="text"] { border-radius: 0 30px 30px 0; }
}


/* --------------------------------------------------------------------------
   ≤ 1200px — laptops étroits
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {

    .header-container { padding: 0 15px; }
    .header-center { max-width: 400px; margin: 0 15px; }
    .nav-menu > li > a { padding: 14px 12px; font-size: 0.88rem; }
    .col-lg-2-4 { width: 25%; }
}


/* --------------------------------------------------------------------------
   ≤ 1100px — features 4 → 2×2
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {

    .features-card {
        grid-template-columns: repeat(2, 1fr);
        padding: 0;
        gap: 0;
        border-radius: 14px;
        overflow: hidden;
    }
    .feature-item {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 16px;
        padding: 22px 24px;
        border-inline-end: none !important;
    }
    .feature-item:nth-child(odd)  { border-right: 1px solid #eee9dc !important; }
    .feature-item:nth-child(1),
    .feature-item:nth-child(2)    { border-bottom: 1px solid #eee9dc; }
    .feature-icon  { width: 50px; height: 50px; font-size: 1.25rem; flex-shrink: 0; }
    .feature-text  { text-align: right; }
    .feature-text h6 { font-size: 0.9rem; }
    .feature-text p  { font-size: 0.78rem; }
}


/* --------------------------------------------------------------------------
   ≤ 992px — hamburger + tablette paysage
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {

    /* Hamburger */
    .desktop-only { display: none !important; }
    .main-nav, .nav-menu { display: none !important; }
    #btn-hamburger,
    .btn-hamburger {
        display: flex !important;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        position: relative;
        z-index: 1200;
    }

    /* Header */
    .header-container { row-gap: 12px; }
    .header-actions { gap: 12px; }
    .account-info { display: none; }

    /* Hero */
    .hero-card { max-width: 100%; padding: 25px; }
    .hero-title { font-size: 1.8rem; }
    .hero-subtitle { font-size: 1rem; }

    /* Catégories */
    .cat-nav-btn { width: 36px; height: 36px; font-size: 0.8rem; }
    /* Footer */
    .tb-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
    .cat-icon-circle { width: 62px; height: 62px; font-size: 1.5rem; }
    .cat-name { font-size: 0.9rem; }
}


/* --------------------------------------------------------------------------
   ≤ 768px — tablette portrait
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {

    body { line-height: 1.5; }

    .header-top { padding: 10px 0; }
    .logo-img { height: 38px; }
    .logo-text { font-size: 1.1rem; }
    .search-cat-select { display: none; }
    .search-box input[type="text"] { padding: 9px 14px; font-size: 0.85rem; }
    .search-box button { padding: 9px 16px; }
    .lang-switcher { display: none; }
    .header-cart-price-block { display: none; }

    /* Hero */
    .hero-banner, .carousel-item { height: 300px; }
    .hero-title { font-size: 1.4rem; }
    .hero-desc  { font-size: 0.85rem; margin-bottom: 18px; }
    .hero-btn   { padding: 10px 20px; font-size: 0.88rem; }
    .carousel-control-prev,
    .carousel-control-next { width: 30px; height: 30px; }

    /* Features → 1 colonne */
    .features-card {
        grid-template-columns: 1fr;
        padding: 8px 16px;
        gap: 0;
        border-radius: 12px;
    }
    .feature-item {
        flex-direction: row;
        justify-content: flex-start;
        gap: 16px;
        padding: 16px 0;
        border-right: none !important;
        border-inline-end: none !important;
        border-bottom: 1px solid #eee9dc;
    }
    .feature-item:nth-child(odd) { border-right: none !important; }
    .feature-item:nth-child(1),
    .feature-item:nth-child(2)   { border-bottom: 1px solid #eee9dc; }
    .feature-item:last-child     { border-bottom: none; }
    .feature-text { text-align: right; }


    /* Footer */
    .tb-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    /* Highlights */
    .highlights-grid {
        grid-template-columns: 1fr;
        border-radius: 12px;
    }
    .highlight-item {
        padding: 20px 24px;
        justify-content: center;
        text-align: center;
        border-left: none !important;
        border-right: none !important;
        border-bottom: 1px solid #ede9e0;
        flex-direction: row;
    }
    .highlight-item:last-child { border-bottom: none; }
    .highlight-item.highlight-featured { order: 0; }

    /* Catégories */
    .categories-section { padding: 36px 0 40px; }
    .cat-section-title h2 { font-size: 1.4rem; }
    .cat-nav-btn { width: 32px; height: 32px; font-size: 0.72rem; }
    .cat-icon-circle { width: 56px; height: 56px; font-size: 1.35rem; }
    .cat-name { font-size: 0.84rem; }
    .cat-card { padding: 22px 12px 18px; gap: 10px; }
}


/* --------------------------------------------------------------------------
   ≤ 600px — gros mobile
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {

    .hero-banner, .carousel-item { height: 260px; }
    .hero-card { padding: 20px; }
    .hero-title { font-size: 1.25rem; }
    .hero-desc  { font-size: 0.8rem; }
}


/* --------------------------------------------------------------------------
   ≤ 480px — mobile standard
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {

    .header-container { padding: 0 12px; }
    .logo-text { display: none; }
    .header-actions { gap: 8px; }

    .hero-section { margin-bottom: 20px; }
    .hero-banner, .carousel-item { height: 220px; }
    .hero-card { padding: 18px; border-radius: var(--border-radius-md); }
    .hero-badge { font-size: 0.7rem; padding: 3px 10px; }
    .hero-title { font-size: 1.2rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .hero-desc { display: none; }

    .mini-cart-dropdown { width: 280px; left: -60px; right: auto; }
    .mobile-drawer { width: 260px; right: -260px; left: auto; }
    .drawer-section { padding: 12px; }


    /* Footer */
    .tb-footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .tb-footer-logo { height: 38px; }

    /* Highlights */
    .highlight-text { font-size: 0.9rem; }
    .highlight-icon { width: 44px; height: 44px; font-size: 1.05rem; }

    /* Catégories */
    .cat-slider-wrapper { gap: 6px; }
    .cat-nav-btn { display: flex !important; width: 28px; height: 28px; font-size: 0.65rem; }
    .cat-card { padding: 18px 10px 14px; gap: 8px; }
    .cat-section-title h2 { font-size: 1.2rem; }
    .cat-icon-circle { width: 50px; height: 50px; font-size: 1.2rem; }
}


/* --------------------------------------------------------------------------
   ≤ 361px — petit mobile
   -------------------------------------------------------------------------- */
@media (max-width: 361px) {

    .logo-img { height: 32px; }
    .search-box input[type="text"] { font-size: 0.8rem; padding: 8px 12px; }
    .search-box button { padding: 8px 12px; }

    .hero-banner, .carousel-item { height: 190px; }
    .hero-card { padding: 14px; }
    .hero-title { font-size: 1.05rem; }
    .hero-subtitle { font-size: 0.82rem; }
    .hero-btn { padding: 8px 16px; font-size: 0.8rem; }

    .mobile-drawer { width: 100%; right: -100%; left: auto; }

    /* Catégories */
    .cat-nav-btn { display: none !important; }
    .cat-section-title h2 { font-size: 1.05rem; }
    .cat-section-title::before,
    .cat-section-title::after { display: none; }

    /* Produits : 1 par ligne */
    .col-product { width: 100%; }
}


/* --------------------------------------------------------------------------
   TACTILE — hover désactivé
   -------------------------------------------------------------------------- */
@media (hover: none) and (pointer: coarse) {

    .nav-menu > li > a,
    .dropdown-menu a,
    .drawer-menu-list a { padding-top: 12px; padding-bottom: 12px; }

    .product-btn-add,
    .hero-btn,
    .search-box button { min-height: 42px; }

    .submenu {
        position: static;
        box-shadow: none;
        display: none;
        width: 100%;
        border-top: none;
        padding-right: 15px;
        padding-left: 0;
    }
    .nav-menu > li.open .submenu { display: block; }
}