/* ============================================================
   EVANIA FINE JEWELLERY — RESPONSIVE STYLES
   ============================================================ */

/* ─── Sticky mobile Add to Cart (product page) — hidden above the mobile
   breakpoint; the primary in-flow #mainAddToCart button covers desktop. ─── */
.sticky-mobile-cta {
  display: none;
}

/* ─── Tablet (768px - 1024px) ─── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .instagram-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .about-story { grid-template-columns: 1fr; gap: var(--space-8); }
  .shop-layout { grid-template-columns: 1fr; }
  .shop-filters { position: static; display: none; }
  .shop-filters.active { display: block; }
  .product-details,
  .product { grid-template-columns: 1fr; gap: var(--space-8); }
  .cart-layout { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .woocommerce-account .woocommerce { grid-template-columns: 1fr; gap: var(--space-6); }
  .woocommerce-order-overview { flex-direction: column; gap: var(--space-4); }
  .woocommerce-customer-details { flex-direction: column; gap: var(--space-4); }
  .contact-grid { grid-template-columns: 1fr; }

  /* Shop Page Tablet */
  .shop-layout { grid-template-columns: 1fr; }
  .shop-filters {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 340px;
    z-index: calc(var(--z-modal) + 1);
    border-radius: var(--radius-2xl) 0 0 var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform var(--transition-base);
  }
  .shop-filters.mobile-open {
    display: block;
    transform: translateX(0);
  }
  .filter-toggle-btn { display: inline-flex !important; }
  .filter-close-mobile { display: block; }
  .shop-main .product-grid,
  ul.products { grid-template-columns: repeat(2, 1fr); }
  .quick-view-content { grid-template-columns: 1fr; }
  .quick-view-image { min-height: 300px; }

  .nav-links { display: none; }
  .mobile-menu-toggle { display: flex; }
  .nav-links.mobile-active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(30, 21, 50, 0.98);
    padding: var(--space-8);
    gap: var(--space-4);
    z-index: var(--z-dropdown);
    backdrop-filter: blur(20px);
    min-height: calc(100vh - var(--nav-height));
  }

  /* .hero-title intentionally omitted — --text-display-lg is a clamp() that
     already scales fluidly down to this breakpoint. A fixed override here
     would defeat it. */
  .collection-banner-content h2 { font-size: var(--text-4xl); }

  .mega-menu-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Mobile (up to 767px) ─── */
@media (max-width: 767px) {
  :root {
    --nav-height: 76px;
    --announcement-height: 36px;
  }

  .sticky-mobile-cta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-sticky);
    padding: var(--space-3) var(--space-4);
    background: var(--color-white);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  }

  .sticky-mobile-cta-price {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    color: var(--color-gold);
    white-space: nowrap;
  }

  .sticky-mobile-cta .btn {
    flex: 1;
  }

  /* product page only — give the last real content room so the fixed
     bar never sits on top of it. */
  .product-tabs {
    margin-bottom: 88px;
  }

  .container {
    padding: 0 var(--space-4);
  }

  .container-wide {
    padding: 0 var(--space-4);
  }

  .section {
    padding: var(--space-12) 0;
  }

  .section-header {
    margin-bottom: var(--space-10);
  }

  /* .section-title intentionally omitted — --text-display-sm clamps down to
     36px on its own at this width. */

  .section-subtitle {
    font-size: var(--text-base);
  }

  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .instagram-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .about-stats { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }

  /* Hero */
  .hero { height: 80vh; min-height: 500px; }
  /* .hero-title intentionally omitted — see the tablet block above. */
  .hero-subtitle { font-size: var(--text-base); }
  .hero-actions { flex-direction: column; gap: var(--space-3); }
  .hero-actions .btn { width: 100%; }

  /* Navigation */
  .nav-logo { font-size: var(--text-xl); }
  .nav-logo-img { height: 52px; max-width: 220px; }
  .nav-actions .btn-icon { width: 36px; height: 36px; }
  .nav-actions .btn-icon.hide-mobile { display: none; }

  /* Collection Banner */
  .collection-banner {
    height: 400px;
    margin: var(--space-12) 0;
    border-radius: var(--radius-xl);
  }
  .collection-banner-overlay {
    background: linear-gradient(transparent 30%, rgba(30, 21, 50, 0.9));
    padding: var(--space-8);
    align-items: flex-end;
  }
  .collection-banner-content h2 { font-size: var(--text-3xl); }

  /* Product Card */
  .product-card-body { padding: var(--space-3); }
  .product-card-body h3 { font-size: var(--text-xs); }
  .product-card-price .current { font-size: var(--text-base); }
  .product-card .btn { font-size: var(--text-xs); padding: var(--space-2) var(--space-4); }
  .product-card-actions { opacity: 1; transform: none; top: var(--space-2); right: var(--space-2); }
  .product-card-actions button { width: 30px; height: 30px; font-size: var(--text-xs); }

  /* Newsletter */
  .newsletter { padding: var(--space-16) 0; }
  .newsletter-content h2 { font-size: var(--text-2xl); }
  .newsletter-form { flex-direction: column; }
  .newsletter-form .btn { width: 100%; }

  /* Page Header */
  .page-header { padding: var(--space-16) 0 var(--space-10); }
  /* .page-header h1 intentionally omitted — --text-display-md clamps down
     to 40px on its own at this width. */

  /* Product Details */
  .product-gallery-main { aspect-ratio: 3/4; }
  .product-gallery-thumb { width: 60px; height: 60px; }
  .product-info h1 { font-size: var(--text-2xl); }
  .product-info .price { font-size: var(--text-2xl); }
  .product-meta { grid-template-columns: 1fr 1fr; }
  .product-actions { flex-direction: column; }
  .product-actions .btn-icon { width: 100%; height: auto; padding: var(--space-3); border-radius: var(--radius-full); }

  /* Cart */
  .cart-item {
    grid-template-columns: 80px 1fr;
    gap: var(--space-4);
    padding: var(--space-4);
  }
  .cart-item-image { width: 80px; height: 80px; }
  .cart-item-actions { grid-column: span 2; flex-direction: row; justify-content: space-between; align-items: center; }
  .cart-summary { position: static; }

  /* Checkout */
  .contact-form .form-row { grid-template-columns: 1fr; }
  .payment-methods { flex-direction: column; }

  /* About */
  .about-hero { height: 50vh; min-height: 350px; }
  .about-hero-content { padding: var(--space-8); }
  .about-hero-content h1 { font-size: var(--text-3xl); }
  .about-story-content h2 { font-size: var(--text-2xl); }
  .about-stat h3 { font-size: var(--text-3xl); }

  /* Contact */
  .contact-info-cards { grid-template-columns: 1fr; }
  .contact-form { padding: var(--space-6); }

  /* Footer */
  .footer-brand .nav-logo-img { height: 66px; max-width: 260px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .tab-nav { overflow-x: auto; gap: var(--space-4); }
  .tab-nav button { white-space: nowrap; font-size: var(--text-xs); }

  /* Toast */
  .toast { left: var(--space-4); right: var(--space-4); bottom: var(--space-4); }

  /* Shop Page Mobile */
  .shop-layout { grid-template-columns: 1fr; }
  .shop-filters {
    width: 300px;
    padding: var(--space-6);
  }
  .shop-main .product-grid,
  ul.products { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .shop-main .product-card-image,
  ul.products .product-card-image { aspect-ratio: 1/1.1; }
  .shop-main .product-card-body,
  ul.products .product-card-body { padding: var(--space-3); }
  .shop-main .product-card-body h3,
  ul.products .product-card-body h3 { font-size: var(--text-xs); }
  .shop-main .product-card-price .current,
  ul.products .product-card-price .current { font-size: var(--text-base); }
  /* These were hardcoded at 8px and 10px, so the site-wide type scale could
     not reach them. An 8px badge is unreadable for the people actually
     buying here. On the scale now, like everything else. */
  .shop-main .product-card-rating { font-size: var(--text-xs); }
  .shop-main .product-card .add-to-cart,
  ul.products .product-card .add-to-cart { padding: var(--space-2); font-size: var(--text-xs); }
  .shop-main .product-card-actions { opacity: 1; transform: none; top: var(--space-2); right: var(--space-2); }
  .shop-main .product-card-actions button { width: 34px; height: 34px; }
  .shop-main .product-card-badges .badge,
  ul.products .product-card-badges .badge { font-size: var(--text-xs); padding: 2px 8px; }
  .shop-header { flex-direction: column; align-items: flex-start; }
  .filter-toggle-btn { display: inline-flex !important; }
  .filter-close-mobile { display: block; }
  .sort-select,
  .woocommerce-ordering select { min-width: 140px; font-size: var(--text-xs); }
  .results { font-size: var(--text-xs); }
  .quick-view-content { grid-template-columns: 1fr; }
  .quick-view-image { min-height: 250px; }
  .quick-view-info { padding: var(--space-5); }
  .shop-empty { padding: var(--space-10) var(--space-4); }
  .shop-empty-icon { width: 72px; height: 72px; }
  .shop-empty h3 { font-size: var(--text-xl); }
}
