/* DAO SIGIL product detail mobile layout hardening
   Loaded after the main product stylesheet to prevent two-column overflow
   and keep the footer aligned on small screens. */

@media (max-width: 767px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: clip !important;
  }

  body,
  .site-shell,
  .product-detail-shell,
  .product-hero,
  .product-story-section,
  .blessing-process-section,
  .wearing-showcase-section,
  .product-faq-section,
  .site-footer {
    box-sizing: border-box !important;
  }

  .site-shell.product-detail-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .product-hero {
    width: 100% !important;
    max-width: 100% !important;
    padding: 108px 0 46px !important;
    overflow: hidden !important;
  }

  .product-shell {
    width: calc(100% - 24px) !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .product-main-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 24px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    align-items: start !important;
  }

  .product-gallery,
  .product-summary {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    transform: none !important;
  }

  .product-gallery {
    display: grid !important;
    gap: 10px !important;
  }

  .product-main-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 !important;
    border-radius: 18px !important;
  }

  .product-main-image img,
  .product-main-image img.is-fit-cover,
  .product-main-image img.is-fit-contain {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    object-position: center !important;
    padding: 0 !important;
  }

  .image-zoom {
    right: 12px !important;
    bottom: 12px !important;
    width: 42px !important;
    height: 42px !important;
  }

  .product-thumbnails {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .thumb {
    width: 100% !important;
    min-width: 0 !important;
    border-radius: 11px !important;
  }

  .thumb img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
  }

  .product-summary {
    padding-top: 0 !important;
  }

  .product-kicker {
    max-width: 100% !important;
    margin: 0 0 10px !important;
    font-size: 9px !important;
    line-height: 1.55 !important;
    letter-spacing: .18em !important;
    overflow-wrap: anywhere !important;
  }

  .product-summary h1 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    font-size: clamp(36px, 11vw, 46px) !important;
    line-height: .98 !important;
    letter-spacing: -.04em !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  .product-price-meta,
  .price-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 16px 0 14px !important;
  }

  .product-price-left {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    min-width: 0 !important;
  }

  .product-price {
    font-size: 34px !important;
  }

  .product-price-meta .rating-row,
  .rating-row {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex-wrap: wrap !important;
    gap: 6px 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    white-space: normal !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
  }

  .product-summary-copy {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 20px !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
  }

  .element-focus-line {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 0 18px !important;
    padding: 14px 16px !important;
    border-radius: 16px !important;
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 7px !important;
  }

  .element-focus-line span {
    text-align: left !important;
    font-size: 13px !important;
  }

  .summary-steps-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .summary-step-card {
    width: auto !important;
    min-width: 0 !important;
  }

  .contact-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 11px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .contact-actions .contact-action,
  .contact-actions .cod-order-open {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 56px !important;
    padding: 0 18px !important;
    white-space: normal !important;
    text-overflow: clip !important;
  }

  .product-story-section,
  .blessing-process-section,
  .wearing-showcase-section,
  .product-faq-section {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .product-story-shell,
  .blessing-process-grid,
  .wearing-showcase-grid,
  .product-faq-list,
  .faq-intro {
    width: calc(100% - 24px) !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  .story-feature {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .story-feature__copy,
  .story-feature__image {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .detail-care-premium {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: calc(100% - 24px) !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .detail-care-premium__intro,
  .detail-care-premium__content,
  .detail-care-premium__grid,
  .detail-care-card,
  .detail-care-premium__timeline {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .detail-care-premium__grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .blessing-process-grid,
  .wearing-showcase-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .blessing-step-card,
  .wearing-look-card,
  .product-faq-item {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .site-footer {
    position: relative !important;
    inset: auto !important;
    clear: both !important;
    float: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 38px 20px 104px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    transform: none !important;
  }

  .footer-shell,
  .footer-top,
  .footer-brand,
  .footer-links,
  .footer-column,
  .footer-bottom,
  .footer-meta {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  .footer-top,
  .footer-links {
    display: block !important;
  }

  .footer-brand {
    text-align: center !important;
  }

  .footer-brand__logo {
    display: block !important;
    width: 150px !important;
    max-width: 60vw !important;
    margin: 0 auto 16px !important;
  }

  .footer-brand__logo img,
  .footer-brand img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  .footer-brand p {
    max-width: 320px !important;
    margin: 0 auto 24px !important;
    text-align: center !important;
  }

  .footer-accordion-toggle {
    box-sizing: border-box !important;
  }

  .footer-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    text-align: center !important;
  }

  .footer-meta {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 10px 16px !important;
  }

  .product-mobile-order-bar {
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    width: auto !important;
    max-width: calc(100% - 16px) !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 380px) {
  .product-shell,
  .product-story-shell,
  .blessing-process-grid,
  .wearing-showcase-grid,
  .product-faq-list,
  .faq-intro,
  .detail-care-premium {
    width: calc(100% - 18px) !important;
  }

  .product-summary h1 {
    font-size: 34px !important;
  }

  .summary-steps-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Footer and section order correction
   Keep product content in its actual HTML order on mobile. The older
   stylesheet turned the story wrapper into a flex container and assigned
   mixed order values, which could place the footer and later sections in
   the middle of the page. */
@media (max-width: 767px) {
  .product-story-shell {
    display: block !important;
  }

  .product-story-shell > .story-feature,
  .product-story-shell > .detail-care-premium,
  .product-story-shell > .blessing-process-section,
  .product-story-shell > .wearing-showcase-section,
  .product-story-shell > .customer-proof-section,
  .product-story-shell > .product-faq-section {
    order: initial !important;
  }

  main.site-shell.product-detail-shell > .site-footer {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    clear: both !important;
  }
}


/* PATCH 2026-07-25: tighten bottom order bar, fix wearing gallery, and remove extra white gap before footer */
@media (max-width: 767px) {
  .product-story-section {
    padding-bottom: 8px !important;
  }

  .wearing-showcase-section {
    margin-bottom: 8px !important;
    padding-bottom: 0 !important;
  }

  .wearing-showcase-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 0 !important;
  }

  .wearing-look-card,
  .wearing-look-card:nth-child(n),
  .wearing-look-card:last-child {
    grid-column: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-self: stretch !important;
    margin: 0 !important;
  }

  .wearing-look-card img,
  .product-detail-shell--gold-pendant .wearing-look-card img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 4 / 5 !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  .site-footer {
    margin-top: 0 !important;
  }

  .product-mobile-order-bar {
    left: 4px !important;
    right: 4px !important;
    bottom: 4px !important;
    width: auto !important;
    max-width: calc(100% - 8px) !important;
    border-radius: 16px !important;
  }
}

@media (max-width: 380px) {
  .product-mobile-order-bar {
    left: 3px !important;
    right: 3px !important;
    bottom: 3px !important;
    max-width: calc(100% - 6px) !important;
  }
}


/* PATCH 2026-07-25 v3: make CTA buttons 2x2 on mobile and restore safer side gutters */
@media (max-width: 767px) {
  .contact-actions,
  .product-actions.contact-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: stretch !important;
  }

  .contact-actions .contact-action,
  .contact-actions .cod-order-open,
  .product-actions.contact-actions .contact-action,
  .product-actions.contact-actions .cod-order-open {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 54px !important;
    padding: 0 12px !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
    letter-spacing: .11em !important;
    text-align: center !important;
    justify-content: center !important;
    gap: 6px !important;
    margin-top: 0 !important;
  }

  .contact-actions .contact-action > span,
  .contact-actions .cod-order-open > span {
    display: none !important;
  }

  .product-story-shell,
  .blessing-process-grid,
  .wearing-showcase-grid,
  .product-faq-list,
  .faq-intro,
  .detail-care-premium {
    width: calc(100% - 24px) !important;
  }

  .story-feature,
  .detail-care-premium,
  .blessing-process-grid,
  .wearing-showcase-grid,
  .product-faq-list {
    gap: 12px !important;
  }
}

@media (max-width: 380px) {
  .contact-actions,
  .product-actions.contact-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .contact-actions .contact-action,
  .contact-actions .cod-order-open,
  .product-actions.contact-actions .contact-action,
  .product-actions.contact-actions .cod-order-open {
    min-height: 52px !important;
    padding: 0 10px !important;
    font-size: 10px !important;
    letter-spacing: .09em !important;
  }

  .product-story-shell,
  .blessing-process-grid,
  .wearing-showcase-grid,
  .product-faq-list,
  .faq-intro,
  .detail-care-premium {
    width: calc(100% - 20px) !important;
  }
}


/* DAO SIGIL mobile width reset v4 — 2026-07-25
   Use one viewport-based gutter only. Inner modules stay at 100% so widths
   are not reduced twice by nested percentage calculations. */
@media (max-width: 767px) {
  .product-hero,
  .product-story-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .product-shell,
  .product-story-shell {
    width: calc(100% - 24px) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  .story-feature,
  .detail-care-premium,
  .blessing-process-section,
  .wearing-showcase-section,
  .customer-proof-section,
  .product-faq-section {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  .blessing-process-grid,
  .wearing-showcase-grid,
  .product-faq-list,
  .faq-intro {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  .detail-care-premium__content,
  .detail-care-premium__grid,
  .detail-care-card,
  .blessing-step-card,
  .wearing-look-card,
  .product-faq-item {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 380px) {
  .product-shell,
  .product-story-shell {
    width: calc(100% - 20px) !important;
  }
}


/* PATCH 2026-07-25 v5: add more horizontal breathing room for the mobile order bar,
   remove the extra page-color gap below the footer, and let the footer sit flush
   with the bottom of the page while keeping room for the sticky order bar. */
@media (max-width: 767px) {
  body:has(.product-mobile-order-bar) {
    padding-bottom: 0 !important;
  }

  .site-footer {
    margin-bottom: 0 !important;
    padding-bottom: 92px !important;
  }

  .product-mobile-order-bar {
    left: 14px !important;
    right: 14px !important;
    bottom: 8px !important;
    max-width: calc(100% - 28px) !important;
  }
}

@media (max-width: 380px) {
  .product-mobile-order-bar {
    left: 12px !important;
    right: 12px !important;
    max-width: calc(100% - 24px) !important;
  }

  .site-footer {
    padding-bottom: 88px !important;
  }
}
