/* ============================================================
   Maple & Oak - online shop
   Example project by Zenbyte
   ============================================================ */

:root {
  --bg: #faf7f1;
  --surface: #ffffff;
  --ink: #2a2521;
  --muted: #897f72;
  --line: rgba(42, 37, 33, 0.12);
  --accent: #3f5c48;
  --accent-dark: #324a3a;
  --radius: 14px;
  --container: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 24px 60px -30px rgba(42, 37, 33, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3,
h4 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: clamp(56px, 8vw, 104px);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-head {
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
}

.price {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.1rem;
}
.price.big {
  font-size: 1.8rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    color 0.25s var(--ease);
}
.btn-dark {
  background: var(--ink);
  color: var(--bg);
}
.btn-dark:hover {
  background: #443c34;
  transform: translateY(-2px);
}
.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}
.btn-block {
  width: 100%;
}

/* ===== Announcement ===== */
.announce {
  background: var(--ink);
  color: var(--bg);
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  padding: 9px 16px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(250, 247, 241, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-block: 16px;
}
.brand {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin-inline: auto;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.75;
  transition: opacity 0.25s var(--ease);
}
.nav-links a:hover {
  opacity: 1;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  position: relative;
  transition: background 0.25s var(--ease);
}
.icon-btn:hover {
  background: rgba(42, 37, 33, 0.06);
}
.cart-count {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* ===== Hero ===== */
.hero {
  padding-block: clamp(40px, 6vw, 80px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.hero-text h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
}
.hero-sub {
  margin-top: 20px;
  max-width: 420px;
  color: var(--muted);
  font-size: 1.1rem;
}
.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-media img {
  width: 100%;
  height: clamp(320px, 42vw, 520px);
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===== Values ===== */
.values {
  border-block: 1px solid var(--line);
  background: var(--surface);
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-block: 30px;
}
.value {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.value strong {
  font-size: 0.98rem;
}
.value span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ===== Shop ===== */
.shop .section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.filter:hover {
  border-color: var(--ink);
}
.filter.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.5vw, 30px);
}
.product {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.product:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}
.product.hidden {
  display: none;
}
.product-img {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.product:hover .product-img img {
  transform: scale(1.05);
}
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
}
.product-info {
  padding: 18px;
}
.product-info h3 {
  font-size: 1.2rem;
}
.cat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}
.product-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}
.add-btn {
  border: 1px solid var(--ink);
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.add-btn:hover {
  background: var(--ink);
  color: var(--bg);
}

/* ===== Featured ===== */
.featured {
  background: var(--surface);
}
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.featured-media img {
  width: 100%;
  height: clamp(320px, 42vw, 520px);
  object-fit: cover;
  border-radius: var(--radius);
}
.featured-text h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin-bottom: 16px;
}
.featured-text p {
  color: var(--muted);
}
.featured-feats {
  list-style: none;
  margin: 22px 0;
  display: grid;
  gap: 10px;
}
.featured-feats li {
  position: relative;
  padding-left: 26px;
  font-weight: 500;
}
.featured-feats li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
}
.featured-buy {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 26px;
}

/* ===== Story ===== */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.story-text h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin-bottom: 18px;
}
.story-text p {
  color: var(--muted);
  margin-bottom: 14px;
}
.story-media img {
  width: 100%;
  height: clamp(320px, 42vw, 500px);
  object-fit: cover;
  border-radius: var(--radius);
}

/* ===== Newsletter ===== */
.newsletter {
  background: var(--ink);
  color: var(--bg);
  padding-block: clamp(56px, 8vw, 96px);
  text-align: center;
}
.newsletter-inner h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
}
.newsletter-inner > p {
  margin: 14px 0 28px;
  color: rgba(250, 247, 241, 0.75);
}
.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}
.newsletter-form input {
  flex: 1;
  font: inherit;
  font-size: 0.95rem;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid rgba(250, 247, 241, 0.25);
  background: rgba(250, 247, 241, 0.06);
  color: var(--bg);
}
.newsletter-form input::placeholder {
  color: rgba(250, 247, 241, 0.5);
}
.newsletter-form input:focus {
  outline: none;
  border-color: var(--bg);
}
.newsletter-form .btn-dark {
  background: var(--bg);
  color: var(--ink);
}
.newsletter-status {
  min-height: 1.2em;
  margin-top: 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #a8d8b4;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg);
  padding-top: clamp(48px, 6vw, 72px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 42px;
}
.footer-brand .brand {
  margin-bottom: 12px;
}
.footer-brand p {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 250px;
}
.footer-col h4 {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 9px;
  color: var(--ink);
  opacity: 0.8;
  transition: opacity 0.25s var(--ease);
}
.footer-col a:hover {
  opacity: 1;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-bottom strong {
  color: var(--ink);
}

/* ===== Cart drawer ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 37, 33, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
  z-index: 120;
}
.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(90vw, 400px);
  background: var(--bg);
  z-index: 130;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  box-shadow: -30px 0 80px -40px rgba(42, 37, 33, 0.6);
}
.cart-drawer.open {
  transform: translateX(0);
}
.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.cart-head h3 {
  font-size: 1.3rem;
}
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
}
.cart-empty {
  color: var(--muted);
  text-align: center;
  margin-top: 40px;
}
.cart-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}
.cart-line .cl-name {
  flex: 1;
  font-weight: 500;
  font-size: 0.95rem;
}
.cart-line .cl-price {
  font-family: "Fraunces", serif;
  font-weight: 600;
}
.qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty button {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--ink);
}
.qty span {
  min-width: 18px;
  text-align: center;
  font-size: 0.9rem;
}
.cart-foot {
  padding: 20px 22px;
  border-top: 1px solid var(--line);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.cart-total strong {
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
}
.cart-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 12px;
}

/* ===== Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
    order: -1;
  }
  .brand {
    margin-right: auto;
  }
  .nav-links {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(78vw, 300px);
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: 40px;
    margin: 0;
    transform: translateX(-100%);
    transition: transform 0.4s var(--ease);
    box-shadow: 20px 0 60px -30px rgba(42, 37, 33, 0.4);
    z-index: 95;
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links a {
    font-size: 1.2rem;
  }
  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero-grid,
  .featured-grid,
  .story-grid {
    grid-template-columns: 1fr;
  }
  .featured-media,
  .story-media {
    order: -1;
  }
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }
  .values-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .newsletter-form {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
