/*
  components.css
  Styles for the shared, reusable pieces of chrome rendered by js/components.js
  (<site-header>, <site-footer>, <newsletter-band>) plus other components reused
  across more than one page: the tasting-notes modal, the whiskey/story card
  grid, product spec lists, the quantity stepper, and status badges.
*/

/* ===== header ===== */
.site-header {
  display: block;
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--frame);
  border-bottom: 1px solid var(--frame-line);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}
.logochip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.logochip img {
  width: 100% !important;
  height: auto !important;
}
.site-header .logochip {
  width: 52px;
  height: 52px;
}
.brand .wm {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand .wm b {
  font-family: 'Old English Text MT', serif;
  font-weight: 700;
  font-size: 25px;
  color: #f3ede1;
}
.brand .wm span {
  font-family: 'EB Garamond', serif;
  font-size: 9px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #c98f55;
  margin-top: 3px;
}
.site-header .brand .wm-line {
  font-family: 'EB Garamond', serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fbf6ec;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a.navlink {
  font-family: 'EB Garamond', serif;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d8d2c6;
  transition: color 0.2s;
}
.nav-links a.navlink:hover,
.nav-links a.navlink.active {
  color: #fbf6ec;
}
.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--copper);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 600;
}
.cart-count[data-empty] {
  background: #5a5751;
}

/* mobile hamburger + slide-down panel */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--frame-line);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle .bars {
  position: relative;
  width: 18px;
  height: 13px;
}
.nav-toggle .bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: #d8d2c6;
  transition: transform 0.2s, opacity 0.2s, top 0.2s;
}
.nav-toggle .bars span:nth-child(1) { top: 0; }
.nav-toggle .bars span:nth-child(2) { top: 6px; }
.nav-toggle .bars span:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--frame);
    border-bottom: 1px solid var(--frame-line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.open {
    max-height: 420px;
  }
  .nav-links a.navlink {
    width: 100%;
    padding: 16px 24px;
    border-top: 1px solid var(--frame-line);
  }
  .nav-toggle {
    display: inline-flex;
  }
}

/* ===== tasting-notes modal ===== */
.tn-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(26, 16, 8, 0.62);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s;
}
.tn-overlay.open {
  opacity: 1;
  visibility: visible;
}
.tn-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: auto;
  background: var(--cream);
  border-top: 5px solid var(--gold);
  box-shadow: 0 40px 90px rgba(20, 12, 6, 0.5);
  padding: 46px 48px 44px;
  transform: translateY(18px) scale(0.98);
  transition: transform 0.28s;
}
.tn-overlay.open .tn-card {
  transform: none;
}
.tn-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--stone-line);
  background: transparent;
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}
.tn-close:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.tn-medal {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: 'EB Garamond', serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  background: var(--copper);
  padding: 6px 14px;
}
.tn-medal.silver {
  background: #8b8681;
}
.tn-card h3 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.06;
  color: var(--ink);
  margin: 18px 0 4px;
}
.tn-sub {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 17px;
  color: var(--copper-deep);
  margin: 0 0 22px;
}
.tn-label {
  font-family: 'EB Garamond', serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 8px;
}
.tn-note {
  position: relative;
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 26px;
  padding: 6px 0 0 26px;
  border-left: 3px solid var(--gold);
}
.tn-meta {
  border-top: 1px solid var(--stone-line);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tn-meta .row {
  display: flex;
  gap: 14px;
  font-size: 15.5px;
  line-height: 1.5;
}
.tn-meta .v {
  color: var(--ink-soft);
}
.tn-foot {
  margin-top: 24px;
  font-family: 'EB Garamond', serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a8a70;
}

/* ===== whiskey card grid (home) ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 58px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, transform 0.25s;
}
.card:hover {
  box-shadow: 0 24px 50px rgba(40, 26, 12, 0.12);
  transform: translateY(-4px);
}
.card .ph {
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.card .ph img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
}
.card .ph.lifestyle {
  background: #f0ece2;
}
.card .ph.lifestyle img {
  padding: 0;
  object-fit: cover;
}
.card .body {
  padding: 28px 28px 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card .badge-label {
  font-family: 'EB Garamond', serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 11px;
}
.card h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 27px;
  color: var(--ink);
  margin: 0 0 10px;
}
.card p {
  font-size: 16.5px;
  line-height: 1.58;
  color: var(--ink-soft);
  margin: 0 0 22px;
  flex: 1;
}
.card-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: auto;
}
.btn-card {
  padding: 11px 24px;
  font-size: 13px;
}

/* ===== product spec lists (shop + cask) ===== */
.spec-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  border-top: 1px solid var(--line);
}
.spec-list li {
  display: flex;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
}
.spec-list .k {
  flex: 0 0 128px;
  font-family: 'EB Garamond', serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  padding-top: 2px;
}
.spec-list .v {
  color: var(--ink-soft);
}

/* ===== badges ===== */
.badge {
  display: inline-block;
  font-family: 'EB Garamond', serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  background: var(--copper);
  padding: 5px 13px;
}
.badge.silver {
  background: #8b8681;
}
.badge.set {
  background: var(--teal);
}

/* ===== quantity stepper + buy row ===== */
.buyrow {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d3c2a6;
  border-radius: 30px;
  overflow: hidden;
}
.qty button {
  width: 42px;
  height: 48px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
}
.qty button:hover {
  background: var(--cream);
}
.qty span {
  min-width: 36px;
  text-align: center;
  font-size: 17px;
}
.btn.added {
  background: #1f8a5b;
  border-color: #1f8a5b;
  color: #fff;
}

/* ===== newsletter band ===== */
.news {
  display: block;
  background: var(--teal);
  color: #fff;
}
.news .inner {
  padding-top: 60px;
  padding-bottom: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.news h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  color: #fff;
  margin: 0 0 8px;
}
.news p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
}
.news .field {
  display: flex;
  min-width: 380px;
  flex: 1;
  max-width: 460px;
}
.news input {
  flex: 1;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-right: none;
  color: #fff;
  padding: 15px 18px;
  font-size: 16px;
  outline: none;
  border-radius: 30px 0 0 30px;
}
.news input::placeholder {
  color: rgba(255, 255, 255, 0.85);
}
.news button {
  background: #fff;
  color: var(--teal);
  border: 1px solid #fff;
  padding: 0 28px;
  font-family: 'EB Garamond', serif;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0 30px 30px 0;
}

/* ===== footer ===== */
.footer {
  display: block;
  background: var(--frame);
  border-top: 1px solid var(--frame-line);
  color: #b9b3a8;
}
.footer a {
  color: #cfc8bb;
}
.footer a:hover {
  color: #f3ede1;
}
.footer .eyebrow {
  color: #a89e8e !important;
}
.footer .logochip {
  width: 76px;
  height: 76px;
}
.footer .top {
  padding-top: 64px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
}
.footer .brand-blurb {
  font-size: 16px;
  line-height: 1.65;
  color: #c4bdb0;
  margin: 0 0 16px;
  max-width: 330px;
}
.footer .spelling-link {
  font-style: italic;
  font-size: 16px;
  color: #d99a63;
  border-bottom: 1px solid var(--frame-line);
  padding-bottom: 3px;
}
.footer .col-title {
  margin-bottom: 20px;
}
.footer .col-links {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.footer .col-links a {
  font-size: 17px;
}
.footer .socials {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}
.footer .socials a {
  color: #d99a63 !important;
}
.footer .bottom {
  border-top: 1px solid var(--frame-line);
}
.footer .bottom .inner {
  padding-top: 22px;
  padding-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: #9a9184;
}
.footer .bottom .responsibly {
  color: #c98f55;
}

@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .news .field {
    min-width: 0;
    width: 100%;
  }
  .footer .top {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}
