/* ================================
   Light Theme — Global Variables
   ================================ */
   :root{
    --bg: #FAF9F6;              /* warm off-white */
    --text: #1A1A1A;
    --muted: #636363;
    --gold: #D4A373;
    --gold-dark: #AD7A4B;
    --accent: var(--gold);
    --accent-dark: var(--gold-dark);
    --text-muted: var(--muted);
    --card: #FFFFFF;
    --border: #EAE7E2;
    --shadow: 0 10px 24px rgba(0,0,0,0.08);
    --radius: 14px;
  
    /* Header control sizing (search + buttons + cart) */
    --hdr-control-h: 40px;
    --hdr-radius: 10px;
    --hdr-font: 15px;
  }
  
  *{ box-sizing:border-box }
  html,body{ height:100% }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color:var(--text);
    background:var(--bg);
    line-height:1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  
  /* ================================
     HEADER (Aligned on a single axis)
     ================================ */
  .site-header{
    position: sticky; top:0; z-index:1000;
    display:flex;                  /* single alignment context */
    align-items:center;            /* vertical centering for ALL children */
    gap:12px;
    padding:12px 24px;
    border-bottom:1px solid var(--border);
    background:rgba(250,249,246,0.88);
    -webkit-backdrop-filter:saturate(1.1) blur(6px);
    backdrop-filter:saturate(1.1) blur(6px);
  }
  
  /* Brand (left) */
  .brand{ 
    display:inline-flex; 
    align-items:center;            /* centers logo + text */
    gap:12px; 
    text-decoration:none; 
    margin-right:8px; 
  }
  .logo{ width:40px; height:40px; border-radius:8px; background:linear-gradient(180deg,#fff,#f3f3f3); }
  .brand-name{ font-weight:700; color:var(--accent); white-space:nowrap; }
  
  /* Nav sits directly after brand */
  .main-nav{ 
    margin:0; 
    display:flex; 
    align-items:center;            /* keeps nav items on same axis */
    gap:12px; 
  }
  .main-nav ul{ display:flex; gap:18px; list-style:none; margin:0; padding:0; }
  .main-nav a{ text-decoration:none; color:var(--text); font-weight:600; padding:8px 10px; border-radius:8px; line-height:1; }
  .main-nav a.active{ color:var(--accent); }
  .main-nav a:hover{ background:#F3F0EA; color:var(--accent); }
  
  /* Actions (right) */
  .actions{ 
    margin-left:auto;              /* pushes actions to far right */
    display:inline-flex; 
    align-items:center;            /* vertical centering of input + buttons + cart */
    gap:12px; 
  }
  
  /* Search input: same height as buttons */
  .search input{
    height:var(--hdr-control-h);
    padding:0 12px;                /* horizontal only; avoid baseline shifts */
    border-radius:var(--hdr-radius);
    border:1px solid var(--border);
    background:#fff;
    line-height:var(--hdr-control-h); /* keeps text centered vertically */
    font-size:var(--hdr-font);
    box-sizing:border-box;
  }
  
  /* Auth buttons (Sign In / Sign Up) */
  .actions .auth{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:var(--hdr-control-h);   /* same as input */
    padding:0 14px;                /* horizontal only */
    border-radius:8px;
    text-decoration:none;
    font-weight:600;
    font-size:var(--hdr-font);
    line-height:1;
    box-sizing:border-box;
    border:1px solid transparent;
    cursor:pointer;
  }
  .auth.signin{
    background:transparent;
    color:var(--text);
  }
  .auth.signup{
    background:var(--accent);
    color:#fff;
    border-color:var(--accent);
  }
  .actions .auth:hover,
  .actions .auth:focus{
    transform:translateY(-1px);
    box-shadow:0 6px 18px rgba(0,0,0,0.06);
  }
  
  /* Cart link: match header control height */
  .cart{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:var(--hdr-control-h);
    padding:0 10px;
    border-radius:8px;
    text-decoration:none;
    color:var(--text);
    position:relative;             /* for quantity badge */
    box-sizing:border-box;
  }
  .cart-icon{ font-size:18px; line-height:1; }
  .cart-quantity{
    position:absolute; top:-6px; right:-6px;
    min-width:20px; height:20px; line-height:20px;
    text-align:center; border-radius:999px;
    background:#d9534f; color:#fff; font-size:12px; padding:0 6px;
  }
  
  /* Mobile header */
  @media (max-width:768px){
    .site-header{ flex-wrap:wrap; gap:10px; padding:12px 16px; }
    .main-nav{ order:3; width:100%; justify-content:center; }
    .actions{ order:2; width:100%; justify-content:center; gap:10px; }
    .search input{ width:100%; max-width:480px; }
  }

  /* Homepage-only calm header tone */
  body.home-page .site-header {
    background: rgba(250, 246, 239, 0.92);
    border-bottom-color: #e6d8c3;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  }
  
  /* ================================
     FEATURED WORKS
     ================================ */
  .featured{ padding:24px; max-width:1100px; margin:0 auto }
  .featured .section-heading{
    text-align:center;
    font-family:"Playfair Display", serif;
    font-weight:700;
    font-size:22px;
    color:var(--text);
    margin:0 0 18px;
  }
  
  /* Flex-centered grid (3-up → 2-up → 1-up) */
  .works-grid{
    list-style:none;
    margin:0 auto;
    padding:0;
    display:flex;
    flex-wrap:wrap;
    gap:22px;
    justify-content:center;
    max-width:1100px;
  }
  
  /* Full-card link */
  .work-card{
    display:flex;
    flex-direction:column;
    text-decoration:none;
    color:inherit;
    border-radius:var(--radius);
    overflow:hidden;
    background:var(--card);
    border:1px solid var(--border);
    box-shadow:var(--shadow);
    transition:transform .18s ease, box-shadow .18s ease;
    width:clamp(280px, 30vw, 320px); /* consistent, responsive card width */
  }
  .work-card:hover{
    transform:translateY(-4px);
    box-shadow:0 16px 36px rgba(0,0,0,.10);
  }
  .work-card:focus{
    outline:none;
    box-shadow:
      0 0 0 3px rgba(212,163,115,0.30),
      0 10px 24px rgba(0,0,0,0.08);
    transform:translateY(-2px);
  }
  
  /* Image tile */
  .work-media{ margin:0; background:linear-gradient(180deg,#fff,#f7f4ee); }
  .work-media img{
    display:block;
    width:100%;
    aspect-ratio:4 / 3;            /* uniform crop across all tiles */
    object-fit:cover;
  }
  
  /* Metadata area */
  .card-meta{ padding:12px 14px; display:grid; gap:6px; background:var(--card); }
  .card-title{ margin:0; color:var(--text); font-size:18px; font-weight:700; }
  .card-sub{ margin:0; color:var(--muted); font-size:14px; }
  
  /* Responsive Featured grid */
  @media (max-width:960px){
    .works-grid{ gap:20px; }
  }
  @media (max-width:640px){
    .works-grid{ gap:16px; padding:0 12px; }
  }
  
  /* ================================
     NEWSLETTER
     ================================ */
  .newsletter{ padding:48px 24px }
  .newsletter-inner{
    max-width:900px; margin:0 auto; background:#fff; border:1px solid var(--border);
    border-radius:var(--radius); box-shadow:var(--shadow);
    padding:28px 28px;
  }
  .newsletter-form{ display:flex; gap:12px; margin-top:10px }
  .newsletter-form input{
    flex:1; padding:12px 14px; border-radius:10px; border:1px solid var(--border);
  }
  
  /* ================================
     FOOTER
     ================================ */
  .site-footer{
    padding:32px 24px; border-top:1px solid var(--border);
    display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap;
  }
  .site-footer p{ margin:0; color:var(--muted) }
  .footer-nav a{ margin-right:16px; color:var(--text); text-decoration:none }
  .footer-nav a:hover{ color:var(--accent-dark) }
  
  /* let main stretch to push footer to the bottom */
  .page-wrapper,
  main.page-wrapper {
    flex: 1 0 auto;
  }
  
  /* Footer */
.site-footer{ text-align:center; padding:20px; background:transparent; color:var(--text-on-panel); }
.footer-container{ display:flex; justify-content:space-around; flex-wrap:wrap; gap:20px; max-width:1200px; margin:0 auto; }
.footer-section h4{ color:var(--accent); margin-bottom:10px; }
.footer-section ul{ list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.footer-section a{ color:var(--text-on-panel); text-decoration:none; }
.footer-section a:hover{ color:var(--accent); }

/* Modern shared footer (injected by load-header.js) */
.site-footer.site-footer-modern {
  margin: 26px auto 0;
  max-width: 1240px;
  padding: 0 16px 24px;
  border-top: 0;
  display: block;
}

.site-footer-modern .footer-modern-shell {
  background: linear-gradient(180deg, #fffef9 0%, #f9f0e2 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(52, 35, 19, 0.09);
  overflow: hidden;
}

.site-footer-modern .footer-modern-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 22px;
  padding: 22px;
}

.site-footer-modern h3,
.site-footer-modern h4 {
  margin: 0 0 10px;
  color: var(--accent-dark);
}

.site-footer-modern p {
  margin: 0 0 8px;
  color: #5f4c3d;
}

.site-footer-modern ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.site-footer-modern a {
  color: #3f2f24;
  text-decoration: none;
  font-weight: 600;
}

.site-footer-modern a:hover {
  color: var(--accent-dark);
}

.site-footer-modern .footer-donate-btn {
  display: inline-flex;
  margin-top: 10px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  font-weight: 700;
}

.site-footer-modern .footer-donate-btn:hover {
  background: var(--accent-dark);
  color: #fff;
}

.site-footer-modern .footer-modern-bottom {
  border-top: 1px solid #e8d9c5;
  background: rgba(255, 255, 255, 0.55);
  padding: 12px 22px;
}

.site-footer-modern .footer-modern-bottom p {
  margin: 0;
  color: #6b5948;
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .site-footer-modern .footer-modern-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .site-footer.site-footer-modern {
    padding: 0 12px 18px;
  }
  .site-footer-modern .footer-modern-top {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }
  .site-footer-modern .footer-modern-bottom {
    padding: 10px 16px;
  }
}

/* Header / Navbar updated to match index.html */
.navbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 20px;
  background:var(--bg);
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  z-index:1000;
}

.navbar .logo {
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:var(--text);
  font-weight:700;
  font-size:1.05rem;
}
.navbar .logo img {
  width:44px;
  height:44px;
  object-fit:contain;
  border-radius:8px;
  background:linear-gradient(180deg,#fff,#f3f3f3);
  padding:6px;
}

.navbar nav {
  display:flex;
  gap:12px;
  align-items:center;
  margin-left:12px;
}
.navbar nav a {
  text-decoration:none;
  color:var(--text);
  padding:8px 10px;
  border-radius:8px;
  font-weight:600;
  transition:background .15s, color .15s, transform .08s;
}
.navbar nav a:hover,
.navbar nav a:focus {
  background:#F3F0EA;
  color:var(--accent);
  transform:translateY(-1px);
}

/* right-side actions */
.navbar .nav-actions {
  margin-left:auto;
  display:flex;
  gap:10px;
  align-items:center;
}

.primary-btn {
  display:inline-block;
  background:var(--accent);
  color:#fff;
  padding:12px 18px;
  border-radius:12px;
  text-decoration:none;
  font-weight:700;
  box-shadow:0 8px 20px rgba(0,0,0,0.08);
}
.primary-btn:hover { background:var(--accent-dark); transform:translateY(-2px); }

/* Homepage layout styles are intentionally centralized in frontend/css/styles.css */

/* custom-card two-column layout: form on the left, example image on the right */
.custom-card {
  max-width: 1100px;
  margin: 40px auto;
  padding: 30px;
}

/* single-column layout and center contents */
.custom-card-grid {
  display: grid;
  grid-template-columns: 320px 1fr; /* left: examples, right: form */
  gap: 30px;
  align-items: start;
}

.custom-example {
  display: flex;
  flex-direction: column; /* stack images vertically */
  gap: 14px;
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
}

.example-card {
  width: 100%;
  background: var(--white);
  padding: 10px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.example-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* responsive: stack the layout on small screens */
@media (max-width: 900px) {
  .custom-card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }
  .custom-example {
    order: -1; /* show examples above form */
    max-width: 420px;
    margin: 0 auto;
  }
  .custom-form { width: 100%; }
}

/* form: canvas preferences styling */
.color-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.color-row input[type="color"] {
  width: 48px;
  height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.text-input {
  flex: 1 1 240px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
}
textarea#canvas-notes {
  width: 100%;
  min-height: 110px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  resize: vertical;
  background: var(--panel);
}
.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
/* small helper text */
.muted.small { font-size: 0.9rem; color: var(--muted); margin-top: 8px; }

/* responsive adjustments */
@media (max-width: 520px) {
  .color-row { gap: 8px; }
  .text-input { flex-basis: 100%; }
  textarea#canvas-notes { min-height: 90px; }
}
