/* ===========================================================
   DressCo — design tokens
   Palette: deep plum + antique gold + warm ivory (bridal boutique,
   not the generic cream/terracotta AI default — leans jewel-tone).
   Display face: Cormorant Garamond (invitation-style serif)
   UI face: Jost (clean geometric sans)
   Sinhala: Noto Sans Sinhala (applied wherever .si / lang="si" is used)
   Signature: "fabric swatch" folded-corner cards for categories,
   and a hand-drawn gold hem-wave divider between sections.
   =========================================================== */
:root {
  --ink:        #241019;
  --plum-deep:  #430f2c;
  --plum:       #7d2350;
  --plum-soft:  #a9436b;
  --rose:       #e7c3cd;
  --gold:       #b6883f;
  --gold-soft:  #e3cb98;
  --ivory:      #faf4ee;
  --panel:      #fffdfb;
  --border:     #ece1d8;
  --muted:      #8a7570;
  --ok:         #3f8f5f;
  --danger:     #b8394a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Jost', 'Noto Sans Sinhala', sans-serif;
  background: var(--ivory);
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.6;
}

.si, [lang="si"] { font-family: 'Noto Sans Sinhala', 'Jost', sans-serif; }

h1, h2, h3 {
  font-family: 'Cormorant Garamond', 'Noto Sans Sinhala', serif;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--plum-deep);
  margin: 0 0 .4em;
}
h1 { font-size: 42px; }
h2 { font-size: 28px; }
h3 { font-size: 20px; }

a { color: var(--plum); }

::selection { background: var(--gold-soft); color: var(--plum-deep); }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- header ---------- */
.site-header {
  background: rgba(250, 244, 238, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  color: var(--gold);
}
.brand-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--plum-deep);
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text em {
  font-style: normal;
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}
.site-header nav a {
  margin-left: 26px;
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}
.site-header nav a:hover { color: var(--plum); border-color: var(--gold); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  background: radial-gradient(120% 160% at 15% 0%, var(--plum) 0%, var(--plum-deep) 55%, var(--ink) 100%);
  color: #fdf7f0;
  padding: 88px 32px 110px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(230,196,152,.18) 1px, transparent 1.4px);
  background-size: 26px 26px;
  opacity: .5;
}
.hero-eyebrow {
  position: relative;
  font-size: 12px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 18px;
}
.hero h1 {
  position: relative;
  color: #fff;
  font-size: 48px;
  max-width: 720px;
  margin: 0 auto 16px;
}
.hero p {
  position: relative;
  font-size: 15.5px;
  opacity: .85;
  max-width: 460px;
  margin: 0 auto;
}
.hem-divider {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: -1px;
}
.hem-divider path { fill: var(--ivory); }
.hem-divider.line path { fill: none; stroke: var(--gold); stroke-width: 1.4; }

/* ---------- layout ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 56px 32px; }
.section-eyebrow {
  font-size: 12px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
  display: block;
}

/* ---------- category "fabric swatch" cards (signature element) ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 22px;
  margin-top: 26px;
}
.cat-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 30px 20px 24px;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.cat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 22px; height: 22px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(67, 15, 44, .12);
  border-color: var(--gold);
}
.cat-card .en {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--plum-deep);
}
.cat-card .si { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ---------- filter pills ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter-bar a {
  padding: 7px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  font-size: 12.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--panel);
}
.filter-bar a.active, .filter-bar a:hover { background: var(--plum); color: #fff; border-color: var(--plum); }

/* ---------- dress cards ---------- */
.dress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 26px;
}
.dress-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: transform .25s ease, box-shadow .25s ease;
}
.dress-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(67, 15, 44, .1); }
.dress-card img { width: 100%; height: 280px; object-fit: cover; display: block; background: var(--rose); }
.dress-card .info { padding: 16px 16px 18px; border-top: 1px solid var(--gold-soft); }
.dress-card .title { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 18px; color: var(--plum-deep); }
.dress-card .price { color: var(--ink); font-size: 13px; margin-top: 6px; }
.dress-card .tags { margin-top: 8px; }
.tag {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--rose);
  color: var(--plum-deep);
  padding: 3px 10px;
  border-radius: 999px;
  margin-right: 4px;
}

/* ---------- dress detail ---------- */
.detail-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: start; }
@media (max-width: 800px) { .detail-wrap { grid-template-columns: 1fr; } }
.gallery-main { width: 100%; height: 460px; object-fit: cover; border-radius: 4px; background: var(--rose); box-shadow: 0 20px 40px rgba(67,15,44,.12); }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs img {
  width: 68px; height: 88px; object-fit: cover; border-radius: 3px; cursor: pointer;
  border: 2px solid transparent; opacity: .7; transition: opacity .2s, border-color .2s;
}
.gallery-thumbs img:hover { opacity: 1; }
.gallery-thumbs img.active { border-color: var(--gold); opacity: 1; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px;
}
.price-row { font-size: 15px; margin: 6px 0; color: var(--ink); }
.price-row strong { color: var(--plum-deep); font-family: 'Cormorant Garamond', serif; font-size: 18px; }

label { font-size: 12px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14.5px;
  font-family: 'Jost', 'Noto Sans Sinhala', sans-serif;
  margin-bottom: 16px;
  background: #fff;
  color: var(--ink);
  transition: border-color .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }

.btn {
  display: inline-block;
  background: var(--plum);
  color: #fff;
  border: none;
  padding: 12px 26px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s, transform .15s;
}
.btn:hover { background: var(--plum-deep); }
.btn:active { transform: scale(.98); }
.btn:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }
.btn-outline { background: transparent; color: var(--plum-deep); border: 1px solid var(--plum-deep); }
.btn-outline:hover { background: var(--plum-deep); color: #fff; }

.msg-ok { background: #e4f3e9; color: #256b40; padding: 14px 18px; border-radius: 6px; margin-bottom: 20px; border-left: 3px solid var(--ok); }
.msg-err { background: #fbe6e9; color: #9a2f3f; padding: 14px 18px; border-radius: 6px; margin-bottom: 20px; border-left: 3px solid var(--danger); }

.buffer-note { font-size: 12.5px; color: var(--muted); margin: -8px 0 12px; line-height: 1.5; }
.availability-note { font-size: 13px; margin: -6px 0 14px; font-weight: 500; }
.availability-note.ok { color: #256b40; }
.availability-note.bad { color: #9a2f3f; }

.badge { padding: 4px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.badge-pending { background: #fbe9c8; color: #a06a10; }
.badge-approved { background: #d9f0e1; color: #256b40; }
.badge-declined { background: #f7dde0; color: #9a2f3f; }
.badge-completed { background: #dde6f7; color: #33528f; }
.badge-cancelled { background: #eee; color: #7a6f68; }

.site-footer {
  text-align: center;
  padding: 30px;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: .04em;
  border-top: 1px solid var(--border);
  margin-top: 50px;
}

/* ---------- responsive ---------- */
@media (max-width: 600px) {
  .hero { padding: 64px 20px 84px; }
  .hero h1 { font-size: 32px; }
  .container { padding: 40px 20px; }
  h1 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cat-card, .dress-card, .btn { transition: none; }
}
