:root{
  --wc-store-mobile-nav:68px;
  --wc-safe-bottom:env(safe-area-inset-bottom,0px);
  --wc-store-touch:46px;
}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
button,a,input,select,textarea{touch-action:manipulation}
.wc-store-mobile-nav,.wc-store-menu-panel{display:none}

@media (min-width:768px) and (max-width:1024px){
  .wc-store-header-inner{padding-left:20px!important;padding-right:20px!important}
  main{min-width:0}
  main [class*="grid-cols-["]{min-width:0}
}

@media(max-width:767px){
  html,body{max-width:100%;overflow-x:hidden}
  body{padding-bottom:calc(var(--wc-store-mobile-nav) + var(--wc-safe-bottom));min-width:0}
  img,video,iframe{max-width:100%;height:auto}

  main{padding-top:16px!important;padding-bottom:26px!important;min-width:0;max-width:100vw}
  .wc-store-header-inner{height:62px!important;padding-left:12px!important;padding-right:12px!important;gap:8px}
  .wc-store-logo{max-width:145px!important;max-height:40px!important}
  .wc-store-desktop-actions{display:none!important}
  .wc-store-mobile-actions{display:flex!important;align-items:center;gap:6px;flex:none}
  .wc-store-icon-button{width:42px;height:42px;min-height:42px;border-radius:13px;display:grid;place-items:center;background:#f5f5f4}
  .wc-store-menu-panel{
    display:block;position:fixed;inset:62px 0 auto 0;z-index:55;background:#fff;border-bottom:1px solid #e7e5e4;
    padding:10px 14px 16px;transform:translateY(-135%);transition:transform .22s;box-shadow:0 22px 35px rgba(0,0,0,.12);
    max-height:calc(100dvh - 62px - var(--wc-store-mobile-nav));overflow-y:auto
  }
  body.wc-store-menu-open{overflow:hidden}
  body.wc-store-menu-open .wc-store-menu-panel{transform:translateY(0)}
  .wc-store-menu-panel a{display:block;padding:13px 12px;border-radius:12px;font-weight:700}
  .wc-store-mobile-nav{
    display:grid;position:fixed;left:0;right:0;bottom:0;z-index:60;height:calc(var(--wc-store-mobile-nav) + var(--wc-safe-bottom));
    padding:5px 6px var(--wc-safe-bottom);grid-template-columns:repeat(5,minmax(0,1fr));background:rgba(255,255,255,.98);
    backdrop-filter:blur(18px);border-top:1px solid #e7e5e4;box-shadow:0 -10px 30px rgba(0,0,0,.08)
  }
  .wc-store-mobile-nav a{display:flex;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:10px;line-height:1.1;font-weight:700;color:#78716c;border-radius:12px;padding:3px 1px}
  .wc-store-mobile-nav svg{width:20px;height:20px;flex:none}

  main>*{max-width:100%}
  main section,main article,main form,main aside{min-width:0;max-width:100%}
  main p,main h1,main h2,main h3,main h4{overflow-wrap:anywhere}
  main h1{line-height:1.08}
  main .max-w-7xl,main .max-w-6xl,main .max-w-5xl,main .max-w-4xl{padding-left:12px;padding-right:12px}

  input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea{
    font-size:16px!important;min-height:48px;width:100%;max-width:100%;min-width:0;box-sizing:border-box
  }
  textarea{min-height:104px}
  button,[role=button]{min-height:44px}
  input[type=checkbox],input[type=radio]{width:20px;height:20px;flex:none}

  main [class*="grid-cols-["],
  main .grid-cols-2,
  main .grid-cols-3,
  main .grid-cols-4,
  main .grid-cols-5,
  main .grid-cols-6{grid-template-columns:minmax(0,1fr)!important}
  main .grid{min-width:0}

  .wc-product-grid,.products-grid,.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .product-card{border-radius:16px!important;min-width:0;overflow:hidden}
  .product-card .aspect-\[4\/5\]{aspect-ratio:1/1.15}
  .product-card .p-5,.product-card .p-6{padding:12px!important}
  .product-card h3{font-size:.92rem!important;line-height:1.25!important}
  .product-card p{font-size:.78rem}
  .product-card button,.product-card a{min-height:40px}
  .product-card .grid-cols-2{grid-template-columns:1fr!important}

  .banner-slide{min-height:300px!important}
  .banner-slide>div{padding:20px!important}
  .banner-slide h1{font-size:1.75rem!important;line-height:1.08!important}

  .product-gallery,.wc-product-gallery{min-width:0;max-width:100%}
  .product-gallery img,.wc-product-gallery img{max-height:68vh;object-fit:contain}

  form[class*="grid"],main form.grid{grid-template-columns:minmax(0,1fr)!important}
  main aside[class*="sticky"]{position:static!important;top:auto!important;width:100%!important}

  main .overflow-x-auto{max-width:calc(100vw - 24px);overflow-x:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  main table{min-width:640px;white-space:nowrap}

  dialog,.modal,.fixed.inset-0>div{max-width:calc(100vw - 20px)!important;max-height:calc(100dvh - 24px)!important}

  article img{border-radius:14px;max-width:100%}
  article iframe{width:100%;aspect-ratio:16/9}

  footer{margin-top:42px!important;padding-bottom:14px}
  footer .grid{grid-template-columns:minmax(0,1fr)!important;gap:24px!important}
}

@media(max-width:389px){
  .wc-store-logo{max-width:128px!important}
  .wc-store-mobile-nav a{font-size:9px}
  .wc-product-grid,.products-grid,.product-grid{grid-template-columns:minmax(0,1fr)!important}
  .product-card h3{font-size:1rem!important}
}
