/* =====================================================
   Kalaa Studio — stylesheet
   A multi-craft artist portfolio: Mehandi Art, Machi (embellishment)
   Work, Pipe Cleaner Crafts, and Painting & Drawing Art.

   Palette:
     --cream        #FBF6EE  page background
     --ink          #2B211B  primary text
     --ink-soft     #6B5C4F  secondary text
     --gold         #B8863B  primary accent (site-wide: links, buttons)
     --line         #E6DCCB  hairlines / borders
     --card         #F4EEE1  card / input background

   Each craft has its own identity accent, used only as small tags,
   dots, and filter chips — never replacing the primary gold accent:
     --c-mehandi    #A8432B  henna-red
     --c-machi      #2F6B63  jewel teal (thread/mirror/zardozi work)
     --c-pipe       #C06B84  dusty rose (florals & pipe-cleaner crafts)
     --c-paint      #3E5C8A  indigo (painting & drawing)
   ===================================================== */

/* Registering these as typed custom properties is what lets the
   background-color/color transitions below actually animate when
   --cream/--ink/etc. change on <html> via the theme toggle - without
   @property, a transition on a var()-dependent value doesn't animate
   (or in some cases doesn't even update) when the variable changes
   only on an ancestor rather than the element itself. */
@property --cream { syntax: '<color>'; inherits: true; initial-value: #FBF6EE; }
@property --ink { syntax: '<color>'; inherits: true; initial-value: #2B211B; }
@property --ink-soft { syntax: '<color>'; inherits: true; initial-value: #6B5C4F; }
@property --gold { syntax: '<color>'; inherits: true; initial-value: #B8863B; }
@property --gold-dark { syntax: '<color>'; inherits: true; initial-value: #8F6626; }
@property --line { syntax: '<color>'; inherits: true; initial-value: #E6DCCB; }
@property --card { syntax: '<color>'; inherits: true; initial-value: #F4EEE1; }
@property --header-bg { syntax: '<color>'; inherits: true; initial-value: rgba(251, 246, 238, 0.92); }

:root {
  --cream: #FBF6EE;
  --ink: #2B211B;
  --ink-soft: #6B5C4F;
  --gold: #B8863B;
  --gold-dark: #8F6626;
  --line: #E6DCCB;
  --card: #F4EEE1;
  --header-bg: rgba(251, 246, 238, 0.92);

  --c-mehandi: #A8432B;
  --c-machi: #2F6B63;
  --c-pipe: #C06B84;
  --c-paint: #3E5C8A;

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  --max-width: 1180px;
}

/* Dark palette: --ink/--cream keep their *roles* (ink = foreground,
   cream = page background) but swap which literal color each one is,
   so every existing rule that already uses these variables inverts
   correctly with no per-component dark overrides needed. */
[data-theme="dark"] {
  --cream: #1C1712;
  --ink: #F3EAD9;
  --ink-soft: #B8A990;
  --gold: #CDA054;
  --gold-dark: #A87D3C;
  --line: #3A2F24;
  --card: #26201A;
  --header-bg: rgba(28, 23, 18, 0.92);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--cream); transition: background-color .35s ease; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
}

/* Animate the surfaces most visibly affected by a theme switch */
.site-header, .craft-card, .product-card, .service-picker, .service-group-head,
.service-subgroup, .auth-modal-card, .account-dropdown, .form-field input,
.form-field select, .form-field textarea, .cta-banner, .site-footer,
.shop-note-banner, .faq-item, .gallery-item, .nav-cta, .btn-outline {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 .4em;
  text-wrap: balance;
}

p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-body);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 .8em;
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.section-tight { padding-top: 3rem; }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-head h2 { font-size: clamp(2rem, 4vw, 2.75rem); }

.section-sub { color: var(--ink-soft); font-size: 1.05rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: .95rem 2.2rem;
  font-family: var(--font-body);
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: var(--gold-dark); }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--cream); }

.btn-small { padding: .6rem 1.3rem; font-size: .72rem; }

/* =====================================================
   Page loader (shared across all pages)
   Full-screen overlay shown until this page's data has actually
   loaded - see js/loader.js. Sits above everything, including the
   sticky header, via z-index.
   ===================================================== */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  background: var(--cream);
  transition: opacity .5s ease, visibility .5s ease;
}
.page-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.page-loader-mark {
  font-size: 2.6rem;
  color: var(--gold);
  animation: page-loader-spin 2.2s ease-in-out infinite;
}
.page-loader-logo { display: none; max-height: 64px; max-width: 220px; object-fit: contain; }
.page-loader-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: .03em;
  color: var(--ink);
  margin: 0;
}
.page-loader-bar {
  width: 130px;
  height: 2px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
  position: relative;
}
.page-loader-bar::after {
  content: '';
  position: absolute;
  top: 0; left: -40%;
  height: 100%; width: 40%;
  background: var(--gold);
  animation: page-loader-sweep 1.3s ease-in-out infinite;
}

@keyframes page-loader-spin {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.15); }
}
@keyframes page-loader-sweep {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* =====================================================
   Header / Nav (shared across all pages)
   ===================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, background-color .35s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 18px rgba(43, 33, 27, .08); }

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: .02em;
}
.logo-mark { color: var(--gold); font-size: 1rem; }
.logo-text em { font-style: italic; color: var(--gold); }
.logo-image { display: none; height: 32px; width: auto; object-fit: contain; }

.main-nav { display: flex; align-items: center; gap: 2rem; }

.nav-link {
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  padding: .25rem 0;
}
.nav-link:hover, .nav-link.is-active { color: var(--ink); }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--gold);
  transition: right .25s ease;
}
.nav-link:hover::after, .nav-link.is-active::after { right: 0; }

.nav-cta {
  border: 1px solid var(--ink);
  padding: .55rem 1.2rem;
  border-radius: 2px;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--ink); color: var(--cream); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span { display: block; height: 1px; background: var(--ink); transition: transform .25s ease, opacity .25s ease; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =====================================================
   Page hero (smaller, used on inner pages)
   ===================================================== */
.page-hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 2rem;
  text-align: center;
}
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); }
.page-hero p { color: var(--ink-soft); max-width: 560px; margin: 0 auto; }

/* =====================================================
   Home Hero
   ===================================================== */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
  min-height: 86vh;
}

.hero-media {
  background: linear-gradient(155deg, #EADFC8, #D9BFA0 45%, var(--c-mehandi) 78%, var(--c-paint) 130%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.hero-media-label {
  color: rgba(43, 33, 27, .55);
  font-size: .8rem;
  text-align: center;
  letter-spacing: .04em;
  border: 1px dashed rgba(43, 33, 27, .35);
  padding: 1rem 1.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, .3);
}

.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 4rem 5vw; }
.hero-copy h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.hero-sub { color: var(--ink-soft); font-size: 1.1rem; max-width: 38ch; margin-bottom: 1.8rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* =====================================================
   Craft category cards (Home)
   ===================================================== */
.craft-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.craft-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent, var(--gold));
  border-radius: 3px;
  padding: 2rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  transition: transform .25s ease, box-shadow .25s ease;
}
.craft-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(43,33,27,.09); }

.craft-card[data-craft="mehandi"] { --accent: var(--c-mehandi); }
.craft-card[data-craft="machi"]   { --accent: var(--c-machi); }
.craft-card[data-craft="pipe"]    { --accent: var(--c-pipe); }
.craft-card[data-craft="paint"]   { --accent: var(--c-paint); }

.craft-card .craft-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent, var(--gold));
  opacity: .16;
  margin-bottom: .3rem;
}

.craft-card h3 { font-size: 1.4rem; margin-bottom: .1rem; }
.craft-card p { color: var(--ink-soft); font-size: .92rem; flex-grow: 1; }

.craft-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: .82rem;
  color: var(--ink-soft);
}
.craft-card ul li { padding: .15rem 0; }
.craft-card ul li::before { content: '— '; color: var(--accent, var(--gold)); }

.craft-card .craft-link {
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent, var(--gold));
  border-bottom: 1px solid currentColor;
  align-self: flex-start;
  padding-bottom: 2px;
}

/* Category tag / badge (used in gallery + shop + form) */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent, var(--gold));
  padding: .3rem .65rem;
  border-radius: 999px;
}
.tag-mehandi { --accent: var(--c-mehandi); }
.tag-machi   { --accent: var(--c-machi); }
.tag-pipe    { --accent: var(--c-pipe); }
.tag-paint   { --accent: var(--c-paint); }

/* =====================================================
   Gallery + filter tabs
   ===================================================== */
.filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .7rem;
  margin-bottom: 3rem;
}

.filter-tab {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .78rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .6rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
}
.filter-tab:hover { border-color: var(--gold); color: var(--ink); }
.filter-tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--cream); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.gallery-item {
  aspect-ratio: 1 / 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.gallery-item.is-hidden { display: none; }

.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.06); }

.gallery-item .placeholder-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: .72rem;
  color: var(--ink-soft);
  padding: .5rem;
  gap: .5rem;
}

.gallery-item .item-tag {
  position: absolute;
  top: .55rem; left: .55rem;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 14, 10, .92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 2rem;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 88vw; max-height: 84vh; border-radius: 3px; }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #fff; font-size: 2.6rem; cursor: pointer; padding: 0 1rem; opacity: .75;
}
.lightbox-nav:hover { opacity: 1; }
.lightbox-prev { left: .5rem; }
.lightbox-next { right: .5rem; }

/* =====================================================
   About page
   ===================================================== */
.artist-section {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 4rem;
  align-items: center;
}

.artist-media {
  aspect-ratio: 4 / 5;
  background: linear-gradient(200deg, var(--card), #DFCBA8);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.artist-copy h2 { font-size: clamp(2rem, 3.5vw, 2.8rem); }
.artist-copy p { color: var(--ink-soft); max-width: 56ch; }

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 1.4rem 0 1.8rem;
}

/* =====================================================
   FAQ
   ===================================================== */
.faq-section { max-width: 820px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
  padding: 1.4rem .25rem;
  cursor: pointer;
}

.faq-icon { font-family: var(--font-body); font-size: 1.3rem; color: var(--gold); transition: transform .25s ease; flex-shrink: 0; }
.faq-item.is-open .faq-icon { transform: rotate(45deg); }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-answer p { color: var(--ink-soft); padding: 0 .25rem 1.4rem; max-width: 62ch; }

/* =====================================================
   Shop
   ===================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-media {
  aspect-ratio: 4/3;
  background: linear-gradient(155deg, #EFE4CC, #DDBFC7);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.product-media .item-tag { position: absolute; top: .6rem; left: .6rem; }

.product-body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; gap: .5rem; flex-grow: 1; }
.product-body h3 { font-size: 1.25rem; margin-bottom: 0; }
.product-body p { color: var(--ink-soft); font-size: .9rem; flex-grow: 1; }
.product-price { font-family: var(--font-body); font-size: .9rem; color: var(--gold-dark); letter-spacing: .04em; }
.product-body .btn { align-self: flex-start; margin-top: .4rem; }

.shop-note-banner {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.4rem 1.6rem;
  color: var(--ink-soft);
  font-size: .9rem;
  max-width: 780px;
  margin: 0 auto 3rem;
  text-align: center;
}

/* =====================================================
   Contact / inquiry form
   ===================================================== */
.contact-section { max-width: 820px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-field { margin-bottom: 1.2rem; }

.form-field label {
  display: block;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .45rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: .8rem .9rem;
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--ink);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--gold); }
.form-field.has-error input, .form-field.has-error select { border-color: #B3382C; }

/* Service picker: accordion of category checkboxes */
.service-picker { margin: 0 0 1.6rem; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }

.service-group { border-bottom: 1px solid var(--line); }
.service-group:last-child { border-bottom: none; }

.service-group-head {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1.1rem 1.3rem;
  background: var(--card);
  cursor: pointer;
}
.service-group-head input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent, var(--gold)); }
.service-group[data-craft="mehandi"] { --accent: var(--c-mehandi); }
.service-group[data-craft="machi"]   { --accent: var(--c-machi); }
.service-group[data-craft="pipe"]    { --accent: var(--c-pipe); }
.service-group[data-craft="paint"]   { --accent: var(--c-paint); }

.service-group-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent, var(--gold)); flex-shrink: 0; }
.service-group-head span.label { font-family: var(--font-display); font-size: 1.1rem; flex-grow: 1; }
.service-group-head .chev { color: var(--ink-soft); transition: transform .25s ease; font-size: .8rem; }
.service-group.is-open .chev { transform: rotate(180deg); }

.service-subgroup {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, background-color .35s ease;
  background: var(--cream);
}
.service-subgroup-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem .9rem;
  padding: 1rem 1.3rem 1.3rem 3rem;
}
.service-subgroup label {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .9rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.service-subgroup input[type="checkbox"] { accent-color: var(--accent, var(--gold)); width: 16px; height: 16px; }

.btn-submit { margin-top: .5rem; border: none; }
.form-status { margin-top: 1rem; font-size: .9rem; }
.form-status.success { color: #4B7A4B; }
.form-status.error { color: #B3382C; }

/* =====================================================
   CTA banner
   ===================================================== */
.cta-banner {
  background: var(--ink);
  color: var(--cream);
  border-radius: 4px;
  max-width: calc(var(--max-width) - 3rem);
  margin: 0 auto 6rem;
  padding: 3.5rem 2rem;
  text-align: center;
}
.cta-banner h2 { color: var(--cream); }
.cta-banner p { color: rgba(251,246,238,.75); max-width: 480px; margin: 0 auto 1.6rem; }
.cta-banner .btn-primary { background: var(--gold); }

/* =====================================================
   Footer
   ===================================================== */
.site-footer { border-top: 1px solid var(--line); padding: 3.5rem 1.5rem 2.5rem; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; text-align: center; }
.footer-logo { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 1.4rem; }
.footer-logo em { font-style: italic; color: var(--gold); }
.footer-links, .footer-social {
  display: flex; justify-content: center; gap: 1.6rem; flex-wrap: wrap;
  font-size: .82rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 1rem;
}
.footer-links a:hover, .footer-social a:hover { color: var(--gold); }
.footer-copy { font-size: .78rem; color: var(--ink-soft); margin: 0; }

/* =====================================================
   Account nav item + dropdown
   ===================================================== */
.nav-account { position: relative; }

.account-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 1rem);
  right: 0;
  min-width: 220px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(43, 33, 27, .12);
  padding: .6rem;
  z-index: 50;
}
.account-dropdown.is-open { display: block; }

.account-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: .65rem .7rem;
  border-radius: 3px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: .85rem;
  color: var(--ink);
  cursor: pointer;
}
.account-menu-item:hover { background: var(--card); }

.account-menu-label {
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: .3rem .7rem 0;
  margin: 0;
}
.account-menu-empty { font-size: .85rem; color: var(--ink-soft); padding: .3rem .7rem .6rem; margin: 0; }
.account-bookings-list { list-style: none; padding: .2rem .7rem .6rem; margin: 0; font-size: .85rem; color: var(--ink); }
.account-bookings-list li { padding: .25rem 0; border-bottom: 1px solid var(--line); }
.account-bookings-list li:last-child { border-bottom: none; }

/* =====================================================
   Auth modal (Login / Sign Up)
   ===================================================== */
.auth-modal {
  position: fixed; inset: 0;
  background: rgba(20, 14, 10, .55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1.5rem;
}
.auth-modal.is-open { display: flex; }

.auth-modal-card {
  position: relative;
  background: var(--cream);
  border-radius: 6px;
  padding: 2.2rem 2rem;
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.auth-modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; color: var(--ink-soft); font-size: 1.6rem; cursor: pointer; line-height: 1;
}
.auth-modal-close:hover { color: var(--ink); }

.auth-tabs { display: flex; gap: 1.6rem; margin-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.auth-tab {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: .82rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0 0 .8rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.auth-tab.is-active { color: var(--ink); border-bottom-color: var(--gold); }

.auth-panel { display: none; }
.auth-panel.is-active { display: block; }

.auth-submit { width: 100%; border: none; }
.auth-error { color: #B3382C; font-size: .85rem; margin: -.3rem 0 .9rem; min-height: 1em; }
.auth-hint { color: var(--ink-soft); font-size: .8rem; margin-top: 1rem; text-align: center; }

/* =====================================================
   Theme toggle (light / dark)
   ===================================================== */
.theme-toggle { background: none; border: none; cursor: pointer; padding: 0; display: flex; align-items: center; }

.theme-toggle-track {
  position: relative;
  width: 46px; height: 24px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: background-color .35s ease, border-color .35s ease;
}

.theme-icon {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: .72rem; line-height: 1;
  color: var(--ink-soft);
  transition: color .35s ease;
}
.theme-icon-sun { left: 6px; color: var(--gold); }
.theme-icon-moon { right: 6px; }
[data-theme="dark"] .theme-icon-sun { color: var(--ink-soft); }
[data-theme="dark"] .theme-icon-moon { color: var(--gold); }

.theme-toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1), background-color .35s ease;
}
[data-theme="dark"] .theme-toggle-thumb { transform: translateX(22px); }

/* =====================================================
   Admin dashboard
   ===================================================== */
.admin-gate { display: none; }

.admin-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}
.admin-tab {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .78rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .6rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
}
.admin-tab:hover { border-color: var(--gold); color: var(--ink); }
.admin-tab.is-active { background: var(--ink); border-color: var(--ink); color: var(--cream); }

.admin-panel { display: none; }
.admin-panel.is-active { display: block; }

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.admin-panel-head h2 { margin: 0; }

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 3rem;
  transition: border-color .35s ease;
}

.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; white-space: nowrap; }
.admin-table th, .admin-table td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); transition: border-color .35s ease; }
.admin-table th {
  background: var(--card);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 400;
  transition: background-color .35s ease;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-empty { color: var(--ink-soft); text-align: center; white-space: normal; }
.admin-tel { color: var(--gold); border-bottom: 1px dotted var(--gold); }
.admin-tel:hover { color: var(--gold-dark); }

.admin-status-select {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: .35rem .5rem;
  font-family: var(--font-body);
  font-size: .8rem;
  color: var(--ink);
  cursor: pointer;
}
.admin-table td.is-saved { background: rgba(139, 178, 128, .25); transition: background-color .2s ease; }

/* =====================================================
   CMS content images (rendered into [data-field="image"]
   slots by ContentRender, replacing the placeholder label)
   ===================================================== */
.hero-media, .artist-media { position: relative; overflow: hidden; }
.cms-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* =====================================================
   Edit mode (admin visual editor)
   ===================================================== */
.admin-toolbar {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: flex-end;
}
.admin-toolbar-btn {
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 999px;
  padding: .7rem 1.3rem;
  font-family: var(--font-body);
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(43, 33, 27, .25);
  transition: background-color .35s ease, color .35s ease;
}
.admin-toolbar-btn:hover { background: var(--gold-dark); }

.is-cms-section { transition: outline-color .2s ease; }
.is-edit-mode .is-cms-section { outline: 1px dashed transparent; outline-offset: 6px; }
.is-edit-mode .is-cms-section:hover { outline-color: var(--gold); }
.is-edit-mode .is-cms-section.is-editing-section { outline: 2px solid var(--gold); outline-offset: 6px; }

.section-edit-badge {
  display: none;
  position: absolute;
  top: 8px; right: 8px;
  z-index: 20;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 3px;
  padding: .4rem .7rem;
  font-family: var(--font-body);
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}
.is-edit-mode .section-edit-badge { display: inline-block; }

.is-editing-field { outline: 1px dashed var(--gold); outline-offset: 3px; cursor: text; }

.edit-panel {
  position: fixed;
  top: 0; right: -360px;
  width: 340px;
  height: 100vh;
  background: var(--cream);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 30px rgba(43, 33, 27, .12);
  z-index: 500;
  display: flex;
  flex-direction: column;
  transition: right .3s ease, background-color .35s ease, border-color .35s ease;
}
.edit-panel.is-open { right: 0; }

/* Shift page content out from under the panel instead of letting it
   overlay (and block clicks on) whatever it's supposed to be editing -
   this matters most for right-column content like the hero copy. */
body.has-edit-panel { padding-right: 340px; transition: padding-right .3s ease; }

.edit-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.3rem 1.3rem 1rem;
  border-bottom: 1px solid var(--line);
}
.edit-panel-head h3 { margin: 0; font-size: 1.2rem; }

.edit-panel-body { padding: 1.2rem 1.3rem; overflow-y: auto; flex-grow: 1; }
.edit-panel-foot { display: flex; gap: .8rem; padding: 1rem 1.3rem; border-top: 1px solid var(--line); }
.edit-panel-foot .btn { flex: 1; border: none; }

.edit-field-group { margin-bottom: 1.3rem; }
.edit-field-group label {
  display: flex; align-items: center; gap: .6rem;
  font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: .5rem;
}
.edit-field-group input[type="color"] { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 3px; padding: 2px; background: var(--card); }
.edit-field-group select,
.edit-field-group input[type="text"],
.edit-field-group input[type="number"],
.edit-field-group textarea {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 2px;
  padding: .6rem .7rem; font-family: var(--font-body); font-size: .88rem; color: var(--ink);
}
.edit-field-group textarea { resize: vertical; }
.edit-reset-btn {
  background: none; border: none; color: var(--gold); text-transform: none; letter-spacing: 0;
  font-size: .72rem; cursor: pointer; padding: 0;
}
.edit-image-preview { width: 100%; border-radius: 3px; margin-bottom: .7rem; }

/* =====================================================
   Image cropper
   ===================================================== */
.crop-modal-card { max-width: 460px; text-align: center; }
.crop-viewport {
  position: relative;
  overflow: hidden;
  margin: 1rem auto;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: grab;
  touch-action: none;
}
.crop-viewport:active { cursor: grabbing; }
.crop-viewport img { position: absolute; top: 0; left: 0; max-width: none; user-select: none; -webkit-user-drag: none; }
.crop-zoom { width: 100%; margin: .5rem 0 1.2rem; accent-color: var(--gold); }
.crop-actions { display: flex; gap: .8rem; }
.crop-actions .btn { flex: 1; border: none; }

/* =====================================================
   Catalog add tile (gallery/shop admin "+ Add" placeholder)
   ===================================================== */
.catalog-add-tile {
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 280px;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: .85rem;
  letter-spacing: .03em;
  transition: border-color .2s ease, color .2s ease;
}
.catalog-add-tile:hover { border-color: var(--gold); color: var(--ink); }
.is-edit-mode .catalog-add-tile { display: flex; }

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 980px) {
  .craft-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-media { min-height: 42vh; }
  .hero-copy { padding: 3rem 1.5rem; }

  .artist-section { grid-template-columns: 1fr; gap: 2rem; }

  .gallery-grid { grid-template-columns: repeat(3, 1fr); }

  .main-nav {
    position: fixed; top: 65px; left: 0; right: 0;
    background: var(--cream);
    flex-direction: column; align-items: stretch; gap: 0;
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .main-nav.is-open { max-height: 550px; overflow-y: auto; }
  .nav-link, .nav-cta {
    display: block; /* anchors nested in .nav-account aren't flex items, so
                        they need this explicitly or their vertical padding
                        paints without contributing to layout height */
    padding: 1rem 1.5rem; border-bottom: 1px solid var(--line); border-radius: 0; text-align: left;
  }
  .nav-cta { border-left: none; border-right: none; border-top: none; }
  .nav-toggle { display: flex; }

  .theme-toggle {
    width: 100%;
    justify-content: flex-start;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-account { border-bottom: 1px solid var(--line); }
  .nav-account .nav-account-toggle { border-bottom: none; }
  .account-dropdown {
    position: static;
    display: none;
    width: 100%;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--line);
    border-radius: 0;
    margin: 0;
    padding: 0;
  }
  .account-dropdown.is-open { display: block; }
  .account-menu-item, .account-menu-label, .account-menu-empty, .account-bookings-list { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (max-width: 600px) {
  .section { padding: 4rem 1.25rem; }
  .form-row { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .craft-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .service-subgroup-inner { grid-template-columns: 1fr; padding-left: 1.3rem; }

  /* A 340px docked panel has no room to "push" content aside on a phone-
     width screen - go full-width and overlay instead of shifting the page. */
  .edit-panel { width: 100%; right: -100%; }
  body.has-edit-panel { padding-right: 0; }

  .admin-panel-head { flex-wrap: wrap; gap: .6rem; }
  .admin-toolbar { right: 1rem; bottom: 1rem; }
  .admin-toolbar-btn { padding: .6rem 1rem; font-size: .72rem; }
}
