/* ============================================================
   BRANDI COLORS — Warm Botanical Design System
   ============================================================ */

/* ── Anti-piracy ─────────────────────────────────────────────────────────────
   Prevent images from being dragged, selected, or printed.
   Right-click blocking and keyboard-shortcut suppression are handled in JS.
   ─────────────────────────────────────────────────────────────────────────── */
img {
  -webkit-user-drag: none;
  -khtml-user-drag:  none;
  -moz-user-drag:    none;
  -o-user-drag:      none;
  user-drag:         none;
  -webkit-user-select: none;
  -moz-user-select:    none;
  user-select:         none;
}

/* Block all printing — replace entire page with a polite notice */
@media print {
  body > * { display: none !important; }
  body::after {
    content: "Printing is disabled on Brandi Colors.\AVisit brandicolors.com to purchase.";
    white-space: pre;
    display: block !important;
    text-align: center;
    padding: 80px 40px;
    font-size: 22px;
    font-family: Georgia, serif;
    color: #3d3228;
  }
}

:root {
  --cream:      #f5f0e8;
  --parchment:  #e8dcc8;
  --tan:        #d4c4a0;
  --brown:      #3d3228;
  --brown-mid:  #5a4a3a;
  --brown-light:#8a7a6a;
  --terra:      #c97a5a;
  --terra-dark: #a85a3a;
  --sage:       #8aab7e;
  --gold:       #c9a84c;
  --white:      #ffffff;
  --shadow:     rgba(61,50,40,0.10);
  --shadow-md:  rgba(61,50,40,0.18);

  --font-serif: 'Georgia', 'Times New Roman', serif;
  --font-sans:  'Helvetica Neue', Arial, sans-serif;

  --radius: 4px;
  --radius-lg: 8px;
  --transition: 0.2s ease;
  --max-width: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--brown);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--terra); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--terra-dark); }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.25;
  color: var(--brown);
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: 0.04em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: 0.03em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1rem; letter-spacing: 0.05em; text-transform: uppercase; }

.serif { font-family: var(--font-serif); }
.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--brown-light);
  font-family: var(--font-sans);
}
.tagline {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--brown-light);
  font-size: 1.1rem;
}

/* ── Layout ──────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  border-radius: var(--radius);
  font-weight: 500;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brown);
  color: var(--cream);
}
.btn-primary:hover { background: var(--brown-mid); color: var(--cream); }
.btn-accent {
  background: var(--terra);
  color: var(--white);
}
.btn-accent:hover { background: var(--terra-dark); color: var(--white); }
.btn-outline {
  background: transparent;
  color: var(--brown);
  border: 1.5px solid var(--brown);
}
.btn-outline:hover { background: var(--brown); color: var(--cream); }
.btn-ghost {
  background: transparent;
  color: var(--terra);
  border: 1.5px solid var(--terra);
}
.btn-ghost:hover { background: var(--terra); color: var(--white); }
.btn-lg { padding: 16px 36px; font-size: 0.85rem; }
.btn-sm { padding: 8px 18px; font-size: 0.72rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Navigation ──────────────────────────────────────────── */
.site-nav {
  background: var(--cream);
  border-bottom: 1px solid var(--parchment);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px var(--shadow);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 72px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img { height: 46px; width: auto; flex-shrink: 0; }
.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.nav-brand-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.nav-brand-name {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--brown);
  font-weight: 400;
}
.nav-brand-colors {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--terra);
  text-transform: uppercase;
  font-weight: 400;
}
.nav-brand-tag {
  font-family: var(--font-serif);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  font-style: italic;
}
/* Mobile — hide tagline on small screens */
@media (max-width: 560px) {
  .nav-logo img { height: 38px; }
  .nav-brand-tag { display: none; }
  .nav-brand-name { font-size: 1rem; }
  .nav-inner { padding: 0 16px; height: 62px; }
}
/* Very small — hide all text, just the owl */
@media (max-width: 360px) {
  .nav-brand-text { display: none; }
  .nav-logo { gap: 0; }
}
/* legacy */
.nav-logo-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: var(--brown);
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brown-mid);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--terra); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-cart-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--brown);
  font-size: 1.2rem;
  position: relative;
  padding: 4px;
}
.nav-cart-count {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--terra);
  color: var(--white);
  font-size: 0.6rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--brown);
  border-radius: 2px;
  transition: all 0.25s ease;
  transition: all var(--transition);
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--brown);
  color: var(--parchment);
  padding: 56px 0 32px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .footer-logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  color: var(--cream);
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}
.footer-brand p {
  font-size: 0.85rem;
  color: var(--brown-light);
  line-height: 1.7;
  max-width: 260px;
}
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.footer-social a {
  color: var(--brown-light);
  font-size: 1.1rem;
  transition: color var(--transition);
}
.footer-social a:hover { color: var(--terra); }
.footer-col h4 {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tan);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  font-size: 0.85rem;
  color: var(--brown-light);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--cream); }
.footer-newsletter {}
.footer-newsletter p { font-size: 0.85rem; color: var(--brown-light); margin-bottom: 12px; }
.footer-newsletter-form {
  display: flex;
  gap: 0;
}
.footer-newsletter-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--brown-mid);
  background: rgba(255,255,255,0.06);
  color: var(--cream);
  font-size: 0.85rem;
  border-radius: var(--radius) 0 0 var(--radius);
  outline: none;
}
.footer-newsletter-form input::placeholder { color: var(--brown-light); }
.footer-newsletter-form button {
  padding: 10px 16px;
  background: var(--terra);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: background var(--transition);
}
.footer-newsletter-form button:hover { background: var(--terra-dark); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.75rem; color: var(--brown-light); }
.footer-legal {
  display: flex;
  gap: 20px;
}
.footer-legal a {
  font-size: 0.75rem;
  color: var(--brown-light);
  transition: color var(--transition);
}
.footer-legal a:hover { color: var(--cream); }

/* ── Cards ───────────────────────────────────────────────── */
.product-card {
  background: var(--white);
  border: 1px solid var(--parchment);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}
.product-card:hover {
  box-shadow: 0 8px 24px var(--shadow-md);
  transform: translateY(-2px);
}
.product-card-image {
  position: relative;  /* stacking context for the watermark canvas */
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--white);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card-image img { transform: scale(1.04); }
.product-card-body { padding: 20px; }
.product-card-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--brown);
}
.product-card-subtitle { font-size: 0.78rem; color: var(--brown-light); margin-bottom: 10px; }
.product-card-price {
  font-size: 1.1rem;
  color: var(--terra);
  font-family: var(--font-serif);
  margin-bottom: 14px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
}

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brown-mid);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--parchment);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--brown);
  transition: border-color var(--transition);
  outline: none;
  font-family: var(--font-sans);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--terra); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-error { color: var(--terra-dark); font-size: 0.8rem; margin-top: 4px; }

/* ── Badges / Tags ───────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.badge-pending   { background: #fff3cd; color: #856404; }
.badge-processing{ background: #cce5ff; color: #004085; }
.badge-shipped   { background: #d4edda; color: #155724; }
.badge-delivered { background: #d1ecf1; color: #0c5460; }
.badge-returned  { background: #f8d7da; color: #721c24; }
.badge-cancelled { background: var(--parchment); color: var(--brown-light); }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 16px;
  border-left: 4px solid;
}
.alert-success { background: #d4edda; border-color: var(--sage); color: #155724; }
.alert-error   { background: #f8d7da; border-color: var(--terra); color: #721c24; }
.alert-info    { background: #d1ecf1; border-color: #17a2b8; color: #0c5460; }

/* ── Lightbox ────────────────────────────────────────────── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox-overlay.active { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 10;   /* above the watermark canvas (z-index: 6) */
  color: var(--cream);
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}

/* ── Cookie Banner ───────────────────────────────────────── */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--brown);
  color: var(--parchment);
  padding: 20px 24px;
  z-index: 500;
  box-shadow: 0 -4px 20px var(--shadow-md);
}
.cookie-banner.visible { display: block; }
.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-inner p {
  flex: 1;
  font-size: 0.85rem;
  color: var(--brown-light);
  min-width: 240px;
}
.cookie-inner p a { color: var(--terra); }
.cookie-actions { display: flex; gap: 10px; }

/* ── Specs table ─────────────────────────────────────────── */
.specs-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.specs-table tr { border-bottom: 1px solid var(--parchment); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table td { padding: 10px 0; font-size: 0.9rem; }
.specs-table td:first-child {
  color: var(--brown-light);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  width: 140px;
}

/* ── Section dividers ────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--parchment);
  margin: 48px 0;
}
.divider-ornament {
  text-align: center;
  position: relative;
  margin: 48px 0;
}
.divider-ornament::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--parchment);
}
.divider-ornament span {
  position: relative;
  background: var(--cream);
  padding: 0 16px;
  color: var(--brown-light);
  font-size: 1rem;
}

/* ── Hero strip ──────────────────────────────────────────── */
.tiktok-strip {
  background: var(--parchment);
  padding: 56px 0;
  text-align: center;
}
.tiktok-embed-wrapper {
  max-width: 400px;
  margin: 24px auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px var(--shadow-md);
}
.tiktok-embed-wrapper iframe {
  width: 100%;
  border: none;
  display: block;
}

/* ── Newsletter strip ────────────────────────────────────── */
.newsletter-strip {
  background: var(--brown);
  padding: 56px 0;
  text-align: center;
}
.newsletter-strip h2 { color: var(--cream); margin-bottom: 8px; }
.newsletter-strip p { color: var(--brown-light); margin-bottom: 24px; }
.newsletter-form {
  display: flex;
  max-width: 440px;
  margin: 0 auto;
  gap: 0;
}
.newsletter-form input {
  flex: 1;
  padding: 14px 18px;
  border: none;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.1);
  color: var(--cream);
  border-radius: var(--radius) 0 0 var(--radius);
  outline: none;
  border: 1px solid rgba(255,255,255,0.15);
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.4); }
.newsletter-form button {
  padding: 14px 22px;
  background: var(--terra);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: background var(--transition);
  white-space: nowrap;
}
.newsletter-form button:hover { background: var(--terra-dark); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-hamburger.open span:nth-child(2) { opacity: 0; }
  .nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: var(--cream);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--parchment);
    box-shadow: 0 4px 12px var(--shadow);
    z-index: 999;
  }
  .nav-links.open a { font-size: 1rem; padding: 8px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
  .product-card-body { padding: 14px; }
  .product-card-title { font-size: 0.9rem; }
  .btn { padding: 12px 20px; font-size: 0.75rem; }
  .btn-lg { padding: 14px 24px; }
  .newsletter-strip { padding: 48px 0; }
  .newsletter-strip h2 { font-size: 1.4rem; }
  /* Ensure tap targets are large enough */
  .btn, button, a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  a.btn, button.btn { display: inline-flex; }
}

@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .section { padding: 36px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }
  /* Stack the footer newsletter form on small screens */
  .footer-newsletter-form { flex-direction: column; gap: 8px; }
  .footer-newsletter-form input { border-radius: var(--radius); width: 100%; }
  .footer-newsletter-form button { border-radius: var(--radius); width: 100%; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input,
  .newsletter-form button { border-radius: var(--radius); width: 100%; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  /* Let aspect-ratio control height rather than a fixed value */
  .product-card-image { height: auto; }
  .product-card-body { padding: 12px; }
  .product-card-title { font-size: 0.85rem; }
  .product-card-price { font-size: 0.95rem; margin-bottom: 10px; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
}

@media (max-width: 360px) {
  .container { padding: 0 10px; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .product-card-image { height: auto; }
  .nav-cart-count { font-size: 0.55rem; width: 16px; height: 16px; }
}

/* ── Utility ─────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--brown-light); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
