/* Nivah | site-wide mobile/tablet polish | 03 Nov 2026
   Loaded LAST. Retains desktop layout, custom hero composition, five-card
   carousel, and the brand's pure white / #46220D / #CE9001 palette. */
@media (max-width: 1024px) {
  #app, main, main > * { min-width:0; }
  .container { box-sizing:border-box; }
  main .product-grid > *, .shop-layout > *, .pdp-layout > *,
  .cart-layout > *, .checkout-layout > *,
  .builder-preview > *, .grid-two > * { min-width:0; }
  .shop-layout .nv-products-main { min-width:0; }
  .product-photo img, .pdp-image img, .editorial-split img {
    max-width:100%;
  }
  .pdp-thumbs { max-width:100%; overflow-x:auto; padding-bottom:5px; scrollbar-width:thin; }
}
@media(max-width:800px) {
  html { scroll-padding-top:105px; }
  .container { width:calc(100% - 32px); max-width:100%; }
  .section { padding-top:46px; padding-bottom:46px; }
  .section.small { padding-top:34px; padding-bottom:40px; }

  /* The brand logo stays genuinely centered; icons remain comfortable tap targets. */
  .site-header .header-main .left, .site-header .header-actions { min-width:0; }
  .site-header .header-main .icon-btn {
    min-width:39px; min-height:39px;
    padding:7px;
    display:inline-flex; align-items:center; justify-content:center;
  }
  .site-header .header-actions { gap:clamp(0px,.7vw,9px); }
  .site-header .header-main .left { gap:clamp(1px,.7vw,10px); }
  .mobile-nav { max-width:92vw; overscroll-behavior:contain; }
  .mobile-nav .link { min-height:42px; display:flex; align-items:center; }
  .mobile-nav .sub-links { gap:13px 11px; }
  .mobile-nav .sub-links a { line-height:1.6; }

  /* Consistent editorial headings without forcing all body text to center. */
  .section-heading, .nv-love-gifts-heading {
    text-align:center;
    margin-left:auto; margin-right:auto;
    max-width:100%;
  }
  .section-heading h2,
  #thoughtful-gifts .nv-love-gifts-heading h2 {
    max-width:100%;
    font-size:clamp(29px,6.7vw,44px) !important;
    line-height:1.18 !important;
    letter-spacing:-.045em !important;
    text-wrap:balance;
    overflow-wrap:break-word;
  }
  .section-heading p, .nv-love-gifts-heading p {
    max-width:36rem;
    margin-left:auto; margin-right:auto;
    line-height:1.7;
  }
  .page-hero {
    padding:37px 18px 40px;
    text-align:center;
  }
  .page-hero .eyebrow { margin-bottom:10px; }
  .page-hero h1 {
    font-size:clamp(34px,7.8vw,52px);
    line-height:1.14;
    letter-spacing:-.035em;
    max-width:620px;
    margin:9px auto 12px;
    overflow-wrap:break-word;
    text-wrap:balance;
  }
  .page-hero p {
    max-width:480px;
    margin:0 auto;
    font-size:12px;
    line-height:1.7;
    text-wrap:pretty;
  }
  .breadcrumb {
    line-height:1.7;
    gap:8px;
    overflow-wrap:anywhere;
    font-size:10px;
    padding-top:17px;
    padding-bottom:18px;
  }
  .static-page { padding:38px 0 64px; max-width:100%; }
  .static-page > .eyebrow,
  .static-page > h1,
  .static-page > p:first-of-type { text-align:center; }
  .static-page > h1 {
    font-size:clamp(36px,8.2vw,55px) !important;
    line-height:1.17;
    text-wrap:balance;
    overflow-wrap:break-word;
    margin:10px 0 20px;
  }
  .static-page > p:first-of-type {
    margin-left:auto; margin-right:auto;
    max-width:530px; font-size:13px;
  }
  .static-page h2 { font-size:clamp(27px,6.7vw,38px); line-height:1.25; }
  .static-page p, .static-page li { line-height:1.8; }
  .static-page ul, .static-page ol { padding-left:22px; }

  /* Entire contact section: centered intro, readable left-aligned form. */
  main > .container.section > .grid-two:has(#contact-form) {
    display:grid; grid-template-columns:minmax(0,1fr);
    gap:28px;
  }
  main > .container.section > .grid-two:has(#contact-form) > div:first-child {
    text-align:center; max-width:600px; margin:0 auto;
    overflow-wrap:anywhere;
  }
  main > .container.section > .grid-two:has(#contact-form) > div:first-child h2 {
    font-size:clamp(29px,7vw,40px);
    line-height:1.19; max-width:510px;
    margin-left:auto; margin-right:auto;
    text-wrap:balance;
  }
  main > .container.section > .grid-two:has(#contact-form) > div:first-child p {
    font-size:12px; line-height:1.8; max-width:520px; margin:10px auto;
  }
  #contact-form { width:100%; min-width:0; }
  #contact-form .grid-two { grid-template-columns:minmax(0,1fr); gap:14px; }
  #contact-form .btn { width:100%; min-height:46px; }

  /* Product/category discovery: no partly cut-off filter pills on phones. */
  .nv-range-links {
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    width:100%;
    max-width:100%;
    margin-bottom:21px;
    overflow:visible !important;
    padding:0;
    scroll-snap-type:none;
  }
  .nv-range-links > a {
    box-sizing:border-box;
    display:flex !important;
    align-items:center; justify-content:center;
    min-width:0; width:100%; height:auto;
    min-height:40px;
    padding:9px 5px !important;
    font:700 10px/1.4 Manrope,Arial,sans-serif !important;
    letter-spacing:0 !important;
    white-space:normal !important;
    text-align:center;
    word-break:normal;
    border-radius:20px;
  }
  .shop-layout { min-width:0; }
  .shop-toolbar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:10px;
    margin-bottom:17px;
  }
  .shop-toolbar > .flex { gap:10px; flex-wrap:wrap; }
  .shop-toolbar .select {
    width:auto; flex:1 1 142px; max-width:230px;
    min-width:0;
    font-size:13px;
  }
  .shop-toolbar .btn { min-height:42px; padding:10px 13px; }
  .nv-products-main, .shop-layout .product-grid { min-width:0; }
  .product-card .product-info .name {
    font-size:clamp(11px,2.8vw,13px);
    line-height:1.5;
    overflow-wrap:anywhere;
  }
  .product-card .price { font-size:12px; }
  .product-card .product-badge { max-width:72%; white-space:normal; line-height:1.3; }
  .nv-sample-disclaimer { line-height:1.65; }

  /* Product detail cards — keep the details in normal reading order. */
  .pdp-layout { gap:25px; padding-bottom:40px; }
  .pdp-main { min-width:0; }
  .pdp-main > .eyebrow,
  .pdp-main > h1,
  .pdp-main > .big-price,
  .pdp-main > .price-note { text-align:center; }
  .pdp-main > h1 {
    font-size:clamp(31px,7vw,43px) !important;
    line-height:1.14;
    letter-spacing:-.04em;
    overflow-wrap:anywhere;
    text-wrap:balance;
    margin:14px 0;
  }
  .pdp-main > .big-price { margin:13px 0 8px; }
  .pdp-thumbs { gap:8px; }
  .pdp-thumbs button { min-width:63px; width:68px; height:78px; flex-shrink:0; }
  .pdp-trust { gap:6px; font-size:9px; }
  .pdp-trust > div { overflow-wrap:anywhere; text-align:center; }
  .choice-head { flex-wrap:wrap; gap:7px; }
  .chips { gap:7px; }
  .chip { min-height:40px; }
  .product-details { grid-template-columns:minmax(0,1fr); gap:26px; }

  /* Cart and offline WhatsApp/pickup checkout. */
  .cart-layout, .checkout-layout {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:23px;
  }
  .cart-row { min-width:0; }
  .cart-row h4 { overflow-wrap:anywhere; font-size:clamp(18px,4.5vw,23px); }
  .cart-row > div { min-width:0; }
  .summary-card { position:static; width:100%; padding:23px 18px 25px; }
  .summary-card h3 { font-size:27px; }
  .summary-line { align-items:flex-start; }
  .summary-line span:last-child { text-align:right; flex:0 0 auto; }
  .order-success {
    max-width:100%;
    padding:36px 19px;
    margin:14px auto;
  }
  .order-success h1 { font-size:clamp(34px,7vw,48px); }
  .order-success .flex { flex-wrap:wrap; justify-content:center; }
  .order-success .btn { max-width:100%; }

  /* Mobile form controls at least 16px to prevent Safari focus zoom. */
  .form-field input,.form-field select,.form-field textarea,
  #contact-form input,#contact-form textarea,
  .newsletter input,
  .checkout-layout input,.checkout-layout select,.checkout-layout textarea,
  .static-page input,.static-page select,.static-page textarea,
  #customize-jewellery .nv-bespoke-form input:not([type=file]):not([type=checkbox]),
  #customize-jewellery .nv-bespoke-form select,
  #customize-jewellery .nv-bespoke-form textarea {
    font-size:16px !important;
    max-width:100%;
  }
  .form-field { min-width:0; }
  .form-field label { font-size:11px; line-height:1.4; }

  /* Custom ring builder: balanced two-column steps instead of tall gaps. */
  .builder-stepper {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin:22px 0 27px;
    width:100%;
  }
  .builder-step {
    min-width:0;
    display:flex;
    align-items:center; justify-content:center;
    min-height:44px;
    margin:0;
    font-size:10px;
    text-align:center;
    line-height:1.35;
    padding:9px 5px;
    overflow-wrap:anywhere;
  }
  .builder-preview { display:grid; grid-template-columns:minmax(0,1fr); gap:22px; }
  .builder-preview img { height:auto; aspect-ratio:1/1; object-fit:cover; }
  .builder-options { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .builder-options .chip { min-height:70px; }

  /* Story and gifting: center the editorial headings but keep prose legible. */
  #thoughtful-gifts .nv-love-gifts-heading h2 {
    font-size:clamp(29px,7.3vw,43px) !important;
    margin-bottom:13px;
    white-space:normal;
  }
  #thoughtful-gifts .nv-love-gifts-tags { margin-top:4px; }
  #thoughtful-gifts .nv-love-gifts-tags a { min-height:39px; }
  #customize-jewellery .nv-bespoke-note {
    max-width:100%; justify-content:center; text-align:center;
  }
  #customize-jewellery .nv-bespoke-form-shell { max-width:100%; }
  #customize-jewellery .nv-bespoke-upload-wrap { background:#fff; }
  #customize-jewellery .nv-bespoke-upload { min-height:115px; }
  #customize-jewellery .nv-bespoke-file-note { line-height:1.6; }
  #customize-jewellery .nv-bespoke-form .nv-bespoke-submit {
    width:100%; min-height:45px;
  }
  #store-location .nv-outlet-intro, #special-you .nv-special-you-copy {
    text-align:center;
  }
  #store-location .nv-outlet-intro h2 {
    font-size:clamp(34px,8vw,50px) !important;
    line-height:1.2 !important;
    text-wrap:balance;
    overflow-wrap:break-word;
  }
  .newsletter { padding:46px 16px; }
  .newsletter h2 { font-size:clamp(32px,7vw,42px); }
  .newsletter .form { max-width:480px; }
  .newsletter .form input, .newsletter .form button { min-height:45px; }
  #toast {
    max-width:calc(100vw - 32px);
    left:16px; right:16px;
    bottom:max(135px,calc(env(safe-area-inset-bottom) + 121px));
    text-align:center;
    overflow-wrap:anywhere;
  }
}
@media(max-width:440px) {
  .container { width:calc(100% - 28px); }
  .section { padding-top:40px; padding-bottom:42px; }
  .section.small { padding-top:28px; padding-bottom:35px; }
  .page-hero { padding:32px 17px 36px; }
  .page-hero h1 { font-size:clamp(32px,8.6vw,42px); }
  .static-page { padding:30px 0 52px; }
  .static-page > h1 { font-size:clamp(35px,9vw,44px) !important; }
  .shop-toolbar .select { flex-basis:130px; }
  .nv-range-links { gap:7px; }
  .nv-range-links > a { font-size:9px !important; line-height:1.35 !important; min-height:40px; }
  .cart-layout h1 { font-size:clamp(34px,8.4vw,45px) !important; line-height:1.18; }
  .cart-row { gap:10px; }
  .cart-row h4 { line-height:1.25; }
  .newsletter .form { width:100%; }
  .newsletter .form input, .newsletter .form button { width:100%; }
  #customize-jewellery .nv-bespoke-inner { gap:25px; }
  #customize-jewellery .nv-bespoke-form-shell { padding:21px 14px; }
  #thoughtful-gifts .nv-love-gifts-heading h2 { font-size:clamp(27px,7.5vw,34px) !important; }
  .nv-expanded-footer .nv-footer-brand-story { text-align:left; }
}
@media(max-width:350px){
  .site-header .header-main .icon-btn { min-width:35px; min-height:38px; padding:5px; }
  .shop-toolbar { align-items:stretch; }
  .shop-toolbar > .flex, .shop-toolbar .select { width:100%; max-width:none; }
  .nv-range-links > a { font-size:8.5px !important; padding:7px 3px !important; }
  .product-info .gemline { letter-spacing:.02em; }
  .section-heading h2 { font-size:29px !important; }
}
@media(hover:none) and (pointer:coarse) and (max-width:800px){
  /* Touch users can see card quick actions without requiring hover. */
  .product-card .product-quick {
    transform:translateY(0);
    padding:9px 7px;
    font-size:9px;
    letter-spacing:.04em;
  }
}
