/* ==========================================================================
   YOURS TRUELY — STORE COMPONENTS
   Cart, checkout, payment, order tracking, account, wishlist.
   Works together with shared-layout.css (header/footer/tokens).
   ========================================================================== */

body.yt-page { margin: 0; background: var(--yt-cream-soft, #fbf6f2); color: var(--yt-ink, #2B2326); font-family: var(--yt-sans, Poppins, Arial, sans-serif); font-size: 15px; line-height: 1.65; }
.yt-page a { color: inherit; }
.yt-container { width: min(1240px, 100% - 32px); margin: 0 auto; }

/* ---------- Page hero ---------- */
.yt-hero {
  background: radial-gradient(1200px 300px at 85% -20%, rgba(242,176,138,.28), transparent 60%), linear-gradient(120deg, #46011D, #6b1a3a);
  color: #fff; padding: clamp(28px, 4.5vw, 54px) 0;
}
.yt-hero small { display: block; color: var(--yt-peach, #F2B08A); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 12px; }
.yt-hero h1 { font: 600 clamp(34px, 5vw, 54px)/1.05 var(--yt-serif, Georgia, serif); margin: 8px 0 0; letter-spacing: -.4px; }
.yt-hero p { margin: 10px 0 0; color: #f0dde5; max-width: 620px; }

.yt-main { padding: clamp(22px, 3.5vw, 40px) 0 clamp(44px, 6vw, 80px); }

/* ---------- Steps ---------- */
.yt-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 22px; padding: 0; list-style: none; font-size: 13px; font-weight: 600; color: var(--yt-muted, #77706d); }
.yt-steps li { display: flex; align-items: center; gap: 8px; }
.yt-steps li + li::before { content: ""; width: 26px; height: 1px; background: var(--yt-line, #EADBD2); }
.yt-steps .num { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--yt-line); background: #fff; font-size: 12px; }
.yt-steps .on { color: var(--yt-burgundy, #46011D); }
.yt-steps .on .num { background: var(--yt-burgundy); border-color: var(--yt-burgundy); color: #fff; }
.yt-steps .done .num { background: #e8f5ec; border-color: #bfe0c9; color: var(--yt-success); }

/* ---------- Layout ---------- */
.yt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 26px; align-items: start; }
.yt-sticky { position: sticky; top: calc(var(--yt-header-h, 84px) + 18px); }
.yt-card { background: #fff; border: 1px solid var(--yt-line, #EADBD2); border-radius: 14px; box-shadow: 0 6px 24px -14px rgba(70,1,29,.2); overflow: hidden; }
.yt-card + .yt-card { margin-top: 20px; }
.yt-card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--yt-line); font: 600 24px/1.2 var(--yt-serif, Georgia, serif); color: var(--yt-burgundy); margin: 0; }
.yt-card-body { padding: 22px; }

/* ---------- Forms ---------- */
.yt-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.yt-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.yt-field.full { grid-column: 1 / -1; }
.yt-field label { font-size: 13px; font-weight: 600; color: var(--yt-burgundy); }
.yt-field label .req { color: var(--yt-danger); }
.yt-input, .yt-field input, .yt-field select, .yt-field textarea {
  box-sizing: border-box; width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid #ddc9d0; border-radius: 9px;
  background: #fff; color: var(--yt-ink); font: inherit; font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
.yt-field textarea { min-height: 92px; resize: vertical; }
.yt-field input:focus, .yt-field select:focus, .yt-field textarea:focus { outline: none; border-color: var(--yt-burgundy); box-shadow: 0 0 0 3px rgba(242,176,138,.35); }
.yt-field input[aria-invalid="true"] { border-color: var(--yt-danger); }
.yt-help { font-size: 12px; color: var(--yt-muted); }
.yt-pin-status { font-size: 12px; font-weight: 600; min-height: 18px; }
.yt-pin-status.ok { color: var(--yt-success); }
.yt-pin-status.bad { color: var(--yt-danger); }

/* ---------- Buttons ---------- */
.yt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border: 1px solid var(--yt-burgundy); border-radius: 999px;
  background: var(--yt-burgundy); color: #fff !important; font: 700 14px var(--yt-sans); letter-spacing: .2px;
  text-decoration: none; cursor: pointer; transition: transform .15s, background .2s, box-shadow .2s;
}
.yt-btn:hover { background: var(--yt-burgundy-hover); transform: translateY(-1px); box-shadow: 0 10px 22px -12px rgba(70,1,29,.7); }
.yt-btn:disabled, .yt-btn.is-loading { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.yt-btn.block { display: flex; width: 100%; }
.yt-btn.outline { background: #fff; color: var(--yt-burgundy) !important; }
.yt-btn.outline:hover { background: var(--yt-cream); }
.yt-btn.sm { min-height: 38px; padding: 0 16px; font-size: 13px; }
.yt-link { color: var(--yt-burgundy); font-weight: 600; text-decoration: underline; text-decoration-color: var(--yt-peach); text-underline-offset: 3px; }
.yt-link-danger { color: #9c3651; font-size: 13px; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }

/* ---------- Alerts / badges ---------- */
.yt-alert { padding: 13px 16px; border-radius: 10px; margin: 0 0 18px; font-size: 14px; border: 1px solid; }
.yt-alert ul { margin: 6px 0 0; padding-left: 18px; }
.yt-alert.success { background: #eaf7ee; border-color: #c4e4ca; color: #1f5e32; }
.yt-alert.error { background: #fff0f0; border-color: #efbcbc; color: #8d2436; }
.yt-alert.info { background: #f3ecf9; border-color: #dccbee; color: #4b2a73; }
.yt-alert.warn { background: #fff7e8; border-color: #f0dba9; color: #7a5200; }
.yt-badge { display: inline-block; padding: 4px 11px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #f5e7ec; color: var(--yt-burgundy); }
.yt-badge.ok { background: #e6f5ea; color: #1b6a37; }
.yt-badge.info { background: #e8f0fb; color: #1d4c8f; }
.yt-badge.warn { background: #fff3d9; color: #7a5200; }
.yt-badge.bad { background: #fdeaea; color: #9b1c2b; }

/* ---------- Cart ---------- */
.yt-cart-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 18px 22px; border-bottom: 1px solid #f0e7e2; }
.yt-cart-item:last-child { border-bottom: 0; }
.yt-cart-photo { width: 96px; height: 112px; border-radius: 10px; overflow: hidden; background: var(--yt-cream); display: grid; place-items: center; color: #a58a94; font-size: 11px; text-align: center; }
.yt-cart-photo img { width: 100%; height: 100%; object-fit: cover; }
.yt-cart-cat { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; color: #956579; }
.yt-cart-name { font-weight: 600; color: var(--yt-burgundy); margin: 4px 0; display: block; text-decoration: none; }
.yt-cart-meta { font-size: 13px; color: var(--yt-muted); }
.yt-qty { display: inline-flex; align-items: center; border: 1px solid #ddc9d0; border-radius: 99px; overflow: hidden; background: #fff; margin-top: 10px; }
.yt-qty button { width: 36px; height: 38px; border: 0; background: transparent; color: var(--yt-burgundy); font-size: 20px; cursor: pointer; }
.yt-qty button:hover { background: var(--yt-cream); }
.yt-qty input { width: 46px; height: 38px; text-align: center; border: 0; font: 600 15px var(--yt-sans); -moz-appearance: textfield; background: transparent; }
.yt-qty input::-webkit-outer-spin-button, .yt-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.yt-cart-line { text-align: right; font-weight: 700; color: var(--yt-burgundy); }

/* ---------- Summary ---------- */
.yt-summary h2 { font: 600 24px var(--yt-serif); color: var(--yt-burgundy); margin: 0 0 14px; }
.yt-summary-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0e7e2; align-items: center; }
.yt-summary-thumb { width: 56px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--yt-cream); flex-shrink: 0; position: relative; }
.yt-summary-thumb img { width: 100%; height: 100%; object-fit: cover; }
.yt-summary-thumb b { position: absolute; top: -1px; right: -1px; min-width: 20px; height: 20px; border-radius: 0 8px 0 8px; background: var(--yt-burgundy); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 4px; }
.yt-summary-name { font-size: 13px; font-weight: 600; color: var(--yt-burgundy); line-height: 1.4; }
.yt-summary-sub { font-size: 12px; color: var(--yt-muted); }
.yt-summary-price { margin-left: auto; font-size: 13px; font-weight: 700; white-space: nowrap; }
.yt-row { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0; font-size: 14px; color: var(--yt-muted); }
.yt-row.total { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--yt-line); color: var(--yt-burgundy); font-weight: 700; font-size: 20px; }
.yt-row .free { color: var(--yt-success); font-weight: 600; }
.yt-trust { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 16px; font-size: 12px; color: var(--yt-muted); }
.yt-trust span::before { content: "✓ "; color: var(--yt-success); font-weight: 700; }

/* ---------- Payment options ---------- */
.yt-pay-option { display: flex; gap: 12px; align-items: flex-start; padding: 15px 16px; border: 1.5px solid var(--yt-line); border-radius: 12px; cursor: pointer; background: #fff; transition: border-color .2s, background .2s, box-shadow .2s; }
.yt-pay-option + .yt-pay-option { margin-top: 12px; }
.yt-pay-option:hover { border-color: #cfa9b8; }
.yt-pay-option input { margin-top: 4px; accent-color: var(--yt-burgundy); width: 18px; height: 18px; }
.yt-pay-option:has(input:checked) { border-color: var(--yt-burgundy); background: #fff8f4; box-shadow: 0 0 0 3px rgba(242,176,138,.3); }
.yt-pay-option strong { display: block; color: var(--yt-burgundy); }
.yt-pay-option span { display: block; font-size: 13px; color: var(--yt-muted); margin-top: 2px; }

/* ---------- Tables ---------- */
.yt-table-wrap { overflow-x: auto; }
.yt-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.yt-table th, .yt-table td { text-align: left; padding: 13px 12px; border-bottom: 1px solid #f0e7e9; font-size: 14px; }
.yt-table th { background: var(--yt-cream-soft); color: var(--yt-burgundy); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }

/* ---------- Order tracking timeline ---------- */
.yt-timeline { list-style: none; margin: 0; padding: 0; }
.yt-timeline li { position: relative; padding: 0 0 20px 30px; font-size: 14px; }
.yt-timeline li::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: -2px; width: 2px; background: var(--yt-line); }
.yt-timeline li:last-child::before { display: none; }
.yt-timeline li::after { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--yt-line); }
.yt-timeline li.done::after { border-color: var(--yt-success); background: var(--yt-success); }
.yt-timeline li.current::after { border-color: var(--yt-burgundy); background: var(--yt-peach); box-shadow: 0 0 0 4px rgba(242,176,138,.35); }
.yt-timeline b { display: block; color: var(--yt-burgundy); }
.yt-timeline span { color: var(--yt-muted); font-size: 12px; }

/* ---------- Empty / success ---------- */
.yt-empty { text-align: center; padding: clamp(36px, 6vw, 64px) 22px; }
.yt-empty h2 { font: 600 clamp(28px, 4vw, 38px) var(--yt-serif); color: var(--yt-burgundy); margin: 8px 0; }
.yt-empty p { color: var(--yt-muted); max-width: 460px; margin: 0 auto 20px; }
.yt-empty .icon { width: 72px; height: 72px; border-radius: 50%; background: var(--yt-cream); color: var(--yt-burgundy); display: grid; place-items: center; margin: 0 auto 10px; font-size: 32px; }
.yt-empty .icon.ok { background: #e6f5ea; color: var(--yt-success); }
.yt-empty .icon.bad { background: #fdeaea; color: var(--yt-danger); }

/* ---------- Product grid (wishlist) ---------- */
.yt-grid-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 18px; }
.yt-product { background: #fff; border: 1px solid var(--yt-line); border-radius: 12px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.yt-product:hover { transform: translateY(-3px); box-shadow: var(--yt-shadow); }
.yt-product-img { aspect-ratio: 3/4; background: var(--yt-cream); overflow: hidden; display: block; }
.yt-product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.yt-product:hover .yt-product-img img { transform: scale(1.04); }
.yt-product-info { padding: 14px; }
.yt-product-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: #a06d64; }
.yt-product-name { display: block; font-weight: 600; color: var(--yt-burgundy); margin: 4px 0 6px; text-decoration: none; line-height: 1.4; }
.yt-product-price { font-weight: 700; color: var(--yt-burgundy); }
.yt-product-price s { color: #9a8e90; font-weight: 400; font-size: 13px; margin-left: 6px; }
.yt-product-actions { display: flex; gap: 8px; margin-top: 12px; }
.yt-product-actions form { flex: 1; margin: 0; }
.yt-product-actions .yt-btn { width: 100%; min-height: 40px; padding: 0 10px; font-size: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .yt-layout { grid-template-columns: 1fr; }
  .yt-sticky { position: static; }
  .yt-grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .yt-container { width: calc(100% - 24px); }
  .yt-grid-2 { grid-template-columns: 1fr; }
  .yt-card-title { padding: 15px 16px; font-size: 21px; }
  .yt-card-body { padding: 16px; }
  .yt-cart-item { grid-template-columns: 76px minmax(0, 1fr); padding: 14px 16px; }
  .yt-cart-photo { width: 76px; height: 92px; grid-row: span 2; }
  .yt-cart-line { grid-column: 2; display: flex; justify-content: space-between; align-items: center; text-align: left; }
  .yt-grid-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .yt-product-actions { flex-direction: column; }
  .yt-steps li + li::before { width: 12px; }
}

/* ---------- Shop / product listing ---------- */
.yt-filterbar { display: grid; grid-template-columns: 2fr 1.4fr .8fr .8fr 1.3fr auto auto; gap: 10px; margin-bottom: 14px; align-items: center; }
.yt-filterbar .yt-btn { min-height: 44px; padding: 0 18px; }
.yt-product-media { position: relative; }
.yt-tag { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 99px; font: 700 10px/1.4 var(--yt-sans); letter-spacing: .6px; text-transform: uppercase; background: var(--yt-burgundy); color: #fff; }
.yt-tag.sale { background: var(--yt-peach); color: var(--yt-burgundy); }
.yt-tag.out { background: #6b6366; }
.yt-wish { position: absolute; top: 8px; right: 8px; margin: 0; }
.yt-wish button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--yt-burgundy); font-size: 18px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.yt-wish button.on { color: #c2185b; }
.yt-pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 32px 0 6px; }
.yt-pager a { min-width: 38px; height: 38px; padding: 0 12px; display: inline-grid; place-items: center; border: 1px solid var(--yt-line); border-radius: 8px; color: var(--yt-burgundy); text-decoration: none; font-weight: 600; font-size: 14px; }
.yt-pager a.on, .yt-pager a:hover { background: var(--yt-burgundy); color: #fff; border-color: var(--yt-burgundy); }
@media (max-width: 980px) { .yt-filterbar { grid-template-columns: 1fr 1fr; } .yt-filterbar input[type=search] { grid-column: 1 / -1; } }

/* ---------- Product detail ---------- */
.yt-crumb { font-size: 12px; color: var(--yt-muted); margin: 0 0 18px; }
.yt-crumb a { color: var(--yt-burgundy); text-decoration: none; }
.yt-pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 5vw, 64px); align-items: start; margin-bottom: 56px; }
.yt-pdp-main { aspect-ratio: 4/5; background: var(--yt-cream); border-radius: 14px; overflow: hidden; }
.yt-pdp-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-pdp-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.yt-pdp-thumbs button { flex: 0 0 72px; height: 88px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--yt-cream); cursor: pointer; }
.yt-pdp-thumbs button.on { border-color: var(--yt-burgundy); }
.yt-pdp-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-pdp-info h1 { font: 600 clamp(34px, 4vw, 54px)/1.05 var(--yt-serif); color: var(--yt-burgundy); margin: 6px 0 12px; }
.yt-pdp-price { font-size: 26px; font-weight: 700; color: var(--yt-burgundy); }
.yt-pdp-price s { font-size: 16px; font-weight: 400; color: #9a8e90; margin-left: 8px; }
.yt-pdp-stock { font-size: 13px; color: var(--yt-success); margin: 8px 0 18px; font-weight: 600; }
.yt-pdp-stock.out { color: var(--yt-danger); }
.yt-sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.yt-sizes label { cursor: pointer; }
.yt-sizes input { position: absolute; opacity: 0; pointer-events: none; }
.yt-sizes span { display: inline-grid; place-items: center; min-width: 46px; height: 42px; padding: 0 12px; border: 1px solid var(--yt-line); border-radius: 8px; font-weight: 600; font-size: 14px; background: #fff; transition: all .15s; }
.yt-sizes input:checked + span { background: var(--yt-burgundy); color: #fff; border-color: var(--yt-burgundy); }
.yt-sizes input:focus-visible + span { outline: 2px solid var(--yt-peach); outline-offset: 2px; }
.yt-pdp-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.yt-pdp-actions .yt-btn { flex: 1 1 160px; }
.yt-btn[disabled] { opacity: .5; cursor: not-allowed; }
.yt-pdp-desc { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--yt-line); }
.yt-pdp-desc h2 { font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--yt-burgundy); margin: 0 0 10px; }
.yt-pdp-desc p { color: #665b5e; line-height: 1.9; font-size: 14px; margin: 0; }
.yt-section-title { font: 600 32px/1.2 var(--yt-serif); color: var(--yt-burgundy); margin: 0 0 18px; }
@media (max-width: 860px) { .yt-pdp { grid-template-columns: 1fr; } }

/* ---------- Account tabs / forms ---------- */
.yt-tabs { display: flex; gap: 4px; margin-bottom: 14px; background: var(--yt-cream); padding: 4px; border-radius: 999px; }
.yt-tabs a { flex: 1; text-align: center; padding: 10px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--yt-burgundy); text-decoration: none; }
.yt-tabs a.on { background: var(--yt-burgundy); color: #fff; }
.yt-form { display: grid; gap: 14px; }

/* ---------- Layout safety (prevents horizontal overflow on phones) ---------- */
.yt-filterbar > *, .yt-pdp > *, .yt-layout > *, .yt-grid-2 > * { min-width: 0; }
.yt-filterbar .yt-input, .yt-filterbar select { width: 100%; }
.yt-pdp-gallery, .yt-pdp-info { min-width: 0; max-width: 100%; }
.yt-main, .yt-container { max-width: 100%; }
@media (max-width: 640px) {
  .yt-filterbar { grid-template-columns: 1fr 1fr; gap: 8px; }
  .yt-filterbar input[type=search], .yt-filterbar select[name=category] { grid-column: 1 / -1; }
  .yt-filterbar .yt-btn { grid-column: auto; }
  .yt-pdp-actions .yt-btn { flex: 1 1 100%; }
}

/* Visually hidden radio inputs for size pickers (must not inherit the full-width field styles) */
.yt-sizes input[type=radio] { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; margin: 0; }
.yt-sizes label { position: relative; }
.yt-qty input { box-sizing: border-box; }

/* buttons never exceed their container */
.yt-btn, .yt-btn.block { box-sizing: border-box; max-width: 100%; }
