/* ============================================================
   BASE.CSS — CSS Reset, Variables, Typography, Utilities
   ============================================================ */

/* --- CSS Custom Properties --------------------------------- */
:root {
  --navy:          #0A1628;
  --gold:          #C9A96E;
  --white:         #FFFFFF;
  --off-white:     #FAFAF8;
  --border:        #E8E4DC;
  --muted:         #999999;
  --text:          #333333;
  --danger:        #C0392B;
  --success:       #27AE60;

  --font-heading:  Georgia, 'Times New Roman', serif;
  --font-body:     'Helvetica Neue', Arial, sans-serif;
  --max-width:     1200px;

  --transition:    0.2s ease;
  --radius:        4px;
  --shadow:        0 2px 12px rgba(10, 22, 40, 0.08);
  --shadow-lg:     0 8px 32px rgba(10, 22, 40, 0.14);
}

/* --- Theme: În Memoriam (dark, sober) --------------------- */
body.theme-memoriam {
  --navy:          #E8E4DC;        /* light text on dark bg */
  --gold:          #C9A96E;
  --white:         #0E1A2D;        /* card bg */
  --off-white:     #0E1A2D;        /* page bg */
  --border:        #2A3850;
  --muted:         #8A96AB;
  --text:          #E8E4DC;
  --shadow:        0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg:     0 8px 32px rgba(0, 0, 0, 0.5);
  background-color: #0E1A2D;
  color: #E8E4DC;
  transition: background-color 0.4s ease, color 0.4s ease;
}
body.theme-memoriam .site-nav,
body.theme-memoriam .product-card,
body.theme-memoriam .base-card,
body.theme-memoriam footer {
  background-color: #0E1A2D;
  color: #E8E4DC;
  border-color: #2A3850;
}
body.theme-memoriam a,
body.theme-memoriam .nav-logo,
body.theme-memoriam h1,
body.theme-memoriam h2,
body.theme-memoriam h3,
body.theme-memoriam h4 {
  color: #E8E4DC;
}
body.theme-memoriam .text-muted,
body.theme-memoriam .subtitle {
  color: #8A96AB;
}
body.theme-memoriam .btn-primary {
  background-color: #C9A96E;
  color: #0E1A2D;
  border-color: #C9A96E;
}
body.theme-memoriam .btn-primary:hover:not(:disabled) {
  background-color: #ffffff;
  color: #0E1A2D;
  border-color: #ffffff;
}
body.theme-memoriam .btn-outline {
  background-color: transparent;
  color: #E8E4DC;
  border-color: #C9A96E;
}
body.theme-memoriam .btn-outline:hover:not(:disabled) {
  background-color: #C9A96E;
  color: #0E1A2D;
  border-color: #C9A96E;
}
body.theme-memoriam .btn-gold:hover:not(:disabled) {
  background-color: #ffffff;
  color: #0E1A2D;
  border-color: #ffffff;
}
body.theme-memoriam .category-tab {
  color: #E8E4DC;
  border-color: #2A3850;
}
body.theme-memoriam .category-tab.active {
  background-color: #C9A96E;
  color: #0E1A2D;
  border-color: #C9A96E;
}
body {
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* --- Themes: Ediții Speciale -------------------------------- */
body.theme-craciun {
  --navy: #0B3D2E;
  --gold: #D4AF37;
  background: radial-gradient(ellipse at top, #155c42 0%, #0B3D2E 50%, #051f17 100%) fixed;
  color: #F5F0E1;
  transition: background 0.6s ease, color 0.6s ease;
}
body.theme-craciun .site-nav,
body.theme-craciun .product-card,
body.theme-craciun footer {
  background-color: #0F4A37;
  color: #F5F0E1;
  border-color: #1a5a43;
}
body.theme-craciun h1, body.theme-craciun h2, body.theme-craciun h3, body.theme-craciun h4,
body.theme-craciun a, body.theme-craciun .nav-logo { color: #F5F0E1; }
body.theme-craciun .btn-primary { background: #C0392B; color: #fff; border-color: #C0392B; }
body.theme-craciun .btn-primary:hover:not(:disabled) { background: #D4AF37; color: #0B3D2E; border-color: #D4AF37; }

body.theme-paste {
  --navy: #5A7A52;
  --gold: #C9A96E;
  background: radial-gradient(ellipse at top, #FFFDF7 0%, #FAF7EF 50%, #EFE8D4 100%) fixed;
  color: #4A4238;
  transition: background 0.6s ease, color 0.6s ease;
}
body.theme-paste .site-nav,
body.theme-paste .product-card,
body.theme-paste footer {
  background-color: #FFFDF7;
  border-color: #E8DFC8;
}
body.theme-paste h1, body.theme-paste h2, body.theme-paste h3 { color: #5A7A52; }

body.theme-valentines {
  --navy: #8B1A2B;
  --gold: #E91E63;
  background: radial-gradient(ellipse at top, #FFE4EB 0%, #FFF0F3 50%, #FFD0DB 100%) fixed;
  color: #5C1825;
  transition: background 0.6s ease, color 0.6s ease;
}
body.theme-valentines .site-nav,
body.theme-valentines .product-card,
body.theme-valentines footer {
  background-color: #FFFFFF;
  border-color: #F4C2CC;
}
body.theme-valentines h1, body.theme-valentines h2, body.theme-valentines h3 { color: #8B1A2B; }
body.theme-valentines .btn-primary { background: #8B1A2B; color: #fff; border-color: #8B1A2B; }

body.theme-martie8 {
  --navy: #6B3F7A;
  --gold: #C9A96E;
  background: radial-gradient(ellipse at top, #FCE8F3 0%, #F9F0F5 50%, #E8D0E0 100%) fixed;
  color: #4A2C52;
  transition: background 0.6s ease, color 0.6s ease;
}
body.theme-martie8 .site-nav,
body.theme-martie8 .product-card,
body.theme-martie8 footer {
  background-color: #FFFFFF;
  border-color: #EBD6E3;
}
body.theme-martie8 h1, body.theme-martie8 h2, body.theme-martie8 h3 { color: #6B3F7A; }

body.theme-martisor {
  --navy: #8A1A1A;
  --gold: #C0392B;
  background: radial-gradient(ellipse at top, #FFFFFF 0%, #FFF5F5 50%, #FFEAEA 100%) fixed;
  color: #2A2A2A;
  transition: background 0.6s ease, color 0.6s ease;
}
body.theme-martisor .site-nav,
body.theme-martisor .product-card,
body.theme-martisor footer {
  background-color: #FFFFFF;
  border-color: #F0D0D0;
}
body.theme-martisor h1, body.theme-martisor h2, body.theme-martisor h3 { color: #8A1A1A; }
body.theme-martisor .btn-primary { background: #C0392B; color: #fff; border-color: #C0392B; }

body.theme-halloween {
  --navy: #1A1A1A;
  --gold: #E67E22;
  background: radial-gradient(ellipse at top, #2a1810 0%, #1A1A1A 50%, #0a0a0a 100%) fixed;
  color: #F5E8D3;
  transition: background 0.6s ease, color 0.6s ease;
}
body.theme-halloween .site-nav,
body.theme-halloween .product-card,
body.theme-halloween footer {
  background-color: #242424;
  color: #F5E8D3;
  border-color: #3a3a3a;
}
body.theme-halloween h1, body.theme-halloween h2, body.theme-halloween h3, body.theme-halloween h4,
body.theme-halloween a, body.theme-halloween .nav-logo { color: #F5E8D3; }
body.theme-halloween h1, body.theme-halloween h2, body.theme-halloween h3 { color: #E67E22; }
body.theme-halloween .btn-primary { background: #E67E22; color: #1A1A1A; border-color: #E67E22; }
body.theme-halloween .btn-primary:hover:not(:disabled) { background: #fff; color: #1A1A1A; border-color: #fff; }

/* --- Event themes: footer always dark navy ----------------- */
body.theme-craciun footer.site-footer,
body.theme-paste footer.site-footer,
body.theme-valentines footer.site-footer,
body.theme-martie8 footer.site-footer,
body.theme-martisor footer.site-footer,
body.theme-halloween footer.site-footer {
  background-color: #0A1628;
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}
body.theme-craciun footer.site-footer a,
body.theme-paste footer.site-footer a,
body.theme-valentines footer.site-footer a,
body.theme-martie8 footer.site-footer a,
body.theme-martisor footer.site-footer a,
body.theme-halloween footer.site-footer a {
  color: rgba(255, 255, 255, 0.55);
}
body.theme-craciun footer.site-footer a:hover,
body.theme-paste footer.site-footer a:hover,
body.theme-valentines footer.site-footer a:hover,
body.theme-martie8 footer.site-footer a:hover,
body.theme-martisor footer.site-footer a:hover,
body.theme-halloween footer.site-footer a:hover {
  color: #C9A96E;
}
body.theme-craciun footer.site-footer h4,
body.theme-paste footer.site-footer h4,
body.theme-valentines footer.site-footer h4,
body.theme-martie8 footer.site-footer h4,
body.theme-martisor footer.site-footer h4,
body.theme-halloween footer.site-footer h4,
body.theme-craciun footer.site-footer .footer-logo,
body.theme-paste footer.site-footer .footer-logo,
body.theme-valentines footer.site-footer .footer-logo,
body.theme-martie8 footer.site-footer .footer-logo,
body.theme-martisor footer.site-footer .footer-logo,
body.theme-halloween footer.site-footer .footer-logo {
  color: #FFFFFF;
}

/* Event sub-tabs */
.event-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
  margin-bottom: 24px;
}
.event-tab {
  padding: 8px 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
}
.event-tab:hover { border-color: var(--gold); color: var(--gold); }
.event-tab.active {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

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

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* --- Typography -------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--navy);
  letter-spacing: 2px;
  line-height: 1.25;
  font-weight: normal;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

h4, h5, h6 {
  font-family: var(--font-body);
  color: var(--navy);
  font-weight: 600;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* --- Layout ------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 48px 0;
}

/* --- Subtitle / Label -------------------------------------- */
.subtitle {
  font-family: var(--font-body);
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 5px;
  text-transform: uppercase;
  font-weight: 600;
  display: block;
}

/* --- Gold divider line ------------------------------------- */
.gold-line {
  display: block;
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, #fff7d0 50%, var(--gold) 80%, transparent);
  background-size: 200% 100%;
  margin: 0 auto;
  border: none;
  animation: goldShimmer 3s linear infinite;
}
@keyframes goldShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary — navy fill */
.btn-primary {
  background-color: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.btn-primary:hover:not(:disabled) {
  background-color: #162240;
  border-color: #162240;
}

/* Outline — navy border, transparent fill */
.btn-outline {
  background-color: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--navy);
  color: var(--white);
}

/* Gold */
.btn-gold {
  background-color: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.btn-gold:hover:not(:disabled) {
  background-color: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

/* Small variant */
.btn-sm {
  padding: 8px 18px;
  font-size: 10px;
}

/* Large variant */
.btn-lg {
  padding: 16px 40px;
  font-size: 12px;
}

/* --- Price -------------------------------------------------- */
.price {
  color: var(--gold);
  font-weight: 700;
  font-size: 1.1em;
  letter-spacing: 0.5px;
}

.price-old {
  color: var(--muted);
  font-weight: 400;
  text-decoration: line-through;
  font-size: 0.9em;
}

/* --- Utility classes --------------------------------------- */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-left    { text-align: left; }

.text-muted   { color: var(--muted); }
.text-gold    { color: var(--gold); }
.text-navy    { color: var(--navy); }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1       { gap: 8px; }
.gap-2       { gap: 16px; }
.gap-3       { gap: 24px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- Forms ------------------------------------------------- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.form-input.error {
  border-color: var(--danger);
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

/* --- Cards ------------------------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* --- Divider ----------------------------------------------- */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* --- Loading spinner --------------------------------------- */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Badge ------------------------------------------------- */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 2px;
}

.badge-gold   { background: var(--gold);    color: var(--white); }
.badge-navy   { background: var(--navy);    color: var(--white); }
.badge-muted  { background: var(--border);  color: var(--muted); }
