/* -----------------------------------
   RESPONSIVE STYLES
   Changes for tablets and phones live here.
----------------------------------- */

/*
  Nothing outside a media query belongs in this file.
  These rules begin when the screen is 768px wide or smaller.
*/
/* Tablets, iPads, and smaller screens */
@media (max-width: 1024px) {
  .navigation-links {
    display: none;
  }

  .mobile-navigation {
    display: block;
  }

  .shopping-links .search-link {
    display: none;
  }

  #bestseller-showcase > .page-width {
    grid-template-columns: 0.9fr 1.1fr;
  }

  #bestseller-showcase aside {
    display: none;
  }

  .category-grid {
    height: auto;
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-card .product-preview {
    min-height: 300px;
  }

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

  .about-hero {
    gap: 32px;
  }

  .about-hero h1 {
    font-size: 58px;
  }

  .cart-layout,
  .checkout-layout {
    display: flex;
    flex-direction: column;
  }

  .order-summary {
    width: 100%;
  }

  .checkout-summary {
    order: -1;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .page-width {
    width: min(100% - 32px, var(--page-width));
  }

  #bestseller-showcase > .page-width {
    display: flex;
    min-height: auto;
    flex-direction: column;
    padding-top: 56px;
    padding-bottom: 88px;
  }

  #bestseller-showcase h1 {
    font-size: 52px;
  }

  #bestseller-showcase .max-w-md {
    max-width: 100%;
  }

  #bestseller-showcase [aria-label^="Featured bestseller"] {
    order: -1;
    min-height: 420px;
    width: 100%;
  }

  #bestseller-showcase aside {
    display: none;
  }

  #bestseller-showcase .previous-product,
  #bestseller-showcase .next-product {
    display: none;
  }

  .category-grid {
    display: flex;
    height: auto;
    min-height: 0;
    margin-right: -16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .catalog-title {
    font-size: 38px;
  }

  .category-grid::-webkit-scrollbar {
    display: none;
  }

  .category-mobile-controls {
    display: flex;
  }

  .category-card {
    min-width: min(82vw, 360px);
    scroll-snap-align: start;
  }

  .category-card .product-preview {
    min-height: 330px;
  }

  .catalog-hero .page-width {
    display: block;
  }

  .catalog-toolbar .page-width {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-list {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .filter-list::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    flex: 0 0 auto;
  }

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

  .quick-view-layout {
    display: block;
    max-height: calc(100svh - 32px);
    overflow-y: auto;
  }

  .quick-view-layout .product-art {
    min-height: 300px;
  }

  #search-results {
    grid-template-columns: 1fr;
  }

  #site-search-form {
    flex-direction: column;
    gap: 12px;
  }

  .about-hero {
    display: flex;
    min-height: auto;
    flex-direction: column;
    gap: 20px;
  }

  .about-hero h1 {
    font-size: 54px;
  }

  .about-visual {
    min-height: 430px;
    width: 100%;
    transform: scale(0.85);
  }

  #our-beginning {
    display: block;
    padding-top: 72px;
    padding-bottom: 72px;
  }

  #our-beginning > div:last-child {
    margin-top: 36px;
  }

  .about-values {
    display: block;
  }

  .about-values article {
    border-bottom: 1px solid #44403c;
    border-left: 0;
    padding: 32px 0;
  }

  .about-values article:last-child {
    border-bottom: 0;
  }

  .about-values article:nth-child(2),
  .about-values article:nth-child(3) {
    padding-right: 0;
    padding-left: 0;
  }

  .about-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .cart-layout {
    display: block;
  }

  .order-summary {
    margin-top: 40px;
  }

  .cart-upsells {
    display: flex;
    margin-right: -16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .cart-upsells::-webkit-scrollbar {
    display: none;
  }

  .cart-upsells article {
    min-width: min(82vw, 340px);
    scroll-snap-align: start;
  }

  .checkout-layout {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .checkout-summary {
    order: -1;
    width: 100%;
  }

  .checkout-progress {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 42px 28px; padding-top: 52px; }
  .footer-introduction, .footer-newsletter { grid-column: 1 / -1; }
}

/* Small phones */
@media (max-width: 480px) {
  .brand-name {
    font-size: 16px;
  }

  .search-link {
    display: none;
  }

  #bestseller-showcase > .page-width {
    padding-top: 32px;
  }

  #bestseller-showcase [aria-label^="Featured bestseller"] {
    min-height: 370px;
    transform: scale(0.82);
  }

  #bestseller-showcase h1 {
    font-size: 46px;
  }

  .catalog-title {
    font-size: 34px;
  }

  .cart-item {
    grid-template-columns: 110px 1fr;
    gap: 16px;
  }

  .cart-item .product-art {
    min-height: 170px;
  }

  .cart-item .product-art > div {
    transform: scale(0.52);
  }

  .checkout-header > p {
    display: none;
  }

  #checkout-form fieldset > .grid {
    grid-template-columns: 1fr;
  }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-introduction, .footer-newsletter { grid-column: auto; }
  .footer-legal { align-items: flex-start; flex-direction: column; gap: 12px; }
  .footer-newsletter-form { flex-direction: column; gap: 10px; }
  .footer-newsletter-form input { border-right: 1px solid #57534e; }
}
