/* =============================================================
   SAFA PERFUMES — responsive layer
   Breakpoints: 1180 / 1024 / 768 / 480
   ============================================================= */

@media (max-width:1180px){
  .product-grid{grid-template-columns:repeat(3,1fr)}
  .footer__grid{grid-template-columns:1.3fr 1fr 1fr;gap:30px}
  .footer__col:last-child{grid-column:span 3}
  .hero__grid{gap:24px}
  .pd{gap:32px}
}

@media (max-width:1024px){
  :root{--header-h:112px}

  /* Header → mobile pattern */
  .header__burger{display:inline-flex}
  .header__row{gap:12px;padding:12px 0}
  .header__search{display:none}
  .header__search-toggle{display:inline-flex!important}
  .main-nav{display:none}
  .brand img{width:126px}

  /* Hero */
  .hero__grid{grid-template-columns:1fr;padding:46px 0 54px;text-align:center}
  .hero__text{margin-inline:auto}
  .hero__cta{justify-content:center}
  .hero__stats{justify-content:center;gap:26px}
  .hero__art{min-height:300px;order:-1}
  .hero__card{left:50%;transform:translateX(-50%);bottom:-6px}

  /* Shop */
  .shop-layout{grid-template-columns:1fr}
  .filters{position:fixed;top:0;left:0;bottom:0;width:min(320px,88vw);z-index:160;border-radius:0;transform:translateX(-102%);transition:transform .3s ease;overflow-y:auto;box-shadow:var(--sh-2)}
  .filters.is-open{transform:none}
  .filters-toggle{display:inline-flex}
  .toolbar{gap:10px}

  /* Product detail */
  .pd{grid-template-columns:1fr}
  .pd__gallery{position:static}

  /* Cart / checkout / account */
  .cart-layout,.checkout-layout{grid-template-columns:1fr}
  .summary-card{position:static}
  .account-layout{grid-template-columns:1fr}
  .account-nav{position:static;display:flex;gap:6px;overflow-x:auto;padding:8px}
  .account-nav a,.account-nav button{white-space:nowrap;width:auto}
  .account-nav a span.label{display:inline}

  /* Value strip */
  .value-strip{grid-template-columns:repeat(2,1fr)}

  /* Quick view */
  .quickview__body{grid-template-columns:1fr}
  .quickview__media{aspect-ratio:16/10}
}

@media (max-width:768px){
  .section{padding:46px 0}
  .section--tight{padding:30px 0}

  .topbar__links{display:none}
  .topbar__row{justify-content:center;text-align:center}
  .topbar__msg{font-size:.72rem}

  .product-grid{grid-template-columns:repeat(2,1fr);gap:16px}
  .cat-grid,.cat-grid--3{grid-template-columns:repeat(2,1fr);gap:16px}
  .reviews-grid{grid-template-columns:1fr}
  .story{grid-template-columns:1fr;gap:28px}
  .story__media{order:-1}

  .section-head{margin-bottom:24px}

  /* Cart → stacked rows */
  .cart-head{display:none}
  .cart-row{grid-template-columns:84px 1fr;grid-template-areas:"img info" "img qty" "img total";row-gap:8px;padding:16px}
  .cart-row__img{grid-area:img;width:84px;height:84px;align-self:start}
  .cart-row__info{grid-area:info}
  .cart-row__qty{grid-area:qty}
  .cart-row__total{grid-area:total}
  .cart-row__unit{display:none}
  .cart-row__remove{position:absolute;right:10px;top:10px}
  .cart-row{position:relative}

  .form-grid{grid-template-columns:1fr}
  .form-grid .span-2{grid-column:auto}

  .footer__grid{grid-template-columns:1fr 1fr;padding:44px 0 30px}
  .footer__col:last-child{grid-column:span 2}
  .newsletter__row{grid-template-columns:1fr;text-align:center}
  .newsletter__form{min-width:0}
  .newsletter h2{font-size:1.6rem}

  .pd__thumbs{grid-template-columns:repeat(5,1fr)}
  .pd__facts{grid-template-columns:1fr 1fr}

  .auth-card{padding:30px 22px}
  .page-hero{padding:38px 0 34px}
}

@media (max-width:480px){
  .container{width:calc(100% - 28px)}

  .brand img{width:108px}
  .header__actions .header__wish{display:none}
  .hero__stats{gap:18px}
  .hero__stat strong{font-size:1.5rem}
  .hero__art{min-height:250px}

  .product-grid{gap:12px}
  .p-card__body{padding:12px 12px 14px;gap:5px}
  .p-card__title{font-size:.98rem}
  .p-card__actions{opacity:1;transform:none}
  .p-card__actions .icon-btn{width:34px;height:34px}
  .price{font-size:1rem}
  .p-card__body .btn{padding:.7em 1em;font-size:.85rem}

  .value-strip{grid-template-columns:1fr}
  .pd__facts{grid-template-columns:1fr}
  .pd__price .price{font-size:1.5rem}

  .footer__grid{grid-template-columns:1fr;gap:26px}
  .footer__col:last-child{grid-column:auto}
  .footer__bottom .container{justify-content:center;text-align:center}

  .panel{padding:20px 16px}
  .summary-card{padding:20px 16px}
  .account-card{padding:18px 16px}

  .btn{padding:.8em 1.5em}
  .float-wa{right:14px;bottom:70px;width:48px;height:48px}
  .float-top{right:16px}

  .timeline__step{min-width:76px;font-size:.68rem}
}

/* Print (order invoice) */
@media print{
  .topbar,.site-header,.site-footer,.newsletter,.float-wa,.float-top,.toast-stack,
  .account-nav,.btn,.pagination,.main-nav,.mobile-drawer{display:none!important}
  body{background:#fff}
  .order-card-row{border:1px solid #999}
}
