/* =============================================
   Responsive CSS - Bareso
   Full Mobile Optimization
   ============================================= */

/* ── Large Tablets (max 1024px) ── */
@media (max-width: 1024px) {
    .features-grid        { grid-template-columns: repeat(2, 1fr); }
    .products-grid        { grid-template-columns: repeat(2, 1fr); }
    .stats-grid           { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .stat-item::after     { display: none; }
    .footer-content       { grid-template-columns: 1fr 1fr; gap: 30px; }
    .carousel-card        { min-width: calc(33.333% - 14px); }
    .branches-grid        { grid-template-columns: repeat(3, 1fr); }
}

/* ── Tablets (max 768px) ── */
@media (max-width: 768px) {

    /* === NAV === */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        background: white;
        z-index: 1500;
        padding: 80px 25px 30px;
        box-shadow: -10px 0 50px rgba(0,0,0,0.15);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }
    body.en .nav-menu { right: auto; left: -300px; transition: left 0.4s cubic-bezier(0.4,0,0.2,1); }
    .nav-menu.open { right: 0; }
    body.en .nav-menu.open { right: auto; left: 0; }

    .nav-menu ul { flex-direction: column; gap: 4px; }
    .nav-menu ul li a {
        display: block;
        padding: 13px 18px;
        font-size: 16px;
        border-radius: 12px;
        font-weight: 600;
    }

    .nav-logo-img { height: 50px; }

    /* Top bar */
    .contact-info          { display: none; }
    .top-bar-content       { justify-content: flex-end; }
    .top-bar               { padding: 6px 0; }

    /* === HERO BANNER === */
    .hero-banner-section   { min-height: 52vw; }
    .hero-quality-badge    { top: 12px; right: 12px; padding: 10px 14px; border-radius: 12px; }
    .hero-slogan-badge     { left: 12px !important; right: auto !important; }
    .hqb-line1             { font-size: clamp(11px, 3.2vw, 17px); letter-spacing: 1px; }
    .hqb-line2             { font-size: clamp(10px, 2.8vw, 15px); letter-spacing: 1px; }
    .hero-quality-badge::before,
    .hero-quality-badge::after { font-size: 12px; letter-spacing: 4px; margin: 3px 0; }
    .hero-banner-btns      { padding-bottom: 14px; gap: 10px; }
    .hero-banner-btns .btn { padding: 10px 18px; font-size: 13px; }

    /* === FEATURES === */
    .features              { padding: 50px 0; }
    .features-grid         { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .feature-card          { padding: 25px 18px; }
    .feature-icon          { width: 56px; height: 56px; font-size: 22px; }

    /* === CAROUSEL === */
    .products-carousel-section { padding: 50px 0; }
    .carousel-card         { min-width: calc(50% - 10px); }
    .carousel-btn          { display: none; }
    .products-carousel-wrapper { gap: 0; }

    /* === PRODUCTS GRID === */
    .products-section      { padding: 50px 0; }
    .products-grid         { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .product-image         { height: 170px; }
    .product-info          { padding: 14px; }
    .product-name          { font-size: 14px; }
    .add-to-cart-btn       { padding: 9px 14px; font-size: 12px; }

    /* === STATS === */
    .stats-section         { padding: 50px 0; }
    .stats-grid            { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-item             { padding: 22px 15px; }
    .stat-number           { font-size: 34px; }

    /* === NEWSLETTER === */
    .newsletter            { padding: 50px 0; }
    .newsletter-content    { flex-direction: column; text-align: center; gap: 25px; }
    .newsletter-form       { min-width: auto; width: 100%; max-width: 100%; }

    /* === FOOTER === */
    .footer                { padding-top: 50px; }
    .footer-content        { grid-template-columns: 1fr; gap: 25px; }
    .footer-bottom         { flex-direction: column; text-align: center; gap: 12px; }
    .footer-links          { flex-wrap: wrap; justify-content: center; }

    /* === PAGE HERO === */
    .page-hero             { padding: 40px 0; }
    .page-hero h1          { font-size: 28px; }
    .page-hero p           { font-size: 14px; }

    /* === SECTION HEADERS === */
    .section-header        { margin-bottom: 30px; }
    .section-title         { font-size: 24px; }

    /* === BRANCHES === */
    .branches-grid         { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .branch-card           { padding: 18px 14px; gap: 12px; }
    .branch-icon           { width: 42px; height: 42px; min-width: 42px; font-size: 16px; }
    .branch-name           { font-size: 14px; }
    .branch-phone          { font-size: 12px; padding: 4px 10px; }

    /* === ABOUT === */
    .about-grid            { grid-template-columns: 1fr !important; }
    .about-image           { display: none; }

    /* === CONTACT === */
    .contact-grid          { grid-template-columns: 1fr !important; }

    /* === QUICK VIEW MODAL === */
    .modal-content         { padding: 20px; }
    .qv-layout             { flex-direction: column !important; }
}

/* ── Small Mobile (max 480px) ── */
@media (max-width: 480px) {
    .container             { padding: 0 14px; }

    /* === NAV === */
    .nav-logo-img          { height: 42px; }
    .nav-actions .account-btn { display: none; }
    .main-nav              { padding: 8px 0; }

    /* === HERO BANNER === */
    .hero-banner-section   { min-height: 58vw; }
    .hero-quality-badge    { top: 8px; right: 8px; padding: 8px 11px; border-radius: 10px; }
    .hero-slogan-badge     { left: 8px !important; }
    .hqb-line1             { font-size: clamp(10px, 2.8vw, 14px); }
    .hqb-line2             { font-size: clamp(9px, 2.5vw, 13px); }
    .hero-quality-badge::before,
    .hero-quality-badge::after { font-size: 10px; margin: 2px 0; }
    .hero-banner-btns      { padding-bottom: 12px; gap: 8px; }
    .hero-banner-btns .btn { padding: 9px 15px; font-size: 12px; }

    /* === FEATURES === */
    .features              { padding: 40px 0; }
    .features-grid         { grid-template-columns: 1fr; gap: 12px; }
    .feature-card          { padding: 22px 16px; }

    /* === CAROUSEL === */
    .products-carousel-section { padding: 40px 0; }
    .carousel-card         { min-width: 82%; }
    .carousel-card .product-image { height: 180px; }

    /* === PRODUCTS GRID === */
    .products-section      { padding: 40px 0; }
    .products-grid         { grid-template-columns: 1fr; gap: 14px; }
    .product-image         { height: 220px; }

    /* === STATS === */
    .stats-section         { padding: 40px 0; }
    .stats-grid            { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .stat-item             { padding: 18px 10px; }
    .stat-number           { font-size: 28px; }
    .stat-label            { font-size: 13px; }

    /* === NEWSLETTER === */
    .newsletter            { padding: 40px 0; }
    .newsletter-form       { flex-direction: column; }
    .newsletter-form .btn  { width: 100%; justify-content: center; }
    .newsletter-text h2    { font-size: 22px; }

    /* === FOOTER === */
    .footer                { padding-top: 40px; }
    .footer-logo .logo-ar  { font-size: 22px; }
    .footer-section p      { font-size: 13px; }

    /* === BUTTONS === */
    .btn                   { padding: 11px 20px; font-size: 14px; }
    .btn-large             { padding: 13px 28px; font-size: 15px; }

    /* === CART SIDEBAR === */
    .cart-sidebar          { width: 100%; right: -100%; }
    body.en .cart-sidebar  { left: -100%; }

    /* === PAGE HERO === */
    .page-hero             { padding: 35px 0; }
    .page-hero h1          { font-size: 24px; }

    /* === BRANCHES === */
    .branches-grid         { grid-template-columns: 1fr; gap: 12px; }
    .branch-card           { padding: 16px 14px; }

    /* === SECTION HEADERS === */
    .section-title         { font-size: 22px; }
    .section-subtitle      { font-size: 14px; }

    /* === ADMIN === */
    .admin-tabs            { flex-wrap: wrap; }
    .admin-tabs button     { flex: 1; min-width: 100px; font-size: 12px; padding: 8px 10px; }

    /* === LOCATIONS === */
    .locations-intro p     { font-size: 14px; }
}

/* ── Extra Small (max 360px) ── */
@media (max-width: 360px) {
    .nav-logo-img          { height: 38px; }
    .hero-banner-section   { min-height: 62vw; }
    .hero-quality-badge    { padding: 6px 9px; border-radius: 8px; top: 6px; right: 6px; }
    .hero-slogan-badge     { left: 6px !important; }
    .hqb-line1,
    .hqb-line2             { font-size: 10px; letter-spacing: 0.5px; }
    .hero-banner-btns .btn { padding: 8px 13px; font-size: 11px; }
    .stats-grid            { grid-template-columns: 1fr; }
    .section-title         { font-size: 20px; }
}

/* ── Print ── */
@media print {
    .header, .footer, .cart-sidebar, .overlay, .toast { display: none; }
}
