:root {
  --bg: #0b0a0d;
  --bg-raised: #151318;
  --border: #2b262f;
  --text: #e9e4e0;
  --text-muted: #948d95;
  --accent: #7a1f2b;
  --accent-bright: #a8283a;
  --gold: #b3944f;
  --gold-bright: #cbab6a;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
  line-height: 1.5;
}

h1, h2 {
  font-family: "Cinzel", serif;
  letter-spacing: 0.04em;
  margin: 0;
}

.announcement-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 0.6rem 1rem;
}

.announcement-bar p {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 15;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  height: 3rem;
  width: 3rem;
  object-fit: contain;
  border-radius: 50%;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a.current {
  color: var(--text);
}

.tagline {
  color: var(--text-muted);
  margin: 0.5rem 0 0;
  font-style: italic;
}

.cart-toggle {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.cart-toggle:hover {
  border-color: var(--accent-bright);
}

#cart-count {
  color: var(--accent-bright);
  font-weight: 600;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.section-title {
  font-size: 1.5rem;
  text-transform: uppercase;
  margin: 0 0 1.75rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.75rem;
}

.brand-tagline {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  margin: 3rem 0 0;
}

.status {
  color: var(--text-muted);
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 0;
  font-style: italic;
}

.product-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #1c191e;
}

.product-card .product-body {
  padding: 1rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.product-card h3 {
  font-family: "Cinzel", serif;
  font-size: 1.05rem;
  margin: 0;
}

.product-card-media {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.product-card-title {
  display: inline;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.product-card-title:hover {
  color: var(--gold-bright);
}

.product-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  flex: 1;
}

.product-price {
  font-size: 1.1rem;
  color: var(--accent-bright);
}

.add-to-cart {
  background: var(--accent);
  color: #f4ece7;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-family: "Cinzel", serif;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-transform: uppercase;
}

.add-to-cart:hover {
  background: var(--accent-bright);
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(380px, 100%);
  background: var(--bg-raised);
  border-left: 1px solid var(--border);
  z-index: 20;
  display: flex;
  transform: translateX(100%);
  transition: transform 0.2s ease;
}

.cart-panel:not([hidden]) {
  transform: translateX(0);
}

.cart-panel[hidden] {
  display: flex;
  visibility: hidden;
}

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 19;
}

.backdrop[hidden] {
  display: none;
}

.cart-panel-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1.5rem;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

#cart-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.cart-items {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.cart-item-name {
  flex: 1;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.qty-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.qty-btn:hover {
  border-color: var(--accent-bright);
}

.qty-value {
  min-width: 1.2rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
}

.cart-empty {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  margin-top: 2rem;
}

.cart-footer {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.checkout-btn {
  width: 100%;
  background: var(--accent);
  color: #f4ece7;
  border: none;
  padding: 0.85rem;
  border-radius: 4px;
  font-family: "Cinzel", serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  font-size: 0.95rem;
}

.checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkout-btn:not(:disabled):hover {
  background: var(--accent-bright);
}

.checkout-error {
  color: #e07a7a;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 2.5rem 0 3rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.footer-inner p {
  margin: 0.3rem 0;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.product-modal[hidden] {
  display: none;
}

.product-modal-inner {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
}

.product-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.product-modal-main-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  background: #1c191e;
  display: block;
}

.product-modal-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.product-modal-thumbs .thumb {
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: #1c191e;
}

.product-modal-thumbs .thumb.active {
  border-color: var(--gold);
}

.product-modal-thumbs .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-modal-info h2 {
  font-size: 1.4rem;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.product-modal-description {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.product-modal-variations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.variation-option {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.variation-option:hover {
  border-color: var(--gold);
}

.variation-option.selected {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--bg);
}

.product-modal-price-row {
  font-size: 1.3rem;
  color: var(--accent-bright);
  margin-bottom: 1.25rem;
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .product-modal-inner {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
}
