@media (min-width: 1440px) {
  .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1199px) {
  .container { width: min(calc(100% - 36px), 1080px); }
  .header-row { height: 78px; gap: 12px; flex-wrap: nowrap; }
  .brand-lockup { width: 170px; }
  .brand-lockup img { width: 170px; height: 56px; }
  .location-block { min-width: 150px; }
  .desktop-nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .search { flex: 1 1 240px; min-width: 160px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .account-layout { grid-template-columns: 210px 1fr; }
  .account-right { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .detail-facts { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.5fr repeat(3, 1fr); }
  .footer-col:last-child { grid-column: 1 / -1; }
}

@media (min-width: 768px) and (max-width: 900px) {
  .header-row { gap: 8px; }
  .brand-lockup { width: 145px; }
  .brand-lockup img { width: 145px; height: 52px; }
  .location-block { min-width: 135px; }
  .search { min-width: 125px; }
  .product-detail-page .detail-layout { grid-template-columns: 1fr; }
  .product-detail-page .gallery { grid-template-columns: 1fr; }
  .product-detail-page .thumbs { order: 2; display: flex; overflow-x: auto; }
  .product-detail-page .thumb { flex: 0 0 76px; width: 76px; }
  .product-detail-page .detail-image { height: min(70vw, 560px); padding: 20px; }
}

@media (max-width: 767px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  body { padding-bottom: 76px; }
  .container { width: min(calc(100% - 28px), 680px); }
  .site-header { position: relative; }
  .header-row { height: 82px; flex-wrap: nowrap; }
  .brand-lockup, .desktop-nav, .header-row > .search, .header-actions .cart-link, .header-actions .header-profile-link { display: none; }
  .header-actions .menu-toggle { order: 2; }
  .header-actions .notification { order: 1; }
  .location-block { flex: 1; min-width: 0; }
  .location-text strong { font-size: 1rem; }
  .location-text span { font-size: .78rem; }
  .mobile-search { display: block; }
  .mobile-search .search { display: block; }
  .hero-shell { padding-top: 14px; }
  .hero { border-radius: 17px; }
  .hero-track { aspect-ratio: 1080/700; }
  .hero-control { display: none; }
  .hero-dots { bottom: 10px; }
  .hero-shop { left: 6%; bottom: 9%; min-width: 108px; min-height: 40px; padding-inline: 14px; font-size: .78rem; }
  .section { padding: 22px 0; }
  .section-head { align-items: center; margin-bottom: 14px; }
  .section-title { font-family: var(--sans); font-size: 1.24rem; }
  .desktop-only { display: none; }
  .mobile-only { display: inline; }
  .section-head .red-link { font-size: .8rem; }
  .brand-rail { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; overflow: visible; }
  .brand-card { min-height: 150px; padding: 8px 5px; }
  .brand-card img { width: 70px; height: 60px; }
  .brand-card strong { font-size: .72rem; line-height: 1.25; }
  .brand-card small { font-size: .64rem; line-height: 1.25; }
  .more-brands { width: 50px; height: 50px; font-size: 1.1rem; }
  .filter-row { display: block; }
  .sorters { margin-top: 12px; }
  .filter-row > .sorters { display: none; }
  .chip { flex-shrink: 0; }
  .product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 100%; }
  .product-card { width: 100%; min-width: 0; display: flex; flex-direction: column; }
  .product-card img { max-width: 100%; }
  .product-card__media { flex: 0 0 auto; }
  .product-info { padding: 12px; display: flex; flex-direction: column; flex: 1 1 auto; }
  .product-info h3 { font-size: .9rem; }
  .product-buy { flex-direction: column; align-items: stretch; gap: 8px; margin-top: auto; padding-top: 12px; }
  .add-btn { width: 100%; white-space: nowrap; }
  .trust-strip { grid-template-columns: 1fr 1fr; padding: 16px; }
  .trust-item { justify-content: flex-start; }
  .trust-item > div > span { display: none; }
  .site-footer { margin-top: 30px; }
  .footer-grid { padding: 34px 0 24px; grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col:last-child { grid-column: 1 / -1; }
  .footer-bottom { display: block; text-align: center; }
  .mobile-nav { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; height: 70px; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(18px); }
  .mobile-nav a { display: grid; place-items: center; align-content: center; gap: 2px; color: var(--muted); font-size: .68rem; }
  .mobile-nav a span:first-child { position: relative; font-size: 1.35rem; line-height: 1; }
  .mobile-nav a span:first-child { display: grid; place-items: center; }
  .mobile-nav a span:first-child .count { top: -14px; right: -14px; }
  .mobile-nav a.active { color: var(--red); font-weight: 750; }
  .page-hero { padding: 38px 0; }
  .detail-layout { grid-template-columns: 1fr; gap: 24px; }
  .gallery { grid-template-columns: 1fr; }
  .thumbs { order: 2; display: flex; overflow-x: auto; }
  .thumb { flex: 0 0 70px; width: 70px; }
  .detail-image { height: min(106vw, 430px); padding: 12px; }
  .detail-info h1 { font-size: 2.35rem; }
  .detail-actions { grid-template-columns: auto minmax(0, 1fr) 46px; grid-auto-flow: dense; }
  .detail-actions .buy-now { grid-column: 1 / -1; }
  .detail-facts { grid-template-columns: 1fr 1fr; }
  .fact { align-items: flex-start; justify-content: flex-start; }
  .licence-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .licence-value { text-align: left; }
  .account-layout { display: block; }
  .account-side { border: 0; border-bottom: 1px solid var(--line); padding: 12px; overflow-x: auto; }
  .account-side h2, .help-card { display: none; }
  .account-nav { display: flex; width: max-content; }
  .account-nav a { white-space: nowrap; }
  .profile-center { padding: 22px 18px; }
  .profile-summary { gap: 15px; }
  .avatar { width: 84px; height: 84px; flex-basis: 84px; }
  .form-grid { grid-template-columns: 1fr; }
  .profile-head { gap: 16px; flex-wrap: wrap; }
  .profile-head > .btn { width: 100%; }
  .profile-actions { flex-direction: column; }
  .profile-actions .btn { width: 100%; }
  .address-box { align-items: flex-start; flex-direction: column; }
  .account-right { display: block; padding: 16px; }
  .content-grid, .contact-grid { grid-template-columns: 1fr; }
  .content-grid > aside { order: -1; }
  .cart-item { grid-template-columns: 82px 1fr; gap: 12px; }
  .cart-item img { width: 82px; height: 82px; }
  .cart-item-actions { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; }
  .cart-item > .price { grid-column: 2; justify-self: start; }
  .checkout-form { grid-template-columns: 1fr; }
  .checkout-form .wide { grid-column: auto; }
  .order-card { grid-template-columns: 78px 1fr; }
  .order-card img { width: 78px; height: 78px; }
  .order-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .modal-backdrop { align-items: end; padding: 0; }
  .login-modal { border-radius: 22px 22px 0 0; padding: 28px 22px; }
  .account-auth { padding: 18px 0 6px; }
  .account-auth .login-modal { border-radius: 20px; padding: 24px 18px; }

  /* Mobile nav drawer — slides in from the right over a dimmed overlay.
     The desktop/tablet dropdown-panel rule for .mobile-menu-panel lives,
     unscoped, in components.css and is untouched by this block. */
  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 590;
    background: rgba(15, 12, 10, .5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
  }
  .mobile-menu-overlay.is-open { opacity: 1; pointer-events: auto; }

  .mobile-menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 600;
    width: min(78vw, 320px);
    max-width: 86vw;
    height: 100dvh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    border: 0;
    border-radius: 0;
    background: #fffdf8;
    box-shadow: -14px 0 40px rgba(20, 15, 8, .22);
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 70px;
  }
  .mobile-menu-panel.is-open { transform: translateX(0); }
  .mobile-menu-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--line);
  }
  .mobile-menu-head strong { font-family: var(--serif); font-size: 1.1rem; }
  .mobile-menu-close {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: inherit;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 1.2rem;
  }
  .mobile-menu-panel a {
    flex: 0 0 auto;
    padding: 16px 20px;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    font-size: .92rem;
  }
  .mobile-menu-panel a:last-of-type { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .animated-search-placeholder,
  .animated-search-placeholder [data-placeholder-term] { transition: none; }
  .mobile-menu-panel, .mobile-menu-overlay { transition: none; }
}

@media (max-width: 420px) {
  .trust-strip { grid-template-columns: 1fr; }
}
