/* Responsive refinements for tablet and mobile screens. */
@media (max-width: 1100px) {
  .search-box {
    width: 210px;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .collection-grid {
    grid-template-columns: 1fr 1fr;
  }

  .collection-tile.large {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 920px) {
  :root {
    --header-height: 68px;
  }

  body {
    padding-bottom: 58px;
  }

  .navbar {
    grid-template-columns: auto auto 1fr;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .main-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: calc(var(--header-height) + 37px);
    max-height: calc(100vh - var(--header-height) - 37px);
    overflow: auto;
    padding: 14px 16px 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: 0.24s ease;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list {
    display: grid;
    gap: 4px;
  }

  .nav-list > li > a,
  .mega-trigger {
    width: 100%;
    justify-content: space-between;
    min-height: 48px;
  }

  .mega-menu {
    position: static;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
    margin-top: 8px;
    padding: 14px;
  }

  .mega-item:hover .mega-menu,
  .mega-item:focus-within .mega-menu {
    transform: none;
  }

  .header-actions .search-box {
    display: none;
  }

  .hero-slider {
    min-height: 660px;
  }

  .service-strip .container,
  .reviews-grid,
  .info-grid,
  .team-grid,
  .contact-grid,
  .newsletter .container,
  .about-story,
  .contact-layout,
  .auth-shell,
  .product-detail,
  .cart-page-layout,
  .shop-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .filters,
  .summary-card {
    position: static;
  }

  .shop-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .newsletter-form {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    min-height: 260px;
  }

  .mobile-bottom-nav {
    display: grid;
  }

  .back-to-top {
    bottom: 76px;
  }
}

@media (max-width: 640px) {
  :root {
    --container: min(100% - 22px, 1180px);
  }

  .top-strip {
    font-size: 0.78rem;
  }

  .brand span:last-child {
    max-width: 118px;
    font-size: 0.84rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions .js-theme-toggle,
  .header-actions .login-shortcut {
    display: none;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
  }

  .section {
    padding: 54px 0;
  }

  .section-header {
    display: block;
  }

  .hero-slider {
    min-height: 600px;
  }

  .hero-slide::before {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.82));
  }

  .hero-content {
    align-self: end;
    padding-bottom: 92px;
  }

  .hero-content h1 {
    font-size: clamp(2.45rem, 16vw, 4.8rem);
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-controls {
    left: 11px;
    right: auto;
    bottom: 20px;
  }

  .service-strip .container {
    grid-template-columns: 1fr 1fr;
  }

  .service-item {
    padding: 14px 8px;
  }

  .collection-grid,
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 230px;
  }

  .collection-tile.large {
    grid-column: span 2;
  }

  .product-grid {
    gap: 12px;
  }

  .product-card__body {
    padding: 12px;
  }

  .product-card h3 {
    font-size: 0.95rem;
  }

  .product-meta,
  .product-card p,
  .price-row s {
    font-size: 0.8rem;
  }

  .product-card .btn {
    min-height: 40px;
    padding-inline: 10px;
    font-size: 0.86rem;
  }

  .quick-view {
    opacity: 1;
    transform: translateY(0);
    min-height: 38px;
  }

  .banner-band {
    background-attachment: scroll;
  }

  .page-hero {
    min-height: 300px;
    padding: 72px 0 38px;
  }

  .filters {
    padding: 14px;
  }

  .cart-line {
    grid-template-columns: 86px 1fr;
    padding: 10px;
  }

  .cart-line img {
    width: 86px;
    height: 108px;
  }

  .cart-line__top,
  .cart-line__bottom {
    display: grid;
    justify-items: start;
  }

  .quick-view__content {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 36px);
    overflow: auto;
  }

  .quick-view__content img {
    height: 320px;
  }

  .form-row,
  .stats-row {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    display: grid;
  }
}

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

  .service-strip .container,
  .collection-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .collection-tile.large {
    grid-column: span 1;
  }

  .newsletter {
    padding: 44px 0;
  }
}
