/* ════════════════════════════════════════════════════
   Arabela Portfolio  –  Global Styles
   Font: Playfair Display (display) + DM Sans (body)
   Theme: warm cream, dark ink, gold accent
   ════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=DM+Sans:wght@300;400;500;700&display=swap');

/* ─── VARIABLES ─────────────────────────────────── */
:root {
  --cream:   #faf8f2;
  --paper:   #f4f0e6;
  --ink:     #1a1614;
  --muted:   #6b6460;
  --gold:    #c9a84c;
  --gold-lt: #e8cb7a;
  --gold-dk: #9a7530;
  --rose:    #d4856a;
  --sage:    #7a9e7e;
  --radius:  14px;
  --shadow:  0 8px 32px rgba(26,22,20,.12);
  --shadow-hover: 0 16px 48px rgba(26,22,20,.22);
  --transition: 0.3s cubic-bezier(.4,0,.2,1);
}

/* ─── RESET ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── TYPOGRAPHY ────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

/* ─── LAYOUT ────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.page-wrap { padding-top: 5rem; }

/* ─── NAV ───────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250,248,242,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,.2);
  padding: .9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 20px rgba(26,22,20,.08);
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-style: italic;
  color: var(--gold-dk);
  letter-spacing: -.3px;
}

.nav-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}

.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .3px;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold-dk); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* hamburger */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .4rem; }
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: var(--transition);
}

/* ─── BUTTONS ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.8rem;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  letter-spacing: .3px;
}

.btn-primary {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-dk);
  border-color: var(--gold-dk);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,168,76,.35);
}

.btn-outline {
  background: transparent;
  color: var(--gold-dk);
  border-color: var(--gold);
}
.btn-outline:hover {
  background: var(--gold);
  color: #fff;
  transform: translateY(-2px);
}

.btn-danger {
  background: #e05d5d;
  color: #fff;
  border-color: #e05d5d;
}
.btn-danger:hover { background: #c04040; border-color: #c04040; }

.btn-sm { padding: .45rem 1.1rem; font-size: .82rem; }

/* ─── CARDS ─────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }

/* ─── FORMS ─────────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .4rem;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.form-control {
  width: 100%;
  padding: .8rem 1rem;
  border: 1.5px solid #e2ddd6;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.form-control.is-invalid { border-color: #e05d5d; }

/* password toggle wrapper */
.pw-wrap { position: relative; }
.pw-toggle {
  position: absolute;
  right: 1rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; color: var(--muted);
  font-size: 1rem;
}

/* ─── ALERTS ────────────────────────────────────── */
.alert {
  padding: .9rem 1.2rem;
  border-radius: var(--radius);
  font-size: .92rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.alert-error   { background: #fdf0ef; color: #c0392b; border: 1px solid #f5c6c6; }
.alert-success { background: #edf7ed; color: #276827; border: 1px solid #b8ddb8; }
.alert-warning { background: #fff9e6; color: #8a6d00; border: 1px solid #ffe082; }
.alert-info    { background: #e8f4fd; color: #1565c0; border: 1px solid #90caf9; }

/* ─── BADGE ─────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .2rem .7rem;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .4px;
}
.badge-gold  { background: rgba(201,168,76,.15); color: var(--gold-dk); }
.badge-green { background: rgba(122,158,126,.15); color: var(--sage); }
.badge-red   { background: rgba(224,93,93,.12);   color: #c04040; }

/* ─── DIVIDER ───────────────────────────────────── */
.divider {
  display: flex; align-items: center; gap: 1rem;
  margin: 1.5rem 0; color: var(--muted); font-size: .85rem;
}
.divider::before, .divider::after {
  content: ''; flex: 1;
  height: 1px; background: #e2ddd6;
}

/* ─── ANIMATIONS ────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up  { animation: fadeUp .6s ease both; }
.delay-1  { animation-delay: .1s; }
.delay-2  { animation-delay: .2s; }
.delay-3  { animation-delay: .3s; }
.delay-4  { animation-delay: .4s; }

/* ─── FOOTER ────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  font-size: .88rem;
  border-top: 1px solid #e8e3d8;
  margin-top: 4rem;
}

/* ─── HERO ──────────────────────────────────────── */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--cream) 0%, var(--paper) 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,.12) 0%, transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .8rem;
}
.hero-title em {
  font-style: italic;
  color: var(--gold-dk);
}
.hero-sub {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 520px;
  margin: 1.2rem 0 2rem;
}

/* ─── PRODUCT GRID ──────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.8rem;
}
.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-6px); }
.product-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--paper);
}
.product-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--paper), #e8e3d8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.product-info { padding: 1.2rem; }
.product-name { font-family: 'Playfair Display', serif; font-size: 1.1rem; margin-bottom: .3rem; }
.product-price { color: var(--gold-dk); font-weight: 700; font-size: 1.1rem; }
.product-stock { font-size: .82rem; color: var(--muted); margin-top: .3rem; }

/* ─── QUIZ ──────────────────────────────────────── */
.quiz-wrap { max-width: 680px; margin: 0 auto; }
.question-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.question-num { font-size: .8rem; font-weight: 700; color: var(--gold); letter-spacing: 1px; text-transform: uppercase; margin-bottom: .5rem; }
.question-text { font-family: 'Playfair Display', serif; font-size: 1.15rem; margin-bottom: 1.2rem; }
.options { display: flex; flex-direction: column; gap: .7rem; }
.option-label {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .85rem 1.1rem;
  border: 1.5px solid #e2ddd6;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  font-weight: 500;
}
.option-label:hover { border-color: var(--gold); background: rgba(201,168,76,.06); }
.option-label input[type=radio] { accent-color: var(--gold); transform: scale(1.2); }

/* progress bar */
.quiz-progress { margin-bottom: 1.5rem; }
.progress-bar { height: 6px; background: #e8e3d8; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-lt)); border-radius: 3px; transition: width .4s ease; }

/* ─── CERTIFICATE ───────────────────────────────── */
.certificate-wrap {
  background: #fff;
  border: 3px solid var(--gold);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  max-width: 700px;
  margin: 2rem auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(201,168,76,.2);
}
.certificate-wrap::before, .certificate-wrap::after {
  content: '✦';
  font-size: 2rem;
  color: var(--gold);
  position: absolute;
  top: 1.5rem;
}
.certificate-wrap::before { left: 2rem; }
.certificate-wrap::after  { right: 2rem; }

/* ─── SETTINGS ──────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.avatar-preview {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--gold);
  display: block;
  margin: 0 auto 1rem;
}

/* ─── RESPONSIVE ────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: fixed; inset: 0 0 0 30%; background: rgba(250,248,242,.98); padding: 5rem 2rem 2rem; gap: 2rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .settings-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 5rem; }
}

/* ─── CART BADGE ────────────────────────────────── */
.cart-icon { position: relative; }
.cart-count {
  position: absolute;
  top: -8px; right: -8px;
  background: var(--rose);
  color: #fff;
  border-radius: 50%;
  width: 18px; height: 18px;
  font-size: .7rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ─── TABLE ─────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead th { background: var(--paper); padding: .8rem 1rem; text-align: left; font-weight: 700; color: var(--muted); font-size: .8rem; letter-spacing: .4px; text-transform: uppercase; }
tbody td { padding: .8rem 1rem; border-bottom: 1px solid #f0ebe0; }
tbody tr:hover td { background: rgba(201,168,76,.04); }

/* ─── SECTION TITLES ────────────────────────────── */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: .5rem;
}
.section-sub { color: var(--muted); margin-bottom: 2.5rem; }
