/* TitanX Storefront: what only the shop needs. The tokens, type, controls,
   header, notices and footer come from the shared tx/css/base.css. */
.cartlink .n { background: var(--fill); color: #fff; border-radius: 99px; font-size: .75rem; min-width: 1.4rem; height: 1.4rem; display: inline-grid; place-items: center; margin-left: .35rem; padding: 0 .3rem; }
.search { display: flex; gap: .4rem; flex: 1 1 100%; order: 5; }
@media (min-width: 760px) { .search { flex: 0 1 20rem; order: 0; } }

/* Shop home */
.hero { background: var(--surface); border-radius: 1.5rem; box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1.5rem; display: grid; gap: 1rem; }
.hero h1 { font-size: 1.9rem; margin-bottom: .25rem; }
.facts { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-size: .95rem; }
.hours { width: 100%; max-width: 20rem; border-collapse: collapse; font-size: .9rem; }
.hours th { text-align: left; font-weight: 500; color: var(--ink-2); padding: .15rem 1rem .15rem 0; }
.hours td { padding: .15rem 0; }
@media (min-width: 760px) { .hero { grid-template-columns: 1.4fr 1fr; padding: 1.75rem; } }
.cats { display: flex; gap: .5rem; overflow-x: auto; padding: .35rem .35rem 1rem; margin: -.35rem -.35rem .5rem; scrollbar-width: thin; }

/* Product grid */
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 1.5rem 0 .75rem; }
.grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card { display: block; color: inherit; text-decoration: none; }
.card .ph { aspect-ratio: 1; border-radius: var(--r-lg); background: var(--line); overflow: hidden; transition: transform .2s var(--ease); }
.card:hover .ph { transform: scale(1.01); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .ph.none { display: grid; place-items: center; color: var(--ink-2); font-size: 2rem; font-weight: 700; background: var(--brand-soft); }
.card h3 { margin: .5rem 0 .1rem; font-size: .95rem; font-weight: 600; }
.card:hover h3 { text-decoration: underline; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; }
.price small { font-weight: 400; color: var(--ink-2); }

/* Product page */
.pdp { display: grid; gap: 1.5rem; }
@media (min-width: 820px) { .pdp { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.gallery .main { display: block; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--line); cursor: zoom-in; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: .5rem; margin-top: .5rem; overflow-x: auto; }
.thumbs a { flex: none; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.big-price { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; margin: .5rem 0; }
.buy { display: flex; gap: .75rem; align-items: flex-end; margin: 1rem 0; }
.buy .qty { width: 5.5rem; }

/* Cart + checkout */
.two { display: grid; gap: 1.5rem; }
@media (min-width: 860px) { .two { grid-template-columns: 1.5fr 1fr; align-items: start; } }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: grid; grid-template-columns: 64px 1fr auto; gap: .75rem; padding: .85rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.lines li:last-child { border-bottom: 0; }
.lines .thumb { width: 64px; height: 64px; border-radius: 8px; background: var(--brand-soft); object-fit: cover; }
.lines form.inline { display: flex; gap: .4rem; align-items: center; margin-top: .3rem; }
.lines input[type=number] { width: 4.5rem; min-height: 44px; }
.linkbtn { background: none; border: 0; color: var(--brand-strong); text-decoration: underline; font: inherit; cursor: pointer; min-height: 44px; padding: 0 .5rem; }
.totals { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.totals td { padding: .3rem 0; } .totals td:last-child { text-align: right; }
.totals tr.grand td { border-top: 1px solid var(--line); padding-top: .6rem; font-weight: 700; font-size: 1.15rem; }
.choice { display: flex; gap: .75rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: .75rem; margin-bottom: .5rem; cursor: pointer; background: var(--surface); }
.choice input { width: 1.25rem; min-height: 0; height: 1.25rem; margin-top: .15rem; flex: none; accent-color: var(--brand); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice b { display: block; } .choice span { color: var(--ink-2); font-size: .9rem; }
.steps { display: grid; gap: .5rem; padding-left: 1.2rem; }

/* Order status */
.status-line { display: flex; gap: .5rem; flex-wrap: wrap; margin: .5rem 0 1rem; }

/* Footer */

/* Header on a phone: brand + cart on one row, links scroll, search below. */
.cartnav { order: 2; }
.nav.main { order: 3; flex: 1 1 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; margin: 0 -.5rem; }
.nav.main a { white-space: nowrap; }
@media (min-width: 760px) { .cartnav { order: 4; } .nav.main { order: 2; flex: 0 1 auto; margin: 0; } .brand { margin-right: auto; } }
.lines.nothumb li { grid-template-columns: 1fr auto; }
.grid { margin-bottom: 2rem; }
.hero .facts + p { margin-top: 1.25rem !important; }
.lines li > * { min-width: 0; }
.lines form.inline { flex-wrap: wrap; }
.choice b { color: var(--ink); }
@media (min-width: 760px) { .search { order: 3; } .cartnav { order: 4; } }
@media (min-width: 860px) { .two > aside { position: sticky; top: 1rem; } }
/* Apple family pass (S1): soft cards in dark mode get a hairline instead of a shadow. */
@media (prefers-color-scheme: dark) { .hero { box-shadow: none; border: 1px solid var(--line); } }
