/* ============================================================
   CLASSIC AMERICAN IRON — Styles
   Dark, rugged, vintage Americana. Big text. Simple layout.
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg:        #1A1A1A;
  --color-bg-alt:    #222222;
  --color-surface:   #2A2A2A;
  --color-cream:     #E8DCC8;
  --color-cream-dim: #C4B89E;
  --color-red:       #8B2500;
  --color-red-hover: #A63000;
  --color-white:     #FFFFFF;
  --color-black:     #000000;

  --font-heading: 'Alfa Slab One', serif;
  --font-body:    'Lora', serif;

  --header-height: 80px;
  --container-max:  1200px;
}

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-cream);
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  padding: 14px 36px;
  min-height: 52px;
  text-align: center;
  transition: background 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--color-red);
  color: var(--color-white);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-red-hover);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(8px);
  z-index: 1000;
  border-bottom: 1px solid rgba(232, 220, 200, 0.1);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  flex-shrink: 0;
}

.logo {
  height: 50px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-cream);
  transition: color 0.2s;
  padding: 8px 0;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--color-white);
}

/* Cart button */
.cart-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-cream);
  padding: 8px;
  transition: color 0.2s;
}

.cart-btn:hover { color: var(--color-white); }

.cart-icon {
  width: 28px;
  height: 28px;
}

.cart-count {
  position: absolute;
  top: 0;
  right: -4px;
  background: var(--color-red);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.cart-count.visible {
  opacity: 1;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 6px;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--color-cream);
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + 40px) 24px 60px;
  overflow: hidden;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-flag {
  width: 70%;
  max-width: 700px;
  opacity: 0.08;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--color-cream);
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--color-cream-dim);
  margin-bottom: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  font-size: 1.3rem;
  padding: 18px 50px;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: 80px 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: 50px;
  color: var(--color-cream);
}

/* ============================================================
   PRODUCT GRID & CARDS
   ============================================================ */
.product-grid {
  display: grid;
  gap: 40px;
}

.product-grid--hats {
  grid-template-columns: repeat(2, 1fr);
  max-width: 800px;
  margin: 0 auto;
}

.product-grid--shirts {
  grid-template-columns: repeat(2, 1fr);
}

.product-card {
  background: var(--color-surface);
  border: 1px solid rgba(232, 220, 200, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.product-card:hover {
  border-color: rgba(232, 220, 200, 0.2);
}

.product-image-wrap {
  position: relative;
  background: var(--color-bg);
  padding: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

.product-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: opacity 0.3s;
}

/* Image carousel arrows */
.product-image-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(42, 42, 42, 0.85);
  border: 1px solid rgba(232, 220, 200, 0.15);
  color: var(--color-cream);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s, background 0.2s, border-color 0.2s;
  z-index: 2;
  padding: 0;
  line-height: 1;
}

.product-image-wrap:hover .product-image-arrow {
  opacity: 1;
}

.product-image-arrow:hover {
  background: rgba(42, 42, 42, 1);
  border-color: var(--color-cream-dim);
}

.product-image-arrow--prev {
  left: 10px;
}

.product-image-arrow--next {
  right: 10px;
}

.product-image-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.25s;
}

.product-image-wrap:hover .product-image-dots {
  opacity: 1;
}

.product-image-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(232, 220, 200, 0.3);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s;
}

.product-image-dot.active {
  background: var(--color-cream);
}

.product-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--color-red);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 6px 14px;
}

.product-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.product-color-label {
  font-size: 0.95rem;
  color: var(--color-cream-dim);
  margin-bottom: 12px;
}

.product-price {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-white);
  margin-bottom: 16px;
  margin-top: auto;
}

/* Variant selectors */
.variant-selector {
  margin-bottom: 14px;
}

.variant-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-cream-dim);
  margin-bottom: 8px;
}

.variant-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variant-btn {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 10px 18px;
  min-height: 44px;
  background: var(--color-bg);
  color: var(--color-cream);
  border: 2px solid rgba(232, 220, 200, 0.15);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.variant-btn:hover {
  border-color: var(--color-cream-dim);
}

.variant-btn.active {
  border-color: var(--color-cream);
  background: rgba(232, 220, 200, 0.1);
  color: var(--color-white);
}

.variant-btn.sold-out {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Add to cart button */
.btn-add-to-cart {
  width: 100%;
  margin-top: 8px;
}

.btn-add-to-cart:disabled {
  background: #555;
  cursor: not-allowed;
}

/* ============================================================
   ABOUT / EMAIL
   ============================================================ */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-cream-dim);
  margin-bottom: 16px;
}

.email-signup {
  background: var(--color-surface);
  padding: 36px;
  border: 1px solid rgba(232, 220, 200, 0.08);
}

.email-heading {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.email-subtext {
  font-size: 0.95rem;
  color: var(--color-cream-dim);
  margin-bottom: 20px;
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.email-input {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 14px 18px;
  min-height: 52px;
  background: var(--color-bg);
  color: var(--color-cream);
  border: 2px solid rgba(232, 220, 200, 0.15);
  outline: none;
  transition: border-color 0.2s;
}

.email-input::placeholder {
  color: var(--color-cream-dim);
  opacity: 0.6;
}

.email-input:focus {
  border-color: var(--color-cream);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--color-cream-dim);
  cursor: pointer;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--color-red);
  cursor: pointer;
}

.email-submit {
  width: 100%;
}

.email-success {
  display: none;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: #6BBF59;
  letter-spacing: 0.04em;
  margin-top: 16px;
}

.email-success.visible {
  display: block;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-black);
  padding: 50px 0 40px;
  text-align: center;
  border-top: 1px solid rgba(232, 220, 200, 0.08);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  height: 50px;
  width: auto;
  opacity: 0.4;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--color-cream-dim);
  opacity: 0.6;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--color-cream-dim);
  transition: color 0.2s;
}

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

/* ============================================================
   CART DRAWER
   ============================================================ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: var(--color-bg-alt);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  border-left: 1px solid rgba(232, 220, 200, 0.1);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid rgba(232, 220, 200, 0.1);
}

.cart-drawer-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.cart-close {
  background: none;
  border: none;
  color: var(--color-cream);
  font-size: 2rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.cart-close:hover {
  color: var(--color-white);
}

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

.cart-empty-msg {
  color: var(--color-cream-dim);
  text-align: center;
  padding: 40px 0;
  font-size: 1rem;
}

/* Cart line items */
.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(232, 220, 200, 0.08);
}

.cart-item-image {
  width: 70px;
  height: 70px;
  object-fit: contain;
  background: var(--color-bg);
  padding: 6px;
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-name {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
}

.cart-item-variant {
  font-size: 0.8rem;
  color: var(--color-cream-dim);
}

.cart-item-price {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-white);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.cart-qty-btn {
  background: var(--color-surface);
  border: 1px solid rgba(232, 220, 200, 0.15);
  color: var(--color-cream);
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.cart-qty-btn:hover {
  border-color: var(--color-cream);
}

.cart-qty-value {
  font-family: var(--font-heading);
  font-size: 1rem;
  min-width: 24px;
  text-align: center;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--color-cream-dim);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  align-self: flex-start;
  transition: color 0.2s;
}

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

/* Cart footer */
.cart-drawer-footer {
  padding: 24px;
  border-top: 1px solid rgba(232, 220, 200, 0.1);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 400;
}

.cart-total-price {
  color: var(--color-white);
}

.btn-checkout {
  width: 100%;
  font-size: 1.2rem;
  padding: 16px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .product-grid--shirts {
    grid-template-columns: 1fr;
  }

  .about-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 700px) {
  html { font-size: 16px; }

  :root { --header-height: 64px; }

  .logo { height: 40px; }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.98);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    border-bottom: 1px solid rgba(232, 220, 200, 0.1);
  }

  .main-nav.open {
    max-height: 300px;
    padding: 20px 0;
  }

  .main-nav .nav-link {
    padding: 16px 0;
    font-size: 1.2rem;
  }

  .hamburger {
    display: flex;
  }

  .product-grid--hats {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 60vh;
    padding-top: calc(var(--header-height) + 30px);
  }

  .hero-title {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }

  .section {
    padding: 50px 0;
  }

  .product-image-wrap {
    min-height: 260px;
    padding: 24px;
  }

  .product-image {
    max-width: 100%;
    max-height: 100%;
  }

  .email-signup {
    padding: 24px;
  }

  .cart-drawer {
    max-width: 100%;
  }
}
