/* ==========================================================================
   Skinside — responsive overrides
   Breakpoints: 1279px (tablet / mobile header swap) · 900px · 640px · 420px
   ========================================================================== */

@media (max-width: 1279px) {
  :root { --gutter: 24px; }

  /* header swaps to the mobile bar + drawer */
  .header-bar, .main-nav, .hero:not(.hero--mobile) { display: none; }
  .header-bar--mobile { display: grid; }
  .msearch { display: block; }
  .hero--mobile { display: flex; }

  .section { padding: 56px 0 72px; }
  .section--tight { padding: 16px 0 80px; }
  .section-head { justify-content: space-between; padding-bottom: 32px; }
  .section-head h2 { font-size: 30px; }
  .rail-nav { position: static; gap: 8px; }
  .rail-nav svg { max-width: 9vw; }

  .cat-card__media { height: 46vw; min-height: 300px; }
  .cat-card__label { left: 18px; right: 18px; }
  .cat-card__label h3 { font-size: 8.5vw; }
  .cat-card__label p { font-size: 15px; }
  .cat-card__blurb { margin: 48px 18px 0; font-size: 16px; }

  .doc { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-top: 30px; }
  .doc__nav {
    position: static;
    flex-direction: row;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .doc__nav a { white-space: nowrap; font-size: 15px; }

  .pdp, .cart, .checkout { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .summary { position: static; }
  .page-head { padding-top: 34px; }
  .page-head h1 { font-size: 38px; }
  .page-head p { font-size: 16px; }
}

@media (max-width: 900px) {
  .hero--mobile { min-height: 520px; }
  .hero--mobile .hero__copy h1 { font-size: 42px; }
  .pdp__info h1 { font-size: 34px; }
  .modal__body { padding: 32px 26px; }
  .modal__body h2 { font-size: 30px; }
  .site-footer__top { padding: 48px var(--gutter) 40px; }
  .site-footer__cols { gap: 30px; margin-top: 38px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }

  /* two products per row, tighter gutters */
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .product-card__kind { margin-top: 14px; font-size: 11px; }
  .product-card__name { margin-top: 8px; font-size: 16px; }
  .product-card__price { font-size: 18px; }
  .product-card__off, .product-card__was { font-size: 13px; }
  .add-btn { width: 46px; height: 46px; right: 10px; bottom: 10px; opacity: 1; transform: none; pointer-events: auto; }

  .shop-banner { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px var(--gutter); font-size: 13px; }
  .filters { gap: 8px; padding: 18px var(--gutter) 22px; overflow-x: auto; flex-wrap: nowrap; }
  .chip { flex: 0 0 auto; padding: 9px 14px; font-size: 13px; }

  .section-head h2 { font-size: 26px; }
  .btn { padding: 18px 26px; font-size: 13px; gap: 14px; }
  .hero--mobile .hero__copy { padding: 24px 20px 30px; }
  .hero--mobile .hero__copy h1 { font-size: 38px; }
  .hero--mobile .hero__copy p.lede { font-size: 18px; }

  .cart-line { grid-template-columns: 78px minmax(0, 1fr); }
  .cart-line__price { grid-column: 2; }
  .split { gap: 26px; padding: 30px var(--gutter) 70px; }
  .card { padding: 22px; }
  .tabs { overflow-x: auto; }
  .doc__body h2 { font-size: 24px; }
  .doc__body p, .doc__body li { font-size: 16px; }
  .accordion__btn { font-size: 17px; }

  .modal__box { grid-template-columns: minmax(0, 1fr); max-height: 88vh; overflow-y: auto; }
  .modal__media { min-height: 180px; }
  .promo-tab button { padding: 20px 11px; font-size: 13px; gap: 12px; }
  .payments > span { width: 62px; }
  .thanks { padding: 56px 20px 80px; }
  .thanks h1 { font-size: 34px; }
}

@media (max-width: 420px) {
  .product-grid { gap: 12px 10px; }
  .logo { font-size: 24px; }
  .logo img { height: 34px; }
  .page-head h1 { font-size: 32px; }
  .hero--mobile .hero__copy h1 { font-size: 34px; }
  .pdp__thumbs { grid-template-columns: repeat(3, 1fr); }
}

@media print {
  .promo-tab, .modal, .scrim, .drawer, .rail-nav, .cart-drawer { display: none !important; }
}

@media (max-width: 760px) {
  .reviews { padding-top: 44px; }
  .reviews__head h2 { font-size: 26px; }
  .review { width: 268px; padding: 20px; }
  .reviews__track { gap: 14px; animation-duration: 44s; }
}

@media (max-width: 760px) {
  .buybar { gap: 12px; padding: 12px 16px; }
  .buybar__name { font-size: 13px; }
  .buybar__sizes { display: none; }
  .buybar .btn { padding: 14px 20px; font-size: 13px; }
}

@media (max-width: 1000px) {
  .promise { grid-template-columns: 1fr; gap: 34px; padding: 52px var(--gutter); }
  .promise__grid { gap: 26px; }
}
@media (max-width: 760px) {
  .promise__intro h2 { font-size: 26px; }
  .promise__grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 1000px) {
  .routine { padding: 52px var(--gutter); }
  .routine__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 760px) {
  .routine__head h2 { font-size: 26px; }
  .routine__grid { margin-top: 26px; }
}

@media (max-width: 760px) {
  .rv-item { grid-template-columns: 62px minmax(0, 1fr); }
  .rv-item .btn--ghost { grid-column: 1 / -1; width: 100%; }
}

/* home — mobile polish */
@media (max-width: 640px) {
  .hero--mobile { min-height: 0; height: min(78svh, 600px); }
  .hero--mobile .hero__copy { justify-content: flex-end; gap: 18px; padding: 22px 20px 24px; }
  .hero--mobile .hero__copy h1 { margin-top: 8px; line-height: 1; }
  .hero--mobile .hero__copy p.lede { margin-top: 10px; font-size: 16px; line-height: 1.4; max-width: 30ch; }
  .hero--mobile .hero__copy .btn { margin-top: 0; padding: 16px 22px; }
  .hero--mobile .hero__copy > .dots { margin-bottom: auto; }
  .hero--mobile .btn { width: 100%; justify-content: center; }
  .section { padding: 44px 0 56px; }
  .section--tight { padding: 8px 0 64px; }
  .section-head { padding-bottom: 22px; }
  .rail-nav { gap: 2px; }
  .rail-btn { width: 44px; height: 44px; justify-content: center; }
  .rail-nav svg { width: 26px; max-width: none; }
  .cat-card { width: calc(100vw - 48px); }
  .cat-card__media { height: 118vw; max-height: 480px; min-height: 0; }
  .cat-card__label { bottom: -18px; }
  .cat-card__label h3 { font-size: clamp(32px, 10vw, 44px); }
  .cat-card__label p { font-size: 14px; }
  .cat-card__blurb { margin: 34px 18px 0; font-size: 15px; }
  .rail--products .rail__track { gap: 14px; }
  .rail--products .product-card { width: 62vw; }
  .site-footer__top { padding: 40px var(--gutter) 32px; }
  .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 18px; margin-top: 30px; }
  .site-footer__cols > div:first-child { grid-column: 1 / -1; }
  .site-footer__cols p.title { font-size: 17px; }
  .site-footer__cols .links { gap: 12px; margin-top: 16px; }
  .site-footer__cols .links a { font-size: 15px; padding: 2px 0; }
  .site-footer__bar { flex-direction: column; align-items: flex-start; gap: 18px; padding: 22px var(--gutter); }
  .site-footer__note { font-size: 13px; padding: 14px var(--gutter); }
  .promo-tab button { padding: 14px 9px; font-size: 12px; gap: 10px; }
}

@media (max-width: 1279px) {
  .header-bar--mobile .icon-btn { justify-self: center; width: 48px; }
}

/* mobile hero — 1d: headline first, framed image, button */
@media (max-width: 1279px) {
  .hero--mobile.hero--stack { display: flex; flex-direction: column; gap: 18px; min-height: 0; height: auto; padding: 24px 20px 28px; background: var(--bg) !important; }
  .hero--stack .hero__copy { position: static; transform: none; padding: 0; gap: 0; display: flex; flex-direction: column; max-width: none; }
  .hero--stack .hero__copy h1 { margin-top: 8px; font-size: 44px; line-height: 1; }
  .hero--stack .hero__copy p.lede { margin-top: 8px; font-size: 16px; line-height: 1.4; color: #3a4042; min-height: 2.8em; }
  .hero--stack .hero__copy h1 { white-space: nowrap; }
  .hero--stack .hero__frame { position: relative; height: min(100vw, 520px); overflow: hidden; background: var(--bg-alt); }
  .hero--stack .hero__frame .hero__media { position: absolute; inset: 0; width: 100%; height: 100%; }
  .hero--stack .hero__frame .dots { position: absolute; left: 14px; bottom: 14px; transform: none; }
  .hero--stack > .btn { width: 100%; justify-content: center; margin: 0; padding: 16px 22px; }
}

@media (max-width: 640px) {
  .page-head--center { padding: 28px var(--gutter) 0; }
  .page-head--center + .filters { justify-content: flex-start; }
}
