/* ==========================================================================
   SPIML Master Stylesheet
   ========================================================================== */

/* --- CSS Variables & Tokens --- */
:root {
  /* Brand Colors */
  --color-navy-900: #0B1B2E;
  --color-navy-700: #14304F;
  --color-navy-500: #1F4A77;
  --color-copper-500: #B87333;
  --color-copper-300: #D49A66;
  --color-ivory-50: #FAF7F2;
  --color-white: #FFFFFF;
  --color-gray-900: #1A1A1A;
  --color-gray-700: #4A4A4A;
  --color-gray-500: #8A8A8A;
  --color-gray-200: #E5E5E5;
  --color-gray-100: #F2F2F2;

  /* Semantic Colors */
  --bg-page: var(--color-ivory-50);
  --bg-surface: var(--color-white);
  --bg-inverse: var(--color-navy-900);
  --text-primary: var(--color-gray-900);
  --text-secondary: var(--color-gray-700);
  --text-inverse: var(--color-white);
  --accent: var(--color-copper-500);
  --border: var(--color-gray-200);

  /* Type scale (modular, 1.25 ratio) */
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-32: 2rem;
  --fs-40: 2.5rem;
  --fs-56: 3.5rem;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-24: 96px;

  /* Form factors */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(11,27,46,.06);
  --shadow-md: 0 4px 16px rgba(11,27,46,.08);
  --shadow-lg: 0 12px 40px rgba(11,27,46,.12);

  /* Motion */
  --ease: cubic-bezier(.2,.8,.2,1);
  --dur-1: 160ms;
  --dur-2: 280ms;
  --dur-3: 480ms;

  /* Fonts */
  --font-serif: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  overflow-x: hidden;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
}
a { text-decoration: none; color: inherit; transition: color var(--dur-2) var(--ease); }
ul { list-style: none; }

/* Focus states */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Typography utilities */
.h1 { font-size: var(--fs-40); font-weight: 700; }
.h2 { font-size: var(--fs-32); font-weight: 700; }
.h3 { font-size: var(--fs-24); font-weight: 500; }
.text-lg { font-size: var(--fs-20); }
.text-sm { font-size: var(--fs-14); }
.text-xs { font-size: var(--fs-12); }
.text-copper { color: var(--accent); }
.text-inverse { color: var(--text-inverse); }
.text-secondary { color: var(--text-secondary); }
.font-sans { font-family: var(--font-sans); }

@media (min-width: 768px) {
  .h1 { font-size: var(--fs-56); }
  .h2 { font-size: var(--fs-40); }
  .h3 { font-size: var(--fs-32); }
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--sp-4);
}
@media (min-width: 768px) { .container { padding-inline: var(--sp-8); } }
.section { padding-block: var(--sp-12); }
@media (min-width: 768px) { .section { padding-block: var(--sp-24); } }
.grid { display: grid; gap: var(--sp-6); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--dur-2) var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background-color: var(--color-copper-500);
  color: var(--color-white);
}
.btn-primary:hover {
  background-color: var(--color-copper-300);
}
.btn-ghost {
  background-color: transparent;
  border-color: var(--color-copper-500);
  color: var(--color-copper-500);
}
.btn-ghost:hover {
  background-color: var(--color-copper-500);
  color: var(--color-white);
}
.btn-inverse-ghost {
  background-color: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}
.btn-inverse-ghost:hover {
  background-color: var(--color-white);
  color: var(--color-navy-900);
}
.btn-full { width: 100%; }

/* --- Components --- */

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition: background-color var(--dur-3) var(--ease), padding var(--dur-3) var(--ease);
  background-color: var(--color-navy-900);
  color: var(--color-white);
  padding-block: var(--sp-4);
}
.site-header.is-transparent {
  background-color: transparent;
  padding-block: var(--sp-6);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo svg {
  height: 32px;
  width: auto;
  fill: currentColor;
}
.main-nav {
  display: none;
}
.main-nav ul {
  display: flex;
  gap: var(--sp-6);
}
.main-nav a {
  font-size: var(--fs-14);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.main-nav a:hover {
  color: var(--color-copper-300);
}
.header-actions {
  display: none;
}
.menu-toggle {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: var(--sp-2);
}
.menu-toggle svg { width: 24px; height: 24px; }
@media (min-width: 1024px) {
  .main-nav, .header-actions { display: flex; }
  .menu-toggle { display: none; }
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--color-navy-900);
  color: var(--color-white);
  z-index: 99;
  padding: var(--sp-24) var(--sp-6) var(--sp-6);
  transform: translateX(100%);
  transition: transform var(--dur-3) var(--ease);
}
.mobile-menu.is-open {
  transform: translateX(0);
}
.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  font-size: var(--fs-24);
  font-family: var(--font-serif);
}

/* Hero */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background-color: var(--color-navy-900);
  color: var(--color-white);
  padding-top: var(--sp-24);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}
.hero-rule {
  width: 60px;
  height: 2px;
  background-color: var(--color-copper-500);
  margin-bottom: var(--sp-6);
}
.hero-subhead {
  font-size: var(--fs-18);
  color: var(--color-gray-200);
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-8);
  max-width: 600px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

/* StatRow */
.stat-row {
  background-color: var(--color-white);
  padding-block: var(--sp-12);
  border-bottom: 1px solid var(--border);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-8);
}
@media (min-width: 768px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-item { text-align: center; }
.stat-number {
  font-family: var(--font-serif);
  font-size: var(--fs-32);
  color: var(--color-copper-500);
  margin-bottom: var(--sp-2);
}
.stat-label {
  font-size: var(--fs-14);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* BrandCard */
.brand-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 768px) {
  .brand-card { flex-direction: row; }
  .brand-card-img { width: 50%; }
  .brand-card-content { width: 50%; }
}
.brand-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 250px;
}
.brand-card-content {
  padding: var(--sp-8);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand-card-title {
  font-family: var(--font-serif);
  font-size: var(--fs-32);
  color: var(--color-navy-900);
  margin-bottom: var(--sp-4);
}
.brand-card-link {
  margin-top: var(--sp-6);
  font-weight: 500;
  color: var(--color-copper-500);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.brand-card-link::after {
  content: '→';
  transition: transform var(--dur-2);
}
.brand-card:hover .brand-card-link::after {
  transform: translateX(4px);
}

/* CategoryTile */
.category-tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-3) var(--ease);
}
.category-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,27,46,0.8), transparent 50%);
}
.category-tile-label {
  position: absolute;
  bottom: var(--sp-4);
  left: var(--sp-4);
  z-index: 2;
  color: var(--color-white);
  font-family: var(--font-serif);
  font-size: var(--fs-24);
}
.category-tile-icon {
  position: absolute;
  bottom: var(--sp-4);
  right: var(--sp-4);
  z-index: 2;
  color: var(--color-copper-500);
  background: var(--color-white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-tile:hover img {
  transform: scale(1.05);
}

/* CTABand */
.cta-band {
  background-color: var(--color-navy-900);
  color: var(--color-white);
  text-align: center;
  padding-block: var(--sp-16);
  border-top: 4px solid var(--color-copper-500);
}
.cta-band h2 {
  color: var(--color-white);
  margin-bottom: var(--sp-6);
}
.cta-band-actions {
  display: flex;
  justify-content: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* ProductCard */
.product-card {
  background: var(--color-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--dur-2);
  height: 100%;
}
.product-card:hover { box-shadow: var(--shadow-md); }
.product-img {
  aspect-ratio: 1 / 1;
  background: var(--color-gray-100);
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-4);
  overflow: hidden;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-brand {
  font-size: var(--fs-12);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-1);
}
.product-name {
  font-family: var(--font-serif);
  font-size: var(--fs-18);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.product-price {
  font-weight: 500;
  color: var(--color-copper-500);
  margin-bottom: var(--sp-3);
}
.product-meta {
  display: flex;
  gap: var(--sp-3);
  font-size: var(--fs-12);
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.product-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

/* FilterBar */
.filter-bar {
  background: var(--color-white);
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--sp-8);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.filter-label {
  font-size: var(--fs-12);
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}
.filter-select {
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  font-size: var(--fs-14);
  min-width: 160px;
}

/* Catalogue Grid */
.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--sp-6);
}
@media (min-width: 480px) { .catalogue-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .catalogue-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .catalogue-grid { grid-template-columns: repeat(4, 1fr); } }

/* Load More */
.load-more-container {
  text-align: center;
  margin-top: var(--sp-12);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
}
@media (min-width: 768px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}
.feature-card {
  text-align: center;
  padding: var(--sp-6);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--sp-4);
  color: var(--color-copper-500);
}

/* Footer */
.site-footer {
  background-color: var(--color-navy-900);
  color: var(--color-gray-200);
  padding-top: var(--sp-16);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  margin-bottom: var(--sp-12);
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}
.footer-col h4 {
  color: var(--color-white);
  margin-bottom: var(--sp-4);
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: var(--fs-14);
  letter-spacing: 0.05em;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.footer-col a {
  font-size: var(--fs-14);
  color: var(--color-gray-200);
}
.footer-col a:hover { color: var(--color-copper-300); }

/* Statutory Warning Band */
.statutory-warning {
  background-color: #000;
  color: #fff;
  text-align: center;
  padding: var(--sp-4);
  font-weight: 700;
  font-size: var(--fs-18);
  text-transform: uppercase;
  border-top: 2px solid #333;
  border-bottom: 2px solid #333;
}

.footer-bottom {
  padding-block: var(--sp-6);
  text-align: center;
  font-size: var(--fs-12);
  color: var(--color-gray-500);
}

/* AgeGateModal */
.age-gate-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--color-navy-900);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}
.age-gate-modal {
  background: var(--color-white);
  color: var(--text-primary);
  max-width: 500px;
  width: 100%;
  padding: var(--sp-8);
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.age-gate-modal h2 { margin-bottom: var(--sp-4); color: var(--color-navy-900); }
.age-gate-modal p { margin-bottom: var(--sp-6); color: var(--text-secondary); }
.age-gate-actions {
  display: flex;
  gap: var(--sp-4);
  justify-content: center;
}

/* Enquiry Form */
.enquiry-form {
  background: var(--color-white);
  padding: var(--sp-8);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.form-group {
  margin-bottom: var(--sp-4);
}
.form-label {
  display: block;
  font-size: var(--fs-14);
  font-weight: 500;
  margin-bottom: var(--sp-2);
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: var(--sp-3);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-sm);
  background-color: var(--color-gray-100);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--color-copper-500);
  background-color: var(--color-white);
  outline: none;
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-success {
  display: none;
  background: #E8F5E9;
  color: #2E7D32;
  padding: var(--sp-4);
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-4);
  font-weight: 500;
}
