/* ── Base ─────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: 'Jost', sans-serif; -webkit-font-smoothing: antialiased; }
::selection { background: #c4dcec; }
input, textarea, select { font-family: 'Jost', sans-serif; }

/* ── Responsive ───────────────────────────────── */
@media (min-width: 1320px) {
  .r-hero-pad { height: 370px !important; }
}
@media (max-width: 1024px) {
  .r-header        { flex-wrap: nowrap !important; gap: 12px !important; }
  .r-search        { order: 0 !important; flex: 1 1 100px !important; min-width: 80px !important; max-width: 100% !important; }
  .r-cart-btn      { flex-shrink: 0 !important; }
  .r-cats-grid     { grid-template-columns: repeat(2,1fr) !important; }
  .r-trust-grid    { gap: 16px !important; }
  .r-trust-item    { width: 180px !important; }
  .r-footer-grid   { grid-template-columns: repeat(2,1fr) !important; gap: 24px !important; }
  .r-catalog       { grid-template-columns: 1fr !important; }
  .r-catalog-main  { width: 100% !important; }
  .r-sidebar       { width: 100% !important; max-width: 100% !important; position: relative !important; }
  .r-sidebar-inner { position: absolute !important; top: 100% !important; left: 0 !important; right: 0 !important; margin-top: 0; max-width: 100%; z-index: 60; box-shadow: 0 12px 32px rgba(0,0,0,.18) !important; }
  .r-filter-toggle { display: flex !important; position: relative !important; }
  .r-sidebar-inner:not(.mf-open) { display: none !important; }
  .r-detail        { grid-template-columns: 1fr !important; }
  .r-detail-img    { height: 320px !important; }
  .r-checkout-row  { grid-template-columns: 1fr !important; gap: 20px !important; }
  .r-max           { padding-left: 16px !important; padding-right: 16px !important; }
  .r-delivery-grid { grid-template-columns: 1fr !important; }
  .r-contacts-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 640px) {
  .r-topbar        { display: none !important; }
  .r-logo-text     { font-size: 13px !important; letter-spacing: .06em !important; }
  .r-logo-sub      { display: flex !important; }
  .r-header        { padding: 8px 12px !important; gap: 8px !important; flex-wrap: nowrap !important; }
  .r-search        { order: 0 !important; flex-basis: auto !important; flex: 1 1 80px !important; min-width: 80px !important; height: 30px !important; max-width: 100% !important; }
  .r-cart-btn      { flex-shrink: 0 !important; padding: 0 10px !important; }
  .r-cart-text     { display: none !important; }
  .r-nav-inner     { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 14px !important; justify-content: space-around !important; }
  .r-nav-inner a   { padding: 0 8px !important; white-space: nowrap; flex: 1; justify-content: center !important; text-align: center; }
  .r-hero-inner    { flex-direction: column !important; }
  .r-hero-logo     { display: none !important; }
  .r-hero-pad      { padding: 0 !important; min-height: 0 !important; height: 62vw !important; }
  .r-hero-wrap     { padding: 0 12px !important; }
  .r-hero-img-desktop { display: none !important; }
  .r-hero-img-mobile  { display: block !important; object-fit: contain !important; }
  .r-hero-h1       { font-size: 30px !important; line-height: 1.1 !important; }
  .r-hero-sub      { font-size: 13px !important; margin: 12px 0 20px !important; }
  .r-products-grid { grid-template-columns: repeat(3,1fr) !important; gap: 10px !important; }
  .r-trust-grid    { flex-direction: column !important; align-items: center !important; }
  .r-trust-item    { flex-direction: row !important; align-items: center !important; gap: 14px !important; width: 280px !important; text-align: left !important; }
  .r-footer-grid   { grid-template-columns: 1fr 1fr !important; gap: 20px !important; }
  .r-catalog-grid  { grid-template-columns: repeat(2,1fr) !important; gap: 12px !important; }
  .r-cats-grid     { grid-template-columns: repeat(2,1fr) !important; gap: 12px !important; }
  .r-detail        { padding: 16px !important; gap: 20px !important; }
  .r-detail-img    { height: 260px !important; }
  .r-detail-price  { font-size: 28px !important; }
  .r-detail-thumb  { width: 64px !important; height: 64px !important; aspect-ratio: auto !important; flex-shrink: 0 !important; }
  .r-detail-col    { min-width: 0; }
  .r-catalog-search{ width: 140px !important; }
  .r-checkout-row  { grid-template-columns: 1fr !important; }
  .r-cart-row      { flex-wrap: wrap !important; align-items: center !important; gap: 10px !important; }
  .r-cart-info     { flex: 1 1 calc(100% - 76px) !important; }
  .r-cart-qty      { order: 1; flex-shrink: 0 !important; }
  .r-cart-unit     { order: 2; flex-shrink: 0 !important; white-space: nowrap !important; }
  .r-cart-price    { order: 3; flex: 1 1 auto !important; width: auto !important; text-align: right !important; white-space: nowrap !important; }
  .r-cart-remove   { order: 4; flex-shrink: 0 !important; }
  .r-sidebar       { width: 100% !important; max-width: 100% !important; }
  .r-delivery-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .r-contacts-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .r-detail-tabs   { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  .r-detail-tabs button { white-space: nowrap; padding: 12px 16px !important; font-size: 11px !important; }
}

@media (max-width: 480px) {
  .r-products-grid { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }
  .r-catalog-grid  { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }
  .r-cats-grid     { grid-template-columns: repeat(2,1fr) !important; }
  .r-hero-cta      { right: auto !important; left: 16px !important; bottom: 16px !important; }

  /* Cart rows: name full width on top, controls in one line below */
  .r-cart-row    { flex-wrap: wrap !important; gap: 10px !important; padding: 16px !important; align-items: center !important; }
  .r-cart-thumb  { width: 64px !important; height: 64px !important; }
  .r-cart-info   { flex: 1 1 calc(100% - 76px) !important; }
  .r-cart-qty    { order: 1; flex-shrink: 0 !important; }
  .r-cart-unit   { order: 2; flex-shrink: 0 !important; font-size: 13px !important; white-space: nowrap !important; }
  .r-cart-price  { order: 3; width: auto !important; flex: 1 1 auto !important; text-align: right !important; font-size: 16px !important; white-space: nowrap !important; }
  .r-cart-remove { order: 4; flex-shrink: 0 !important; }
}

/* iPhone / iOS Safari only — raise the hero CTA button */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 1024px) {
    .r-hero-cta { bottom: 15% !important; }
  }
}
