/* ==========================================================================
   RESPONSIVE.CSS — Mobile / Tablet / Desktop breakpoints
   Pixel-perfect responsive for all pages
   ========================================================================== */

/* ============ MOBILE FIRST (default) ============ */
/* Base styles target mobile screens by default */

/* Container responsive */
.container{max-width:1280px;margin:0 auto;padding:0 1.2rem}

/* ============ SMALL MOBILE (< 480px) ============ */
@media (max-width:479px){
    /* Top bar */
    .topbar{font-size:11px;padding:.35rem 0}
    .topbar a{margin-right:.8rem;font-size:11px}
    .topbar-inner{padding:0 1rem;gap:.5rem;flex-wrap:wrap}

    /* Nav */
    .nav-inner{padding:0 1rem;height:60px;gap:.5rem}
    .logo-mark{width:36px;height:36px;border-radius:9px}
    .logo-text span:first-child{font-size:13px}
    .logo-text span:last-child{font-size:9.5px}

    /* Hero */
    .hero{padding:3rem 0;min-height:auto}
    .hero-inner{padding:0 1rem;grid-template-columns:1fr;gap:2rem}
    .hero h1{font-size:1.8rem;line-height:1.4}
    .hero p{font-size:14px;line-height:1.8}
    .hero-btns{gap:8px}
    .hero-btns .btn{flex:1;font-size:12px;padding:10px 12px}
    .hero-stats{gap:1rem}
    .hstat-num{font-size:1.3rem}

    /* Stats */
    .stats-inner{grid-template-columns:repeat(2,1fr)}
    .stat-item{padding:1.2rem 1rem}
    .stat-num{font-size:1.8rem}

    /* Section headers */
    .sec{padding:3rem 0}
    .sec-header h2{font-size:1.5rem}
    .sec-header p{font-size:13px}

    /* Products grid */
    .pgrid{grid-template-columns:1fr;gap:1rem}
    .pcard-body{padding:1rem}
    .pcard-body h3{font-size:14px}

    /* News grid */
    .ngrid{grid-template-columns:1fr;gap:1rem}

    /* Features */
    .fgrid{grid-template-columns:1fr;gap:1rem}
    .fcard{padding:1.2rem;gap:12px}
    .ficon{width:44px;height:44px}

    /* Certs */
    .cgrid{grid-template-columns:repeat(2,1fr);gap:.8rem}
    .cert-card{padding:1rem;min-width:0;flex-basis:calc(50% - .4rem)}

    /* CTA */
    .cta-section{padding:2.5rem 0}
    .cta-inner h2{font-size:1.5rem}
    .cta-btns{gap:8px}
    .cta-btns .btn{width:100%;justify-content:center}

    /* Footer */
    .footer{padding:2.5rem 0 0}
    .footer-inner{padding:0 1rem;gap:1.5rem;grid-template-columns:1fr !important}
    .flinks h4{font-size:13px;margin-bottom:.8rem}
    .flinks ul li a{font-size:12.5px}
    .footer-bottom{padding:1rem;flex-direction:column;text-align:center;gap:.5rem}
    .footer-bottom span{font-size:11px}

    /* Side CTA - hide on small mobile */
    .side-cta{display:none}

    /* Chatbot */
    .chat-fab{bottom:80px;left:14px}
    .chat-toggle{width:48px;height:48px}
    .chat-win{bottom:80px;left:14px;width:calc(100vw - 28px);max-width:340px}

    /* Modals */
    .mbox{max-width:100%;margin:0 8px}
    .mgrid-2{grid-template-columns:1fr}
    .m-header{padding:1.2rem 1.2rem .8rem}
    .m-body{padding:1rem 1.2rem 1.2rem}

    /* WooCommerce */
    .pp-layout{gap:1rem}
    .pgrid-shop{grid-template-columns:1fr}
    ul.products{grid-template-columns:1fr !important}

    /* Single product */
    .spec-grid{grid-template-columns:1fr}
    .size-select-row .size-chip{font-size:12px;padding:7px 12px}

    /* Cart */
    .cart-layout{gap:1rem}
    .cart-item{flex-wrap:wrap;gap:10px}
    .cart-info{flex:1 1 100%;order:-1}

    /* Blog */
    .post-grid{grid-template-columns:1fr !important}
    .featured-card{aspect-ratio:4/3 !important}
    .featured-card h2{font-size:1.1rem !important}

    /* My account */
    .quick-grid{grid-template-columns:repeat(3,1fr);gap:6px}
    .quick-item{padding:8px;font-size:10px}
    .quick-item .ic{width:28px;height:28px}
    .panel-sidebar{position:static}

    /* Forms */
    .pargas-field-row{grid-template-columns:1fr}
    .pargas-admin-body{flex-direction:column}
    .pargas-tabs{width:100%;flex-direction:row;overflow-x:auto}
    .pargas-tab{border-right:none;border-bottom:3px solid transparent;white-space:nowrap;padding:11px 14px}
    .pargas-tab.active{border-bottom-color:#2563EB}
    .pargas-content{padding:16px}
}

/* ============ TABLET (480px - 899px) ============ */
@media (min-width:480px) and (max-width:899px){
    /* Top bar */
    .topbar-inner{padding:0 1.5rem}

    /* Nav */
    .nav-inner{padding:0 1.5rem;height:64px}

    /* Hero */
    .hero{padding:4rem 0;min-height:auto}
    .hero-inner{padding:0 1.5rem}
    .hero h1{font-size:2.2rem}

    /* Products grid - 2 columns on tablet */
    .pgrid{grid-template-columns:repeat(2,1fr);gap:1rem}
    ul.products{grid-template-columns:repeat(2,1fr) !important}

    /* News */
    .ngrid{grid-template-columns:repeat(2,1fr)}

    /* Features - 2 cols on tablet */
    .fgrid{grid-template-columns:repeat(2,1fr)}

    /* Footer - 2 columns */
    .footer-inner{grid-template-columns:1fr 1fr !important;padding:0 1.5rem}

    /* WooCommerce */
    .pgrid-shop{grid-template-columns:repeat(2,1fr)}

    /* Blog */
    .post-grid{grid-template-columns:repeat(2,1fr) !important}
    .featured-card{aspect-ratio:16/8 !important}

    /* My account */
    .panel-layout{grid-template-columns:1fr !important}
    .panel-sidebar{position:static}
    .quick-grid{grid-template-columns:repeat(3,1fr) !important}
}

/* ============ DESKTOP (>= 900px) ============ */
@media (min-width:900px){
    /* Top bar */
    .topbar-inner{padding:0 2rem}

    /* Nav */
    .nav-inner{padding:0 2rem;height:70px}
    /* nav-links and nav-ctas are display:flex by default in header.css — keep them visible on desktop */
    .nav-links{display:flex !important}
    .nav-ctas{display:flex !important}
    /* nav-search and nav-icons remain hidden by default; only shown when explicitly enabled via shop page context */
    .hamburger{display:none !important}
    .mobile-search{display:none !important}
    .mobile-nav{display:none !important}

    /* Container */
    .container{padding:0 2rem}

    /* Trust bar */
    .trust-inner{padding:0 2rem}

    /* Hero */
    .hero-inner{grid-template-columns:1fr 380px;gap:4rem;padding:0 2rem}
    .hero h1{font-size:3.2rem}

    /* Stats */
    .stats-inner{grid-template-columns:repeat(4,1fr)}
    .stat-item{padding:1.8rem 1.5rem}

    /* Section */
    .sec{padding:5rem 0}
    .sec-inner{padding:0 2rem}
    .sec-header h2{font-size:2.2rem}

    /* Products */
    .pgrid{grid-template-columns:repeat(3,1fr);gap:1.4rem}
    ul.products{grid-template-columns:repeat(3,1fr) !important}

    /* News */
    .ngrid{grid-template-columns:repeat(3,1fr);gap:1.4rem}

    /* Features */
    .fgrid{grid-template-columns:repeat(2,1fr);gap:1.4rem}

    /* Footer */
    .footer-inner{grid-template-columns:1.4fr 1fr 1fr 1fr !important;padding:0 2rem;gap:3rem}
    .footer-bottom{padding:1.2rem 2rem;flex-direction:row;justify-content:space-between}

    /* WooCommerce */
    .pgrid-shop{grid-template-columns:repeat(3,1fr)}

    /* Single product — 2-column layout */
    .pp-layout{display:grid;grid-template-columns:1fr 1fr;gap:2.5rem;align-items:start}

    /* Cart — 2-column */
    .cart-layout{display:grid;grid-template-columns:1fr 340px;gap:2rem;align-items:start}
    .summary-card{position:sticky;top:88px}
    .bottom-nav{display:none !important}
    body{padding-bottom:0 !important}

    /* Checkout */
    .woocommerce-checkout .checkout{grid-template-columns:1fr 380px;gap:2rem;align-items:start}
    .woocommerce-checkout-review-order{position:sticky;top:88px}

    /* My account — sidebar + main */
    .panel-layout{grid-template-columns:270px 1fr;gap:1.8rem;align-items:start}
    .panel-sidebar{position:sticky;top:90px}
    .quick-grid{grid-template-columns:repeat(6,1fr) !important}

    /* Blog — sidebar layout */
    .blog-layout{display:grid;grid-template-columns:1fr 300px;gap:2rem;align-items:start}
    .blog-sidebar{display:block;position:sticky;top:90px}
    .post-grid{grid-template-columns:repeat(2,1fr) !important}
    .featured-card{aspect-ratio:21/7 !important}
    .featured-card h2{font-size:1.7rem !important;max-width:680px}

    /* Single blog post */
    .article-layout{display:grid;grid-template-columns:1fr 300px;gap:2rem;align-items:start}
    .main-article{min-width:0}
    .post-head h1{font-size:2rem;max-width:760px}
    .cover{aspect-ratio:21/9}
    .article-body{font-size:15px}
    .article-body h2{font-size:1.4rem}
    .rp-scroller{display:grid;grid-template-columns:repeat(3,1fr);overflow:visible}

    /* Forms */
    .footer{margin-top:0 !important}
}

/* ============ LARGE DESKTOP (>= 1180px) ============ */
@media (min-width:1180px){
    /* Products grid - 4 columns on large screens */
    .pgrid{grid-template-columns:repeat(4,1fr)}
    ul.products{grid-template-columns:repeat(4,1fr) !important}
}

/* ============ PRINT STYLES ============ */
@media print{
    .topbar, .nav, .trust, .chat-fab, .chat-win, .side-cta, .footer, .bottom-nav{display:none !important}
    body{background:#fff;color:#000}
    .container{max-width:100%}
}

/* ============ ACCESSIBILITY (reduced motion) ============ */
@media (prefers-reduced-motion:reduce){
    *, *::before, *::after{
        animation-duration:0.01ms !important;
        animation-iteration-count:1 !important;
        transition-duration:0.01ms !important;
        scroll-behavior:auto !important;
    }
}

/* ============ ADMIN PANEL RESPONSIVE ============ */
@media (max-width:768px){
    .pargas-admin-body{flex-direction:column}
    .pargas-tabs{width:100%;border-left:none;border-bottom:1px solid #E2E8F0;display:flex;overflow-x:auto;padding:0}
    .pargas-tab{border-right:none;border-bottom:3px solid transparent;white-space:nowrap;padding:11px 14px}
    .pargas-tab.active{border-bottom-color:#2563EB}
    .pargas-content{padding:18px}
    .pargas-field-row{grid-template-columns:1fr}
    .pargas-repeater-item-inner{grid-template-columns:1fr;padding-left:50px}
    .pargas-admin-header{flex-direction:column;align-items:flex-start;gap:12px}
    .pargas-admin-header .pargas-actions{width:100%;justify-content:space-between}
}
