/* =====================================================================
   commerce.css — overflow fixes, product page, swatches, size chart.
   Loaded after storefront.css.
   ===================================================================== */

/* ---- No sideways scrolling, anywhere -------------------------------- */
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
.shop-layout > *, .split > *, .pdp-grid > * { min-width: 0; }
.prow, .chiprow, .table-wrap { max-width: 100%; }
img, video, iframe { max-width: 100%; }
/* Hidden header menus must not stretch the page */
.catnav .navdrop:nth-last-child(-n+3):not(.navdrop-mega) .navdrop-panel { left: auto; right: 0; }

/* ---- Product page ---------------------------------------------------- */
.pdp { padding-bottom: 32px; }
.pdp .crumbs { margin: 12px 0 14px; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.pdp .crumbs a { color: var(--ink-2); }
.pdp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 900px) {
  .pdp-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
  .pdp-media { position: sticky; top: 92px; }
}

.pdp-stage { position: relative; border-radius: var(--r-lg, 18px); overflow: hidden; background: var(--wash, #F4F6FC); }
.pdp-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 1 / 1; outline: none; }
.pdp-track::-webkit-scrollbar { display: none; }
.pdp-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; display: grid; place-items: center; overflow: hidden; cursor: zoom-in; background: #fff; }
.pdp-slide img { width: 100%; height: 100%; object-fit: contain; transition: transform .2s ease; user-select: none; }
.pdp-slide.is-zoom img { transform: scale(2); }
.pdp-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line, #E3E7F2); background: rgba(255,255,255,.94); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 4px 14px rgba(16,19,34,.12); z-index: 2; transition: transform .15s, background .15s; }
.pdp-nav:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.pdp-nav svg { width: 20px; height: 20px; fill: none; stroke: var(--ink, #101322); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pdp-prev { left: 12px; } .pdp-next { right: 12px; }
.pdp-single .pdp-nav, .pdp-single .pdp-count { display: none; }
.pdp-count { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: rgba(16,19,34,.72); color: #fff;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; z-index: 2; }
.pdp-off { position: absolute; top: 12px; left: 12px; background: var(--green-600, #0E8A52); color: #fff; font-size: 12px; font-weight: 800;
  padding: 5px 10px; border-radius: 8px; z-index: 2; letter-spacing: .02em; }
.pdp-tools { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.pdp-tool { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line, #E3E7F2); background: rgba(255,255,255,.94);
  display: grid; place-items: center; cursor: pointer; }
.pdp-tool svg { width: 18px; height: 18px; fill: none; stroke: var(--ink, #101322); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pdp-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.pdp-thumbs::-webkit-scrollbar { display: none; }
.pdp-thumb { flex: 0 0 68px; height: 68px; border: 2px solid transparent; border-radius: 10px; padding: 0; overflow: hidden; background: #fff; cursor: pointer; opacity: .75; }
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumb.is-on, .pdp-thumb:hover { border-color: var(--blue-600, #1B5CFF); opacity: 1; }
@media (max-width: 899px) {
  .pdp-nav { width: 36px; height: 36px; }
  .pdp-thumbs { display: none; }
  .pdp-media { margin: 0 -16px; }
  .pdp-stage { border-radius: 0; }
}

.pdp-info { min-width: 0; }
.pdp-brand { display: inline-block; font-weight: 700; color: var(--blue-700, #1247D6); font-size: 14px; margin-bottom: 4px; }
.pdp-title { font-family: var(--display, inherit); font-size: clamp(20px, 2.4vw, 28px); line-height: 1.25; margin: 0 0 10px; overflow-wrap: anywhere; }
.pdp-rating { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3, #79839E); margin-bottom: 12px; }
.pdp-rating span { display: inline-flex; align-items: center; gap: 3px; background: var(--green-600, #0E8A52); color: #fff; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.pdp-rating svg { width: 12px; height: 12px; fill: currentColor; }
.pdp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.pdp-price b { font-size: clamp(26px, 3vw, 32px); font-weight: 800; }
.pdp-price s { color: var(--ink-3, #79839E); font-size: 17px; }
.pdp-save { color: var(--green-600, #0E8A52); font-weight: 800; font-size: 17px; }
.pdp-tax { color: var(--ink-3, #79839E); font-size: 13px; margin: 4px 0 14px; }
.pdp-short { color: var(--ink-2, #48506B); margin: 0 0 14px; }

.pdp-opts { border-top: 1px solid var(--line-2, #EDF1F7); padding-top: 14px; }
.pdp-opt { margin-bottom: 16px; }
.pdp-opt-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 14px; }
.pdp-opt-h b span { font-weight: 500; color: var(--ink-2, #48506B); }
.pdp-vals { display: flex; flex-wrap: wrap; gap: 8px; }
.pdp-chip { min-width: 48px; height: 42px; padding: 0 14px; border: 1.5px solid var(--line, #E3E7F2); border-radius: 10px; background: #fff;
  font-weight: 600; font-size: 14px; cursor: pointer; position: relative; transition: border-color .12s, background .12s; }
.pdp-chip:hover { border-color: var(--ink-2, #48506B); }
.pdp-chip.is-on { border-color: var(--blue-600, #1B5CFF); background: var(--blue-050, #F0F5FF); color: var(--blue-800, #0B2E8A); }
.pdp-chip.is-oos, .pdp-sw.is-oos { color: var(--ink-3, #79839E); background: repeating-linear-gradient(135deg, #fff 0 6px, #f4f5f8 6px 7px); }
.pdp-chip.is-oos::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; border-top: 1.5px solid #b9bfce; transform: rotate(-12deg); }
.pdp-chip.is-na, .pdp-sw.is-na { opacity: .35; cursor: not-allowed; }
.pdp-sw { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; padding: 4px; border: 1.5px solid var(--line, #E3E7F2);
  border-radius: 12px; background: #fff; cursor: pointer; font-size: 11px; font-weight: 600; color: var(--ink-2, #48506B); position: relative; }
.pdp-sw i { display: block; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(16,19,34,.14); margin: 4px 0 1px; }
.pdp-sw img { width: 54px; height: 54px; object-fit: cover; border-radius: 9px; }
.pdp-sw span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdp-sw.is-on { border-color: var(--blue-600, #1B5CFF); box-shadow: 0 0 0 2px var(--blue-100, #DCE7FF); color: var(--ink, #101322); }
.pdp-opt-err { color: var(--red-600, #C0392B); font-size: 13px; font-weight: 600; margin: 6px 0 0; }
.pdp-opt.is-shake { animation: pdpShake .4s; }
@keyframes pdpShake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.linkbtn { background: none; border: 0; padding: 0; color: var(--blue-700, #1247D6); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.pdp-stock { font-size: 14px; font-weight: 600; margin: 4px 0 10px; min-height: 1em; }
.pdp-stock.is-ok { color: var(--green-600, #0E8A52); }
.pdp-stock.is-low { color: var(--orange-600, #D9541A); }
.pdp-stock.is-out { color: var(--red-600, #C0392B); }
.pdp-buy { display: grid; grid-template-columns: auto 1fr 1fr; gap: 10px; align-items: stretch; }
.pdp-buy .stepper { height: 50px; }
.pdp-add, .pdp-buynow { height: 50px; font-size: 15px; font-weight: 800; }
.pdp-buynow { background: var(--ink, #101322); color: #fff; border-color: var(--ink, #101322); }
.pdp-buynow:hover { filter: brightness(1.15); }
@media (max-width: 480px) { .pdp-buy { grid-template-columns: auto 1fr; } .pdp-buynow { grid-column: 1 / -1; } }
.pdp-sku { font-size: 12px; color: var(--ink-3, #79839E); margin: 8px 0 14px; }

.pdp-usp { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 0; border: 1px solid var(--line, #E3E7F2); border-radius: 14px; overflow: hidden; }
.pdp-usp li { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--line-2, #EDF1F7); }
.pdp-usp li:first-child { border-top: 0; }
.pdp-usp b { display: block; font-size: 14px; } .pdp-usp small { color: var(--ink-3, #79839E); font-size: 12.5px; }
.pdp-usp .usp-ic { flex: 0 0 34px; height: 34px; border-radius: 10px; background: var(--blue-050, #F0F5FF); display: grid; place-items: center; color: var(--blue-700, #1247D6); }
.pdp-usp .usp-ic svg { width: 18px; height: 18px; }

.pdp-hl h2 { font-size: 16px; margin: 0 0 10px; }
.pdp-hl dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.pdp-hl dl div { border-bottom: 1px solid var(--line-2, #EDF1F7); padding-bottom: 8px; min-width: 0; }
.pdp-hl dt { font-size: 12px; color: var(--ink-3, #79839E); } .pdp-hl dd { margin: 2px 0 0; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }

.pdp-more { margin-top: 34px; border: 1px solid var(--line, #E3E7F2); border-radius: var(--r-lg, 18px); background: #fff; overflow: hidden; }
.pdp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line, #E3E7F2); overflow-x: auto; scrollbar-width: none; padding: 0 10px; }
.pdp-tabs::-webkit-scrollbar { display: none; }
.pdp-tabs button { flex: 0 0 auto; background: none; border: 0; border-bottom: 3px solid transparent; padding: 15px 12px 12px; font-weight: 700; font-size: 14px; color: var(--ink-3, #79839E); cursor: pointer; }
.pdp-tabs button.is-on { color: var(--ink, #101322); border-bottom-color: var(--blue-600, #1B5CFF); }
.pdp-panel { display: none; padding: 18px 20px 22px; }
.pdp-panel.is-on { display: block; }
.pdp-ph { font-size: 17px; margin: 0 0 12px; } .pdp-ph small { font-weight: 500; color: var(--ink-3, #79839E); }
.pdp-specs { width: 100%; border-collapse: collapse; max-width: 760px; }
.pdp-specs th, .pdp-specs td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-2, #EDF1F7); vertical-align: top; font-size: 14px; }
.pdp-specs th { width: 38%; color: var(--ink-3, #79839E); font-weight: 500; }
.pdp-specs tr:nth-child(odd) td, .pdp-specs tr:nth-child(odd) th { background: #FAFBFE; }
.pdp-care { margin: 0; padding-left: 20px; line-height: 1.7; }
.pdp-review { border-top: 1px solid var(--line-2, #EDF1F7); padding: 12px 0; }
.pdp-review p { margin: 6px 0; } .pdp-review small { color: var(--ink-3, #79839E); }
.rte p { margin: 0 0 12px; line-height: 1.7; } .rte ul { margin: 0 0 12px; padding-left: 20px; line-height: 1.7; }

.sizechart { width: 100%; border-collapse: collapse; font-size: 14px; }
.sizechart th, .sizechart td { padding: 9px 12px; border: 1px solid var(--line, #E3E7F2); text-align: center; white-space: nowrap; }
.sizechart th { background: var(--wash, #F4F6FC); font-weight: 700; }
.sizechart tbody tr:hover td { background: var(--blue-050, #F0F5FF); }

.pdp-dialog { border: 0; border-radius: 18px; padding: 0; width: min(640px, calc(100vw - 24px)); max-height: 86vh; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.pdp-dialog::backdrop { background: rgba(16,19,34,.55); }
.pdp-dialog > *:not(.pdp-dialog-h) { margin: 16px 18px; }
.pdp-dialog-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line, #E3E7F2); position: sticky; top: 0; background: #fff; }
.pdp-dialog-h button { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; }

.pdp-lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(10,12,20,.94); display: grid; place-items: center; }
.pdp-lightbox[hidden] { display: none; }
.pdp-lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.pdp-lb-close { position: absolute; top: 12px; right: 16px; border: 0; background: none; color: #fff; font-size: 38px; cursor: pointer; z-index: 3; }
.pdp-lightbox .pdp-count { position: fixed; bottom: 18px; }

.pdp-sticky { display: none; }
@media (max-width: 899px) {
  .pdp-sticky { display: flex; position: fixed; left: 0; right: 0; bottom: var(--tabbar-h, 60px); z-index: 60; gap: 12px; align-items: center; justify-content: space-between;
    background: #fff; border-top: 1px solid var(--line, #E3E7F2); padding: 10px 14px; box-shadow: 0 -6px 18px rgba(16,19,34,.08);
    transform: translateY(calc(100% + var(--tabbar-h, 60px) + 24px)); visibility: hidden; transition: transform .2s ease, visibility .2s; }
  .pdp-sticky.is-on { transform: none; visibility: visible; }
  .pdp-sticky b { font-size: 18px; display: block; } .pdp-sticky small { color: var(--ink-3, #79839E); font-size: 12px; }
  .pdp-sticky .btn { min-width: 150px; height: 46px; }
  .pdp-hl dl { grid-template-columns: minmax(0, 1fr); }
  .pdp-specs th { width: 45%; }
}
.pdp-flash { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink, #101322); color: #fff;
  padding: 10px 16px; border-radius: 10px; z-index: 1100; font-weight: 600; font-size: 14px; }

/* Category SEO text under the listing */
.seo-text { margin: 30px 0 10px; color: var(--ink-2, #48506B); line-height: 1.7; font-size: 14px; }
.seo-text h2 { font-size: 17px; color: var(--ink, #101322); }

/* ---- Phone menu: compact three-level accordion (Men > Topwear > T-shirts) ----
   Every arrow is sized explicitly: an SVG without a size can render
   very large on some phones. */
.drawer { width: min(84vw, 340px); }
.drawer-head { padding: 12px 14px; padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
.drawer-head b { font-size: 14.5px; }
.drawer-close { width: 30px; height: 30px; font-size: 18px; }
.drawer-quick { gap: 6px; padding: 10px; }
.drawer-quick a { padding: 8px 2px; font-size: 11px; gap: 4px; border-radius: 10px; }
.drawer-quick svg { width: 18px; height: 18px; }
.drawer .caret { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; color: var(--ink-3, #8790A6); transition: transform .18s ease, background .18s ease; }
.drawer .caret svg { width: 14px !important; height: 14px !important; display: block; }
.drawer-item > a, .drawer-item > button { font-size: 14px; font-weight: 600; padding: 12px 14px; min-height: 46px; line-height: 1.3; }
.drawer-item.is-open > button { color: var(--blue-600, #1B5CFF); background: var(--blue-050, #F0F5FF); }
.drawer-item.is-open > button .caret { transform: rotate(90deg); background: #fff; color: var(--blue-600, #1B5CFF); }
.drawer-sub { padding: 0 0 4px; }
.drawer-sub > a { display: block; padding: 10px 14px 10px 26px; font-size: 13px; color: var(--ink-2, #3A4157); }
.drawer-node { border-top: 1px solid var(--line-2, #EEF1F7); }
.drawer-node > .drawer-group {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px 10px 26px; min-height: 42px; background: none; border: 0; cursor: pointer; text-align: left;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink, #12162B); margin: 0;
}
.drawer-node.is-open > .drawer-group { color: var(--blue-600, #1B5CFF); }
.drawer-node.is-open > .drawer-group .caret { transform: rotate(90deg); color: var(--blue-600, #1B5CFF); }
.drawer-leaves { display: none; background: #fff; padding: 2px 0 6px; border-left: 2px solid var(--blue-100, #D6E2FF); margin-left: 26px; }
.drawer-node.is-open > .drawer-leaves { display: block; }
.drawer-leaves a { display: block; padding: 8px 14px 8px 14px; font-size: 13px; font-weight: 500; color: var(--ink-2, #3A4157); }
.drawer-leaves a:hover, .drawer-sub > a:hover { color: var(--blue-600, #1B5CFF); }
.drawer .soon-pill { font-size: 9px; padding: 1px 5px; vertical-align: 1px; }
.drawer-item.is-open .drawer-node > .drawer-group .caret { transform: none; background: transparent; }
.drawer-item.is-open .drawer-node.is-open > .drawer-group .caret { transform: rotate(90deg); }
