@media (max-width: 1050px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desktop-links { gap: 17px; margin-left: 5px; }
}
@media (min-width: 768px) and (max-width: 900px) {
  .home-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .home-preview { width: min(100%, 620px); }
}
@media (max-width: 767px) {
  .container { width: min(100% - 28px, var(--content)); }
  .header-inner { width: calc(100% - 28px); height: 66px; gap: 11px; }
  .menu-toggle { display: grid; width: 36px; height: 36px; border-color: transparent; background: transparent; font-size: 21px; }
  .desktop-links, .header-login { display: none; }
  .header-actions { gap: 7px; }
  .header-actions .icon-button { width: 36px; height: 36px; border-color: transparent; background: transparent; }
  .header-actions .message-link { display: none; }
  .header-actions .avatar { width: 34px; height: 34px; }
  .brand { gap: 7px; font-size: 1rem; }
  .brand-mark { width: 32px; height: 32px; border-radius: 11px; }
  .mobile-drawer { position: absolute; top: 66px; left: 0; display: grid; width: min(340px, 88vw); gap: 4px; padding: 15px; border: 1px solid var(--border); border-left: 0; border-radius: 0 0 20px 0; background: var(--surface); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateX(-8px); transition: .2s ease; }
  .mobile-drawer.open { opacity: 1; pointer-events: auto; transform: translateX(0); }
  .mobile-drawer > a { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 11px; color: var(--text-secondary); }
  .mobile-drawer > a:hover { background: var(--gradient-soft); color: var(--text); }
  .drawer-account { display: flex; align-items: center; gap: 10px; margin-top: 9px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; }
  .drawer-account strong, .drawer-account small { display: block; }
  .drawer-account small { color: var(--muted); }
  .drawer-account > a { margin-left: auto; }
  .side-nav { display: none; }
  .page-layout { display: block; }
  .page-shell { padding-top: 26px; }
  .bottom-nav { position: fixed; z-index: 25; right: 10px; bottom: calc(9px + env(safe-area-inset-bottom)); left: 10px; display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px 5px; border: 1px solid rgba(176, 203, 225, .8); border-radius: 22px; background: rgba(247, 251, 255, .94); box-shadow: 0 12px 38px rgba(41, 79, 109, .16); backdrop-filter: blur(18px); }
  .bottom-nav a { display: grid; min-height: 51px; align-content: center; justify-items: center; gap: 2px; border-radius: 15px; color: var(--muted); font-size: .68rem; transition: .2s; }
  .bottom-nav a i { font-size: 19px; }
  .bottom-nav a.active { background: var(--gradient-soft); color: var(--accent-strong); }
  .bottom-space { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-card { padding: 12px; border-radius: 17px; }
  .product-card h3 { font-size: .92rem; }
  .product-icon { width: 40px; height: 40px; }
  .product-actions .button { min-height: 37px; padding-inline: 12px; }
  .product-bottom { align-items: start; flex-direction: column; }
  .product-actions { width: 100%; }
  .product-actions .button { flex: 1; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .category-card { min-height: 84px; padding: 12px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .stat-card { gap: 10px; padding: 13px; border-radius: 16px; }
  .stat-icon { width: 38px; height: 38px; font-size: 16px; }
  .stat-card strong { font-size: 1.15rem; }
  .stat-label { font-size: .74rem; }
  .page-heading { align-items: start; flex-direction: column; }
  .page-heading .button { align-self: stretch; }
  .section { margin-top: 40px; }
  .section-heading { align-items: start; }
  .hero { min-height: 440px; padding: 27px 22px; border-radius: 24px; }
  .hero::after { top: 37%; right: -38%; width: 240px; height: 240px; }
  .hero p { font-size: .95rem; }
  .listing-toolbar { grid-template-columns: minmax(0, 1fr) 48px; }
  .listing-toolbar > .button { width: 48px; padding: 0; }
  .filter-panel.open { grid-template-columns: 1fr 1fr; }
  .order-row { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; }
  .order-row .status-badge { grid-column: 2 / -1; }
  .order-row .product-icon { width: 40px; height: 40px; }
  .order-price { align-self: start; font-size: .88rem; }
  .list-card { padding: 15px; }
  .two-column { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 9px; }
  .cart-item .quantity-control { grid-column: 2 / 3; }
  .cart-item > .price { grid-column: 3; grid-row: 1; }
  .site-footer { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
  .site-footer > div { width: 100%; flex-wrap: wrap; }
  .home-hero { padding: 35px 0 46px; }
  .home-hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .home-copy { padding-block: 6px; }
  .home-copy h1 { font-size: clamp(3rem, 12vw, 4.3rem); }
  .home-copy > p { margin-top: 17px; }
  .home-assurances { gap: 10px 16px; font-size: .74rem; }
  .home-preview { padding: 17px; }
  .preview-float { right: 9px; bottom: -22px; }
  .home-trending { grid-template-columns: 1fr; gap: 12px; padding-block: 19px; }
  .trending-track { grid-auto-columns: minmax(205px, 78%); }
  .home-section { padding-block: 49px; }
  .home-section-heading { align-items: start; flex-direction: column; gap: 10px; margin-bottom: 19px; }
  .home-feature-grid { grid-template-columns: 1fr; gap: 10px; }
  .home-feature { min-height: 225px; padding: 18px; }
  .home-service-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .home-service-link { padding: 9px; }
  .home-how { padding-block: 46px; }
  .how-grid { grid-template-columns: 1fr; gap: 9px; }
  .how-card { padding: 17px; }
  .how-card h3 { margin-top: 12px; }
  .home-bottom-callout { align-items: start; flex-wrap: wrap; gap: 13px; margin-top: 42px; padding: 20px; }
  .callout-orbit { width: 48px; height: 48px; font-size: 19px; }
  .home-bottom-callout > div:nth-child(2) { flex: 1; min-width: 190px; }
  .home-bottom-callout > .button { width: 100%; margin: 4px 0 0; }
}
@media (max-width: 374px) {
  .container { width: calc(100% - 22px); }
  .header-inner { width: calc(100% - 18px); gap: 5px; }
  .header-actions { gap: 2px; }
  .header-actions [data-notifications] { display: none; }
  .product-grid { gap: 7px; }
  .product-card { padding: 10px; }
  .product-meta, .stock { font-size: .7rem; }
  .filter-panel.open { grid-template-columns: 1fr; }
  .home-copy h1 { font-size: 2.9rem; }
  .preview-tabs button { font-size: .68rem; }
  .preview-item-copy strong { font-size: .72rem; }
  .preview-float { max-width: calc(100% - 18px); }
}
@media (min-width: 768px) {
  .bottom-space { padding-bottom: 60px; }
}
