/* ==========================================================================
   PhoneBazaar storefront: extends the AiNa design system in app.css
   (same tokens + component classes; only store-specific layout lives here).
   ========================================================================== */
:root { --accent: #0f9d58; --accent-hover: #0b7d46; --accent-soft: #e7f6ee; }
@media (prefers-color-scheme: dark) { :root { --accent: #3ddc84; --accent-hover: #2fbf71; --accent-soft: #12271c; --accent-text: #06210f; } }
.sidebar__brand .logo, .shop-logo .logo { background: linear-gradient(135deg, #0f9d58, #3ddc84); }

body.store { font-size: 15px; }
.shop-wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.shop-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(150%) blur(8px); border-bottom: 1px solid var(--border); }
.shop-header__inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.shop-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text); letter-spacing: -0.02em; }
.shop-logo:hover { text-decoration: none; }
.shop-logo .logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 800; }
.shop-search { flex: 1; max-width: 460px; }
.shop-search .input { border-radius: 999px; padding-left: 16px; background: var(--surface-2); border-color: transparent; }
.shop-nav { display: flex; gap: 4px; margin-left: auto; }
.shop-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; color: var(--text-muted); font-weight: 600; }
.shop-nav a:hover, .shop-nav a.on { background: var(--surface-2); color: var(--text); text-decoration: none; }
.pill { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: 11.5px; display: inline-grid; place-items: center; color: var(--text); }
.pill--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.shop-main { padding-top: 28px; padding-bottom: 56px; min-height: 60vh; }
.shop-main h1 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.02em; }
.shop-footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--text-muted); font-size: 13px; background: var(--surface); }
.shop-footer a { color: var(--text-muted); margin-left: 14px; }
@media (max-width: 720px) {
  .shop-header__inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
  .shop-search { order: 3; flex-basis: 100%; max-width: none; }
  .shop-nav a { padding: 6px 9px; }
}

.hero { background: radial-gradient(1200px 400px at 80% 0%, #3ddc8433, transparent), linear-gradient(135deg, #062b1a, #0b5d36 55%, #0f9d58);
  color: #fff; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.hero h1 { color: #fff; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -0.03em; margin: 14px 0; font-weight: 800; }
.hero p { font-size: 17px; opacity: .88; max-width: 520px; }
.hero__kicker { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(255,255,255,.14); padding: 5px 12px; border-radius: 999px; }
.hero__devices { display: flex; justify-content: center; align-items: flex-end; gap: 18px; filter: drop-shadow(0 24px 30px rgba(0,0,0,.35)); }
.hero__devices svg:nth-child(1) { transform: rotate(-8deg) translateY(10px); }
.hero__devices svg:nth-child(3) { transform: rotate(8deg) translateY(10px); }
.btn--lg { padding: 11px 20px; font-size: 14.5px; border-radius: 10px; }
.btn--light { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.btn--light:hover { background: rgba(255,255,255,.2); }
.btn--on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 820px) { .hero__inner { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 36px; } .hero__devices { display: none; } }

.section-title { font-size: 20px; margin: 0 0 14px; letter-spacing: -0.02em; }
.brand-row { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-chip { padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.brand-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--3 h3 { margin-bottom: 6px; }

.pgrid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.pcard { display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.pcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.pcard__img { display: grid; place-items: center; padding: 18px 0 10px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.pcard__body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.pcard__body h3 { font-size: 16px; margin: 2px 0 8px; }
.pcard__body h3 a { color: var(--text); }
.pcard__brand { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pcard__actions { margin-top: auto; padding-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-muted); font-weight: 600; }
.price { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.price--lg { font-size: 30px; margin-top: 10px; }
.cmp-form { margin: 0; }

.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: start; }
.filters { position: sticky; top: 84px; }
.filters fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.filters legend { font-size: 13px; font-weight: 550; margin-bottom: 6px; }
.check { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
@media (max-width: 860px) { .catalog { grid-template-columns: 1fr; } .filters { position: static; } }

.crumbs { font-size: 13px; color: var(--text-faint); margin-bottom: 16px; }
.detail { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 32px; align-items: start; }
.detail__img { display: grid; place-items: center; padding: 32px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); position: sticky; top: 84px; }
.detail__title { font-size: clamp(26px, 3.4vw, 36px) !important; margin: 4px 0 10px; }
.spec th { width: 38%; text-transform: none; letter-spacing: 0; font-size: 13px; background: transparent; color: var(--text-muted); border-bottom: 1px solid var(--border); }
@media (max-width: 820px) { .detail { grid-template-columns: 1fr; } .detail__img { position: static; } .detail__img svg { height: 220px; } }

.cmp-wrap { overflow-x: auto; }
.cmp th:first-child { width: 160px; }
.cmp thead th { text-transform: none; letter-spacing: 0; background: var(--surface); vertical-align: bottom; }
.cmp__head { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text); font-size: 14px; font-weight: 700; text-align: center; }
.cmp tbody th { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text-muted); background: var(--surface-2); }
.cmp td { text-align: center; font-size: 14px; }
.cmp td.win { background: var(--success-soft); color: var(--success); font-weight: 700; }

.demo-banner { background: var(--warning-soft); color: #8a4b00; border: 1px solid #fedf89; padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13.5px; margin-bottom: 18px; }
@media (prefers-color-scheme: dark) { .demo-banner { background: #2a1f0a; color: #fdb022; border-color: #4a3510; } }
.alert { background: var(--danger-soft); color: var(--danger); padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 600; }
.checkout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.summary { position: sticky; top: 84px; }
.summary .row { padding: 4px 0; }
.summary hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
.summary .total { font-size: 17px; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } .summary { position: static; } }
.cart-line { display: grid; grid-template-columns: 56px 1fr auto auto auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.cart-line:last-child { border-bottom: 0; }
.cart-line__total { min-width: 90px; text-align: right; }
@media (max-width: 600px) { .cart-line { grid-template-columns: 48px 1fr auto; } .cart-line__total { grid-column: 2; text-align: left; } }
.is-bad { border-color: var(--danger) !important; }
.err { color: var(--danger); font-size: 12.5px; margin-top: 4px; }
.confirm { max-width: 720px; margin: 0 auto; }
.confirm__tick { width: 52px; height: 52px; border-radius: 999px; background: var(--success-soft); color: var(--success); display: grid; place-items: center; font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.login { max-width: 400px; margin: 40px auto; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 16px; }
input[type=color].input { height: 40px; padding: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pcard .btn { white-space: nowrap; padding: 8px 10px; }
