/* Xandow theme: what the platform needs on top of the design's CSS (xg.css, fun.css).
   Loaded by components/xg/assets.html on every page, after base/index.css. */

/* ---------- 1. The platform's wrappers (playbook §11.1–11.2) ---------- */
[id^="shopline-section-"].section { padding: 0; margin: 0; }
/* the header group: dissolve its wrappers so the sticky header sticks to the page */
[id^="shopline-section-"]:has(> .promo),
[id^="shopline-section-"]:has(> .hdr),
[id^="shopline-section-"]:has(> .xg-overlay) { display: contents; }
/* block wrappers left by a block without "tag": "" must not become the flex or grid item */
.xg-blocks > [id^="shopline-block-"] { display: contents; }
main#MainContent { display: block; }

/* ---------- 2. The base theme's cascade (playbook §11.3) ---------- */
html { background: var(--ink); }
body.xg { font-family: var(--f-body); letter-spacing: normal; color: var(--ink-on-light); background: var(--cream); }
body.xg h1, body.xg h2, body.xg h3, body.xg h4 { letter-spacing: inherit; }
body.xg a:not(.button) { color: inherit; }
body.xg .xg-scope a.btn, body.xg .xg-scope a.link { color: inherit; }
body.xg .btn-gold { color: var(--ink) !important; }
body.xg .btn-violet { color: #fff !important; }
.skip-to-content-link { display: none; }

/* ---------- 3. Native commerce on the brand ---------- */
/* buttons the platform renders (product form, cart drawer, cart page, account forms) */
body.xg .button {
  border-radius: 999px; min-height: 54px; font: 400 18px/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase;
}
body.xg .button--fill.button--secondary, body.xg .button--fill.button--primary, body.xg .cart-drawer .button--fill,
body.xg .main-cart .button--fill, body.xg .customer .button--fill {
  background: var(--foil); background-size: 200% 100%; color: var(--ink); border: 0;
  box-shadow: 0 10px 30px -10px rgba(217,179,91,.8), inset 0 -3px 0 rgba(0,0,0,.18);
}
body.xg .button--fill:hover { background-position: 100% 0; }
body.xg .button[disabled] { filter: grayscale(.6); opacity: .6; cursor: not-allowed; }

/* PDP: the native spine (main-product) skinned to the design */
body.page-product .product-detail { padding-block: 20px clamp(56px, 7vw, 90px); }
body.page-product .product-detail__title, body.page-product .product__title, body.page-product [class*="detail-heading"] h1 {
  font: 400 clamp(38px, 5.6vw, 80px)/.95 var(--f-display); text-transform: uppercase; letter-spacing: .01em; text-wrap: balance; margin: 6px 0 12px;
}
body.page-product .product-detail__price, body.page-product .price { font: 400 40px/1 var(--f-display); letter-spacing: .02em; }
body.page-product .price__sale, body.page-product .price-item--sale { color: var(--ink-on-light); }
body.page-product .product-detail__description, body.page-product .product-description { font-size: 16.5px; line-height: 1.6; }
body.page-product .product-detail__form .form__buttons { display: grid; gap: 10px; }
body.page-product .product-detail__form .button { width: 100%; }
body.page-product .quantity, body.page-product .product-detail__quantity .quantity { border-radius: 999px; border: 2px solid rgba(29,24,16,.18); min-height: 56px; }
/* media: rounded frame, dark ground while loading */
body.page-product .product-detail__media img, body.page-product .product-media img { border-radius: var(--radius); }
body.page-product .product-media-group, body.page-product [class*="product-detail__media"] { --media-radius: var(--radius); }
body.page-product .product-detail__info { gap: 18px; }

/* collection grid cards (native product-card) on the brand */
body.page-collection .product-card, body.page-collection .block-product-card { background: var(--paper); border-radius: var(--radius); overflow: hidden; }
body.page-collection .product-card__title, body.page-collection .block-product-card__title { font: 400 22px/1.05 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
body.page-collection .price { font: 400 22px/1 var(--f-display); }

/* cart drawer (native): brand header, cream body, our free-shipping meter and recommendations */
body.xg .cart-drawer, body.xg theme-cart-drawer { --color-background: 248,237,222; }
body.xg .cart-drawer__header, body.xg .cart-drawer .drawer__header { background: var(--ink); color: var(--paper); }
body.xg .cart-drawer__header h2, body.xg .cart-drawer .drawer__title, body.xg .cart-drawer [class*="title"] { font-family: var(--f-display); text-transform: uppercase; letter-spacing: .04em; }
.xg-cart-extras { padding: 14px 20px; background: var(--paper); border-bottom: 1px solid rgba(29,24,16,.08); font-size: 14px; color: var(--ink-on-light); }
.xg-cart-extras .bar { height: 8px; border-radius: 8px; background: rgba(29,24,16,.12); margin-top: 8px; overflow: hidden; }
.xg-cart-extras .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint-d), var(--violet)); transition: width .6s var(--ease); }
.xg-recs { padding: 12px 20px 6px; }
.xg-recs h3 { font: 400 15px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
.xg-recs .rec { margin-bottom: 8px; }

/* system pages (search, 404, account, cart page): the brand's type on the base's layouts */
body.xg .main-cart h1, body.xg .search h1, body.xg .customer h1, body.xg .main-page h1 {
  font: 400 clamp(38px, 5.6vw, 72px)/.95 var(--f-display); text-transform: uppercase;
}
body.xg input:not([type=checkbox]):not([type=radio]), body.xg textarea, body.xg select { border-radius: 12px; }
body.xg .field .field__input { border-radius: 0; background: none; }
body.xg .field__suffix .button { min-height: 0; }  /* show-password / Send code: not 54px tall */

/* ---------- 4. Motion off (theme setting) ---------- */
html.motion-off .rv { opacity: 1; transform: none; }

/* cart page: the same extras as the drawer, as a card above the lines */
.xg-cart-page-extras{margin:24px 0 8px;border-radius:var(--radius);overflow:hidden;background:var(--paper)}
.xg-cart-page-extras .xg-cart-extras{border-bottom:0}

/* policy pages (scripts/18-policy-pages.py) */
.xg-pol-page .pol-body h2{font:400 clamp(26px,2.6vw,36px)/1.05 var(--f-display);text-transform:uppercase;letter-spacing:.01em;margin:52px 0 14px;scroll-margin-top:110px;color:var(--ink-on-light,#1d1810)}
.xg-pol-page .pol-body h2:first-of-type{margin-top:28px}
.xg-pol-page .pol-body h3{font:600 18px/1.3 var(--f-body);margin:28px 0 8px}
.xg-pol-page .pol-body p,.xg-pol-page .pol-body li{font-size:17px;line-height:1.7;margin:0 0 14px}
.xg-pol-page .pol-body ul{padding-left:22px;margin:0 0 16px}
.xg-pol-page .pol-body li{margin-bottom:8px}
.xg-pol-page .pol-body a:not(.btn){font-weight:600;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px;color:inherit}
.xg-pol-page .pol-body p.pol-meta{display:inline-block;margin:0 0 18px;font-size:13px;line-height:1;padding:8px 14px}
.xg-pol-page .pol-body p.pol-meta em{font-style:normal}
.xg-pol-page .pol-help{margin-top:56px;padding:30px 32px}
.xg-pol-page .pol-help h3{font:400 26px/1 var(--f-display);text-transform:uppercase;letter-spacing:.02em;margin:0 0 10px;position:relative;z-index:3}
.xg-pol-page .pol-help p{margin:0;position:relative;z-index:3}
.xg-pol-page .pol-toc ol{max-height:calc(100vh - 160px);overflow:auto}
.xg-pol-page{padding:clamp(48px,6vw,88px) 0 clamp(72px,8vw,120px)}
.xg-pol-page .pol-toc a{align-items:baseline}
.xg-pol-page .pol-toc a::before{flex:none;min-width:22px}
@media (max-width:860px){.xg-pol-page .pol-body h2{margin-top:40px}.xg-pol-page .pol-help{padding:26px 24px}}
