/* ============================================================
   VELORA — MOBILE REFINEMENT LAYER
   A world-class luxury mobile shopping experience.
   
   Strategy: Override only what is necessary. Preserve the
   entire desktop identity. Craft intentional mobile layouts
   that feel native to the luxury mobile space.
   
   Target widths: 320px · 375px · 390px · 393px · 414px · 430px
   Tablet: 768px
   Desktop: untouched at 1024px+
   ============================================================ */

/* ============================================================
   GLOBAL MOBILE TOKENS & SAFE-AREA SUPPORT
   ============================================================ */
@media (max-width: 1023px) {
  :root {
    --header-height-mobile: 60px;
    --mobile-side-pad: 20px;
    --mobile-section-pad: 64px;
    --mobile-section-pad-sm: 48px;
  }

  /* Safe area for notched phones (iPhone 12+, S22, etc.) */
  body {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  /* Smooth native scrolling */
  html {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 375px) {
  :root {
    --mobile-side-pad: 16px;
    --mobile-section-pad: 52px;
  }
}


/* ============================================================
   HEADER — MOBILE REFINEMENT
   ============================================================ */
@media (max-width: 1023px) {
  /* Ensure header is always legible — use solid bg from top */
  .header-wrapper {
    background-color: rgba(var(--ivory-rgb), 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
  }

  /* When on dark hero — use dark bg */
  .header-wrapper.header-dark-mode {
    background-color: rgba(var(--obsidian-rgb), 0.92);
    border-bottom-color: var(--border-light);
  }

  .header-inner {
    height: var(--header-height-mobile);
    padding: 0 var(--mobile-side-pad);
  }

  .header-logo a {
    font-size: 1.35rem;
    letter-spacing: 0.28em;
  }

  .header-nav-right {
    gap: 18px;
  }

  /* Make touch targets at least 44x44px */
  .header-icon-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-hamburger {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
  }

  .mobile-hamburger span {
    width: 22px;
    height: 1px;
    position: absolute;
    transition: var(--transition-smooth);
  }

  .mobile-hamburger span:nth-child(1) { transform: translateY(-7px); }
  .mobile-hamburger span:nth-child(2) { transform: translateY(0); }
  .mobile-hamburger span:nth-child(3) { transform: translateY(7px); }

  .mobile-hamburger.active span:nth-child(1) {
    transform: translateY(0) rotate(45deg);
  }
  .mobile-hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .mobile-hamburger.active span:nth-child(3) {
    transform: translateY(0) rotate(-45deg);
  }
}

/* Ultra-small screens: tighter logo */
@media (max-width: 360px) {
  .header-logo a {
    font-size: 1.2rem;
    letter-spacing: 0.2em;
  }
  .header-nav-right {
    gap: 10px;
  }
}


/* ============================================================
   MOBILE MENU — FULL SCREEN OVERLAY REFINEMENT
   ============================================================ */
@media (max-width: 1023px) {
  #mobile-menu {
    width: 100vw;
    height: 100dvh; /* dynamic viewport height for mobile */
    background-color: var(--ivory);
    overflow: hidden;
  }

  /* Menu header matches header bar exactly */
  #mobile-menu .drawer-header {
    height: var(--header-height-mobile);
    padding: 0 var(--mobile-side-pad);
    border-bottom: 1px solid var(--border-color);
  }

  /* Menu body uses full remaining height and distributes space */
  #mobile-menu .drawer-body {
    height: calc(100dvh - var(--header-height-mobile));
    padding: 40px var(--mobile-side-pad) calc(40px + env(safe-area-inset-bottom, 0));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
  }

  /* Primary nav links — large editorial serif */
  #mobile-menu nav {
    gap: 0;
    display: flex;
    flex-direction: column;
  }

  #mobile-menu nav a {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 7vw, 2.2rem);
    font-weight: 400;
    line-height: 1;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: 0.01em;
    color: var(--obsidian);
    transition: var(--transition-fast);
  }

  #mobile-menu nav a:first-child {
    border-top: 1px solid var(--border-color);
  }

  #mobile-menu nav a::after {
    content: '→';
    font-family: var(--font-ui);
    font-size: 1rem;
    opacity: 0;
    transform: translateX(-8px);
    transition: var(--transition-fast);
  }

  #mobile-menu nav a:hover {
    color: var(--champagne);
  }

  #mobile-menu nav a:hover::after {
    opacity: 1;
    transform: translateX(0);
  }

  /* Bottom utility links */
  #mobile-menu .drawer-body > div:last-child {
    border-top: 1px solid var(--border-color);
    padding-top: 28px;
    display: flex;
    flex-direction: row;
    gap: 28px;
    flex-wrap: wrap;
  }

  #mobile-menu .drawer-body > div:last-child a {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--taupe);
  }
}


/* ============================================================
   CART DRAWER — MOBILE REFINEMENT
   ============================================================ */
@media (max-width: 1023px) {
  #cart-drawer {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .drawer-header {
    padding: 0 var(--mobile-side-pad);
    height: 64px;
  }

  .drawer-body {
    padding: 24px var(--mobile-side-pad);
  }

  .drawer-footer {
    padding: 20px var(--mobile-side-pad) calc(20px + env(safe-area-inset-bottom, 0));
  }

  .drawer-title {
    font-size: 1.25rem;
  }

  /* Make checkout buttons full-width and touch-friendly */
  .drawer-footer .btn {
    width: 100%;
    height: 52px;
    font-size: 0.7rem;
  }
}

@media (min-width: 480px) and (max-width: 1023px) {
  /* Tablet: side drawer at ~80% width */
  #cart-drawer {
    width: 420px;
    max-width: 90vw;
  }
}


/* ============================================================
   SEARCH OVERLAY — MOBILE REFINEMENT
   ============================================================ */
@media (max-width: 1023px) {
  .search-overlay {
    padding: var(--header-height-mobile) 0 40px;
  }

  .search-field {
    font-size: clamp(1.4rem, 7vw, 2.4rem);
    padding: 12px 0;
  }

  .search-inner {
    gap: 28px;
    padding: 0 var(--mobile-side-pad);
  }

  .search-result-item {
    grid-template-columns: 64px 1fr auto;
    gap: 16px;
  }

  .search-result-img {
    width: 64px;
  }

  .search-result-details h4 {
    font-size: 0.95rem;
  }

  .search-tags {
    gap: 8px;
  }

  .search-tag-link {
    font-size: 0.8rem;
    padding: 8px 14px;
  }
}


/* ============================================================
   HERO SECTION — MOBILE REFINEMENT
   ============================================================ */
@media (max-width: 1023px) {
  .hero-sec {
    height: 100dvh;
    min-height: 600px;
    align-items: flex-end; /* Content sits near bottom on mobile — more editorial */
    padding-bottom: 80px;
  }

  .hero-bg img {
    object-position: center 30%; /* Focus on jewelry, not background */
    opacity: 0.5;
  }

  .hero-overlay {
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.15) 0%,
      rgba(0,0,0,0.1) 30%,
      rgba(0,0,0,0.7) 75%,
      rgba(0,0,0,0.85) 100%
    );
  }

  .hero-content {
    max-width: 100%;
    gap: 16px;
    padding-bottom: 0;
  }

  .hero-subtitle {
    font-size: 0.65rem;
    letter-spacing: 0.22em;
  }

  .display-huge {
    font-size: clamp(2.2rem, 9vw, 3.8rem);
    line-height: 1.05;
  }

  .hero-desc {
    font-size: 0.9rem;
    max-width: 100%;
    line-height: 1.55;
    color: rgba(var(--ivory-rgb), 0.85);
  }

  .hero-ctas {
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
  }

  .hero-ctas .btn {
    width: 100%;
    height: 52px;
    font-size: 0.7rem;
  }

  .scroll-indicator {
    bottom: 28px;
    opacity: 0.6;
  }
}

@media (max-width: 375px) {
  .hero-sec {
    padding-bottom: 60px;
  }

  .display-huge {
    font-size: clamp(1.9rem, 8.5vw, 2.8rem);
  }
}


/* ============================================================
   MANIFESTO SECTION — MOBILE REFINEMENT
   ============================================================ */
@media (max-width: 1023px) {
  .manifesto-sec {
    padding: var(--mobile-section-pad) 0;
  }

  .manifesto-text {
    font-size: clamp(1.4rem, 5vw, 2.2rem);
    line-height: 1.3;
  }

  .manifesto-wrap {
    gap: 24px;
  }
}


/* ============================================================
   NEW ARRIVALS PRODUCT GRID — MOBILE
   ============================================================ */
@media (max-width: 1023px) {
  .new-arrivals-sec {
    padding: var(--mobile-section-pad) 0;
  }

  /* 2-column grid on mobile — industry standard for luxury */
  .new-arrivals-sec .shop-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .new-arrivals-sec [style*="margin-bottom: 60px"] {
    margin-bottom: 36px !important;
  }

  /* Tighter card product name on small screens */
  .product-name {
    font-size: 0.95rem;
  }

  .product-price {
    font-size: 0.85rem;
  }

  /* Quick-add always visible on mobile — no hover */
  .quick-add-btn {
    transform: translateY(0);
    padding: 11px;
    font-size: 0.65rem;
  }

  /* Card image: keep 3/4 ratio but smaller footprint */
  .product-image-wrap {
    margin-bottom: 12px;
  }
}

@media (max-width: 375px) {
  .new-arrivals-sec .shop-product-grid {
    gap: 12px;
  }

  .product-name {
    font-size: 0.85rem;
  }
}


/* ============================================================
   EDITORIAL SPLIT — MOBILE
   ============================================================ */
@media (max-width: 1023px) {
  .editorial-split-sec {
    grid-template-columns: 1fr;
  }

  .editorial-split-img {
    min-height: 0;
    height: 55vw;
    max-height: 420px;
  }

  .editorial-split-content {
    padding: 48px var(--mobile-side-pad);
    gap: 20px;
  }

  .editorial-split-content .display-large {
    font-size: clamp(1.8rem, 7vw, 2.8rem);
  }

  .editorial-split-content .btn {
    width: 100%;
    height: 52px;
  }
}


/* ============================================================
   CATEGORY GRID — MOBILE
   ============================================================ */
@media (max-width: 1023px) {
  .categories-sec {
    padding: var(--mobile-section-pad) 0;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 32px;
  }

  /* Make category cards taller on mobile for better visual */
  .category-item {
    aspect-ratio: 2/3;
  }

  .category-item-overlay {
    padding: 20px 16px;
  }

  .category-item-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 375px) {
  .category-grid {
    gap: 8px;
  }
  .category-item-title {
    font-size: 1.1rem;
  }
}


/* ============================================================
   BRAND PILLARS / EXPERIENCE — MOBILE
   ============================================================ */
@media (max-width: 1023px) {
  .experience-sec {
    padding: var(--mobile-section-pad) 0;
  }

  .experience-grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 40px;
  }

  .experience-pillar {
    border-left: none;
    border-top: 1px solid var(--border-color);
    padding-left: 0;
    padding-top: 28px;
    padding-bottom: 28px;
    gap: 12px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .experience-pillar:last-child {
    border-bottom: 1px solid var(--border-color);
  }

  .experience-pillar-num {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 40px;
    margin-top: 2px;
  }

  .experience-pillar-title,
  .experience-pillar-desc {
    flex-basis: calc(100% - 56px);
  }

  .experience-pillar-title {
    font-size: 0.7rem;
  }
}


/* ============================================================
   TESTIMONIAL — MOBILE
   ============================================================ */
@media (max-width: 1023px) {
  .testimonial-sec {
    padding: var(--mobile-section-pad) 0;
  }

  .testimonial-quote {
    font-size: clamp(1.2rem, 4.5vw, 1.8rem);
    line-height: 1.45;
  }
}


/* ============================================================
   JOURNAL SECTION (HOMEPAGE) — MOBILE
   ============================================================ */
@media (max-width: 1023px) {
  .journal-sec {
    padding: var(--mobile-section-pad) 0;
  }

  /* Stack header above — remove side-by-side on mobile */
  .journal-sec > .container > div:first-child {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 20px !important;
    margin-bottom: 32px !important;
  }

  .journal-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* On mobile, horizontal card style is more editorial */
  .journal-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    align-items: start;
  }

  .journal-card-img-wrap {
    aspect-ratio: 1;
    width: 100%;
  }

  .journal-card-title {
    font-size: 1.1rem;
  }

  .journal-card p {
    display: none; /* Hide description on mobile to keep cards lean */
  }
}

@media (max-width: 375px) {
  .journal-card {
    grid-template-columns: 100px 1fr;
    gap: 14px;
  }
}


/* ============================================================
   NEWSLETTER — MOBILE
   ============================================================ */
@media (max-width: 1023px) {
  .newsletter-sec {
    padding: var(--mobile-section-pad) 0;
  }

  .newsletter-sec .display-large {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
  }

  .footer-newsletter-form {
    max-width: 100% !important;
    flex-direction: row;
    border-bottom: 2px solid rgba(var(--ivory-rgb), 0.35);
  }

  .footer-newsletter-input {
    font-size: 0.9rem;
    padding: 12px 0;
  }
}


/* ============================================================
   FOOTER — MOBILE
   ============================================================ */
@media (max-width: 1023px) {
  footer {
    padding: 64px 0 calc(40px + env(safe-area-inset-bottom, 0)) 0;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    margin-bottom: 48px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-brand .logo {
    font-size: 1.5rem;
  }

  .footer-brand p {
    max-width: 100%;
    font-size: 0.85rem;
  }

  .footer-title {
    font-size: 0.7rem;
    margin-bottom: 16px;
  }
}

@media (max-width: 480px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-socials {
    gap: 20px;
  }
}


/* ============================================================
   SHOP PAGE — MOBILE
   ============================================================ */
@media (max-width: 1023px) {
  /* Mobile filter bar always visible */
  .mobile-filter-bar {
    display: flex;
    padding: 14px 0;
    gap: 12px;
  }

  .mobile-filter-btn {
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--border-color);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    gap: 8px;
  }

  .mobile-filter-btn svg {
    flex-shrink: 0;
  }

  /* Product grid: 2-col default on mobile */
  .shop-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  /* Shop catalog header: show count, hide sort label */
  .sort-dropdown-wrap label {
    display: none;
  }

  .catalog-results-count {
    font-size: 0.8rem;
  }

  /* Shop page banner */
  .shop-page-wrapper {
    margin-top: 24px;
  }
}

@media (max-width: 375px) {
  .shop-product-grid {
    gap: 10px;
  }
}

/* Breadcrumb nav on shop: tighter on mobile */
@media (max-width: 1023px) {
  .shop-page-wrapper + * {
    font-size: 0.75rem;
  }
}


/* ============================================================
   BOTTOM FILTER SHEET — MOBILE REFINEMENT
   ============================================================ */
@media (max-width: 1023px) {
  .bottom-sheet {
    border-radius: 16px 16px 0 0;
    max-height: 90dvh;
    /* Add safe area for home indicator */
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .bottom-sheet-header {
    padding: 18px 20px;
  }

  /* Drag handle visual indicator */
  .bottom-sheet-header::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 3px;
    border-radius: 2px;
    background-color: var(--border-color);
  }

  .bottom-sheet-header {
    position: relative;
    padding-top: 24px;
  }

  .bottom-sheet-body {
    padding: 20px;
  }

  .bottom-sheet-footer {
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0));
  }

  /* Bigger tap targets for filter checkboxes */
  .filter-checkbox-label {
    padding: 10px 0;
    font-size: 0.9rem;
    gap: 14px;
  }

  .filter-checkbox-input {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .filter-options-list {
    gap: 0;
  }
}


/* ============================================================
   PRODUCT DETAIL PAGE — MOBILE REFINEMENT
   ============================================================ */
@media (max-width: 1023px) {
  .pdp-wrapper {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 100px; /* room for sticky CTA */
  }

  /* Gallery: stacked scrolling carousel on mobile */
  .pdp-gallery-wrap {
    flex-direction: column;
    gap: 0;
  }

  /* Main image viewport: full-width with swipe capability */
  .pdp-main-viewport {
    width: 100%;
    aspect-ratio: 1/1;
    cursor: default; /* No zoom cursor on touch */
  }

  /* Thumbnails: horizontal strip below main image */
  .pdp-thumbs-rail {
    flex-direction: row;
    width: 100%;
    gap: 8px;
    padding: 12px 0 0 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .pdp-thumbs-rail::-webkit-scrollbar {
    display: none;
  }

  .pdp-thumb {
    width: 64px;
    height: 64px;
    aspect-ratio: 1;
    flex-shrink: 0;
  }

  /* PDP Info panel: no sticky on mobile */
  .pdp-info-panel {
    position: static;
    gap: 24px;
  }

  .pdp-brand-label {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
  }

  .pdp-price {
    font-size: 1.3rem;
  }

  /* Size/material swatches: scrollable row */
  .swatch-group {
    flex-wrap: wrap;
    gap: 8px;
  }

  .swatch-pill {
    padding: 10px 16px;
    font-size: 0.8rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Purchase row: stack vertically on small screens */
  .purchase-row {
    flex-direction: column;
    gap: 12px;
  }

  .qty-selector {
    width: fit-content;
  }

  .qty-btn {
    width: 44px;
    height: 44px;
  }

  .purchase-actions-wrap .btn-atc {
    height: 52px;
  }

  .btn-pdp-wishlist {
    height: 52px;
  }
}

/* Sticky mobile add-to-cart bar */
@media (max-width: 1023px) {
  .sticky-mobile-cta-bar {
    display: none;
    grid-template-columns: auto 1fr;
    padding: 16px var(--mobile-side-pad);
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
    box-shadow: 0 -1px 0 var(--border-color), 0 -10px 30px rgba(0,0,0,0.04);
  }

  .sticky-mobile-cta-bar.visible {
    display: grid;
  }

  .sticky-mobile-cta-bar .btn {
    height: 52px;
    font-size: 0.7rem;
  }
}


/* ============================================================
   CART PAGE — MOBILE REFINEMENT
   ============================================================ */
@media (max-width: 1023px) {
  .cart-page-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .cart-item-row {
    grid-template-columns: 90px 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
    padding: 24px 0;
    position: relative;
  }

  /* Price in top right */
  .cart-item-price-wrap {
    position: absolute;
    top: 24px;
    right: 0;
    height: auto;
    text-align: right;
  }

  .cart-item-img {
    width: 90px;
  }

  .cart-item-title-meta h3 {
    font-size: 1.1rem;
    padding-right: 60px; /* avoid overlap with price */
  }

  .cart-item-meta {
    font-size: 0.75rem;
  }

  .cart-item-qty-remove {
    gap: 20px;
    flex-wrap: wrap;
  }

  /* Order summary box: compact on mobile */
  .order-summary-box {
    padding: 28px var(--mobile-side-pad);
  }

  .summary-heading {
    font-size: 1.25rem;
    margin-bottom: 20px;
  }

  .checkout-btn {
    height: 54px;
    font-size: 0.72rem;
  }
}

@media (max-width: 375px) {
  .cart-item-row {
    grid-template-columns: 76px 1fr;
  }

  .cart-item-img {
    width: 76px;
  }
}


/* ============================================================
   CHECKOUT PAGE — MOBILE REFINEMENT
   ============================================================ */
@media (max-width: 1023px) {
  .checkout-page-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Reverse on mobile: order summary collapses to top */
  .checkout-review-sidebar {
    order: -1;
    padding: 24px var(--mobile-side-pad);
  }

  .checkout-review-items {
    max-height: 240px;
  }

  .checkout-review-title {
    font-size: 1.1rem;
    margin-bottom: 16px;
  }

  /* Stepper blocks */
  .checkout-step-header {
    padding: 20px var(--mobile-side-pad);
  }

  .checkout-step-content-inner {
    padding: 20px var(--mobile-side-pad);
  }

  .checkout-step-title {
    font-size: 0.7rem;
    gap: 12px;
  }

  /* Full-width payment tabs */
  .payment-selector-tabs {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }

  .payment-tab {
    padding: 14px 8px;
    font-size: 0.7rem;
    min-height: 52px;
  }

  /* Shipping method options: tighter */
  .shipping-method-option {
    padding: 16px;
    font-size: 0.85rem;
  }

  /* Form inputs: taller for touch */
  .input-underlined {
    padding: 14px 0;
    font-size: 1rem;
  }

  .select-underlined {
    padding: 14px 0;
    font-size: 1rem;
  }

  /* Step CTA button */
  .checkout-stepper-wrap .btn {
    height: 54px;
    width: 100%;
    font-size: 0.72rem;
    margin-top: 16px;
  }
}


/* ============================================================
   ABOUT PAGE — MOBILE REFINEMENT
   ============================================================ */
@media (max-width: 1023px) {
  .about-hero-sec {
    height: 55dvh;
    min-height: 340px;
  }

  .about-editorial-grid,
  .about-grid-reverse {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Reverse: image comes first on mobile */
  .about-grid-reverse > *:first-child {
    order: 2;
  }

  .about-grid-reverse > *:last-child {
    order: 1;
  }

  .about-editorial-img {
    aspect-ratio: 3/2;
    max-height: 360px;
  }

  /* About page text sections */
  .about-editorial-grid .display-large,
  .about-grid-reverse .display-large {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
  }
}


/* ============================================================
   JOURNAL PAGE — MOBILE REFINEMENT
   ============================================================ */
@media (max-width: 1023px) {
  .journal-hero-article {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 48px;
    margin-bottom: 48px;
  }

  .journal-hero-img {
    aspect-ratio: 4/3;
  }

  .journal-hero-content .display-large {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
  }

  /* Journal grid page: single column on mobile */
  .journal-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Full card layout on journal page */
  .journal-page .journal-card {
    display: block;
  }

  .journal-page .journal-card-img-wrap {
    aspect-ratio: 16/9;
    margin-bottom: 16px;
  }

  .journal-page .journal-card p {
    display: block;
  }

  .journal-card-title {
    font-size: 1.2rem;
  }
}


/* ============================================================
   CONTACT PAGE — MOBILE REFINEMENT
   ============================================================ */
@media (max-width: 1023px) {
  .contact-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-info-column {
    gap: 36px;
  }

  .contact-block-content {
    font-size: 0.95rem;
  }

  /* Fictional map: 3:2 ratio on mobile */
  .contact-fictional-map-visual {
    aspect-ratio: 3/2;
    font-size: 1.1rem;
  }

  /* Contact form inputs: touch-friendly */
  .contact-split .input-underlined,
  .contact-split .select-underlined {
    padding: 14px 0;
    font-size: 1rem;
  }

  .contact-split .btn {
    width: 100%;
    height: 54px;
    margin-top: 8px;
  }
}


/* ============================================================
   PAGE-LEVEL SECTION PADDING — MOBILE UNIVERSAL
   ============================================================ */
@media (max-width: 1023px) {
  .section-padding {
    padding: var(--mobile-section-pad) 0;
  }

  /* Page hero banners: tighter on tablet */
  .about-hero-sec,
  .shop-hero-banner,
  .journal-hero-banner,
  .contact-hero-banner {
    padding-top: var(--header-height-mobile);
  }

  /* Generic display sizes on inner pages */
  .display-large {
    font-size: clamp(1.6rem, 5.5vw, 2.6rem);
  }

  .display-huge {
    font-size: clamp(2rem, 8vw, 3.4rem);
  }
}

@media (max-width: 480px) {
  .section-padding {
    padding: var(--mobile-section-pad-sm) 0;
  }
}


/* ============================================================
   TYPOGRAPHY — MOBILE UNIVERSAL
   ============================================================ */
@media (max-width: 1023px) {
  p {
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .label-editorial {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
  }
}

@media (max-width: 375px) {
  html {
    font-size: 15px;
  }
}


/* ============================================================
   BUTTONS — MOBILE TOUCH SIZING
   ============================================================ */
@media (max-width: 1023px) {
  /* All buttons must hit minimum 44px touch target */
  .btn {
    min-height: 48px;
    padding: 14px 28px;
  }

  .btn-underline {
    min-height: auto;
    padding-bottom: 4px;
  }
}


/* ============================================================
   ACCORDION — MOBILE TOUCH SIZING
   ============================================================ */
@media (max-width: 1023px) {
  .accordion-trigger {
    padding: 20px 0;
    min-height: 56px;
  }
}


/* ============================================================
   PRODUCT CARDS — MOBILE DISPLAY FIX
   Quick-add: always show on touch devices (no hover state)
   ============================================================ */
@media (hover: none) {
  /* Touch devices: always show quick-add */
  .quick-add-btn {
    transform: translateY(0);
  }

  /* No hover scale on card images */
  .product-card:hover .img-primary {
    transform: none;
  }

  .product-card:hover .img-secondary {
    opacity: 0;
  }

  /* Category items: no hover scale */
  .category-item:hover img {
    transform: none;
  }
}


/* ============================================================
   IMAGES — MOBILE PERFORMANCE
   ============================================================ */
@media (max-width: 1023px) {
  /* Prevent layout shifts */
  img {
    height: auto;
  }

  /* Category and product images: crisp on mobile */
  .category-item img,
  .product-card img,
  .editorial-split-img,
  .about-editorial-img {
    will-change: auto; /* disable will-change on mobile to save memory */
  }
}


/* ============================================================
   SCROLL BEHAVIOR — MOBILE
   ============================================================ */
@media (max-width: 1023px) {
  /* Carousel track: native momentum scrolling */
  .carousel-track {
    gap: 12px;
    padding: 0 var(--mobile-side-pad) 8px;
    /* Allow scroll from outside container edges */
    scroll-padding-left: var(--mobile-side-pad);
  }

  .carousel-slide {
    flex: 0 0 calc(80% - var(--mobile-side-pad));
    scroll-snap-align: start;
  }
}

@media (max-width: 480px) {
  .carousel-slide {
    flex: 0 0 calc(85% - var(--mobile-side-pad));
  }
}


/* ============================================================
   TABLET REFINEMENTS (768px)
   ============================================================ */
@media (min-width: 600px) and (max-width: 1023px) {
  :root {
    --mobile-side-pad: 32px;
  }

  /* On tablet: 3-col product grid */
  .shop-product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  /* Homepage arrivals: 4-col if enough room */
  .new-arrivals-sec .shop-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Journal cards: horizontal on tablet */
  .journal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }

  /* Homepage journal: back to standard card layout */
  .journal-sec .journal-card {
    display: flex;
    flex-direction: column;
  }

  .journal-sec .journal-card-img-wrap {
    aspect-ratio: 3/2;
  }

  .journal-sec .journal-card p {
    display: block;
  }

  /* Category grid: 4-col on tablet */
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  /* Cart drawer: side panel on tablet */
  #cart-drawer {
    width: 400px;
    border-radius: 0;
  }

  /* Footer: 2x2 grid on tablet */
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }

  /* Hero: centered on tablet */
  .hero-sec {
    align-items: center;
    padding-bottom: 0;
  }

  .hero-content {
    max-width: 620px;
  }
}


/* ============================================================
   EDGE CASES & FIXES
   ============================================================ */

/* Fix: hero section on landscape mobile */
@media (max-width: 1023px) and (orientation: landscape) and (max-height: 500px) {
  .hero-sec {
    height: 100vw;
    min-height: 320px;
    max-height: 100dvh;
    align-items: center;
    padding-bottom: 0;
  }

  .hero-ctas {
    flex-direction: row;
    gap: 12px;
  }

  .hero-ctas .btn {
    width: auto;
    padding: 12px 24px;
  }
}

/* Fix: prevent scroll behind drawers when open */
body.drawer-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Fix: safe area on iPhone X+ for fixed elements */
.sticky-mobile-cta-bar,
.bottom-sheet-footer,
.drawer-footer {
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

/* Fix: iOS bounce-scroll causing gray flash on dark sections */
@supports (-webkit-touch-callout: none) {
  .manifesto-sec,
  .newsletter-sec,
  footer {
    background-attachment: scroll;
  }
}

/* Fix: input zoom on iOS — keep font-size ≥ 16px in forms */
@media (max-width: 1023px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  select,
  textarea {
    font-size: max(16px, 1rem);
  }
}

/* Fix: footer newsletter form on mobile */
@media (max-width: 480px) {
  #newsletter-subscribe-form {
    flex-direction: column;
    gap: 12px;
    border-bottom: none !important;
    align-items: stretch;
  }

  #newsletter-subscribe-form .footer-newsletter-input {
    border-bottom: 2px solid rgba(var(--ivory-rgb), 0.3);
    padding: 12px 0;
    width: 100%;
  }

  #newsletter-subscribe-form .footer-newsletter-btn {
    background-color: var(--champagne);
    color: var(--obsidian);
    padding: 14px 24px;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-align: center;
    border: none;
    min-height: 48px;
  }
}
