/* Brian's Smart Home: shop pages. Uses the tokens from styles.css (:root). */

.crumbs { padding: 28px 0 8px; color: var(--dim); font-size: .95rem; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { margin: 0 6px; }

.kicker.small { font-size: .8rem; }

/* shop grid + cards */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin: 8px 0 48px; }
.shop-grid.small { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 8px; }
.shop-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s, box-shadow .2s; }
.shop-card:hover { border-color: rgba(2, 213, 253, .55); transform: translateY(-3px); box-shadow: 0 14px 40px rgba(0, 0, 0, .35); color: var(--text); }
.shop-card .pic { position: relative; aspect-ratio: 4 / 3; background: #cfcfcf; overflow: hidden; }
.shop-card .pic img { width: 100%; height: 100%; object-fit: cover; }
.shop-card .body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.shop-card h2, .shop-card h3 { font-size: 1.28rem; line-height: 1.25; letter-spacing: -.01em; }
.shop-card p { color: var(--muted); font-size: .98rem; }
.shop-card .more { margin-top: auto; font-weight: 800; color: var(--accent); }
.badge { position: absolute; left: 12px; top: 12px; background: var(--accent-2); color: #03111f; font-weight: 800; font-size: .82rem; padding: 6px 12px; border-radius: 999px; }
.price { color: var(--text) !important; font-size: 1.45rem !important; font-weight: 800; letter-spacing: -.01em; }
.price.big { font-size: 2.1rem !important; margin: 4px 0 14px; }

/* the site gives every <section> 80px of padding; the shop sections manage their own spacing */
.how, .note-box, .pdp-body > section { padding: 0; }

/* how it works */
.how { margin: 8px 0 36px; }
.how h2, .note-box h2, .pdp-body h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.015em; margin-bottom: 14px; }
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-bottom: 18px; }
.steps li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 22px 70px; position: relative; color: var(--muted); }
.steps li::before { content: counter(s); position: absolute; left: 20px; top: 20px; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; display: grid; place-items: center; }
.steps li b { color: var(--text); }
.small-note { color: var(--dim); font-size: .92rem; margin-top: 10px; max-width: 80ch; }
.note-box { background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 26px 28px; margin: 12px 0 40px; }
.note-box p { color: var(--muted); max-width: 70ch; }

/* product page */
.pdp { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 44px; align-items: start; margin-top: 8px; }
.gallery .main { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #cfcfcf; }
.gallery .main img { width: 100%; height: auto; display: block; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-top: 12px; }
.thumb { display: block; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #cfcfcf; }
.thumb img { width: 100%; height: 68px; object-fit: cover; }
.thumb[aria-current="true"] { border-color: var(--accent); }
.thumb:hover { border-color: rgba(2, 213, 253, .6); }
.photo-note { color: var(--dim); font-size: .88rem; margin-top: 12px; }

.buy-box { background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 28px 28px 26px; position: sticky; top: 96px; }
.buy-box h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.12; letter-spacing: -.02em; font-weight: 800; margin: 6px 0 12px; }
.buy-box .lede { color: var(--muted); }
.buy-btn { width: 100%; min-height: 58px; font-size: 1.12rem; cursor: pointer; }
.buy-btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.buy-msg { min-height: 1.5em; margin-top: 12px; font-size: 1rem; color: var(--muted); }
.buy-msg.note { color: var(--accent-2); }
.buy-msg.error { color: #ff9b9b; font-weight: 600; }
.ticks { list-style: none; display: grid; gap: 10px; margin-top: 18px; color: var(--muted); font-size: .98rem; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 3px solid var(--accent-2); border-bottom: 3px solid var(--accent-2); transform: rotate(-45deg); }

.pdp-body { display: grid; gap: 40px; margin: 56px 0 24px; max-width: 920px; }
.pdp-body section > p { color: var(--muted); margin-bottom: 12px; max-width: 72ch; }
/* "what it's made for": a compact card, picture on the left, text on the right */
.madefor-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; margin-bottom: 4px; }
.madefor-list.single { grid-template-columns: minmax(0, 520px); }
.madefor-list li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; grid-template-columns: 132px 1fr; column-gap: 18px; row-gap: 6px; align-content: start; align-items: start; }
.madefor-list .pic { grid-row: 1 / span 3; display: flex; align-items: center; justify-content: center; width: 132px; height: 150px; background: #fff; border-radius: 12px; padding: 8px; overflow: hidden; }
.madefor-list .pic img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.madefor-list b { color: var(--text); font-size: 1.08rem; }
.madefor-list span { color: var(--muted); font-size: .96rem; }
.madefor-list .btn { justify-self: start; margin-top: 6px; }
@media (max-width: 520px) {
  .madefor-list, .madefor-list.single { grid-template-columns: 1fr; }
  .madefor-list li { grid-template-columns: 96px 1fr; column-gap: 14px; }
  .madefor-list .pic { width: 96px; height: 120px; }
}
/* the printing time-lapse is one of the gallery tabs */
.thumb-video { position: relative; }
.thumb .tab-play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.gallery .main video { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 786; background: #000; }
.print-facts { margin-bottom: 4px; }
.spec { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.spec th, .spec td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { width: 32%; color: var(--text); font-weight: 700; }
.spec td { color: var(--muted); }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style-position: outside; }
.faq details[open] summary { color: var(--accent); }
.faq details p { color: var(--muted); padding: 0 0 16px; }

/* legal pages reuse .prose from styles.css */
.prose ul { margin: 0 0 16px 22px; color: var(--muted); }

@media (max-width: 860px) {
  .pdp { grid-template-columns: 1fr; gap: 28px; }
  .buy-box { position: static; }
  .spec th { width: 40%; }
  .pdp-body { gap: 32px; margin-top: 40px; }
}
