:root {
  /* Brand Palette */
  --camel: #d6a76a;
  --navy: #1e3a5f;
  --cream: #f5deb3;
  --terracotta: #c2410c;
  
  /* Backgrounds & Text */
  --bg-color: #faf5eb; /* Lighter version of cream for main bg */
  --text-primary: #1e3a5f;
  --text-secondary: rgba(30, 58, 95, 0.7);
  
  /* Typography */
  --font-heading: 'Lora', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Space Mono', monospace;
  
  /* Spacing */
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 32px;
  --spacing-xl: 64px;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* Texture Overlay */
.texture-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 9999;
}

/* Header */
.site-header {
  padding: var(--spacing-md) var(--spacing-lg);
  text-align: center;
  border-bottom: 1px solid rgba(30, 58, 95, 0.1);
}

.header-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Sticky Cart */
.sticky-cart {
  position: fixed;
  top: 24px;
  right: 24px;
  background-color: var(--navy);
  color: var(--cream);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sticky-cart:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(30, 58, 95, 0.3);
}

.cart-count {
  position: absolute;
  top: 0;
  right: -5px;
  background-color: var(--terracotta);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--terracotta);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(194, 65, 12, 0.3);
  z-index: 1000;
  transform: translateY(0);
  opacity: 1;
  transition: all 0.3s ease;
}

.toast.hidden {
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
}

/* Hero Banner */
.hero-banner {
  background-color: var(--navy);
  color: var(--cream);
  padding: var(--spacing-xl) var(--spacing-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(214, 167, 106, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.banner-content {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--camel);
  margin-bottom: var(--spacing-md);
}

.hero-banner h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
}

.hero-banner p {
  font-size: 1.1rem;
  color: rgba(245, 222, 179, 0.8);
  margin-bottom: var(--spacing-lg);
}

/* Form */
.input-group {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(245, 222, 179, 0.2);
  border-radius: 8px;
  overflow: hidden;
  padding: 4px;
}

.input-group input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 16px;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
}

.input-group input::placeholder {
  color: rgba(245, 222, 179, 0.5);
}

.input-group button {
  background-color: var(--terracotta);
  color: white;
  border: none;
  padding: 0 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.input-group button:hover {
  background-color: #a33609;
}

.input-group button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.error-msg {
  color: #ff6b6b;
  margin-top: 10px;
  font-size: 0.9rem;
}

/* Success View */
.code-display-box {
  display: inline-flex;
  align-items: center;
  background-color: var(--cream);
  color: var(--navy);
  padding: 8px 8px 8px 24px;
  border-radius: 8px;
  margin-bottom: var(--spacing-md);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

#coupon-code {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-right: 20px;
}

.copy-btn {
  background-color: var(--terracotta);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background-color: #a33609;
}

.copy-success {
  color: var(--camel);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: var(--spacing-lg);
}

.scroll-link {
  display: inline-block;
  color: rgba(245, 222, 179, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.scroll-link:hover {
  color: var(--cream);
}

#status-message {
  padding: 40px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
}

/* Shop Layout */
.shop-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-lg);
  display: flex;
  gap: var(--spacing-xl);
}

/* Filter Rail */
.filter-rail {
  width: 240px;
  flex-shrink: 0;
}

.filter-group {
  margin-bottom: var(--spacing-lg);
  border-bottom: 1px solid rgba(30, 58, 95, 0.1);
  padding-bottom: var(--spacing-lg);
}

.filter-group h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: var(--spacing-md);
  font-weight: 600;
}

.filter-label {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.filter-label:hover {
  color: var(--text-primary);
}

.filter-label input {
  display: none;
}

.custom-check {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(30, 58, 95, 0.3);
  border-radius: 4px;
  margin-right: 12px;
  display: inline-block;
  position: relative;
}

.filter-label input:checked + .custom-check {
  background-color: var(--navy);
  border-color: var(--navy);
}

.filter-label input:checked + .custom-check::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.size-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-btn {
  background: transparent;
  border: 1px solid rgba(30, 58, 95, 0.2);
  width: 40px;
  height: 40px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.size-btn:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.size-btn.active {
  background: var(--navy);
  color: var(--cream);
  border-color: var(--navy);
}

.color-grid {
  display: flex;
  gap: 12px;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.color-swatch:hover {
  transform: scale(1.1);
  border-color: rgba(30, 58, 95, 0.3);
}

/* Product Grid */
.product-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
}

.product-card {
  position: relative;
  group: true;
}

.img-wrapper {
  position: relative;
  aspect-ratio: 3/4;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: var(--spacing-md);
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .img-wrapper img {
  transform: scale(1.05);
}

.product-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.product-name {
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 4px;
}

.product-price {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.add-to-cart-btn {
  background: transparent;
  border: 1px solid rgba(30, 58, 95, 0.2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.2s;
}

.add-to-cart-btn:hover {
  background-color: var(--navy);
  color: var(--cream);
  border-color: var(--navy);
}

/* Footer */
.site-footer {
  padding: var(--spacing-xl) 0;
  text-align: center;
}

/* Responsive */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .shop-layout {
    flex-direction: column;
  }
  
  .filter-rail {
    width: 100%;
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
  }
  
  .filter-group {
    flex: 1;
    min-width: 200px;
    border-bottom: none;
  }
  
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .hero-banner h1 {
    font-size: 2.2rem;
  }
  
  .input-group {
    flex-direction: column;
    background: transparent;
    border: none;
    gap: 12px;
  }
  
  .input-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(245, 222, 179, 0.2);
    border-radius: 8px;
  }
  
  .input-group button {
    padding: 16px;
    border-radius: 8px;
  }
  
  .code-display-box {
    flex-direction: column;
    padding: 16px;
    gap: 16px;
  }
  
  #coupon-code {
    margin-right: 0;
  }
  
  .product-grid {
    grid-template-columns: 1fr;
  }
}
