/* ==========================================================================
   SunTeam v2 — Shop / Product / Cart
   ========================================================================== */

.crumbs-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); margin-bottom: 14px; }
.crumbs-row a:hover { color: var(--text); }
.crumbs-row span { color: var(--text-2); }

.flash { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--r-md); margin-bottom: 18px; font-weight: 600; font-size: var(--fs-sm); line-height: 1.9; }
.flash-ok { background: var(--mint-soft); color: var(--mint); }
.flash-bad { background: var(--rose-soft); color: var(--rose); }
.flash-info { background: var(--sky-soft); color: var(--sky); }
.flash-link { margin-inline-start: auto; font-weight: 800; text-decoration: underline; }

.empty-block { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 56px 20px; border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.empty-ico { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--amber-soft); color: var(--accent-ink); margin-bottom: 4px; }

/* ---------- shop header ---------- */
.shop-hero { position: relative; padding: 16px 0 20px; overflow: hidden; }
.shop-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.shop-search { display: flex; align-items: center; gap: 8px; width: min(440px, 100%); height: 52px; padding: 6px 16px 6px 6px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong), var(--sh-1); }
.shop-search .ic { color: var(--text-3); flex: none; }
.shop-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; }
.shop-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--sun-500), 0 0 0 4px rgba(255,212,0,.2); }
.chip-rail { gap: 8px; padding-bottom: 6px; }
.chip-rail .chip .ic { color: var(--accent-ink); }
.chip-rail .chip.is-active .ic { color: var(--sun-400); }
.subcats { margin-top: 12px; }
.subcats summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font-size: var(--fs-sm); font-weight: 700; color: var(--text-2); padding: 6px 2px; }
.subcats summary::-webkit-details-marker { display: none; }
.subcats[open] summary .chev { transform: rotate(180deg); }
.subcats-list { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.subcats-list .chip { height: 32px; font-size: var(--fs-xs); }

.p-tax { font-size: 11px; font-weight: 600; color: var(--text-3); }

/* ---------- pagination (Laravel bootstrap markup) ---------- */
.pager { display: flex; justify-content: center; margin-top: 36px; }
.pager .pagination { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.pager .page-link, .pager .pagination li > span, .pager .pagination li > a {
  min-width: 44px; height: 44px; padding: 0 12px; display: grid; place-items: center; border-radius: 14px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; color: var(--text-2); transition: all .2s;
}
.pager .page-link:hover { box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); }
.pager .active .page-link, .pager .active > span { background: var(--ink-900); color: #fff; box-shadow: none; }
.pager .disabled .page-link, .pager .disabled > span { opacity: .4; }

/* ---------- product page ---------- */
.pdp { padding: 16px 0 24px; }
.pdp-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: start; }
.pdp-media { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 14px; }
.pdp-stage { position: relative; aspect-ratio: 1; border-radius: var(--r-xl); background: #fff; box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; }
.pdp-stage img { width: 86%; height: 86%; object-fit: contain; transition: transform .6s var(--ease); }
.pdp-stage:hover img { transform: scale(1.08); }
.pdp-badge { position: absolute; top: 18px; inset-inline-start: 18px; width: 72px; height: 72px; border-radius: 50%; background: var(--sun-400); color: var(--ink-900); display: grid; place-items: center; align-content: center; font-weight: 900; font-size: 1.15rem; line-height: 1.1; box-shadow: var(--sh-sun); transform: rotate(-10deg); }
.pdp-badge small { font-size: .65rem; font-weight: 700; }
.pdp-perks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pdp-perks div { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-sm); font-weight: 700; color: var(--text-2); }
.pdp-perks .ic { color: var(--accent-ink); }
.pdp-info { display: flex; flex-direction: column; gap: 16px; }
.pdp-title { font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); font-weight: 900; line-height: 1.6; }
.pdp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: var(--fs-sm); }
.pdp-price { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.pdp-price .price strong { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }
.pdp-price .price del { font-size: var(--fs-sm); }
.pdp-tax { font-size: var(--fs-sm); color: var(--text-2); margin: 0; }
.pdp-points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px 0; border-block: 1px dashed var(--line-strong); }
.pdp-points div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.pdp-points span { font-size: var(--fs-xs); color: var(--text-3); font-weight: 700; }
.pdp-points b { font-size: var(--fs-md); font-weight: 800; }
.pdp-buy { border-radius: var(--r-lg); transition: box-shadow .3s; }
.pdp-buy.flash-ring { box-shadow: 0 0 0 4px rgba(255,212,0,.5); }
.pdp-buy-form { display: flex; gap: 10px; align-items: stretch; }
.pdp-note { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-sunk); font-size: var(--fs-sm); color: var(--text-2); line-height: 1.9; }
.pdp-note .ic { color: var(--sky); flex: none; margin-top: 4px; }
.pdp-desc { margin-top: 32px; padding: clamp(20px, 3vw, 36px); }
.prose { line-height: 2.1; color: var(--text-2); font-size: var(--fs-md); overflow-wrap: anywhere; }
.prose img { border-radius: var(--r-md); height: auto; margin: 12px auto; }
.prose p { margin-bottom: 12px; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--text); margin: 18px 0 8px; font-size: var(--fs-lg); }
.prose ul, .prose ol { padding-inline-start: 22px; margin-bottom: 12px; list-style: disc; }
.prose table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.prose td, .prose th { border: 1px solid var(--line-strong); padding: 8px 10px; }
.prose * { font-family: var(--font) !important; max-width: 100%; }

.qty { display: inline-flex; align-items: center; height: 56px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); padding: 4px; flex: none; }
.qty button { width: 44px; height: 100%; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); transition: background .2s; }
.qty button:hover { background: var(--surface); color: var(--text); }
.qty input { width: 46px; text-align: center; border: 0; outline: 0; background: none; font-weight: 800; font-size: var(--fs-lg); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm { height: 42px; }
.qty-sm button { width: 34px; }
.qty-sm input { width: 34px; font-size: var(--fs-md); }
.qty.is-busy { opacity: .55; pointer-events: none; }

.buybar { display: none; }
@media (max-width: 960px) {
  .pdp-grid { grid-template-columns: 1fr; gap: 20px; }
  .pdp-media { position: static; }
  .buybar { position: fixed; inset-inline: 12px; bottom: 90px; z-index: 55; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 22px; }
  .buybar .price strong { font-size: var(--fs-lg); }
  .pdp { padding-bottom: 80px; }
}
@media (max-width: 560px) {
  .pdp-buy-form { flex-direction: column; }
  .pdp-buy-form .qty { align-self: stretch; justify-content: space-between; }
  .pdp-perks div { font-size: var(--fs-xs); padding: 10px; }
}

/* ---------- cart ---------- */
.cart-page { padding: 16px 0 24px; }
.checkout-steps { display: flex; align-items: center; gap: 10px; margin: 6px 0 24px; font-size: var(--fs-sm); font-weight: 700; color: var(--text-3); flex-wrap: wrap; }
.checkout-steps span { display: inline-flex; align-items: center; gap: 8px; }
.checkout-steps b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-sunk); font-size: var(--fs-xs); }
.checkout-steps span.is-active { color: var(--text); }
.checkout-steps span.is-active b { background: var(--sun-400); color: var(--ink-900); }
.checkout-steps i { flex: 0 1 60px; height: 2px; border-radius: 2px; background: var(--line-strong); }
.cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-item { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.cart-item:hover { box-shadow: var(--sh-2), inset 0 0 0 1px var(--line); }
.cart-thumb { width: 112px; height: 112px; border-radius: var(--r-md); background: #fff; box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; }
.cart-thumb img { width: 92%; height: 92%; object-fit: contain; }
.cart-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cart-title { font-weight: 800; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-title:hover { color: var(--accent-ink); }
.cart-sub { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; }
.cart-unit { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: var(--fs-sm); }
.cart-unit del { color: var(--text-3); font-size: var(--fs-xs); }
.cart-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; position: relative; padding-inline-end: 40px; }
.cart-total { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.5; }
.cart-total .muted { font-size: var(--fs-xs); color: var(--mint); font-weight: 700; }
.cart-total b { font-size: var(--fs-lg); font-weight: 900; }
.cart-total small { font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; }
.cart-del { position: absolute; top: 0; inset-inline-end: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); transition: all .2s; }
.cart-del:hover { background: var(--rose-soft); color: var(--rose); }
.cart-summary { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 12px; }
.summary-card { padding: 22px; }
.sum-rows { margin: 0 0 14px; display: flex; flex-direction: column; gap: 10px; }
.sum-rows div { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-sm); color: var(--text-2); }
.sum-rows dt { font-weight: 600; }
.sum-rows dd { margin: 0; font-weight: 700; }
.sum-rows .is-saving { color: var(--mint); }
.sum-rows .is-total { padding-top: 12px; border-top: 1px dashed var(--line-strong); color: var(--text); font-size: var(--fs-lg); }
.sum-rows .is-total dd { font-weight: 900; }
.sum-rows .is-total small { font-size: var(--fs-xs); color: var(--text-3); }
.sum-points { display: flex; gap: 8px; margin-bottom: 14px; }
.sum-points span { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--fs-xs); font-weight: 800; color: var(--text-2); }
.weight { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-size: var(--fs-xs); font-weight: 700; color: var(--text-3); }
.support-card { display: flex; align-items: center; gap: 12px; padding: 16px; }
.support-card .kpi-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--amber-soft); color: var(--accent-ink); flex: none; }
.support-card b { display: block; }
.support-card span { font-size: var(--fs-sm); color: var(--text-3); }
@media (max-width: 1020px) {
  .cart-grid { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}
@media (max-width: 600px) {
  .cart-item { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
  .cart-thumb { width: 84px; height: 84px; }
  .cart-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; padding-inline-end: 0; }
  .cart-del { position: static; }
  .cart-total { align-items: flex-start; }
}

/* ---------- checkout / payment ---------- */
.checkout-steps span.is-done { color: var(--text-2); }
.checkout-steps span.is-done b { background: var(--mint); color: #fff; }
.checkout-steps i.is-done { background: var(--mint); }

.addr-list { display: grid; gap: 10px; }
.addr-list.is-busy { opacity: .55; pointer-events: none; }
.addr-card { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow .2s, background .2s; }
.addr-card:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.addr-card input { position: absolute; opacity: 0; pointer-events: none; }
.addr-card.is-static { cursor: default; }
.addr-check { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--line-strong); color: transparent; margin-top: 2px; transition: all .2s; }
.addr-card input:checked ~ .addr-check, .pay-card input:checked ~ .addr-check { background: var(--sun-400); box-shadow: none; color: var(--ink-900); }
.addr-card:has(input:checked) { background: var(--surface); box-shadow: inset 0 0 0 2px var(--sun-500), var(--sh-1); }
.addr-card input:focus-visible ~ .addr-check { outline: 2.5px solid var(--sun-500); outline-offset: 2px; }
.addr-body { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.9; }
.addr-body b { color: var(--text); font-size: var(--fs-md); }
.addr-empty { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px; border-radius: var(--r-md); border: 2px dashed var(--line-strong); background: none; text-align: center; transition: border-color .2s, background .2s; }
.addr-empty:hover { border-color: var(--sun-500); background: var(--amber-soft); }

.mini-items { display: flex; flex-direction: column; }
.mini-item { display: flex; align-items: center; gap: 14px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.mini-item:last-child { border-bottom: 0; }
.mini-item b { display: block; font-size: var(--fs-sm); line-height: 1.7; }
.mini-item .muted { font-size: var(--fs-xs); }
.mini-thumb { width: 60px; height: 60px; flex: none; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; }
.mini-thumb img { width: 90%; height: 90%; object-fit: contain; }
.mini-price { display: flex; flex-direction: column; align-items: flex-end; font-size: var(--fs-sm); white-space: nowrap; }
.mini-price del { font-size: var(--fs-xs); color: var(--text-3); }

.pay-list { display: grid; gap: 10px; }
.pay-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow .2s, background .2s; }
.pay-card:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.pay-card input { position: absolute; opacity: 0; pointer-events: none; }
.pay-card:has(input:checked) { background: var(--surface); box-shadow: inset 0 0 0 2px var(--sun-500), var(--sh-1); }
.pay-card input:focus-visible ~ .addr-check { outline: 2.5px solid var(--sun-500); outline-offset: 2px; }
.pay-logo { width: 52px; height: 52px; flex: none; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; overflow: hidden; }
.pay-logo img { width: 80%; height: 80%; object-fit: contain; }
.pay-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pay-body b { font-size: var(--fs-md); }
.pay-body span { font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; }
.pay-card .addr-check { margin: 0; }

.promo-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 20px; }
.promo-card .kpi-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.promo-input { display: flex; gap: 8px; flex: 1 1 260px; }
.promo-input .input { height: 46px; }

.items-details { padding: 18px 22px; }
.items-details summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.items-details summary::-webkit-details-marker { display: none; }
.items-details[open] summary .chev { transform: rotate(180deg); }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; font-size: var(--fs-xs); color: var(--text-3); font-weight: 600; }

/* native dialog sheet */
.sheet { width: min(640px, calc(100% - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: var(--r-xl); background: var(--surface); color: var(--text); box-shadow: var(--sh-3); overflow: auto; }
.sheet::backdrop { background: rgba(10,11,14,.5); backdrop-filter: blur(4px); }
.sheet[open] { animation: sheet-in .3s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet-body { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.sheet-head, .sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-foot { justify-content: flex-end; padding-top: 6px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid select.input { appearance: auto; }
.field-hint { margin: -6px 0 0; font-size: var(--fs-xs); color: var(--rose); font-weight: 600; }
.map-box { height: 240px; border-radius: var(--r-md); overflow: hidden; background: var(--surface-sunk); box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .sheet { width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
}

/* order result */
.result-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: clamp(28px, 5vw, 56px) 20px; border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); position: relative; overflow: hidden; isolation: isolate; }
.result-hero::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; top: -260px; filter: blur(60px); opacity: .45; z-index: -1; }
.result-hero.is-ok::before { background: var(--sun-300); }
.result-hero.is-bad::before { background: #FFB4AE; }
.result-hero .lead { max-width: 620px; }
.result-ico { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; animation: pop .5s var(--ease); }
.result-ico .ic { width: 42px; height: 42px; stroke-width: 2.6; }
.is-ok .result-ico { background: var(--mint); color: #fff; box-shadow: 0 0 0 10px var(--mint-soft); }
.is-bad .result-ico { background: var(--rose); color: #fff; box-shadow: 0 0 0 10px var(--rose-soft); }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: none; opacity: 1; } }
.result-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.result-meta span { padding: 8px 14px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-sm); color: var(--text-2); }
