/*
Theme Name: Thread & Bloom
Theme URI: https://threadandbloom.test
Author: Cybrok
Author URI: https://cybrok.com
Description: A heart-meltingly cute, cottagecore storefront theme for a handmade embroidery brand. Hand-coded from scratch.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: thread-and-bloom
*/

/* ============================================================
   1. DESIGN TOKENS  (the brand — change colors here once)
   ============================================================ */
:root {
  --cream:      #FBF7F0;
  --blush:      #E8B4B0;
  --rose:       #C97B78;
  --sage:       #A8B89A;
  --brown:      #5A4A42;
  --gold:       #C9A227;
  --white-soft: #FFFDFA;

  --font-head: "Cormorant Garamond", Georgia, serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;

  --radius: 22px;
  --shadow: 0 10px 30px rgba(90, 74, 66, 0.10);
  --shadow-hover: 0 16px 40px rgba(90, 74, 66, 0.18);
  --wrap: 1160px;
}

/* ============================================================
   2. BASE
   ============================================================ */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--brown);
  line-height: 1.15;
  margin: 0 0 0.4em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.6rem; }

p { margin: 0 0 1.2em; }

a { color: var(--rose); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold); }

img { max-width: 100%; display: block; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.btn {
  display: inline-block;
  background: var(--rose);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .3px;
  padding: 14px 34px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { background: var(--gold); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.btn-ghost {
  background: transparent;
  color: var(--rose);
  border: 2px solid var(--blush);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--blush); color: #fff; border-color: var(--blush); }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--sage);
  margin-bottom: 10px;
}

/* ============================================================
   3. HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(168, 184, 154, 0.25);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--wrap);
  margin: 0 auto;
}
.site-logo {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--brown);
}
.site-logo span { color: var(--rose); }

.main-nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0; padding: 0;
}
.main-nav a {
  color: var(--brown);
  font-weight: 600;
  font-size: 1rem;
  position: relative;
}
.main-nav a::after {
  content: "";
  position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--rose);
  transition: width .25s ease;
}
.main-nav a:hover::after { width: 100%; }

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--brown);
}
.cart-count {
  background: var(--rose);
  color: #fff;
  font-size: .8rem;
  border-radius: 999px;
  padding: 2px 9px;
}

/* ============================================================
   4. HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 24px 96px;
  background:
    radial-gradient(900px 380px at 12% -8%, rgba(232,180,176,0.38), transparent 70%),
    radial-gradient(760px 380px at 102% 18%, rgba(168,184,154,0.30), transparent 72%),
    var(--cream);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 54px;
  align-items: center;
}
.hero-copy { animation: tab-fade-up .8s ease both; }
.hero-copy .eyebrow { color: var(--sage); }
.hero-copy h1 { margin: 0 0 18px; }
.hero-copy h1 em { font-style: italic; color: var(--rose); }
.hero-sub { max-width: 42ch; margin: 0 0 30px; font-size: 1.2rem; color: #7a6a60; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px;
  margin: 34px 0 0; padding: 0; color: #8a7a70; font-weight: 600; font-size: .92rem;
}
.hero-trust li { display: flex; align-items: center; gap: 7px; }

/* floating showcase card */
.hero-media {
  position: relative; display: flex; justify-content: center;
  animation: tab-fade-up 1s ease .15s both;
}
.hero-card {
  position: relative;
  width: 100%; max-width: 420px; aspect-ratio: 5 / 6;
  border-radius: 30px;
  background: linear-gradient(150deg, #ffffff 0%, var(--cream) 55%, #f4e5e3 100%);
  box-shadow: 0 34px 64px rgba(90, 74, 66, 0.22);
  border: 8px solid #fff;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-2.5deg);
  animation: tab-float 6s ease-in-out infinite;
  overflow: hidden;
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-bouquet { width: 80%; height: auto; }
.hero-badge {
  position: absolute; background: #fff; color: var(--brown);
  font-weight: 700; font-size: .85rem; padding: 9px 15px; border-radius: 999px;
  box-shadow: 0 12px 26px rgba(90, 74, 66, 0.20); transform: rotate(2.5deg);
  white-space: nowrap;
}
.hero-badge--top { top: 20px; left: -12px; color: var(--rose); }
.hero-badge--bottom { bottom: 24px; right: -10px; color: var(--sage); }

@keyframes tab-fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes tab-float {
  0%, 100% { transform: rotate(-2.5deg) translateY(0); }
  50%      { transform: rotate(-2.5deg) translateY(-14px); }
}

@media (max-width: 860px) {
  .hero { padding: 46px 24px 66px; text-align: center; }
  .hero-inner { grid-template-columns: 1fr; gap: 38px; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-trust { justify-content: center; }
  .hero-media { order: -1; }
  .hero-card { max-width: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-copy, .hero-media, .hero-card { animation: none; }
}

/* ============================================================
   5. SECTIONS
   ============================================================ */
.section { padding: 80px 0; }
.section-head { text-align: center; margin-bottom: 50px; }
.section-head p { max-width: 44ch; margin: 8px auto 0; color: #7a6a60; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}
.product-card {
  background: var(--white-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
  text-align: center;
  padding-bottom: 24px;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.product-thumb {
  height: 230px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.4rem;
}
.product-card h3 { margin: 22px 12px 4px; font-size: 1.5rem; }
.product-price { color: var(--rose); font-weight: 700; font-size: 1.1rem; margin-bottom: 16px; }

/* Story teaser */
.story {
  background: linear-gradient(180deg, transparent, rgba(168,184,154,0.12));
}
.story-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.story-photo {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blush), var(--sage));
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}
@media (max-width: 800px) {
  .story-inner { grid-template-columns: 1fr; gap: 30px; }
}

/* ============================================================
   6. FOOTER
   ============================================================ */
.site-footer {
  background: var(--brown);
  color: #efe4dc;
  text-align: center;
  padding: 60px 24px 40px;
  margin-top: 40px;
}
.site-footer .site-logo { color: #fff; }
.site-footer .site-logo span { color: var(--blush); }
.footer-tagline { color: #d8c7bd; margin: 10px 0 24px; }
.social-row { display: flex; gap: 22px; justify-content: center; margin-bottom: 28px; }
.social-row a { color: #efe4dc; font-weight: 700; }
.social-row a:hover { color: var(--blush); }
.footer-fine { color: #b8a79d; font-size: .85rem; }

/* Page content (About, Contact, etc.) */
.page-content { padding: 70px 0; }
.page-content .wrap { max-width: 760px; }

/* ============================================================
   7. SHOP / PRODUCT IMAGES
   ============================================================ */
.product-thumb { overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb-link { display: block; }
.product-card h3 a { color: var(--brown); }
.product-card h3 a:hover { color: var(--rose); }

/* Single product */
.sp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.sp-media {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  min-height: 420px; display: flex; align-items: center; justify-content: center;
}
.sp-media img { width: 100%; height: 100%; object-fit: cover; }
.sp-emoji { font-size: 5rem; }
.sp-price { font-size: 1.5rem; margin: 6px 0 20px; }
.sp-desc { color: #7a6a60; }
.sp-note { color: var(--sage); font-weight: 700; margin: 18px 0 26px; }
.sp-actions { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 780px) { .sp-grid { grid-template-columns: 1fr; gap: 28px; } .sp-media { min-height: 300px; } }

/* ============================================================
   8. CART
   ============================================================ */
.cart-box { margin-top: 10px; }
.cart-empty { text-align: center; font-size: 1.15rem; color: #7a6a60; padding: 40px 0; }
.cart-row {
  display: grid;
  grid-template-columns: 74px 1fr auto auto 34px;
  gap: 18px; align-items: center;
  background: var(--white-soft);
  border-radius: 16px; padding: 14px 18px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.cart-thumb {
  width: 74px; height: 74px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(135deg, #FBF7F0, #E8B4B0);
  display: flex; align-items: center; justify-content: center;
}
.cart-thumb-img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb-emoji { font-size: 2rem; }
.cart-info h4 { font-family: var(--font-body); font-weight: 700; margin: 0 0 2px; font-size: 1.05rem; }
.cart-unit { color: #9a8a80; font-size: .9rem; }
.cart-qty { display: flex; align-items: center; gap: 12px; }
.cart-qty button {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--blush);
  background: #fff; color: var(--rose); font-size: 1.1rem; line-height: 1; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.cart-qty button:hover { background: var(--blush); color: #fff; }
.cart-line { font-weight: 700; color: var(--brown); min-width: 60px; text-align: right; }
.cart-remove { border: none; background: none; color: #c9b6ac; font-size: 1.5rem; cursor: pointer; line-height: 1; }
.cart-remove:hover { color: var(--rose); }
.cart-foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px;
  margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(168,184,154,0.3);
}
.cart-total { font-size: 1.25rem; }
@media (max-width: 620px) {
  .cart-row { grid-template-columns: 60px 1fr auto; grid-row-gap: 10px; }
  .cart-thumb { width: 60px; height: 60px; }
  .cart-line { grid-column: 2 / 4; text-align: left; }
  .cart-remove { grid-column: 3; grid-row: 1; }
}

/* ============================================================
   9. CHECKOUT
   ============================================================ */
.checkout-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 50px; align-items: start; }
.checkout-form-col label {
  display: block; font-weight: 700; color: var(--brown); margin-bottom: 18px; font-size: .95rem;
}
.checkout-form-col .opt { font-weight: 400; color: #9a8a80; }
.checkout-form-col input,
.checkout-form-col textarea {
  display: block; width: 100%; margin-top: 7px;
  font-family: var(--font-body); font-size: 1rem; color: var(--brown);
  padding: 13px 16px; border: 2px solid rgba(168,184,154,0.4);
  border-radius: 14px; background: var(--white-soft); box-sizing: border-box;
}
.checkout-form-col input:focus,
.checkout-form-col textarea:focus { outline: none; border-color: var(--blush); }
.checkout-submit { width: 100%; margin-top: 8px; }
.checkout-payinfo { text-align: center; color: #7a6a60; font-size: .9rem; margin-top: 16px; }
.form-error {
  background: #fbeaea; color: #b0433f; border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; font-weight: 600;
}
.checkout-summary-col {
  background: var(--white-soft); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow); position: sticky; top: 100px;
}
.checkout-summary-col h3 { margin-bottom: 18px; }
.sum-row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; color: #7a6a60; }
.sum-total {
  border-top: 1px solid rgba(168,184,154,0.35); margin-top: 8px; padding-top: 16px;
  font-weight: 800; color: var(--brown); font-size: 1.15rem;
}
@media (max-width: 820px) {
  .checkout-grid { grid-template-columns: 1fr; gap: 30px; }
  .checkout-summary-col { position: static; order: -1; }
}

/* Thank you */
.ty-emoji { font-size: 4rem; margin-bottom: 10px; }

/* ============================================================
   10. OUR STORY + CONTACT
   ============================================================ */
.lead { font-size: 1.25rem; color: #7a6a60; margin-top: 8px; }

/* Our Story */
.story-page-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 54px; align-items: center; }
.story-page-photo {
  aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--blush), var(--sage));
  display: flex; align-items: center; justify-content: center; font-size: 4rem;
}
.story-page-photo img { width: 100%; height: 100%; object-fit: cover; }
.story-page-text { font-size: 1.1rem; color: #6f5f56; }
.story-page-text p { margin-bottom: 1.1em; }
@media (max-width: 820px) { .story-page-grid { grid-template-columns: 1fr; gap: 30px; } }

/* Values strip */
.values-strip { background: linear-gradient(180deg, rgba(168,184,154,0.12), transparent); }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.value { text-align: center; }
.value-emoji { font-size: 2.6rem; margin-bottom: 10px; }
.value h3 { margin-bottom: 6px; }
.value p { color: #7a6a60; font-size: .98rem; }
@media (max-width: 720px) { .values-grid { grid-template-columns: 1fr; gap: 26px; } }

/* CTA band */
.cta-band {
  background: radial-gradient(700px 300px at 50% 0%, rgba(232,180,176,0.30), transparent 70%), var(--cream);
}
.cta-band h2 { margin-bottom: 22px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 50px; align-items: start; }
.contact-form-col label { display: block; font-weight: 700; color: var(--brown); margin-bottom: 18px; font-size: .95rem; }
.contact-form-col input,
.contact-form-col textarea {
  display: block; width: 100%; margin-top: 7px; box-sizing: border-box;
  font-family: var(--font-body); font-size: 1rem; color: var(--brown);
  padding: 13px 16px; border: 2px solid rgba(168,184,154,0.4);
  border-radius: 14px; background: var(--white-soft);
}
.contact-form-col input:focus,
.contact-form-col textarea:focus { outline: none; border-color: var(--blush); }
.contact-info-col {
  background: var(--white-soft); border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow);
}
.contact-line { margin-bottom: 12px; }
.contact-socials { display: flex; gap: 18px; margin: 16px 0; font-weight: 700; }
.contact-note { color: #7a6a60; font-size: .95rem; margin-top: 10px; }
.form-success { background: #eef4ea; color: #5f7a4f; border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; font-weight: 600; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; gap: 30px; } }
