/* ============================================
   Decor Avenue — styles.css
   ============================================ */

:root {
  /* Color */
  --ink: #21322c;
  --ink-soft: #35473f;
  --linen: #f3eee3;
  --linen-deep: #e8e0cd;
  --paper: #fbf9f4;
  --brass: #a9782e;
  --brass-dark: #8a621f;
  --clay: #a6503e;
  --charcoal: #2b2b27;
  --stone: #6b6459;
  --line: #ddd3bf;
  --error: #a13327;
  --success: #3b6b52;

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --container-width: 1280px;
  --header-height: 76px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --transition: 200ms ease;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--linen);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; color: var(--ink); }
p { margin: 0; }
button { font-family: inherit; font-size: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input { font-family: inherit; font-size: inherit; }
address { font-style: normal; }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1.25rem; z-index: 999;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

section[id] { scroll-margin-top: var(--header-height); }

.wrap {
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 900px) {
  .wrap { padding-inline: 2rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.75rem; border-radius: 999px;
  font-size: 0.95rem; font-weight: 500;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-soft); }
.btn-text {
  color: var(--ink); padding: 0.25rem; border-radius: 0;
  border-bottom: 1px solid var(--ink);
}
.btn-text:hover { color: var(--brass-dark); border-color: var(--brass-dark); }
.btn-block { width: 100%; }

.btn-add {
  font-size: 0.85rem; font-weight: 500; color: var(--ink);
  padding: 0.4rem 0; border-radius: 0;
  border-bottom: 1px solid var(--ink);
  transition: color var(--transition), border-color var(--transition);
}
.btn-add:hover { color: var(--brass-dark); border-color: var(--brass-dark); }

/* ---------- Announcement bar ---------- */
.announcement-bar {
  background: var(--ink); color: var(--paper);
  text-align: center; font-size: 0.8rem;
  padding: 0.55rem 1rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--linen);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition), border-color var(--transition), background var(--transition);
}
.site-header.is-scrolled {
  background: var(--paper);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 16px rgba(33, 50, 44, 0.06);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; height: var(--header-height);
}
.logo {
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 600;
  color: var(--ink); white-space: nowrap;
}

.main-nav {
  position: fixed; top: var(--header-height); left: 0; right: 0; bottom: 0;
  background: var(--paper);
  transform: translateX(100%);
  transition: transform 280ms ease;
  padding: 2rem 1.5rem;
  overflow-y: auto;
  z-index: 95;
}
.main-nav.is-open { transform: translateX(0); }
.main-nav ul { display: flex; flex-direction: column; gap: 1.5rem; }
.main-nav a { font-size: 1.25rem; font-weight: 500; color: var(--ink); position: relative; }

.header-actions { display: flex; align-items: center; gap: 0.25rem; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; color: var(--ink);
  transition: background var(--transition);
}
.icon-btn:hover { background: var(--linen-deep); }
.icon-btn svg { width: 20px; height: 20px; }

.cart-count {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 3px;
  border-radius: 999px; background: var(--ink); color: var(--paper);
  font-size: 0.65rem; line-height: 16px; text-align: center;
  opacity: 0; transform: scale(0.6);
  transition: opacity var(--transition), transform var(--transition);
}
.cart-count.is-visible { opacity: 1; transform: scale(1); }

.menu-toggle .icon-close { display: none; }
.menu-toggle.is-open .icon-open { display: none; }
.menu-toggle.is-open .icon-close { display: block; }

/* ---------- Search bar ---------- */
.search-bar { border-top: 1px solid var(--line); background: var(--paper); }
.search-bar-inner {
  display: flex; align-items: center; gap: 0.6rem;
  padding-block: 0.75rem; color: var(--stone);
}
.search-bar-inner:focus-within { box-shadow: inset 0 -2px 0 var(--brass); }
.search-bar-inner svg { width: 18px; height: 18px; flex-shrink: 0; }
.search-bar input { flex: 1; border: none; background: none; font-size: 0.95rem; color: var(--charcoal); }
.search-bar input:focus { outline: none; }

/* ---------- Cart panel ---------- */
.cart-panel {
  position: fixed; top: 0; right: 0; height: 100vh;
  width: min(380px, 100vw);
  background: var(--paper);
  z-index: 210;
  display: flex; flex-direction: column;
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform 280ms ease;
  box-shadow: -12px 0 32px rgba(33, 50, 44, 0.15);
}
.cart-panel.is-open { transform: translateX(0); }
.cart-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.cart-panel-header h2 { font-size: 1.25rem; }
.cart-items { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; }
.cart-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--line);
}
.cart-item-name { font-weight: 500; font-size: 0.95rem; margin-bottom: 0.2rem; }
.cart-item-meta { font-size: 0.85rem; color: var(--stone); }
.cart-item-remove { padding: 0.25rem; color: var(--stone); }
.cart-item-remove svg { width: 16px; height: 16px; }
.cart-item-remove:hover { color: var(--clay); }
.cart-empty { color: var(--stone); text-align: center; padding: 2rem 0; }
.cart-footer { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: auto; }
.cart-subtotal { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 1rem; color: var(--ink); }

.cart-backdrop { position: fixed; inset: 0; background: rgba(33, 50, 44, 0.35); z-index: 205; }

/* ---------- Hero ---------- */
.hero { padding: 3rem 0 3.5rem; }
.hero-inner { display: grid; gap: 2.5rem; }
.hero-content { max-width: 42ch; }
.hero-content h1 { font-size: clamp(2.25rem, 5vw + 1rem, 3.75rem); letter-spacing: -0.01em; }
.hero-lead { margin-top: 1.25rem; font-size: 1.1rem; color: var(--stone); max-width: 46ch; }
.hero-actions { margin-top: 2rem; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }

.hero-gallery {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: repeat(2, minmax(110px, 1fr));
  gap: 0.85rem;
  min-height: 280px;
}
.hero-tile {
  border-radius: var(--radius-md); overflow: hidden; background: var(--linen-deep);
  opacity: 0; transform: translateY(14px) scale(0.98);
  animation: tileIn 700ms ease forwards;
}
.hero-tile img { width: 100%; height: 100%; object-fit: cover; }
.tile-1 { grid-column: 1; grid-row: 1 / span 2; animation-delay: 60ms; }
.tile-2 { grid-column: 2; grid-row: 1; animation-delay: 200ms; }
.tile-3 { grid-column: 2; grid-row: 2; animation-delay: 340ms; }
@keyframes tileIn { to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---------- Trust strip ---------- */
.trust-strip { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 1.75rem; }
.trust-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.trust-item { display: flex; align-items: center; gap: 0.75rem; color: var(--ink); }
.trust-item svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--brass); }
.trust-item p { font-size: 0.9rem; }

/* ---------- Section heading (shared) ---------- */
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.section-heading h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.15rem); }
.section-lead { color: var(--stone); margin-top: 0.4rem; max-width: 48ch; }

.scroller-controls { display: flex; gap: 0.5rem; }
.scroller-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
  transition: background var(--transition), border-color var(--transition);
}
.scroller-btn:hover { background: var(--linen-deep); border-color: var(--stone); }
.scroller-btn svg { width: 16px; height: 16px; }

/* ---------- Avenue / categories ---------- */
.avenue { padding: 4rem 0; }
.avenue-row {
  display: flex; gap: 1rem; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.avenue-row::-webkit-scrollbar { display: none; }
.avenue-card { flex: 0 0 auto; width: 190px; scroll-snap-align: start; }
.avenue-card img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius-md); background: var(--linen-deep);
  transition: transform 400ms ease;
}
.avenue-card a:hover img { transform: scale(1.03); }
.avenue-card span { display: block; margin-top: 0.65rem; font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); }

/* ---------- Products ---------- */
.products { padding: 1rem 0 4.5rem; }
.no-results { color: var(--stone); padding: 2rem 0; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2rem 1.5rem; }
.product-image { aspect-ratio: 4 / 5; border-radius: var(--radius-md); overflow: hidden; background: var(--linen-deep); margin-bottom: 0.9rem; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.product-card:hover .product-image img { transform: scale(1.035); }
.product-info h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.3rem; }
.product-desc { color: var(--stone); font-size: 0.88rem; margin-bottom: 0.75rem; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.product-price { font-weight: 600; color: var(--ink); }

/* ---------- Story ---------- */
.story { background: var(--ink); padding: 4.5rem 0; }
.story-inner { display: grid; gap: 2.5rem; align-items: center; }
.story-image img { border-radius: var(--radius-md); aspect-ratio: 4 / 3; object-fit: cover; background: var(--ink-soft); }
.story-content h2 { color: var(--paper); font-size: clamp(1.6rem, 2vw + 1rem, 2.25rem); margin-bottom: 1.25rem; }
.story-content p { color: #d7dfd9; max-width: 56ch; }
.story-content p + p { margin-top: 1rem; }

/* ---------- Testimonials ---------- */
.testimonials { padding: 4.5rem 0; }
.testimonial-row { display: flex; gap: 2rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.testimonial-row::-webkit-scrollbar { display: none; }
.testimonial-card {
  flex: 0 0 auto; width: min(400px, 85vw); scroll-snap-align: start;
  border-top: 1px solid var(--line); padding-top: 1.5rem;
}
.testimonial-card p:first-child { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); line-height: 1.5; }
.testimonial-name { margin-top: 1rem; color: var(--stone); font-size: 0.9rem; }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--linen-deep); padding: 4rem 1.25rem; }
.newsletter-inner { max-width: 560px; margin-inline: auto; text-align: center; }
.newsletter-inner h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2rem); }
.newsletter-inner p { color: var(--stone); margin-top: 0.75rem; }
.newsletter-form { display: flex; gap: 0.75rem; margin-top: 1.75rem; flex-wrap: wrap; justify-content: center; }
.newsletter-form input {
  flex: 1; min-width: 220px; padding: 0.85rem 1.1rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 0.95rem;
}
.newsletter-form input:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(169, 120, 46, 0.18); }
.form-message { margin-top: 0.85rem; font-size: 0.9rem; min-height: 1.2em; }
.form-message.is-error { color: var(--error); }
.form-message.is-success { color: var(--success); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--linen); padding: 4rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(243, 238, 227, 0.15); }
.footer-brand .logo { color: var(--paper); margin-bottom: 0.85rem; display: block; }
.footer-brand p { color: #c9d2cb; max-width: 32ch; }
.social-links { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.social-links a {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(243, 238, 227, 0.3);
  display: inline-flex; align-items: center; justify-content: center; color: var(--linen);
  transition: background var(--transition), border-color var(--transition);
}
.social-links a:hover { background: rgba(243, 238, 227, 0.1); border-color: var(--paper); }
.social-links svg { width: 17px; height: 17px; }

.footer-links h3, .footer-contact h3 { font-family: var(--font-body); font-size: 0.9rem; font-weight: 600; color: var(--paper); margin-bottom: 1rem; }
.footer-links ul { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-links a { color: #c9d2cb; font-size: 0.92rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--paper); }
.footer-contact address { color: #c9d2cb; font-size: 0.92rem; line-height: 1.6; margin-bottom: 0.85rem; display: block; }
.footer-contact p { margin-bottom: 0.5rem; }
.footer-contact a { color: #c9d2cb; font-size: 0.92rem; }
.footer-contact a:hover { color: var(--paper); }

.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.5rem; font-size: 0.82rem; color: #9fab9f; }

/* ---------- Back to top & toast ---------- */
.back-to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(33, 50, 44, 0.25);
  z-index: 90;
  transition: transform var(--transition), background var(--transition);
}
.back-to-top:hover { background: var(--ink-soft); transform: translateY(-2px); }
.back-to-top[hidden] { display: none; }
.back-to-top svg { width: 18px; height: 18px; }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem;
  transform: translate(-50%, 12px);
  background: var(--ink); color: var(--paper);
  padding: 0.85rem 1.5rem; border-radius: 999px; font-size: 0.9rem;
  opacity: 0; pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 220;
  box-shadow: 0 10px 24px rgba(33, 50, 44, 0.25);
  max-width: 90vw;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  .hero-tile { opacity: 1; transform: none; }
}

/* ============================================
   Responsive (mobile-first)
   ============================================ */
@media (min-width: 640px) {
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 700px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .main-nav {
    position: static; transform: none; background: none;
    padding: 0; height: auto; overflow: visible; z-index: auto;
  }
  .main-nav ul { flex-direction: row; gap: 2rem; }
  .main-nav a { font-size: 0.95rem; padding: 0.25rem 0; }
  .main-nav a::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
    background: var(--brass); transform: scaleX(0); transform-origin: left;
    transition: transform var(--transition);
  }
  .main-nav a:hover::after, .main-nav a:focus-visible::after { transform: scaleX(1); }

  .hero-inner { grid-template-columns: 1.1fr 1fr; align-items: center; }
  .hero-gallery { min-height: 440px; }
  .story-inner { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
}

@media (max-width: 899.98px) {
  .menu-toggle { display: inline-flex; }
  body.nav-open { overflow: hidden; }
}

@media (min-width: 1200px) {
  .hero { padding: 4.5rem 0 5rem; }
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}