/* ==================== CSS VARIABLES ==================== */
/* One palette, tone on tone. The ground steps in small lifts of the same
   oxblood hue; the ink is a warm bone taken from the wordmark rather than a
   cold white, so type, mark and buttons all read as one material. */
:root {
  /* ground */
  --black: #230A0D;
  --dark: #2C0F12;
  --dark-border: #3C171B;

  /* ink */
  --white: #F2E7D9;
  --light-gray: #C2AB9F;
  --gray: #9C8279;

  /* accents */
  --red: #E63946;
  --gold: #C9A227;
}

/* ==================== BASE STYLES ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--black);
  /* Moody heritage ground: warm pools of light over deep oxblood, fixed so
     the texture stays put while content scrolls past it. */
  background-image:
    radial-gradient(ellipse 95% 60% at 50% -8%,  rgba(72, 26, 30, 0.55), transparent 70%),
    radial-gradient(ellipse 70% 50% at 10% 32%,  rgba(58, 21, 25, 0.45), transparent 66%),
    radial-gradient(ellipse 80% 55% at 90% 72%,  rgba(50, 18, 22, 0.40), transparent 68%),
    radial-gradient(ellipse 130% 90% at 50% 50%, transparent 45%, rgba(14, 4, 5, 0.50) 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--white);
  overflow-x: hidden;
}

/* Film grain. Fixed, non-interactive, sits over the ground but under the
   header (z-index 100) so nav stays crisp. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ==================== HEADER ==================== */
.header::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(18, 5, 6, 0.75), transparent);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 24px 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  will-change: transform;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.logo {
  height: 56px;
}

.nav {
  order: 1;
  display: flex;
  gap: 24px;
  justify-content: flex-start;
  align-items: center;
}

/* Wordmark sits centre-stage. Kept first in the DOM for reading order and
   moved visually with order, rather than reordering the markup. */
.logo-link {
  order: 2;
  justify-self: center;
  display: block;
}

.header-actions { order: 3; }

.nav a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  gap: 24px;
  justify-content: flex-end;
  align-items: center;
}

.header-icon {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

#langToggle {
  font-size: 20px;
  line-height: 1;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
}

/* ==================== CART DRAWER ==================== */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  height: 100%;
  background: var(--dark);
  border-left: 1px solid var(--dark-border);
  z-index: 10000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cart-drawer.active {
  right: 0;
}

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

.cart-drawer-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.cart-drawer-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
}

.cart-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--dark-border);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 80px;
  height: 100px;
  background: var(--black);
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.cart-item-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.cart-item-variant {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 600;
  margin-top: 8px;
}

.cart-qty-btn {
  width: 24px;
  height: 24px;
  background: var(--black);
  border: 1px solid var(--gray);
  color: var(--white);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.cart-qty-btn:hover:not(:disabled) {
  border-color: var(--white);
}

.cart-qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--gray);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 8px;
  padding: 0;
  transition: color 0.3s ease;
}

.cart-item-remove:hover {
  color: var(--red);
}

.cart-drawer-footer {
  padding: 30px;
  border-top: 1px solid var(--dark-border);
}

.cart-discount {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--red);
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 700;
  padding-top: 12px;
  border-top: 1px solid var(--dark-border);
}

.cart-checkout-btn {
  width: 100%;
  padding: 16px;
  background: var(--white);
  color: var(--black);
  border: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ==================== EMAIL SIGNUP ==================== */
.email-signup {
  padding: 80px;
  border-top: 1px solid var(--dark-border);
  background: var(--black);
}

.email-signup-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.email-signup h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0;
  white-space: nowrap;
}

.email-signup h2 .red {
  color: var(--red);
}

.email-form {
  flex: 1;
  display: flex;
  gap: 0;
  margin: 0;
  border-bottom: 1px solid var(--dark-border);
}

.email-form input {
  flex: 1;
  padding: 12px 0;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

.email-form input:focus {
  outline: none;
}

.email-form input::placeholder {
  color: var(--gray);
  opacity: 0.5;
}

.email-form button {
  padding: 12px 20px;
  background: transparent;
  color: var(--white);
  border: none;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s;
}

.email-form button:hover {
  color: var(--red);
}

.email-message {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: absolute;
  margin-top: 8px;
}

.email-message.success {
  color: var(--white);
}

.email-message.error {
  color: var(--red);
}

/* ==================== FOOTER ==================== */
.footer {
  padding: 120px 80px 60px;
  border-top: 1px solid var(--dark-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 60px;
}

.footer-logo {
  height: 72px;
  opacity: 0.7;
  object-fit: contain;
}

.footer-tagline {
  font-size: 11px;
  color: var(--gray);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: -40px;
}

.footer-links {
  display: flex;
  gap: 40px;
  font-size: 12px;
  letter-spacing: 0.1em;
}

.footer-links a {
  color: var(--gray);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  font-size: 10px;
  color: var(--gray);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-top: 60px;
  border-top: 1px solid var(--dark-border);
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  color: var(--gray);
  transition: color 0.2s;
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--white);
}

/* ==================== RESPONSIVE - BASE ==================== */
@media (max-width: 1024px) {
  .header {
    padding: 20px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .header {
    padding: 30px;
  }
  
  .header-actions {
    gap: 20px;
  }
  
}

@media (max-width: 768px) {
  .header {
    padding: 16px 20px;
  }

  /* The wordmark is wide; at desktop size it collides with the nav and the
     action icons on a narrow viewport. */
  .logo {
    height: 26px;
  }

  .footer-logo {
    height: 44px;
  }

  .header-actions {
    gap: 8px;
  }

  .nav {
    gap: 14px;
  }

  .cart-drawer {
    width: 100%;
    right: -100%;
  }
  
  .email-signup {
    padding: 60px 20px;
  }
  
  .email-signup-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  
  .email-form {
    width: 100%;
  }
  
  .footer {
    padding: 80px 20px 40px;
    gap: 40px;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 16px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
