/*
Theme Name: Dolce Kawsay
Theme URI: https://dolcekawsay.com
Author: Dolce Kawsay
Description: Custom theme for Dolce Kawsay, Peruvian Artisan Bakery. Warm cream, teal and terracotta palette with Andean details.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: dolce-kawsay
*/

:root {
  --cream: #fbf1e3;
  --cream-2: #f6e6cf;
  --brown: #4a2a1d;
  --brown-2: #5b3424;
  --teal: #12918e;
  --teal-dark: #0d7573;
  --terracotta: #d4613e;
  --gold: #f2a92b;
  --gold-dark: #d98d12;
  --ink: #3b2a22;
  --muted: #6d5a4d;
  --radius: 18px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Nunito", "Segoe UI", system-ui, sans-serif;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--brown); line-height: 1.12; margin: 0 0 .5em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; position: relative; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .7em 1.5em; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; transition: transform .15s, background .15s, color .15s;
  cursor: pointer; font-family: var(--sans);
}
.btn:hover { transform: translateY(-2px); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); }
.btn-outline { border-color: var(--terracotta); color: var(--terracotta); background: transparent; }
.btn-outline:hover { background: var(--terracotta); color: #fff; }
.btn-gold { background: var(--gold); color: var(--brown); }
.btn-gold:hover { background: var(--gold-dark); }
.btn svg { width: 1em; height: 1em; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--teal); color: #fff; font-size: .9rem; position: relative;
}
.topbar::before, .topbar::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 120px;
  background:
    repeating-linear-gradient(45deg, #d4613e 0 6px, #f2a92b 6px 12px, #12918e 12px 18px, #b8282f 18px 24px);
  opacity: .9;
}
.topbar::before { left: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }
.topbar::after { right: 0; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.topbar ul { list-style: none; margin: 0; padding: .55em 0; display: flex; justify-content: center; flex-wrap: wrap; gap: .3em 1.4em; }
.topbar li { display: flex; align-items: center; gap: .5em; }
.topbar li + li::before { content: "|"; opacity: .6; margin-right: 1em; }
.topbar svg { width: 20px; height: 20px; }

/* ---------- Header ---------- */
.site-header { background: var(--cream); position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 18px; padding-bottom: 18px; }
.brand { text-decoration: none; display: block; text-align: center; color: var(--brown); }
.brand .mtn { width: 110px; margin: 0 auto -4px; color: var(--brown); }
.brand-name { font-family: var(--serif); font-size: 2rem; font-weight: 700; letter-spacing: .04em; line-height: 1; display: block; }
.brand-tag { display: flex; align-items: center; gap: .5em; justify-content: center; font-size: .66rem; letter-spacing: .22em; font-weight: 700; margin-top: 4px; }
.brand-tag::before, .brand-tag::after { content: ""; width: 18px; height: 1px; background: currentColor; }
.brand .pods { width: 64px; margin: 2px auto 0; color: var(--brown); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 34px; align-items: center; }
.main-nav a { color: var(--brown); text-decoration: none; font-weight: 600; padding: 4px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: var(--terracotta); border-color: var(--terracotta); }
.main-nav li { position: relative; }
.main-nav .sub-menu, .main-nav .children { display: none; position: absolute; top: 100%; left: -16px; background: #fff; border-radius: 12px; padding: 10px 16px; box-shadow: 0 10px 30px rgba(74,42,29,.15); flex-direction: column; gap: 6px; align-items: flex-start; min-width: 180px; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav .menu-item-has-children > a::after { content: " \25BE"; font-size: .8em; }

.header-icons { display: flex; gap: 18px; align-items: center; }
.header-icons a { color: var(--brown); position: relative; display: flex; }
.header-icons svg { width: 26px; height: 26px; }
.cart-count { position: absolute; top: -8px; right: -10px; background: var(--terracotta); color: #fff; font-size: .7rem; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; }
.menu-toggle { display: none; background: none; border: 0; color: var(--brown); padding: 4px; cursor: pointer; }
.menu-toggle svg { width: 30px; height: 30px; }
.site-header .search-pop { display: none; padding: 0 24px 16px; }
.site-header .search-pop.open { display: block; }
.search-pop form { display: flex; gap: 8px; max-width: 520px; margin: 0 auto; }
.search-pop input { flex: 1; padding: .7em 1.2em; border-radius: 999px; border: 1px solid #e0cbb0; font: inherit; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 30px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 30px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; text-transform: uppercase; letter-spacing: .3em; font-size: .85rem; font-weight: 600; color: var(--brown); }
.eyebrow::before, .eyebrow::after { content: ""; width: 34px; height: 1px; background: var(--gold-dark); }
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.2rem); margin: .25em 0 .3em; }
.hero p.lead { font-style: italic; font-size: 1.2rem; color: var(--ink); margin: 0 0 1.4em; max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-text { position: relative; z-index: 2; padding-left: 70px; }
.hero-photo { position: relative; }
.hero-photo img { width: 100%; border-radius: 40% 12px 12px 40% / 50% 12px 12px 50%; box-shadow: 0 30px 60px -30px rgba(74,42,29,.5); aspect-ratio: 4/3; object-fit: cover; }
.hero-mtn { position: absolute; top: -10px; left: 30%; width: 220px; color: #c99a76; opacity: .7; z-index: 1; }
.hero-llama { position: absolute; left: -10px; top: 50%; width: 110px; transform: translateY(-40%); z-index: 1; }
.flower-cluster { position: absolute; pointer-events: none; }
.flower-cluster.tl { left: -30px; top: 10px; width: 130px; }
.flower-cluster.bl { left: -20px; bottom: -10px; width: 140px; }
.flower-cluster.tr { right: -20px; top: -10px; width: 150px; transform: scaleX(-1); }

/* ---------- Features strip ---------- */
.features { padding: 10px 0 30px; }
.features ul { list-style: none; margin: 0 auto; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; max-width: 860px; }
.features li { flex: 1 1 0; min-width: 160px; text-align: center; padding: 6px 18px; font-weight: 600; font-size: .95rem; }
.features li + li { border-left: 1px solid #e0b98b; }
.features svg { width: 34px; height: 34px; margin: 0 auto 4px; display: block; }

/* ---------- Section title ---------- */
.section-title { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: clamp(1.9rem, 3.6vw, 2.6rem); text-align: center; margin-bottom: 26px; }
.section-title svg { width: 70px; height: 24px; color: var(--gold-dark); flex: none; }
.section-title svg.flip { transform: scaleX(-1); }

/* ---------- Treats ---------- */
.treats { padding: 20px 0 50px; }
.treat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.treat-card { display: block; text-decoration: none; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: 0 14px 30px -18px rgba(74,42,29,.45); transition: transform .2s; }
.treat-card:hover { transform: translateY(-5px); }
.treat-card img { width: 100%; aspect-ratio: 2/1.1; object-fit: cover; }
.treat-card .label { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 10px; color: #fff; font-weight: 700; font-size: 1.15rem; border-radius: 0 0 var(--radius) var(--radius); margin-top: -14px; position: relative; border-top-left-radius: 14px; border-top-right-radius: 14px; }
.treat-card .label svg { width: 28px; height: 20px; }
.label.teal { background: var(--teal); }
.label.terracotta { background: var(--terracotta); }
.label.gold { background: var(--gold); color: var(--brown); }

/* ---------- Gift ---------- */
.gift { position: relative; padding: 50px 0 80px; background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%); overflow: hidden; }
.gift .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.gift-photo img { border-radius: 14px; box-shadow: 0 30px 50px -25px rgba(74,42,29,.55); width: 100%; }
.gift .eyebrow { letter-spacing: .3em; }
.gift .eyebrow::before, .gift .eyebrow::after { display: none; }
.gift h2 { font-size: clamp(2rem, 4vw, 3rem); margin: .2em 0 .25em; }
.gift p { font-style: italic; font-size: 1.15rem; margin: 0 0 1.3em; }
.gift-waves { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 90px; }
.gift-mtn { position: absolute; right: 2%; bottom: 60px; width: 260px; color: #c99a76; opacity: .8; }
.gift .flower-cluster.tr { top: -20px; right: -40px; width: 130px; opacity: .9; }
.site-footer .brand-name { font-size: 1.6rem; white-space: nowrap; }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--teal); color: #fff; padding: 20px 0; }
.newsletter .wrap { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }
.newsletter h3 { color: #fff; font-family: var(--sans); font-size: 1.35rem; margin: 0; display: flex; align-items: center; gap: 12px; }
.newsletter h3 svg { width: 32px; height: 32px; }
.newsletter p { margin: 0; font-size: .95rem; padding-left: 24px; border-left: 1px solid rgba(255,255,255,.5); }
.newsletter form { display: flex; background: #fff; border-radius: 999px; padding: 4px; min-width: 300px; flex: 0 1 380px; }
.newsletter input[type=email] { border: 0; background: transparent; padding: .5em 1em; flex: 1; font: inherit; font-size: .95rem; min-width: 0; outline: none; }
.newsletter button { background: var(--terracotta); color: #fff; border: 0; border-radius: 999px; padding: .55em 1.4em; font-weight: 700; cursor: pointer; font: inherit; font-weight: 700; }
.newsletter button:hover { background: #b84c2b; }
.newsletter .notice { width: 100%; text-align: center; font-weight: 700; margin: 0; border: 0; padding: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brown); color: #f3e3cf; position: relative; overflow: hidden; padding: 40px 0 0; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr .8fr 1fr 1fr 1.3fr; gap: 30px; align-items: start; position: relative; z-index: 2; }
.site-footer .brand { color: #fff; }
.site-footer .brand .mtn, .site-footer .brand .pods { color: #fff; }
.site-footer h4 { font-family: var(--sans); color: #fff; font-size: 1.05rem; font-weight: 600; margin: 0 0 .6em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 .15em; }
.site-footer a { color: #f3e3cf; text-decoration: none; font-size: .95rem; }
.site-footer a:hover { color: var(--gold); }
.footer-col { border-left: 1px solid rgba(255,255,255,.25); padding-left: 30px; }
.footer-col:nth-child(3) { border-left: 0; padding-left: 0; }
.socials { display: flex; gap: 16px; }
.socials svg { width: 26px; height: 26px; color: #fff; }
.footer-art { width: 100%; max-width: 280px; color: #c9a37f; align-self: end; }
.footer-bottom { text-align: center; font-size: .85rem; color: #cdb59c; padding: 22px 0; margin-top: 26px; border-top: 1px solid rgba(255,255,255,.12); position: relative; z-index: 2; }
.site-footer .flower-cluster.bl { left: -40px; bottom: 30px; width: 120px; opacity: .9; }

/* ---------- Generic pages ---------- */
.page-hero { background: var(--cream-2); padding: 50px 0 40px; text-align: center; position: relative; overflow: hidden; }
.page-hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); margin: 0; }
.page-content { padding: 50px 0 70px; }
.page-content .entry { max-width: 820px; margin: 0 auto; }
.page-content .entry.wide { max-width: var(--wrap); }
.entry h2 { font-size: 1.9rem; margin-top: 1.2em; }
.entry img { border-radius: 14px; }
.entry .wp-block-button__link { background: var(--teal); border-radius: 999px; }
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }
.post-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 14px 30px -18px rgba(74,42,29,.45); }
.post-card .body { padding: 18px 22px 24px; }
.post-card h2 { font-size: 1.4rem; }
.post-card a { text-decoration: none; }
.dk-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; margin: 30px 0; }
.dk-product { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 14px 30px -18px rgba(74,42,29,.45); display: flex; flex-direction: column; }
.dk-product img { aspect-ratio: 2/1.2; object-fit: cover; width: 100%; border-radius: 0; }
.dk-product .body { padding: 16px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dk-product h3 { font-size: 1.35rem; margin: 0; }
.dk-product p { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.dk-product .btn { align-self: flex-start; padding: .5em 1.2em; font-size: .9rem; }
.dk-contact { display: grid; gap: 14px; max-width: 560px; }
.dk-contact input, .dk-contact textarea { width: 100%; padding: .8em 1em; border: 1px solid #e0cbb0; border-radius: 12px; font: inherit; background: #fff; }

/* WooCommerce touches */
.woocommerce ul.products li.product .button, .woocommerce a.button, .woocommerce button.button { background: var(--teal); color: #fff; border-radius: 999px; }
.woocommerce ul.products li.product .price { color: var(--terracotta); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .main-nav ul { gap: 20px; }
  .treat-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer .wrap { grid-template-columns: 1fr 1fr 1fr; }
  .footer-art { display: none; }
  .footer-col:nth-child(4) { border-left: 0; padding-left: 0; }
}
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--cream); display: none; box-shadow: 0 16px 30px -10px rgba(74,42,29,.25); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 18px; }
  .main-nav li a { display: block; padding: 10px 0; border-bottom: 1px solid #eedcc4; }
  .main-nav .sub-menu { position: static; display: flex; box-shadow: none; background: transparent; padding: 0 0 0 16px; }
  .hero .wrap, .gift .wrap { grid-template-columns: 1fr; }
  .hero-text { padding-left: 0; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-llama, .flower-cluster.tl, .flower-cluster.bl { display: none; }
  .gift-text { text-align: center; }
  .gift-mtn { display: none; }
  .newsletter p { border: 0; padding: 0; text-align: center; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .brand-name { font-size: 1.5rem; }
  .brand .mtn { width: 80px; }
  .header-icons { gap: 12px; }
  .header-icons .acct { display: none; }
  .topbar::before, .topbar::after { width: 40px; }
  .topbar li + li::before { display: none; }
  .features li { flex-basis: 50%; border: 0 !important; }
  .treat-grid { gap: 14px; }
  .treat-card .label { font-size: .95rem; gap: 6px; }
  .treat-card .label svg { display: none; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .wrap > .brand { grid-column: 1 / -1; }
  .footer-col { border: 0; padding-left: 0; }
  .newsletter form { min-width: 0; width: 100%; }
}