/* ============================================================
   dannyjwest.com — public look
   Palette: plaster (page), bottle green (ink + header), masking-tape
   yellow (the swing tag), rust (sold / danger), sage (ok).
   Display face: Bricolage Grotesque (self-hosted, OFL). Body: system-ui.
   Signature: every price hangs on a kraft swing tag.
   ============================================================ */
@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal; font-weight: 700; font-display: swap;
    src: url('/css/fonts/bricolage-grotesque-latin-700-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal; font-weight: 800; font-display: swap;
    src: url('/css/fonts/bricolage-grotesque-latin-800-normal.woff2') format('woff2');
}

:root {
    --djw-plaster:   #EDE9E1;
    --djw-plaster-2: #E3DED4;
    --djw-paper:     #F8F6F1;
    --djw-ink:       #1F3A31;
    --djw-ink-2:     #3D5A50;
    --djw-muted:     #6F7D77;
    --djw-line:      #CFC8BB;
    --djw-tape:      #F2C744;
    --djw-tape-dark: #C99A12;
    --djw-kraft:     #D9BB8B;
    --djw-kraft-2:   #C2A16E;
    --djw-rust:      #A8442A;
    --djw-sage:      #6E8A67;
    --djw-display:   'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
    --djw-radius:    6px;
}

body { background: var(--djw-plaster); color: var(--djw-ink); font-size: 16px; }
a { color: var(--djw-ink-2); }
main { max-width: 1200px; }
main.is-wide { --bspkfw-measure-wide: 1400px; }

/* ---- header --------------------------------------------------- */
.site-header { background: var(--djw-ink); border-bottom: 3px solid var(--djw-tape); }
.djw-wordmark { display: inline-flex; flex-direction: column; line-height: 1.05; }
.djw-wordmark-name { font-family: var(--djw-display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; color: #fff; }
.djw-wordmark-tag  { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--djw-tape); }
.site-nav-badge { background: var(--djw-tape); color: var(--djw-ink); font-weight: 700; }
.site-nav-main-item.is-active { color: var(--djw-tape); }

/* ---- buttons -------------------------------------------------- */
.btn-primary { background: var(--djw-ink); border-color: var(--djw-ink); }
.btn-primary:hover { background: var(--djw-ink-2); border-color: var(--djw-ink-2); }
.djw-btn-lg { min-height: 52px; padding: 12px 24px; font-size: 17px; font-weight: 700; border-radius: var(--djw-radius); }
.djw-btn-block { display: flex; width: 100%; justify-content: center; }
.djw-btn-ghost { background: transparent; border: 2px solid var(--djw-ink); color: var(--djw-ink); }
.djw-btn-ghost:hover { background: var(--djw-paper); }
.djw-link-btn { background: none; border: 0; padding: 0; color: var(--djw-rust); cursor: pointer; font: inherit; text-decoration: underline; }
.djw-back { color: var(--djw-muted); }

/* ---- type ----------------------------------------------------- */
.djw-h1, .djw-hero-title, .djw-section-head h2, .djw-step-head h2, .djw-panel h2 {
    font-family: var(--djw-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; color: var(--djw-ink);
}
.djw-h1 { font-size: clamp(28px, 4vw, 40px); margin: 8px 0 12px; }
.djw-eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--djw-muted); margin-bottom: 8px; }
.djw-sub { font-family: var(--djw-display); font-weight: 700; font-size: 15px; margin: 18px 0 8px; color: var(--djw-ink-2); }
.djw-hint { color: var(--djw-muted); font-size: 14px; margin: 10px 0; }
.djw-footer-note { text-align: center; color: var(--djw-muted); margin: 48px 0 6px; font-size: 14px; }

/* ---- the swing tag (signature) -------------------------------- */
.djw-tag {
    position: relative; display: inline-block;
    background: var(--djw-kraft); color: var(--djw-ink);
    font-family: var(--djw-display); font-weight: 800; font-variant-numeric: tabular-nums;
    padding: 6px 12px 6px 26px; border-radius: 3px 8px 8px 3px;
    box-shadow: 0 1px 0 var(--djw-kraft-2), 0 2px 4px rgba(31,58,49,0.18);
    transform: rotate(-3deg); transform-origin: 8px 50%;
}
.djw-tag::before { /* punched hole */
    content: ''; position: absolute; left: 9px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
    border-radius: 50%; background: var(--djw-plaster); box-shadow: inset 0 1px 1px rgba(0,0,0,0.35);
}
.djw-tag::after { /* the string */
    content: ''; position: absolute; left: 11px; top: -14px; width: 2px; height: 18px;
    background: var(--djw-ink-2); transform: rotate(18deg); transform-origin: bottom;
}

/* ---- hero ----------------------------------------------------- */
.djw-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; padding: 24px 0 40px; }
.djw-hero-title { font-size: clamp(40px, 6.5vw, 76px); margin: 0 0 16px; max-width: 12ch; }
.djw-hero-sub { font-size: 18px; color: var(--djw-ink-2); max-width: 42ch; line-height: 1.55; margin-bottom: 28px; }
.djw-hero-art { position: relative; }
.djw-hero-art img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--djw-radius); box-shadow: 0 12px 30px rgba(31,58,49,0.22); }
.djw-hero-art::before { /* a strip of tape across the corner */
    content: ''; position: absolute; top: -10px; left: 24px; width: 110px; height: 26px; background: var(--djw-tape);
    opacity: 0.9; transform: rotate(-6deg); z-index: 1; box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* ---- sections + cards ----------------------------------------- */
.djw-section { margin: 32px 0; }
.djw-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.djw-section-head h2 { font-size: 26px; }
.djw-section-link { font-weight: 600; }
.djw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px 18px; }
.djw-card { display: block; color: inherit; text-decoration: none; }
.djw-card:hover { text-decoration: none; }
.djw-card-media { position: relative; background: var(--djw-paper); border-radius: var(--djw-radius); overflow: hidden; aspect-ratio: 4 / 5; }
.djw-card-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.djw-card:hover .djw-card-img { transform: scale(1.03); }
.djw-card-noimg { width: 100%; height: 100%; min-height: 120px; background:
    repeating-linear-gradient(135deg, var(--djw-plaster-2) 0 8px, var(--djw-paper) 8px 16px); }
.djw-card-body { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "kind kind" "title price"; gap: 2px 12px; padding: 12px 2px 0; align-items: start; }
.djw-card-kind  { grid-area: kind; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--djw-muted); }
.djw-card-title { grid-area: title; font-weight: 600; line-height: 1.3; }
.djw-card-price { grid-area: price; }
.djw-card-price { position: relative; display: inline-block; background: var(--djw-kraft); font-family: var(--djw-display); font-weight: 800; font-variant-numeric: tabular-nums; padding: 4px 10px 4px 22px; border-radius: 3px 6px 6px 3px; transform: rotate(-3deg); margin-top: 4px; box-shadow: 0 1px 0 var(--djw-kraft-2); }
.djw-card-price::before { content: ''; position: absolute; left: 7px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--djw-plaster); box-shadow: inset 0 1px 1px rgba(0,0,0,0.35); }
.djw-card.is-sold .djw-card-img { filter: grayscale(1) contrast(0.9); opacity: 0.75; }
.djw-card.is-sold .djw-card-price { background: var(--djw-plaster-2); text-decoration: line-through; color: var(--djw-muted); }
.djw-badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 3px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.djw-badge-sold     { background: var(--djw-rust); color: #fff; }
.djw-badge-reserved { background: var(--djw-tape); color: var(--djw-ink); }
.djw-badge-featured { background: var(--djw-tape); color: var(--djw-ink); font-size: 14px; padding: 2px 8px; }
.djw-results { color: var(--djw-muted); font-size: 14px; margin: 8px 0 14px; }

/* ---- chips ---------------------------------------------------- */
.djw-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.djw-chips-inline { margin: 16px 0 0; }
.djw-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: 999px;
    border: 1.5px solid var(--djw-line); background: var(--djw-paper); color: var(--djw-ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.djw-chip:hover { border-color: var(--djw-ink-2); text-decoration: none; }
.djw-chip.is-active { background: var(--djw-ink); border-color: var(--djw-ink); color: #fff; }
.djw-chip-n { font-size: 12px; color: var(--djw-muted); }
.djw-chip.is-active .djw-chip-n { color: var(--djw-tape); }
.djw-chip-sm { min-height: 32px; padding: 3px 12px; font-size: 14px; }

/* ---- shop head ------------------------------------------------ */
.djw-shop-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.djw-search { flex: 1 1 280px; max-width: 420px; margin-bottom: 0; }
.djw-search .form-control { min-height: 44px; font-size: 16px; border-radius: 999px; padding-left: 18px; }

/* ---- item page ------------------------------------------------ */
.djw-item { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; padding-top: 8px; }
.djw-gallery-main { margin: 0; background: var(--djw-paper); border-radius: var(--djw-radius); overflow: hidden; aspect-ratio: 4 / 5; cursor: zoom-in; }
.djw-gallery-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.djw-gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.djw-gallery-thumb { flex: 0 0 72px; height: 90px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: var(--djw-paper); cursor: pointer; }
.djw-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.djw-gallery-thumb.is-active { border-color: var(--djw-ink); }
.djw-video { width: 100%; margin-top: 14px; border-radius: var(--djw-radius); background: #000; }
.djw-item-info .djw-h1 { font-size: clamp(30px, 4vw, 44px); }
.djw-price { display: flex; align-items: center; gap: 18px; margin: 18px 0 14px; flex-wrap: wrap; }
.djw-price-amount { position: relative; display: inline-block; background: var(--djw-kraft); color: var(--djw-ink); font-family: var(--djw-display); font-weight: 800; font-size: 28px; font-variant-numeric: tabular-nums;
    padding: 8px 18px 8px 34px; border-radius: 4px 10px 10px 4px; transform: rotate(-3deg); transform-origin: 10px 50%; box-shadow: 0 1px 0 var(--djw-kraft-2), 0 3px 6px rgba(31,58,49,0.2); margin-left: 6px; }
.djw-price-amount::before { content: ''; position: absolute; left: 12px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--djw-plaster); box-shadow: inset 0 1px 1px rgba(0,0,0,0.35); }
.djw-price-amount::after { content: ''; position: absolute; left: 15px; top: -18px; width: 2px; height: 22px; background: var(--djw-ink-2); transform: rotate(20deg); transform-origin: bottom; }
.djw-price-postage { color: var(--djw-ink-2); font-weight: 600; }
.djw-stock { color: var(--djw-sage); font-weight: 700; margin: 4px 0 10px; }
.djw-buy { display: grid; gap: 10px; max-width: 420px; }
.djw-buy .form-actions { margin: 0; }
.djw-buy .btn { width: 100%; justify-content: center; }
.djw-qty { max-width: 140px; }
.djw-soldout { margin: 8px 0 16px; }
.djw-soldout .djw-badge { position: static; display: inline-block; font-size: 14px; }
.djw-desc { margin: 24px 0; line-height: 1.65; max-width: 60ch; }
.djw-desc p + p { margin-top: 12px; }
.djw-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 12px 0; }
.djw-kv div { display: contents; }
.djw-kv dt { color: var(--djw-muted); }
.djw-kv dd { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- basket --------------------------------------------------- */
.djw-basket { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 32px; align-items: start; }
.djw-lines { list-style: none; padding: 0; margin: 0 0 16px; }
.djw-line { display: grid; grid-template-columns: 88px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--djw-line); }
.djw-lines-sm .djw-line { grid-template-columns: 56px 1fr; padding: 8px 0; }
.djw-line-img { display: block; aspect-ratio: 4 / 5; border-radius: 4px; overflow: hidden; background: var(--djw-paper); }
.djw-line-img img, .djw-line-img .djw-card-noimg { width: 100%; height: 100%; object-fit: cover; display: block; }
.djw-line-body { display: grid; gap: 6px; align-content: start; }
.djw-line-title { font-weight: 700; color: var(--djw-ink); }
.djw-line-price { font-variant-numeric: tabular-nums; font-weight: 600; }
.djw-line-price small { color: var(--djw-muted); font-weight: 400; }
.djw-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--djw-line); border-radius: 999px; overflow: hidden; width: max-content; }
.djw-step-btn { width: 40px; height: 40px; border: 0; background: var(--djw-paper); font-size: 20px; cursor: pointer; color: var(--djw-ink); }
.djw-step-btn:disabled { color: var(--djw-line); cursor: default; }
.djw-stepper-n { min-width: 36px; text-align: center; font-weight: 700; }
.djw-checkout-box { background: var(--djw-paper); border-radius: var(--djw-radius); padding: 20px; border: 1px solid var(--djw-line); position: sticky; top: 16px; }
/* Post / collect choice — each option is a big tappable row; a locked option
   (a collection-only piece is in the basket) is struck through, not just grey. */
.djw-fulfilment .radio-group { display: grid; gap: 8px; }
.djw-fulfilment .radio-group__option { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border: 2px solid var(--djw-line); border-radius: var(--djw-radius); background: var(--djw-paper); cursor: pointer; font-weight: 600; }
.djw-fulfilment .radio-group__option:has(input:checked) { border-color: var(--djw-ink); }
.djw-fulfilment .radio-group__option input { width: 22px; height: 22px; margin: 0; accent-color: var(--djw-ink); }
.djw-fulfilment .radio-group__option:has(input:disabled) { cursor: not-allowed; color: var(--djw-muted); background: var(--djw-plaster-2); border-style: dashed; }
.djw-fulfilment .radio-group__option:has(input:disabled) .radio-group__label { text-decoration: line-through; }
.djw-fulfilment-note { margin: -4px 0 14px; padding: 10px 14px; border-left: 4px solid var(--djw-tape); background: #FBF1CF; color: var(--djw-ink); font-size: 15px; border-radius: 0 var(--djw-radius) var(--djw-radius) 0; }
.djw-thanks { max-width: 60ch; margin: 24px auto; text-align: center; }
.djw-thanks-lead { font-size: 20px; margin-bottom: 8px; }
.djw-orderref { font-family: var(--djw-display); font-weight: 800; font-size: 28px; margin: 12px 0; }

/* ---- empty ---------------------------------------------------- */
.djw-empty { text-align: center; padding: 48px 16px; color: var(--djw-muted); }
.djw-empty p { margin-bottom: 16px; font-size: 17px; }

/* ---- lightbox (framework classes, project-driven for now) ----- */
.djw-lightbox-open { overflow: hidden; }

/* ---- responsive ---------------------------------------------- */
@media (max-width: 800px) {
    .djw-hero { grid-template-columns: 1fr; gap: 20px; padding-top: 8px; }
    .djw-hero-art { order: -1; }
    .djw-hero-art img { aspect-ratio: 5 / 4; }
    .djw-item { grid-template-columns: 1fr; gap: 20px; }
    .djw-basket { grid-template-columns: 1fr; }
    .djw-checkout-box { position: static; }
    .djw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
}
@media (max-width: 420px) {
    .djw-card-body { grid-template-columns: 1fr; grid-template-areas: "kind" "title" "price"; }
}
@media (prefers-reduced-motion: reduce) {
    .djw-card-img { transition: none; }
    .djw-card:hover .djw-card-img { transform: none; }
}

/* ---- chrome tweaks ------------------------------------------- */
/* Only Dan signs in, straight at /login — shoppers don't need the prompt. */
.header-login { display: none; }
@media (max-width: 560px) {
    .djw-wordmark-name { font-size: 17px; }
    .djw-wordmark-tag  { display: none; }
}

/* ---- logged-in edit affordance on the item page ---------------- */
.djw-edit-item { margin-bottom: 12px; }

/* ---- phone: put the whole header bar at the bottom, under the thumb -- */
@media (max-width: 700px) {
    /* Flow-order trick rather than position:fixed — fixed bars get hidden
       behind mobile browser toolbars and misbehave in some emulators. The
       header is moved to the END of the body's flex column and made sticky
       to the bottom edge, so it is always on screen and always in flow. */
    body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
    main { flex: 1 0 auto; }
    .site-header { order: 99; position: sticky; bottom: 0; z-index: 60; width: 100%; padding-bottom: env(safe-area-inset-bottom);
                   border-top: 3px solid var(--djw-tape); border-bottom: 0; box-shadow: 0 -6px 18px rgba(31,58,49,0.25); }
    /* Dropdowns that normally fall below the bar must open upwards. */
    .site-header .site-nav-dropdown, .site-header .user-menu-dropdown, .site-header .notifications-dropdown {
        top: auto; bottom: calc(100% + 6px);
        /* Opening upwards: never taller than the room above the bar, scroll inside instead. */
        max-height: calc(100vh - 88px); max-height: calc(100dvh - 88px); overflow-y: auto; overscroll-behavior: contain;
    }
    .image-lightbox { z-index: 70; }
}
/* "How you can get it" line under the buy buttons. */
.djw-ways { margin: 12px 0 4px; color: var(--djw-ink-2); font-size: 15px; }
.djw-ways-label { font-weight: 700; color: var(--djw-ink); }
.djw-ways-sep { color: var(--djw-line); padding: 0 4px; }
.djw-footer-login { text-align: center; margin: 0 0 16px; font-size: 14px; }
.djw-footer-login a { color: var(--djw-muted); text-decoration: underline; }

/* ---- share ------------------------------------------------------ */
.djw-item-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.djw-item-tools .djw-edit-item { margin-bottom: 0; }
.djw-buy .djw-share-btn { width: 100%; justify-content: center; }
.djw-share-modal .modal-box { width: 560px; max-width: calc(100vw - 24px); }
.djw-share-body { padding: 16px 20px 20px; }
.djw-share-text textarea { font-size: 15px; line-height: 1.5; }
.djw-share-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.djw-share-actions .btn { flex: 1 1 150px; justify-content: center; min-height: 44px; }
.djw-share-fb { background: #1877F2; border-color: #1877F2; color: #fff; }
.djw-share-fb:hover { background: #145ec2; border-color: #145ec2; color: #fff; }
.djw-share-ig { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); border-color: transparent; color: #fff; }
