/* Island of Durian Store v3 · shared base: reset, section heads, product card, rail, grids, look dots, voucher
   tickets, buttons. Loaded on every page rebuilt in v3 (home, catalog, product, compare) and on
   the parent-layout pages for the cards. Dense retail layout: square photos, up to 6 cards a row. */

/* Base (the parent's base.css is not loaded on the rebuilt pages) --------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.xd { margin: 0; font: 400 16px/1.55 var(--body); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
[hidden] { display: none !important; }
:where(.xd) img { display: block; max-width: 100%; height: auto; }
:where(.xd) a { color: inherit; text-decoration: none; }
:where(.xd) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:where(.xd) :is(h1, h2, h3, p, ul, ol, figure, dl, dd) { margin: 0; }
:where(.xd) :is(ul, ol) { padding: 0; list-style: none; }
:where(.xd) :is(h1, h2, h3) { font-family: var(--display); font-weight: 800; letter-spacing: -.015em; text-wrap: balance; }
:where(.xd) :is(h1, h2, h3) em { font-style: normal; color: var(--red); }

/* Sections and heads -------------------------------------------------------------------------------------------- */
.xs { padding-block: clamp(18px, 2.4vw, 32px); }
.xs--paper, .xs--lr, .xs--vq { background: var(--linen); padding-block: clamp(26px, 3.4vw, 44px); margin-block: clamp(10px, 1.4vw, 18px); }
.xs--paper + .xs--paper, .xs--paper + .xs--lr, .xs--lr + .xs--paper { margin-top: calc(-1 * clamp(10px, 1.4vw, 18px)); }

.xk { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; font: 800 12px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--red-ink); }
.xk::before { content: ""; width: 18px; height: 3px; border-radius: 2px; background: currentColor; }
.xh { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; margin-bottom: clamp(14px, 1.8vw, 22px); }
.xh-text { max-width: 760px; min-width: 0; }
.xh h2, .xsizes-head h2, .xmember h2 { font: 800 clamp(22px, 2.1vw, 30px)/1.12 var(--display); letter-spacing: -.02em; }
.xh--sm h2 { font-size: clamp(20px, 1.8vw, 26px); }
.xh p { margin-top: 6px; color: var(--ink-2); max-width: 62ch; font-size: 15px; }
.xh-link { display: inline-flex; align-items: center; gap: 6px; flex: none; font: 700 14.5px/1 var(--display); color: var(--red-ink); white-space: nowrap; }
.xh-link .ic { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.xh-link:hover .ic { transform: translateX(3px); }

/* Product card ---------------------------------------------------------------------------------------------------- */
.xc { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 10px; overflow: hidden; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, transform .2s var(--ease); }
@media (hover: hover) {
	.xc:hover { box-shadow: var(--sh-card), inset 0 0 0 1px transparent; transform: translateY(-2px); }
	.xc:hover .xc-img--hover { opacity: 1; }
}
.xc-media { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--bg); }
.xc-img { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; transition: opacity .35s var(--ease); }
.xc-img--hover { opacity: 0; }
.xc.is-out .xc-img { filter: grayscale(.7); opacity: .7; }
.xc-out { position: absolute; inset: auto 8px 8px; padding: 5px 8px; border-radius: 6px; background: rgba(255, 255, 255, .94); color: var(--ink); box-shadow: 0 1px 4px rgba(42, 37, 39, .18); font: 700 12.5px/1.2 var(--display); text-align: center; }
.xc-badges { position: absolute; left: 0; top: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.xc-badge { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 0 4px 4px 0; background: var(--red); color: #fff; font: 800 12px/1 var(--display); }
.xc-badge .ic { width: 13px; height: 13px; }
.xc-badge--flash { background: var(--red); }
.xc-badge--flash .ic { fill: #fff; stroke: #fff; }
.xc-badge--sale { background: var(--red); }
.xc-badge--new { background: var(--mint-ink); color: #fff; }
.xc-fav { position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .95); color: var(--ink-2); box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .2); transition: transform .2s var(--ease), color .2s; }
.xc-fav:hover { transform: scale(1.08); color: var(--red); }
.xc-fav .ic { width: 18px; height: 18px; }
.xc-fav.is-on { color: var(--red); }
.xc-fav.is-on .ic { fill: var(--red); stroke: var(--red); }
/* sits on the photo's lower right corner: margin-top % is relative to the card width, the photo is square */
.xc-add { position: absolute; right: 8px; top: 0; margin-top: calc(100% - 44px); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; box-shadow: 0 6px 14px -6px rgba(142, 14, 20, .7); transition: transform .2s var(--ease), background .2s; }
.xc-add:hover { transform: scale(1.08); background: var(--red-ink); }
.xc-add .ic { width: 20px; height: 20px; }
.xc-add.is-loading { opacity: .6; pointer-events: none; }
.xc-body { display: grid; gap: 3px; padding: 10px 12px 14px; align-content: start; flex: 1; }
.xc-brand { font: 700 11px/1.3 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.xc-name { font: 500 14.5px/1.35 var(--body); color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(2 * 1.35em); }
.xc-name:hover { color: var(--red-ink); }
.xc-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 4px; }
.xc-price b { font: 800 16.5px/1.2 var(--display); color: var(--red-ink); letter-spacing: -.01em; }
.xc-price small { font: 500 12px/1 var(--body); color: var(--ink-3); }
.xc-price s { font-size: 12.5px; color: var(--ink-3); }
.xc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }
.xc-meta i { font-style: normal; }
.xc-rate { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-2); }
.xc-rate .ic { width: 13px; height: 13px; fill: var(--red); stroke: var(--red); }

/* Flash sale stock bar on cards (real quota and sold count of the campaign) */
.xc-stockbar { display: block; height: 6px; margin-top: 6px; border-radius: 6px; background: var(--red-bg-2); overflow: hidden; }
.xc-stockbar i { display: block; height: 100%; border-radius: 6px; background: var(--red); }
.xc-stocktxt { font: 600 11.5px/1.3 var(--display); color: var(--ink-2); }
.xc-stockbar.is-low + .xc-stocktxt { color: var(--red-ink); }

/* Rail: up to 6 cards in view ------------------------------------------------------------------------------------- */
.xr { position: relative; }
.xr-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 14px) / 6); gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: 2px 6px; }
.xr-track::-webkit-scrollbar { display: none; }
.xr-track > * { scroll-snap-align: start; }
.xr-btn { position: absolute; top: calc((100% - 110px) / 2); z-index: 3; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); box-shadow: 0 6px 18px -6px rgba(23, 23, 28, .45); transition: opacity .2s, transform .2s var(--ease), color .2s; }
.xr-btn--prev { left: -20px; }
.xr-btn--next { right: -20px; }
.xr-btn:hover { transform: scale(1.06); color: var(--red); }
.xr-btn[disabled] { opacity: 0; pointer-events: none; }
.xf { position: relative; grid-column: span 2; display: block; min-height: 100%; border-radius: 10px; overflow: hidden; background: var(--linen); color: var(--ink); }
.xf-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.xf:hover .xf-img { transform: scale(1.03); }
.xf-copy { position: absolute; left: 12px; bottom: 12px; display: grid; gap: 2px; max-width: calc(100% - 24px); padding: 10px 14px; border-radius: 10px; background: rgba(255, 255, 255, .96); color: var(--ink); box-shadow: 0 6px 18px -10px rgba(42, 37, 39, .4); }
.xf-copy small { font: 800 11.5px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--red-ink); }
.xf-copy b { font: 800 18px/1.15 var(--display); letter-spacing: -.015em; }
.xf-copy em { display: inline-flex; align-items: center; gap: 6px; font: 700 14px/1 var(--display); font-style: normal; margin-top: 4px; color: var(--red-ink); }
.xf-copy em .ic { width: 16px; height: 16px; }

/* Grids */
.xgrid--6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.xgrid--loading { min-height: 320px; border-radius: 10px; background: linear-gradient(90deg, var(--bg) 0 40%, #fff 50%, var(--bg) 60% 100%) 0 0 / 300% 100%; animation: xshimmer 1.4s linear infinite; }
@keyframes xshimmer { to { background-position: -150% 0; } }

/* Shop-the-look dots and mini cards */
.xl { position: relative; }
.xl-dot { position: absolute; z-index: 2; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: #fff; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .45); display: grid; place-items: center; }
.xl-dot span { width: 12px; height: 12px; border-radius: 50%; background: var(--red); transition: transform .2s var(--ease); }
.xl-dot::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .9); animation: xpulse 2.4s var(--ease) infinite; }
.xl-dot[aria-expanded="true"] span { transform: scale(1.5); }
.xl-dot.is-off { display: none; }
@keyframes xpulse { 0% { transform: scale(.7); opacity: 1; } 80%, 100% { transform: scale(1.35); opacity: 0; } }
@keyframes xpop { from { opacity: 0; } }
.xl-pop { position: absolute; z-index: 5; width: 290px; display: grid; gap: 10px; padding: 12px; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .55); font-size: 14px; text-align: left; transform: translate(26px, -50%); animation: xpop .25s var(--ease); }
.xl-pop.is-left { transform: translate(calc(-100% - 26px), -50%); }
.xl-pop[hidden] { display: none; }
.xl-pop-main { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; padding-right: 22px; }
.xl-pop-main img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--bg); }
.xl-pop-main span { display: grid; gap: 2px; }
.xl-pop-main small { font: 700 10.5px/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.xl-pop-main b { font-size: 14.5px; line-height: 1.3; font-weight: 600; }
.xl-pop-main em { font: 800 15.5px/1.2 var(--display); font-style: normal; color: var(--red-ink); }
.xl-pop-main em small { font-size: 11.5px; letter-spacing: 0; text-transform: none; font-weight: 500; }
.xl-pop-main i { font-style: normal; font-size: 12.5px; color: var(--ink-3); }
.xl-pop-also { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--bg); font-size: 13.5px; font-weight: 600; }
.xl-pop-also .ic { width: 16px; height: 16px; }
.xl-pop-add { display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; border-radius: 8px; background: var(--red); color: #fff; font: 700 14.5px/1 var(--display); }
.xl-pop-add .ic { width: 18px; height: 18px; }
.xl-pop-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); }
.xl-pop-x .ic { width: 16px; height: 16px; }

/* Tabs (kept for parent-layout pages) */
.xtabs { display: flex; gap: 8px; flex-wrap: wrap; }
.xtab-btn { height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-2); font: 700 14px/1 var(--display); white-space: nowrap; }
.xtab-btn[aria-selected="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.xtab-panel[hidden] { display: none; }

.xflash-logo { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; font: 900 italic 15px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.xflash-logo .ic { fill: #fff; stroke: #fff; }
.xflash-next { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.xflash-next .xflash-logo { margin: 0; }
.xflash-next p { flex: 1; }

/* Voucher tickets (markup from the parent partial parts/shop/voucher.php) ------------------------------------------ */
.xd .vc { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr); min-width: 0; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-family: var(--body); }
.xd .vc-side { position: relative; display: grid; place-items: center; align-content: center; gap: 4px; padding: 10px 6px; background: var(--blush); color: var(--blush-ink); font: 800 11px/1.2 var(--display); text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.xd .vc-side::after { content: ""; position: absolute; right: -1px; top: 8px; bottom: 8px; border-right: 2px dashed rgba(42, 37, 39, .18); }
.xd .vc-side .ic { width: 26px; height: 26px; }
.xd .vc--ongkir .vc-side { background: var(--mint); color: var(--mint-ink); }
.xd .vc--member .vc-side, .xd .vc--poin .vc-side { background: var(--t-gold); color: var(--t-gold-ink); }
.xd .vc--ultah .vc-side { background: var(--peach); color: var(--peach-ink); }
.xd .vc-main { display: grid; gap: 3px; padding: 12px 14px; min-width: 0; }
.xd .vc-head { font: 800 16px/1.2 var(--display); }
.xd .vc-head small { font: 600 13px/1.2 var(--body); color: var(--ink-2); }
.xd .vc-min, .xd .vc-exp { font-size: 12.5px; color: var(--ink-3); }
.xd .vc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; }
.xd .vc .btn { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 6px; font: 700 13px/1 var(--display); border: 1.5px solid var(--red); color: var(--red-ink); background: #fff; }
.xd .vc .btn--red { background: var(--red); color: #fff; }
.xd .vc .bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.xd .vc .bar i { display: block; height: 100%; background: var(--red); }
.xd .vc .pill { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.xd .vc-code { font: 700 12px/1 ui-monospace, Menlo, monospace; padding: 6px 8px; border-radius: 6px; background: var(--bg); }
.xd .vc.is-used { opacity: .55; }
.xd .vc-used { font-size: 12.5px; color: var(--ink-2); }
.xd .vc-used a { color: var(--red-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.xd .vc-tag { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 28px; padding: 0 10px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--ink-2); font: 700 12px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.xd .vc-tag--ok { box-shadow: none; background: var(--green-bg); color: var(--green); text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.xd .vc-tag .ic { width: 14px; height: 14px; }
.xd .vc-foot:has(> .vc-tag) { flex-wrap: wrap; row-gap: 6px; }
.xd .vc-foot:has(> .vc-tag) .vc-exp { white-space: nowrap; }

/* Buttons */
.xbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: var(--r-sm); border: 1.5px solid transparent; font: 700 15px/1 var(--display); transition: background .2s, border-color .2s, transform .2s var(--ease); }
.xbtn .ic { width: 20px; height: 20px; }
.xbtn--light { background: #fff; color: var(--ink); }
.xbtn--light:hover { background: var(--red-bg); }
.xbtn--dark { background: var(--red); color: #fff; } /* r7: no dark buttons; the old "dark" primary is now the red primary */
.xbtn--dark:hover { background: var(--red-hover); }
.xbtn--dark[disabled] { opacity: .45; cursor: not-allowed; }
.xbtn--line { background: #fff; border-color: var(--red); color: var(--red-ink); }
.xbtn--line:hover { background: var(--red-bg); }
.xbtn--red { background: var(--red); color: #fff; }
.xbtn--red:hover { background: var(--red-hover); }
.xbtn--wa { background: var(--wa); color: #fff; }
/* Hover keeps the text color of each button: link buttons on cart/account/content pages otherwise picked up the
   parent theme's red link hover (red text on a red button). Client sheet #26: hover contrast at least 4.5:1. */
.xbtn--light:hover, .xbtn--light:focus-visible { color: var(--ink); }
.xbtn--line:hover, .xbtn--line:focus-visible { color: var(--red-ink); }
.xbtn--dark:hover, .xbtn--dark:focus-visible, .xbtn--red:hover, .xbtn--red:focus-visible { color: #fff; }
.xbtn--wa:hover, .xbtn--wa:focus-visible { background: #15803D; color: #fff; }
.xbtn.is-loading { opacity: .6; pointer-events: none; }
.xbtn.is-disabled { opacity: .45; }

/* Reveal (motion only; the parent app.js adds .is-in) */
html.motion .xd [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--d, 0) * 50ms); }
html.motion .xd [data-reveal].is-in { opacity: 1; transform: none; }

/* Tablet -------------------------------------------------------------------------------------------------------------- */
@media (max-width: 1180px) {
	.xr-track { grid-auto-columns: calc((100% - 3 * 12px) / 4); gap: 12px; }
	.xgrid--6 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
	.xr-btn--prev { left: -10px; }
	.xr-btn--next { right: -10px; }
}

/* Phone ----------------------------------------------------------------------------------------------------------------- */
@media (max-width: 760px) {
	body.xd { font-size: 15.5px; }
	.xh { align-items: center; gap: 12px; }
	.xh h2, .xsizes-head h2, .xmember h2 { font-size: 20px; }
	.xh--sm h2 { font-size: 19px; }
	.xh p { font-size: 14px; }
	.xh-link { font-size: 13.5px; }
	.xk { font-size: 11px; margin-bottom: 6px; }
	.xc-body { padding: 8px 10px 12px; gap: 2px; }
	.xc-name { font-size: 13.5px; }
	.xc-price b { font-size: 15px; }
	.xc-meta { font-size: 11.5px; }
	.xc-badge { height: 20px; padding: 0 6px; font-size: 11px; }
	.xc-fav { right: 6px; top: 6px; width: 30px; height: 30px; }
	.xc-fav .ic { width: 16px; height: 16px; }
	.xc-add { right: 6px; width: 32px; height: 32px; margin-top: calc(100% - 38px); }
	.xc-add .ic { width: 18px; height: 18px; }
	.xr-track { grid-auto-columns: 40%; gap: 10px; margin-inline: calc(-1 * var(--gut)); padding-inline: var(--gut); scroll-padding-inline: var(--gut); }
	.xr-btn { display: none; }
	.xgrid--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.xf-copy b { font-size: 19px; }
	.xl-pop, .xl-pop.is-left { position: absolute; left: 12px !important; right: 12px; top: auto !important; bottom: 12px; width: auto; transform: none; }
	.xbtn { height: 46px; padding: 0 18px; font-size: 14.5px; }
	.xd .vc { grid-template-columns: 72px minmax(0, 1fr); }
}
