/* ZARINA responsive polish: phones first, tablets next */
@media (max-width: 1024px) {
  html {
    scroll-padding-top: calc(var(--header-height, 78px) + var(--announcement-height, 0px) + 10px);
  }

  body {
    overflow-x: hidden;
  }

  .container {
    width: min(100% - 28px, 920px) !important;
  }

  h1 {
    font-size: clamp(2rem, 8vw, 3.4rem) !important;
    line-height: 1.08 !important;
  }

  h2,
  .section-title {
    font-size: clamp(1.55rem, 6vw, 2.25rem) !important;
    line-height: 1.18 !important;
  }

  p {
    font-size: clamp(0.94rem, 3.4vw, 1.02rem);
  }

  .product-grid,
  .products-grid,
  .featured-grid {
    gap: 1rem !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html body .product-card {
    border-radius: 16px !important;
    min-height: 0 !important;
  }

  html body .product-card .product-img {
    height: clamp(150px, 26vw, 220px) !important;
  }

  html body .product-card .product-info {
    gap: 0.45rem !important;
    grid-template-rows: 2.7rem 1rem 1.4rem 1.25rem 3.5rem 1.55rem 40px !important;
    padding: 0.85rem !important;
  }

  html body .product-card .product-title {
    font-size: clamp(0.96rem, 3.2vw, 1.12rem) !important;
  }

  html body .product-card .product-category {
    font-size: 0.7rem !important;
  }

  html body .product-card .product-rating-badge {
    font-size: 0.76rem !important;
  }

  html body .product-card .product-desc {
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
    -webkit-line-clamp: 2 !important;
  }

  html body .product-card .price {
    font-size: 1rem !important;
  }

  html body .product-card .add-to-cart {
    border-radius: 999px !important;
    font-size: 0.78rem !important;
    min-height: 40px !important;
    padding: 0 0.55rem !important;
  }

  .product-new-badge {
    font-size: 0.68rem !important;
    left: 8px !important;
    padding: 0.38rem 0.58rem !important;
    top: 8px !important;
  }

  .cart-sidebar {
    max-width: 420px !important;
    width: min(92vw, 420px) !important;
  }
}

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

  .container {
    width: calc(100% - 22px) !important;
  }

  section,
  .home-section,
  .story-section,
  .featured,
  .featured-products {
    padding-block: 2.15rem !important;
  }

  .home-curated-head,
  .catalog-head,
  .story-grid {
    align-items: stretch !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.85rem !important;
  }

  .trust-grid,
  .values-grid,
  .stats-grid,
  .checkout-layout,
  .checkout-container {
    grid-template-columns: 1fr !important;
  }

  .trust-item {
    min-height: 68px !important;
    padding: 0.8rem 0.65rem !important;
  }

  .hero {
    min-height: clamp(520px, calc(100svh - var(--header-height) - var(--announcement-height)), 680px) !important;
  }

  .hero-inner {
    padding: 2.65rem 0 3rem !important;
  }

  .hero-content {
    max-width: 100% !important;
  }

  .hero-kicker {
    font-size: 0.78rem !important;
    padding: 7px 11px !important;
  }

  .hero p {
    font-size: 0.98rem !important;
    line-height: 1.7 !important;
  }

  .hero-actions {
    gap: 9px !important;
  }

  .products-section .section-title {
    line-height: 1.18 !important;
    margin-bottom: 1.25rem !important;
    padding-top: 0.1rem !important;
  }

  .products-section .section-title::after {
    margin-top: 0.62rem !important;
  }

  .hero-btn,
  .hero-link,
  .cta-btn,
  .home-curated-link,
  .checkout-action,
  .btn-submit {
    font-size: 0.86rem !important;
    min-height: 44px !important;
    padding-inline: 15px !important;
    width: 100%;
  }

  .home-curated-grid {
    display: grid !important;
    gap: 0.85rem !important;
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
  }

  html body .home-curated .product-card {
    display: block !important;
    height: auto !important;
    overflow: hidden !important;
    padding: 0 !important;
  }

  html body .home-curated .product-card.curated-feature {
    height: 360px !important;
    min-height: 360px !important;
    position: relative !important;
  }

  html body .home-curated .product-card.curated-stack-card {
    height: 142px !important;
    min-height: 142px !important;
    position: relative !important;
  }

  html body .home-curated .product-card img {
    border-radius: 0 !important;
    display: block !important;
    height: 100% !important;
    inset: 0 !important;
    margin: 0 !important;
    max-height: none !important;
    object-fit: cover !important;
    position: absolute !important;
    width: 100% !important;
  }

  .curated-feature {
    min-height: 360px !important;
  }

  .curated-stack {
    display: grid !important;
    gap: 0.85rem !important;
    grid-template-rows: none !important;
  }

  .curated-stack-card {
    min-height: 140px !important;
  }

  .home-curated {
    overflow: visible !important;
    padding-bottom: 2.5rem !important;
  }

  .curated-content {
    padding: 1rem !important;
  }

  .curated-content h3 {
    font-size: clamp(1rem, 5vw, 1.5rem) !important;
  }

  .curated-content p {
    font-size: 0.9rem !important;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
  }

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

  html body .product-card .product-img {
    height: 138px !important;
  }

  html body .product-card .product-info {
    grid-template-rows: 2.45rem 0.95rem 1.2rem 1.18rem 2.65rem 1.4rem 38px !important;
    padding: 0.72rem !important;
  }

  html body .product-card .product-title {
    font-size: 0.92rem !important;
  }

  html body .product-card .product-category,
  html body .product-card .product-rating-badge,
  html body .product-card .product-desc {
    font-size: 0.72rem !important;
  }

  html body .product-card .price {
    font-size: 0.94rem !important;
  }

  .product-modal {
    width: 96vw !important;
  }

  .product-modal-grid {
    grid-template-columns: 1fr !important;
    padding: 0.9rem !important;
  }

  .product-modal-img {
    max-height: 300px !important;
  }

  .product-reviews-head,
  .product-review-form,
  .product-review-list {
    grid-template-columns: 1fr !important;
  }

  .reviews-showcase .home-reviews-list {
    gap: 0.9rem !important;
    grid-template-columns: 1fr !important;
  }

  .reviews-showcase .home-review-card,
  .reviews-showcase .home-review-empty {
    min-height: 150px !important;
    padding: 0.95rem !important;
  }

  .form-group input,
  .form-group textarea,
  .form-control,
  select {
    font-size: 16px !important;
    min-height: 44px !important;
  }

  .cart-sidebar {
    border-radius: 0 !important;
    height: 100dvh !important;
    max-width: none !important;
    width: 100vw !important;
  }
}

@media (max-width: 430px) {
  .container {
    width: calc(100% - 18px) !important;
  }

  h1 {
    font-size: clamp(1.9rem, 10vw, 2.65rem) !important;
  }

  .product-grid,
  .products-grid,
  .featured-grid {
    gap: 0.72rem !important;
  }

  html body .product-card {
    border-radius: 13px !important;
  }

  html body .product-card .product-img {
    height: 124px !important;
  }

  html body .product-card .product-info {
    gap: 0.34rem !important;
    grid-template-rows: 2.3rem 0.85rem 0.75rem 1.05rem 2.25rem 1.25rem 36px !important;
    padding: 0.58rem !important;
  }

  html body .product-card .product-title {
    font-size: 0.84rem !important;
  }

  html body .product-card .product-category {
    font-size: 0.62rem !important;
  }

  html body .product-card .product-tags {
    display: none !important;
  }

  html body .product-card .product-rating-badge,
  html body .product-card .product-desc {
    font-size: 0.68rem !important;
  }

  html body .product-card .price {
    font-size: 0.86rem !important;
  }

  html body .product-card .add-to-cart {
    font-size: 0.68rem !important;
    min-height: 36px !important;
  }

  .product-new-badge {
    font-size: 0.6rem !important;
    padding: 0.32rem 0.46rem !important;
  }

  html body .home-curated .product-card.curated-feature {
    height: 320px !important;
    min-height: 320px !important;
  }

  html body .home-curated .product-card.curated-stack-card {
    height: 124px !important;
    min-height: 124px !important;
  }

  html body .home-curated .product-card img {
    height: 100% !important;
    min-height: 100% !important;
  }
}

@media (max-width: 720px) {
  html body .product-modal-overlay.show {
    padding: 8px !important;
  }

  html body .product-modal {
    max-height: calc(100dvh - 16px) !important;
    overflow-y: auto !important;
  }

  html body .product-modal-img {
    height: auto !important;
    max-height: 210px !important;
    width: 100% !important;
  }

  html body .variant-option,
  html body .product-color-option,
  html body .detail-add {
    -webkit-tap-highlight-color: transparent;
  }
}

/* Final mobile image dimensions to reserve stable space before images load. */
@media (max-width: 1024px) {
  html body .product-card .product-img,
  html body .collections-grid .product-img {
    aspect-ratio: 4 / 3 !important;
    display: block !important;
    height: clamp(150px, 26vw, 220px) !important;
    min-height: clamp(150px, 26vw, 220px) !important;
    object-fit: cover !important;
    width: 100% !important;
  }

  html body .story-image img {
    aspect-ratio: 1 / 1 !important;
    max-height: 460px !important;
    object-fit: cover !important;
    width: 100% !important;
  }
}

@media (max-width: 760px) {
  html body .product-card .product-img,
  html body .collections-grid .product-img {
    height: 138px !important;
    min-height: 138px !important;
  }

  html body .home-curated .curated-feature img,
  html body .home-curated .curated-stack-card img {
    aspect-ratio: 16 / 10 !important;
    height: 100% !important;
    min-height: 190px !important;
    object-fit: cover !important;
    width: 100% !important;
  }

  html body .home-collection-image img {
    aspect-ratio: 1 / 1 !important;
    height: 92px !important;
    object-fit: cover !important;
    width: 92px !important;
  }

  html body .collection-tab-img {
    aspect-ratio: 1 / 1 !important;
    height: 34px !important;
    object-fit: cover !important;
    width: 34px !important;
  }

  html body .cart-item-img {
    aspect-ratio: 1 / 1 !important;
    height: 54px !important;
    object-fit: cover !important;
    width: 54px !important;
  }

  html body .story-image img {
    max-height: 360px !important;
  }
}

@media (max-width: 430px) {
  html body .product-card .product-img,
  html body .collections-grid .product-img {
    height: 124px !important;
    min-height: 124px !important;
  }

  html body .story-image img {
    max-height: 310px !important;
  }
}
