/* ============================================================
   shop-pages.css — cart, checkout, legal, status, feedback,
   customer account. PDP layout/styles live in shop-pdp.css.
   Tokens from theme.css.
   ============================================================ */

/* ---------- Cart ---------- */
.t-cart-shell { position: relative; z-index: 1; }
.t-cart-title { font-size: clamp(1.6rem, 2vw + 1rem, 2.2rem); font-weight: 900; margin-bottom: 24px; }
.t-cart-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 18px; }
@media (min-width: 900px) { .t-cart-grid { grid-template-columns: minmax(0,1fr) 340px; align-items: start; } }
.t-cart-items { display: flex; flex-direction: column; gap: 14px; }
.t-cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 16px; }
.t-cart-item-media { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(150deg, #2a2158, #17123a); }
.t-cart-item-media img { width: 100%; height: 100%; object-fit: cover; }
.t-cart-item-name { font-weight: 800; }
.t-cart-item-variant, .t-cart-item-qty { color: var(--t-muted); font-size: 0.84rem; font-weight: 500; margin-top: 2px; }
.t-cart-item-price { color: var(--t-accent); font-weight: 900; font-size: 1.05rem; }
.t-cart-empty { text-align: center; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.t-cart-empty-ico { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; color: var(--t-accent); background: rgba(var(--t-accent-rgb),0.12); }
.t-cart-empty h3 { font-weight: 900; } .t-cart-empty p { color: var(--t-muted); font-weight: 500; }
.t-cart-empty .t-btn { margin-top: 8px; }
.t-cart-summary { position: static; }
@media (min-width: 900px) { .t-cart-summary { position: sticky; top: calc(var(--t-nav-h) + 18px); } }
.t-cart-summary-title { font-weight: 900; font-size: 1.1rem; margin-bottom: 16px; }
.t-cart-summary-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--t-muted); font-weight: 600; }
.t-cart-summary-row strong { color: var(--t-text); }
.t-cart-discount { color: var(--t-green) !important; }
.t-cart-summary-total { border-top: 1px solid var(--t-border-subtle); margin-top: 6px; padding-top: 14px; font-size: 1.1rem; }
.t-cart-summary-total strong { color: var(--t-accent); font-weight: 900; }
.t-cart-checkout { width: 100%; margin: 16px 0 12px; height: 48px; }
.t-cart-loading { display: flex; justify-content: center; padding: 60px 0; color: var(--t-accent); }
.t-spin { animation: t-spin 0.9s linear infinite; }
@keyframes t-spin { to { transform: rotate(360deg); } }
.t-cart-item-info { min-width: 0; }
a.t-cart-item-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.t-cart-item-name:hover { color: var(--t-accent); }
.t-cart-item-controls { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.t-cart-qty { height: 38px; }
.t-cart-qty button { width: 36px; height: 36px; font-size: 1.1rem; }
.t-cart-qty input { width: 44px; height: 36px; }
.t-cart-remove { color: var(--t-muted); font-size: 0.84rem; font-weight: 600; }
.t-cart-remove:hover { color: #ff6b6b; }
.t-cart-item-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.t-cart-item-each { color: var(--t-muted); font-size: 0.74rem; font-weight: 500; }
.t-cart-messages { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.t-cart-message { font-size: 0.86rem; color: var(--t-amber, #f5c451); border: 1px solid rgba(245,196,81,0.3);
  background: rgba(245,196,81,0.06); border-radius: 10px; padding: 8px 12px; font-weight: 600; }

/* ---------- Feedback page (pagination) ---------- */
/* Sort links were replaced by the client-side category tabs (#fb-tabs, .t-cat-tab in theme.css). */
.t-fb-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; }
/* display:flex overrides the UA [hidden] rule — force it so theme-vouches.js can hide server paging. */
#fb-pagination[hidden] { display: none !important; }
.t-fb-pag-info { color: var(--t-muted); font-size: 0.88rem; font-weight: 500; }
.t-fb-pag-links { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.t-fb-pag-link { min-width: 40px; height: 40px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--t-border-subtle); background: rgba(255,255,255,0.02);
  color: var(--t-muted); font-weight: 700; font-size: 0.9rem; transition: color .15s, background .15s, border-color .15s; }
.t-fb-pag-link:hover { color: var(--t-text); border-color: var(--t-border-hover); background: rgba(var(--t-accent-rgb),0.08); }
.t-fb-pag-link.is-active { color: #fff; background: var(--t-accent); border-color: var(--t-accent); }
.t-fb-pag-link.is-disabled { opacity: 0.4; pointer-events: none; }
.t-fb-pag-link.is-ellipsis { border: 0; background: transparent; pointer-events: none; }
@media (max-width: 620px) { .t-fb-pagination { justify-content: center; } .t-fb-pag-info { width: 100%; text-align: center; } }

/* ---------- Legal / prose ---------- */
.t-legal-shell { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.t-legal-title { font-size: clamp(1.7rem, 2vw + 1rem, 2.4rem); font-weight: 900; letter-spacing: -0.02em; margin-bottom: 8px; }
.t-legal-prose { color: var(--t-muted); font-weight: 500; line-height: 1.75; margin-top: 18px; }
.t-legal-prose h1 { color: var(--t-text); font-size: 1.5rem; font-weight: 900; margin: 8px 0 14px; letter-spacing: -0.02em; }
.t-legal-prose h2, .t-legal-prose h3, .t-legal-prose h4 { color: var(--t-text); margin: 26px 0 10px; font-weight: 800; }
.t-legal-prose h3 { font-size: 1.12rem; }
.t-legal-prose p { margin-bottom: 16px; }
.t-legal-prose strong, .t-legal-prose b { color: var(--t-text); font-weight: 800; }
.t-legal-prose a { color: var(--t-accent); font-weight: 700; }
.t-legal-prose a:hover { text-decoration: underline; }
.t-legal-prose ul, .t-legal-prose ol { padding-left: 20px; margin-bottom: 16px; } .t-legal-prose li { margin-bottom: 8px; }
.t-legal-prose blockquote { margin: 14px 0; padding: 12px 16px; border-left: 3px solid var(--t-accent);
  background: rgba(var(--t-accent-rgb),0.06); border-radius: 0 10px 10px 0; color: var(--t-text); }
.t-legal-prose blockquote p:last-child { margin-bottom: 0; }
.t-legal-prose code { font-family: var(--t-font-mono, monospace); font-size: 0.86em; padding: 2px 6px;
  border-radius: 6px; background: rgba(255,255,255,0.06); color: var(--t-text); }
.t-legal-prose hr { border: 0; border-top: 1px solid var(--t-border-subtle); margin: 22px 0; }
.t-legal-prose img { max-width: 100%; border-radius: 8px; }

/* ---------- Maintenance ---------- */
.t-maint-shell { position: relative; z-index: 1; max-width: 520px; margin: 40px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.t-maint-mark { width: 54px; height: 54px; border-radius: 16px; font-size: 1.4rem; margin-bottom: 6px; }
.t-maint-body { color: var(--t-muted); font-weight: 500; }
.t-maint-shell .t-btn { margin-top: 8px; }

/* ---------- Status ---------- */
.t-status-sub { color: var(--t-muted); font-weight: 500; margin-bottom: 22px; }
.t-status-list { display: flex; flex-direction: column; gap: 12px; }
.t-status-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
.t-status-name { font-weight: 700; }
.t-status-state { display: inline-flex; align-items: center; gap: 8px; color: var(--t-green); font-weight: 700; font-size: 0.88rem; }
.t-status-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--t-green); box-shadow: 0 0 10px var(--t-green); }
.t-status-state.is-down { color: #ff6b6b; } .t-status-state.is-down i { background: #ff6b6b; box-shadow: 0 0 10px #ff6b6b; }

/* ---------- Account ---------- */
.t-account-shell { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 860px) { .t-account-shell { grid-template-columns: 220px 1fr; align-items: start; } }
.t-account-nav { display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 860px) { .t-account-nav { flex-direction: column; position: sticky; top: calc(var(--t-nav-h) + 18px); } }
.t-account-link { padding: 10px 14px; border-radius: 10px; color: var(--t-muted); font-weight: 600; font-size: 0.92rem; border: 1px solid transparent; }
.t-account-link:hover { color: var(--t-text); background: rgba(255,255,255,0.04); }
.t-account-link.is-active { color: var(--t-text); background: rgba(var(--t-accent-rgb),0.12); border-color: rgba(var(--t-accent-rgb),0.35); }
.t-account-main .t-legal-title { margin-bottom: 20px; }
.t-account-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 560px) { .t-account-cards { grid-template-columns: 1fr; } }
.t-account-cards .t-pdp-card { padding: 20px; }
.t-account-stat { font-size: 1.8rem; font-weight: 900; }
.t-account-stat-label { color: var(--t-muted); font-size: 0.84rem; font-weight: 600; margin-top: 4px; }
.t-account-welcome h3 { font-weight: 900; } .t-account-welcome p { color: var(--t-muted); font-weight: 500; margin: 10px 0 16px; }
.t-account-list { display: flex; flex-direction: column; gap: 12px; }
.t-account-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; }
.t-account-row-title { font-weight: 800; } .t-account-row-sub { color: var(--t-muted); font-size: 0.84rem; margin-top: 2px; font-weight: 500; }
.t-account-row-meta { display: flex; align-items: center; gap: 14px; } .t-account-row-meta strong { color: var(--t-accent); font-weight: 900; }
.t-account-empty { text-align: center; color: var(--t-muted); font-weight: 500; padding: 32px; } .t-account-empty a { color: var(--t-accent); }

/* ---------- Checkout (minimal restyle) ---------- */
.checkout-page input:focus, .checkout-page select:focus, .checkout-page textarea:focus {
  border-color: color-mix(in srgb, var(--t-accent) 50%, transparent) !important;
  box-shadow: 0 0 0 3px var(--t-accent-soft) !important; outline: none !important;
}
.checkout-page .btn-primary, .checkout-page button[type="submit"] {
  background: linear-gradient(180deg, var(--t-accent-hover), var(--t-accent)) !important;
  border-radius: var(--t-radius-btn) !important; border: 0 !important;
}
