/* =========================================================================
   Steampunk Market — storefront theme
   Palette, type and a couple of signature motifs (engraved brass nameplate,
   stamped paper price tags). Everything else stays quiet and disciplined.
   ========================================================================= */

:root {
    --soot:          #1b1916;
    --iron:          #26221d;
    --iron-line:     #3a342b;
    --parchment:     #ece0c8;
    --parchment-2:   #e3d4b4;
    --parchment-edge:#cdb78a;
    --ink:           #2a2118;
    --brass:         #c79a4e;
    --brass-bright:  #e6c989;
    --verdigris:     #4f8a7b;
    --copper:        #a85f33;
    --cream:         #efe6d2;

    --shadow: 0 18px 40px rgba(0,0,0,.45);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "EB Garamond", Georgia, "Times New Roman", serif;
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--cream);
    background-color: var(--soot);
    /* faint brushed-iron sheen + a vignette so the page never reads flat */
    background-image:
        radial-gradient(120% 80% at 50% -10%, rgba(199,154,78,.10), transparent 60%),
        repeating-linear-gradient(115deg, rgba(255,255,255,.014) 0 2px, transparent 2px 5px);
    background-attachment: fixed;
}

a { color: var(--verdigris); text-decoration: none; }
a:hover { color: var(--brass-bright); }
img { max-width: 100%; display: block; }

/* ------- The framed shell ------------------------------------------------ */
.shell {
    max-width: 1080px;
    margin: 1.4rem auto;
    background: var(--iron);
    border: 1px solid var(--iron-line);
    box-shadow: var(--shadow), inset 0 0 0 4px rgba(0,0,0,.35), inset 0 0 0 5px var(--brass);
    border-radius: 3px;
}
.shell > main { padding: 1.8rem clamp(1rem, 4vw, 3rem) 2.4rem; }

/* ------- Masthead: an engraved brass nameplate --------------------------- */
.masthead {
    text-align: center;
    padding: 1.9rem 1rem 1.2rem;
    background:
        linear-gradient(180deg, rgba(199,154,78,.10), transparent 70%);
    border-bottom: 2px solid var(--brass);
    position: relative;
}
.masthead h1 {
    margin: 0;
    font-family: "Cinzel", "EB Garamond", serif;
    font-weight: 700;
    font-size: clamp(1.7rem, 5vw, 3rem);
    letter-spacing: .14em;
    line-height: 1.1;
}
.masthead h1 a {
    color: var(--brass-bright);
    /* engraved look: dark cut above, brass glow below */
    text-shadow: 0 1px 0 rgba(0,0,0,.6), 0 -1px 0 rgba(255,230,180,.18);
}
.masthead h1 a:hover { color: #f2dca6; }

.cog { color: var(--brass); display: inline-block; vertical-align: middle; opacity: .92; }
.masthead .rule {
    display: flex; align-items: center; justify-content: center; gap: .8rem;
    margin: .7rem auto 0; max-width: 320px; color: var(--brass);
}
.masthead .rule::before, .masthead .rule::after {
    content: ""; height: 1px; flex: 1;
    background: linear-gradient(90deg, transparent, var(--brass));
}
.masthead .rule::after { background: linear-gradient(90deg, var(--brass), transparent); }

/* ------- Navigation ------------------------------------------------------ */
.shop-nav {
    text-align: center;
    padding: .7rem 1rem;
    background: rgba(0,0,0,.22);
    border-bottom: 1px solid var(--iron-line);
    font-family: "Cinzel", serif;
    font-size: .82rem;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.shop-nav a { color: var(--cream); padding: 0 .2rem; position: relative; }
.shop-nav a:hover { color: var(--brass-bright); }
.shop-nav .sep { color: var(--brass); margin: 0 .55rem; opacity: .7; }

/* ------- Parchment panels (intro + content pages) ------------------------ */
.parchment {
    background: var(--parchment);
    background-image:
        radial-gradient(circle at 18% 22%, rgba(0,0,0,.04) 0 1px, transparent 2px),
        radial-gradient(circle at 72% 64%, rgba(0,0,0,.035) 0 1px, transparent 2px);
    color: var(--ink);
    border: 1px solid var(--parchment-edge);
    border-radius: 2px;
    box-shadow: inset 0 0 22px rgba(120,90,40,.18), 0 2px 0 rgba(0,0,0,.25);
    padding: 1.5rem clamp(1.1rem, 3vw, 2rem);
}
.parchment a { color: var(--copper); text-decoration: underline; text-decoration-color: rgba(168,95,51,.4); }
.parchment a:hover { color: #7e3f1d; }

.intro { margin-bottom: 2rem; }
.intro > p:first-of-type::first-letter {
    font-family: "Cinzel", serif;
    font-size: 3.1rem;
    font-weight: 700;
    float: left;
    line-height: .8;
    padding: .25rem .5rem 0 0;
    color: var(--copper);
}

/* ------- Section heading (engraved) -------------------------------------- */
.shelf-title {
    font-family: "Cinzel", serif;
    letter-spacing: .12em;
    color: var(--brass-bright);
    font-size: 1.05rem;
    text-transform: uppercase;
    display: flex; align-items: center; gap: .7rem;
    margin: 0 0 1.1rem;
}
.shelf-title::after {
    content: ""; flex: 1; height: 1px;
    background: linear-gradient(90deg, var(--brass), transparent);
}

/* ------- Product grid + specimen cards ----------------------------------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.3rem;
}
.specimen {
    background: var(--parchment);
    border: 1px solid var(--parchment-edge);
    border-radius: 2px;
    padding: .7rem .7rem 1rem;
    box-shadow: 0 2px 0 rgba(0,0,0,.3), inset 0 0 0 1px rgba(255,255,255,.25);
    transition: transform .15s ease, box-shadow .15s ease;
    position: relative;
}
.specimen:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,.4); }

/* image mounted like a daguerreotype: brass inner line on a dark mat */
.specimen__frame {
    background: #15130f;
    padding: 5px;
    border: 1px solid var(--parchment-edge);
    box-shadow: inset 0 0 0 1px var(--brass);
    margin-bottom: .7rem;
}
.specimen .frame-img { width: 100%; height: 200px; object-fit: cover; }
.specimen .frame-img--empty { width: 100% !important; height: 200px !important; }

.specimen__name {
    font-family: "Cinzel", serif;
    font-size: .98rem;
    letter-spacing: .03em;
    line-height: 1.25;
    margin: 0 0 .15rem;
}
.specimen__name a { color: var(--ink); }
.specimen__name a:hover { color: var(--copper); }

/* ------- Signature: the stamped paper price tag -------------------------- */
.price-tag {
    display: inline-block;
    font-family: "Special Elite", "Courier New", monospace;
    font-size: .95rem;
    color: #3a2c1b;
    background: var(--parchment-2);
    border: 1px solid var(--parchment-edge);
    padding: .2rem .65rem .2rem .95rem;
    margin-top: .3rem;
    transform: rotate(-1.5deg);
    box-shadow: 1px 2px 3px rgba(0,0,0,.3);
    position: relative;
}
.price-tag::before { /* punched string hole */
    content: ""; position: absolute; left: .32rem; top: 50%;
    width: 7px; height: 7px; margin-top: -3.5px;
    border-radius: 50%;
    background: #15130f; box-shadow: inset 0 0 0 1px rgba(0,0,0,.5);
}
.price-tag s { color: #8a6b46; }
.price-tag .from { font-size: .72em; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.price-tag--sale { color: var(--copper); }

/* ------- Product detail page --------------------------------------------- */
.product-head { font-family: "Cinzel", serif; color: var(--brass-bright); letter-spacing: .06em; margin: .2rem 0 1rem; }
.backlink { font-family: "Cinzel", serif; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }

.product-media { margin-bottom: 1.2rem; }
.product-media #store-main-image .frame-img,
.product-media #store-main-image .frame-img--empty {
    width: 100%; max-width: 420px; height: auto; aspect-ratio: 1/1; object-fit: cover;
    background: #15130f; padding: 6px; border: 1px solid var(--parchment-edge); box-shadow: inset 0 0 0 1px var(--brass);
}
.thumbs { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.thumbs .frame-img, .thumbs .frame-img--empty { width: 64px !important; height: 64px !important; object-fit: cover; border: 1px solid var(--brass); }

.lead { color: var(--cream); font-size: 1.18rem; }

/* variation picker controls */
.picker { margin: 1.2rem 0; }
.picker label { display: block; font-family: "Cinzel", serif; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); margin-bottom: .8rem; }
.picker select {
    display: block; margin-top: .25rem; min-width: 220px;
    font-family: "EB Garamond", serif; font-size: 1rem;
    color: var(--cream); background: #15130f;
    border: 1px solid var(--brass); border-radius: 2px; padding: .45rem .6rem;
}
#store-sel-price {
    font-family: "Special Elite", monospace; font-size: 1.5rem; color: var(--brass-bright);
    background: rgba(0,0,0,.25); border-left: 3px solid var(--brass);
    padding: .5rem .9rem; display: inline-block;
}
#store-sel-price s { color: #9c8a66; }

.detail-block { margin-top: 1.6rem; }
.detail-block .shelf-title { color: var(--brass); }

.notice { color: var(--brass); font-style: italic; opacity: .85; }

/* tables (no-JS option fallback) */
table { border-collapse: collapse; background: var(--parchment); color: var(--ink); }
th, td { border: 1px solid var(--parchment-edge); padding: .4rem .7rem; }
th { background: var(--parchment-2); font-family: "Cinzel", serif; font-size: .8rem; letter-spacing: .08em; }

/* ------- Footer colophon ------------------------------------------------- */
.colophon {
    margin-top: 2.5rem;
    padding: 1.3rem clamp(1rem, 4vw, 3rem) 1.6rem;
    border-top: 2px solid var(--brass);
    background: rgba(0,0,0,.25);
    color: #9b9081;
    font-size: .92rem;
    text-align: center;
}
.colophon a { color: var(--cream); }
.colophon a:hover { color: var(--brass-bright); }
.colophon .powered { font-family: "Cinzel", serif; letter-spacing: .12em; font-size: .72rem; text-transform: uppercase; opacity: .7; margin-top: .5rem; }

/* ------- 404 ------------------------------------------------------------- */
.lost { text-align: center; padding: 4rem 1rem; }
.lost h1 { font-family: "Cinzel", serif; color: var(--brass-bright); letter-spacing: .1em; }

/* ------- Accessibility & motion ------------------------------------------ */
:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .specimen { transition: none; }
    .specimen:hover { transform: none; }
}
@media (max-width: 560px) {
    body { font-size: 1.05rem; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
    .specimen .frame-img, .specimen .frame-img--empty { height: 150px !important; }
}

/* ------- Cart / checkout / order ----------------------------------------- */
.catalogue input[type="text"], .catalogue input[type="email"], .catalogue input[type="number"],
.catalogue textarea {
    font-family: "EB Garamond", serif; font-size: 1rem;
    color: var(--cream); background: #15130f;
    border: 1px solid var(--brass); border-radius: 2px; padding: .45rem .6rem;
}
.catalogue button, .btn-buy {
    font-family: "Cinzel", serif; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
    color: #15130f; background: linear-gradient(180deg, var(--brass-bright), var(--brass));
    border: 1px solid #8a6b35; border-radius: 2px; padding: .5rem .9rem; cursor: pointer;
    text-decoration: none; display: inline-block;
}
.catalogue button:hover, .btn-buy:hover { background: var(--brass-bright); color: #000; }
.add-cart { margin: 1.2rem 0; }
.add-cart__controls { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; }
.add-cart__controls input[type="number"] { width: 4.5em; }

.cart-table { width: 100%; margin: 1rem 0; }
.cart-table small { color: #6b5a3f; }
.cart-total { font-family: "Special Elite", monospace; font-size: 1.25rem; color: var(--brass-bright); }

.cart-error {
    background: #2a1714; color: #f2c9b8; border: 1px solid var(--copper);
    border-radius: 2px; padding: .7rem 1rem; margin: 1rem 0;
}
.checkout-form label { display: block; margin-bottom: .2rem; }

/* The payment reference — deliberately unmissable */
.order-ref {
    display: flex; flex-direction: column; align-items: center; gap: .25rem;
    background: var(--parchment); color: var(--ink);
    border: 2px solid var(--brass); border-radius: 3px;
    padding: 1.1rem 1.5rem; margin: 1.4rem 0; text-align: center;
    box-shadow: inset 0 0 18px rgba(120,90,40,.18);
}
.order-ref__label { font-family: "Cinzel", serif; font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--copper); }
.order-ref__number { font-family: "Special Elite", monospace; font-size: 2.1rem; letter-spacing: .06em; color: #2a1c0e; }
.order-ref__hint { font-size: .85rem; font-style: italic; color: #6b5a3f; }

.product-media { text-align: left; }
