/* ============================================================
   styles-dark.css - printsounds.com, dark design
   Loaded by inc-header-dark.cfm. Same class names as styles.css,
   so any page switches over by changing its two include lines.

   The OLD token names (--paper, --card, --ink, --mid, --line,
   --danger) are kept and given dark values, because the product
   pages use them in their own inline styles.
     --paper  page background      --card  raised surface
     --ink    main text            --mid   secondary text
     --line   borders and rules
   ============================================================ */

:root {
    --paper:  #1d2033;
    --card:   #262a41;
    --ink:    #ece9f2;
    --mid:    #a9a6bd;
    --line:   #3b4060;
    --danger: #ff8f80;
    --ok:     #8fd4a8;
    color-scheme: dark;            /* native selects, checkboxes, scrollbars go dark */
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Instrument Sans', 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }
img { max-width: 100%; display: block; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 max(20px, 3vw); }
.muted { color: var(--mid); }

/* ---------- page titles ---------- */

.page-title {
    font-family: 'Big Shoulders Display', Impact, sans-serif;
    font-weight: 800;
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: .95;
    text-transform: uppercase;
    margin: 48px 0 10px 0;
}

.page-sub { color: var(--mid); margin: 0 0 32px 0; max-width: 60ch; font-size: 1.05rem; }

/* ---------- gallery grid (index.cfm) ---------- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px 28px;
    padding-bottom: 80px;
}

.card {
    background: transparent;
    border: 0;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    color: var(--ink);
}

.card .art { aspect-ratio: 3 / 1; overflow: hidden; background: var(--card); }
.card .art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .art img, .card:focus-visible .art img { transform: scale(1.05); }

/* the signature: the print itself, squished to a thin band */
.strip { height: 8px; width: 100%; overflow: hidden; }
.strip img { width: 100%; height: 8px; object-fit: fill; }

.card .meta { padding: 14px 0 0 0; }

.card h2 {
    font-family: 'Big Shoulders Display', Impact, sans-serif;
    font-weight: 800;
    font-size: 1.7rem;
    line-height: 1;
    text-transform: uppercase;
    margin: 0 0 6px 0;
}

.card .desc { color: var(--mid); font-size: .95rem; margin: 0 0 8px 0; }

.price { font-variant-numeric: tabular-nums; font-size: 1rem; color: var(--ink); }

/* ---------- product page ---------- */

.crumb { font-size: .92rem; color: var(--mid); margin-bottom: 12px; }
.crumb a { color: var(--mid); text-decoration: none; }
.crumb a:hover, .crumb a:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumb span { margin: 0 8px; opacity: .6; }

.product-layout {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: clamp(28px, 4vw, 64px);
    margin: 44px 0 90px 0;
    align-items: start;
}

.product-art { background: var(--card); border: 0; }

.product-info { position: sticky; top: 130px; }

.product-info h1 {
    font-family: 'Big Shoulders Display', Impact, sans-serif;
    font-weight: 800;
    font-size: clamp(2.6rem, 4.5vw, 4rem);
    text-transform: uppercase;
    margin: 0 0 12px 0;
    line-height: .92;
}

.product-info .long { color: var(--ink); opacity: .9; }
.product-info .long p { margin: 0 0 14px; }

label.f-label {
    display: block;
    font-size: .92rem;
    font-weight: 600;
    color: var(--mid);
    margin: 22px 0 8px 0;
}

select, input[type="text"], input[type="number"], input[type="password"], input[type="email"],
input[type="search"], input[type="file"], textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 15px;
    border-radius: 4px;
}
select:focus, input:focus, textarea:focus { border-color: var(--ink); outline: none; }
select option { background: var(--card); color: var(--ink); }

input[type="number"].qty { width: 96px; }

.btn {
    display: inline-block;
    background: var(--ink);
    color: var(--paper);
    border: 2px solid var(--ink);
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 30px;
    border-radius: 2px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 22px;
}
.btn:hover, .btn:focus-visible { background: #fff; border-color: #fff; color: var(--paper); }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--ink); color: var(--paper); }

.btn-sm { padding: 7px 14px; font-size: .88rem; margin-top: 0; border-width: 1px; }

/* the product pages' Add to Cart is the one big action: give it the full width */
.product-info form .btn[type="submit"] { width: 100%; font-size: 1.1rem; padding: 17px 30px; }

/* ---------- category chips ---------- */

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 34px 0; }

.chip {
    font-size: .92rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--mid);
    border: 1px solid var(--line);
    padding: 7px 16px;
    border-radius: 99px;
    background: transparent;
}
.chip:hover, .chip:focus-visible { color: var(--ink); border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- pagination ---------- */

.pager { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; align-items: center; margin: 10px 0 80px 0; }

.pg {
    font-variant-numeric: tabular-nums;
    font-size: .95rem;
    text-decoration: none;
    color: var(--ink);
    border: 1px solid var(--line);
    padding: 8px 13px;
    min-width: 42px;
    text-align: center;
    border-radius: 4px;
}
.pg:hover, .pg:focus-visible { border-color: var(--ink); }
.pg.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- product image gallery ---------- */

.product-art img.zoomable { cursor: zoom-in; }

.thumb-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.thumb {
    padding: 0;
    border: 1px solid var(--line);
    background: var(--card);
    cursor: pointer;
    width: 88px;
    height: 30px;
    overflow: hidden;
    flex: 0 0 auto;
    opacity: .7;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.on { opacity: 1; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.thumb:hover, .thumb:focus-visible { opacity: 1; border-color: var(--ink); }

/* ---------- lightbox ---------- */

.lightbox {
    position: fixed; inset: 0;
    background: rgba(14, 16, 28, .95);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; padding: 40px;
}
.lightbox.open { display: flex; }
.lb-image { max-width: 96vw; max-height: 88vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-close {
    position: absolute; top: 18px; right: 24px;
    background: none; border: none; color: #fff;
    font-size: 42px; line-height: 1; cursor: pointer;
}
.lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #fff;
    font-size: 56px; line-height: 1; cursor: pointer; padding: 0 18px; opacity: .7;
}
.lb-nav:hover, .lb-nav:focus-visible { opacity: 1; }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lb-close:focus-visible, .lb-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- cart & tables ---------- */

table.tbl { width: 100%; border-collapse: collapse; background: var(--card); border: 0; }
table.tbl th {
    font-size: .88rem; font-weight: 600; text-align: left; color: var(--mid);
    padding: 14px 16px; border-bottom: 1px solid var(--line);
}
table.tbl td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl td strong { font-family: 'Big Shoulders Display', Impact, sans-serif; font-weight: 800;
    font-size: 1.35rem; text-transform: uppercase; line-height: 1; }
table.tbl tr:last-child td { border-bottom: none; }

.t-right { text-align: right; }
.mono { font-variant-numeric: tabular-nums; }

.cart-total { font-variant-numeric: tabular-nums; font-size: 1.05rem; line-height: 1.9; margin: 22px 0; text-align: right; color: var(--mid); }
.cart-total strong { color: var(--ink); font-size: 1.4rem; }

.msg-ok, .msg-err { padding: 14px 18px; margin: 20px 0; font-size: .95rem; border: 1px solid; border-radius: 4px; }
.msg-ok  { border-color: var(--ok); color: var(--ok); background: rgba(143, 212, 168, .08); }
.msg-err { border-color: var(--danger); color: var(--danger); background: rgba(255, 143, 128, .08); }

.empty {
    border: 1px dashed var(--line);
    padding: 70px 20px;
    text-align: center;
    color: var(--mid);
    margin: 30px 0 90px 0;
}

/* ---------- admin (only if an admin page is ever switched over) ---------- */

.admin-tabs { display: flex; gap: 8px; margin: 30px 0 20px 0; flex-wrap: wrap; }
.admin-tabs a { font-size: .92rem; text-decoration: none; padding: 8px 16px; border: 1px solid var(--line); border-radius: 4px; }
.admin-tabs a.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.admin-form { max-width: 640px; }
.admin-form .f-row { margin-bottom: 16px; }
.badge-on, .badge-off { font-size: .78rem; padding: 2px 8px; border-radius: 99px; }
.badge-on  { color: var(--ok); border: 1px solid var(--ok); }
.badge-off { color: var(--mid); border: 1px solid var(--mid); }

/* ---------- responsive & a11y ---------- */

@media (max-width: 860px) {
    .product-layout { grid-template-columns: 1fr; gap: 26px; margin-top: 24px; }
    .product-info { position: static; }
}

/* phones: each cart row becomes its own block instead of a wide table.
   Columns are print / size / price / qty / line total / remove. */
@media (max-width: 640px) {
    table.tbl, table.tbl tbody, table.tbl tr, table.tbl td { display: block; width: 100%; }
    table.tbl tr:has(th) { display: none; }
    table.tbl tr { display: grid; grid-template-columns: 1fr auto; align-items: center;
        gap: 8px 12px; padding: 18px 16px; border-bottom: 1px solid var(--line); }
    table.tbl tr:last-child { border-bottom: 0; }
    table.tbl td { padding: 0; border: 0; width: auto; }
    table.tbl td:nth-child(1), table.tbl td:nth-child(2) { grid-column: 1 / -1; }
    table.tbl td:nth-child(2) { color: var(--mid); }
    table.tbl td:nth-child(3) { display: none; }
    table.tbl td:nth-child(6) { grid-column: 1 / -1; text-align: left; }
    .page-title { margin-top: 32px; }
}

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .card .art img { transition: none; }
    .card:hover .art img { transform: none; }
}
