/*
Theme Name: Barbary Coast Press
Theme URI: https://barbarycoastpress.com
Author: Barbary Coast Press
Description: Deep-sea modern theme for Barbary Coast Press — books and fine art prints. Custom design with ships masthead banner.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: barbary-coast
*/


/* Barbary Coast Press — Deep Sea Modern */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,900;1,600&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --abyss: #030b12;        /* near-black deep sea */
  --deep: #06141f;         /* page background */
  --panel: #0a1c2b;        /* cards / panels */
  --panel-edge: #14324a;
  --line: rgba(140, 190, 230, .14);
  --text: #dce8f2;
  --text-dim: #8fa8bc;
  --gold: #c9a154;         /* brass accent */
  --gold-bright: #e6c37a;
  --sea: #2e7fb6;          /* accent blue */
  --sea-bright: #56a8dd;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--deep);
  background-image:
    radial-gradient(1100px 500px at 50% -10%, rgba(46,127,182,.14), transparent 65%),
    linear-gradient(var(--deep), var(--abyss));
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  position: relative;
}

/* ships banner — spans masthead + nav + opening content, fading out fully */
body::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: min(64vh, 560px);
  background: url('assets/ships-banner.jpg') center top / cover no-repeat;
  opacity: .55;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.8) 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.8) 45%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

a { color: var(--sea-bright); }

/* ---------- masthead ---------- */
header.masthead {
  padding: 26px 20px 0;
  text-align: center;
  background: transparent;
}
.masthead h1 a, .masthead .est, .masthead .motto { text-shadow: 0 2px 16px rgba(0,0,0,.9); }
nav.mainnav a { text-shadow: 0 1px 10px rgba(0,0,0,.9); }
.masthead .est {
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
}
.masthead h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(22px, 3.2vw, 30px);
  letter-spacing: .01em;
  line-height: 1.1;
  margin: 4px 0 2px;
}
.masthead h1 a { color: var(--text); text-decoration: none; }
.masthead .motto {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.masthead .motto::before, .masthead .motto::after { content: " — "; color: var(--gold); font-style: normal; }

nav.mainnav {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
nav.mainnav a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  padding: 10px 16px;
  border-bottom: 2px solid transparent;
  transition: color .15s;
}
nav.mainnav a:hover { color: var(--text); }
nav.mainnav a.active { color: var(--gold-bright); border-bottom-color: var(--gold); }

/* ---------- shared ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.section-title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(26px, 4vw, 38px);
  text-align: center;
  margin: 0 0 8px;
}
.section-kicker {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
}
.ornament {
  text-align: center;
  color: var(--sea);
  font-size: 14px;
  margin: 10px 0 38px;
  letter-spacing: .6em;
}

.btn {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 22px;
  border: 1px solid var(--gold);
  border-radius: 3px;
  color: var(--gold-bright);
  background: transparent;
  cursor: pointer;
  transition: all .15s ease;
}
.btn:hover { background: var(--gold); color: var(--abyss); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--abyss); }
.btn.primary:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.btn.small { padding: 8px 14px; font-size: 11px; }

/* ---------- hero ---------- */
.hero {
  text-align: center;
  padding: 34px 20px 32px;
}
.hero p {
  max-width: 560px;
  margin: 0 auto 20px;
  font-size: 15px;
  color: var(--text-dim);
}
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- book grid ---------- */
.books { padding: 44px 0 28px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 280px));
  justify-content: center;
  gap: 20px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--sea); }
.card .cover {
  height: 210px;
  background: var(--abyss);
  border-bottom: 1px solid var(--panel-edge);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
}
.card .cover img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.card .cover a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; cursor: pointer; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  margin-bottom: 3px;
}
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--gold-bright); }
.card .byline {
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.card p.blurb {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
  margin-bottom: 10px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .morelink { font-size: 12px; color: var(--sea-bright); text-decoration: none; margin-bottom: 10px; }
.card .morelink:hover { color: var(--gold-bright); }
.buylist { display: flex; flex-direction: column; gap: 5px; }
.buyrow {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 5px;
  font-size: 12px;
}
.buyrow .label { color: var(--text-dim); }
.buyrow .price { font-weight: 600; margin-left: auto; color: var(--text); }
.buyrow .btn.small { padding: 5px 10px; font-size: 10px; }
.badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 1px 7px;
  border-radius: 3px;
  margin-left: 8px;
  vertical-align: 2px;
}

/* ---------- poster feature ---------- */
.poster-feature {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(800px 400px at 20% 50%, rgba(46,127,182,.12), transparent 70%),
    var(--abyss);
  padding: 72px 0;
}
.poster-feature .wrap { display: grid; grid-template-columns: 340px 1fr; gap: 52px; align-items: center; }
.poster-feature img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--panel-edge);
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.poster-feature .kicker { font-size: 12px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.poster-feature h2 { font-family: 'Playfair Display', serif; font-weight: 900; font-size: clamp(26px, 4vw, 42px); line-height: 1.12; margin: 10px 0 16px; }
.poster-feature p { color: var(--text-dim); margin-bottom: 20px; max-width: 54ch; font-size: 15px; }
.poster-feature .morelink { display: inline-block; font-size: 13px; color: var(--sea-bright); text-decoration: none; margin: 0 0 18px; }
.poster-feature .morelink:hover { color: var(--gold-bright); }
.poster-feature .poster-actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 800px) { .poster-feature .wrap { grid-template-columns: 1fr; } .poster-feature img { max-width: 320px; margin: 0 auto; display: block; } }

/* ---------- product page ---------- */
.product { padding: 56px 0 80px; }
.product .wrap { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 56px; align-items: start; }
@media (max-width: 820px) { .product .wrap { grid-template-columns: 1fr; } }
.product .art img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--panel-edge);
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  background: var(--panel);
}
.product .art .caption { font-size: 12px; color: var(--text-dim); margin-top: 12px; text-align: center; }
.product h1 { font-family: 'Playfair Display', serif; font-weight: 900; font-size: clamp(28px, 4vw, 42px); line-height: 1.12; margin-bottom: 8px; }
.product .byline { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 22px; }
.product .desc p { margin-bottom: 14px; color: var(--text-dim); font-size: 15px; }
.breadcrumb { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 24px 0 0; color: var(--text-dim); }
.breadcrumb a { color: var(--text-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-bright); }

.editions { margin-top: 30px; border: 1px solid var(--panel-edge); border-radius: 6px; background: var(--panel); overflow: hidden; }
.editions h3 {
  font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); background: var(--abyss); border-bottom: 1px solid var(--panel-edge); padding: 12px 20px;
}
.edition {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.edition:last-child { border-bottom: none; }
.edition .name { font-weight: 600; }
.edition .via { font-size: 12px; color: var(--text-dim); }
.edition .price { margin-left: auto; font-weight: 600; }

/* poster option picker */
.options { margin-top: 30px; border: 1px solid var(--panel-edge); border-radius: 6px; background: var(--panel); padding: 22px 24px 26px; }
.options h3 { font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.optgroup { margin-bottom: 18px; }
.optgroup .optlabel { font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--panel-edge); border-radius: 3px;
  background: var(--abyss); color: var(--text);
  font-family: 'Inter', sans-serif; font-size: 13px; padding: 9px 14px; cursor: pointer;
  transition: all .12s;
}
.chip:hover { border-color: var(--sea); }
.chip.selected { background: var(--gold); border-color: var(--gold); color: var(--abyss); font-weight: 600; }
.chip:disabled { opacity: .35; cursor: not-allowed; }
.pricebar { display: flex; align-items: baseline; gap: 14px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }
.pricebar .amount { font-family: 'Playfair Display', serif; font-weight: 900; font-size: 32px; color: var(--gold-bright); }
.pricebar .note { font-size: 12px; color: var(--text-dim); }
.options .btn { margin-top: 16px; width: 100%; text-align: center; }
.fulfil-note { font-size: 12px; color: var(--text-dim); margin-top: 12px; }

/* ---------- full-size image lightbox (pure CSS) ---------- */
.lightbox {
  position: fixed; inset: 0;
  display: none;
  overflow: auto;
  background: rgba(3, 11, 18, .97);
  z-index: 1000;
}
.lightbox:target { display: block; }
.lightbox-backdrop {
  position: fixed; inset: 0;
  display: block;
  cursor: zoom-out;
  z-index: 0;
}
.lightbox-inner {
  position: relative;
  z-index: 1;
  max-width: 940px;
  margin: 40px auto 64px;
  padding: 0 22px;
  text-align: center;
}
.lightbox-inner img {
  width: min(880px, 92vw);
  height: auto;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .7);
}
.lightbox-desc {
  max-width: 720px;
  margin: 26px auto 0;
  text-align: left;
}
.lightbox-desc p { color: var(--text-dim); font-size: 14.5px; line-height: 1.7; margin-bottom: 14px; }
.lightbox-close {
  position: fixed;
  top: 12px; right: 22px;
  font-size: 42px; line-height: 1;
  color: var(--text-dim);
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  z-index: 2;
}
.lightbox-close:hover { color: var(--gold-bright); }
.lightbox-back {
  position: fixed;
  top: 18px; left: 24px;
  font-size: 13px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim); text-decoration: none;
  z-index: 2;
}
.lightbox-back:hover { color: var(--gold-bright); }
.lightbox-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  justify-content: center;
  margin-top: 22px;
}
.art a { display: block; cursor: zoom-in; }
.art .viewlarger { display: inline-block; margin: 14px 0 4px; cursor: pointer; }
/* any enlargeable image */
.zoom { cursor: zoom-in; display: inline-block; }
.poster-feature .zoom, .poster-feature .zoom img { display: block; width: 100%; }

/* fixed-size line + paper note in the picker */
.sizeline {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--text);
}
.paper-note { font-size: 11.5px; color: var(--text-dim); margin-top: 8px; line-height: 1.5; }

/* author photo (about page) */
.author-photo { text-align: center; margin: 0 auto 26px; }
.author-photo img {
  width: 240px; max-width: 70%;
  border-radius: 6px;
  border: 1px solid var(--panel-edge);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.author-photo figcaption {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin-top: 12px;
}

/* ---------- poster credits ---------- */
.poster-credits {
  border-top: 1px solid var(--line);
  padding: 40px 20px 8px;
  text-align: center;
}
.poster-credits p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.9;
  margin-bottom: 18px;
}
.poster-credits p:last-child { margin-bottom: 0; }
.poster-credits a { color: var(--gold-bright); text-decoration: none; }
.poster-credits a:hover { text-decoration: underline; }

/* ---------- about / contact ---------- */
.prose { max-width: 720px; margin: 0 auto; padding: 64px 20px 90px; }
.prose h2 { font-family: 'Playfair Display', serif; font-weight: 900; font-size: 34px; margin-bottom: 18px; text-align: center; }
.prose p { margin-bottom: 16px; color: var(--text-dim); font-size: 17px; }
.prose .lede { font-size: 21px; color: var(--text); font-family: 'Playfair Display', serif; font-style: italic; text-align: center; }
.contact-block { background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 6px; padding: 30px; margin-top: 26px; text-align: center; }
.contact-block a { font-size: 19px; font-weight: 600; color: var(--gold-bright); }

/* ---------- retailers strip ---------- */
.retailers { text-align: center; padding: 52px 20px 64px; }
.retailers p { color: var(--text-dim); max-width: 60ch; margin: 0 auto; font-size: 15px; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  background: var(--abyss);
  padding: 40px 20px 34px;
  text-align: center;
}
footer .fnav { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; margin-bottom: 16px; }
footer .fnav a {
  font-size: 11px; font-weight: 600;
  letter-spacing: .24em; text-transform: uppercase; color: var(--text-dim); text-decoration: none;
}
footer .fnav a:hover { color: var(--gold-bright); }
footer .social { margin-bottom: 12px; }
footer .social a { margin: 0 10px; text-decoration: none; font-size: 13px; color: var(--text-dim); }
footer .legal { font-size: 12px; color: var(--text-dim); }
footer .legal a { color: var(--text-dim); }
