/* ============================================================
   Happiness.co — Hoja de estilos principal
   ============================================================ */

:root {
  --yellow: #FFCA28;
  --green: #4CAF50;
  --orange: #FF7A3D;
  --red: #EF4444;
  --blue: #4C6EF5;
  --dark: #123524;
  --cream: #FFF8E7;
  --text: #24312a;
  --white: #ffffff;
  --shadow: 0 8px 24px rgba(18, 53, 36, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Nunito', 'Baloo 2', system-ui, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.5;
}

h1, h2, h3, h4, .bubble {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 .4em;
}

p { margin: 0 0 1em; }

a { color: inherit; text-decoration: none; }

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 28px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.02); }
.btn:active { transform: translateY(0) scale(.98); }

.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 6px 0 #d95f22;
}
.btn-primary:hover { box-shadow: 0 8px 0 #d95f22; }

.btn-dark {
  background: var(--dark);
  color: var(--white);
  box-shadow: 0 6px 0 #06180f;
}

.btn-outline {
  background: transparent;
  border: 3px solid var(--dark);
  color: var(--dark);
}

.btn-block { width: 100%; }

.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  font-weight: 700;
  font-size: .85rem;
  background: var(--yellow);
  color: var(--dark);
}

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 4px solid var(--dark);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.logo {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  display: flex;
  align-items: baseline;
  gap: 2px;
  letter-spacing: -0.5px;
}
.logo .h-color { transition: color .4s ease; }
.logo .dot-co { color: var(--dark); font-size: 1.1rem; }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-weight: 700;
}
.nav-links a { padding: 6px 2px; border-bottom: 3px solid transparent; }
.nav-links a:hover { border-color: var(--orange); }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.cart-btn {
  position: relative;
  background: var(--dark);
  color: var(--white);
  border: none;
  border-radius: 100px;
  padding: 10px 18px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-count {
  background: var(--orange);
  color: var(--white);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--dark); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 70px 24px 90px;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, var(--cream) 100%);
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  opacity: .85;
  animation: float 7s ease-in-out infinite;
}
.blob-1 { width: 220px; height: 220px; background: var(--yellow); top: -60px; left: -60px; }
.blob-2 { width: 160px; height: 160px; background: var(--blue); top: 40px; right: -40px; animation-delay: 1s; }
.blob-3 { width: 140px; height: 140px; background: var(--red); bottom: -50px; left: 10%; animation-delay: 2s; }
.blob-4 { width: 120px; height: 120px; background: var(--green); bottom: 10px; right: 12%; animation-delay: 1.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-18px) scale(1.05); }
}

.hero-inner { position: relative; z-index: 2; max-width: 720px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.15;
}
.color-cycle {
  display: inline-block;
  transition: color .4s ease;
}
.hero-sub { font-size: 1.15rem; max-width: 560px; margin: 0 auto 28px; color: #3d4a41; }
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-swatches { display: flex; justify-content: center; gap: 10px; margin-top: 34px; }
.hero-swatches span {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* ---------- CONCEPT SECTION ---------- */
.concept {
  padding: 70px 24px;
  text-align: center;
}
.concept h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.concept p.lead { max-width: 640px; margin: 0 auto 40px; font-size: 1.1rem; color: #3d4a41; }

.concept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: 960px;
  margin: 0 auto;
}
.concept-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 26px 20px;
  box-shadow: var(--shadow);
}
.concept-card .icon-circle {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin: 0 auto 14px;
  color: var(--white);
}
.concept-card h3 { font-size: 1.15rem; }
.concept-card p { font-size: .95rem; color: #4a5750; margin: 0; }

/* ---------- CATALOG ---------- */
.catalog {
  padding: 70px 24px 90px;
  background: var(--white);
  border-top: 4px solid var(--dark);
  border-bottom: 4px solid var(--dark);
}
.catalog-head { text-align: center; max-width: 620px; margin: 0 auto 46px; }
.catalog-head h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.catalog-head p { color: #3d4a41; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 26px;
  max-width: 1180px;
  margin: 0 auto;
}

.product-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 3px solid var(--dark);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease;
}
.product-card:hover { transform: translateY(-6px); }

.product-media {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
}
.product-media img { width: 100%; height: 100%; object-fit: contain; }

.product-card h3 { font-size: 1.2rem; margin-bottom: 2px; }
.product-tagline { font-size: .85rem; color: #6b756d; margin-bottom: 10px; }
.product-price { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.25rem; color: var(--orange); margin-bottom: 12px; }

.swatches { display: flex; gap: 8px; margin-bottom: 14px; }
.swatch {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--dark);
  cursor: pointer;
  padding: 0;
  position: relative;
}
.swatch.active { outline: 3px solid var(--orange); outline-offset: 2px; }
.swatch[data-color="rainbow"] { background: conic-gradient(var(--yellow), var(--orange), var(--red), var(--blue), var(--yellow)); }

.size-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--dark);
  font-family: inherit;
  font-weight: 700;
  margin-bottom: 12px;
  background: var(--white);
}

.add-cart-btn {
  width: 100%;
  background: var(--dark);
  color: var(--white);
  border: none;
  border-radius: 100px;
  padding: 12px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  cursor: pointer;
}
.add-cart-btn:hover { background: var(--orange); }
.add-cart-btn.added { background: var(--green); }

/* ---------- ABOUT / TRUST ---------- */
.trust {
  padding: 60px 24px;
  text-align: center;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 30px auto 0;
}
.trust-item { font-weight: 700; color: var(--dark); }
.trust-item span { display: block; font-size: 1.8rem; margin-bottom: 6px; }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--dark);
  color: var(--cream);
  padding: 50px 24px 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  max-width: 1180px;
  margin: 0 auto 30px;
}
.footer-logo { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 1.5rem; color: var(--yellow); margin-bottom: 10px; }
.site-footer h4 { color: var(--white); font-size: 1rem; margin-bottom: 12px; }
.site-footer a { color: #cfe0d5; display: block; margin-bottom: 8px; }
.site-footer a:hover { color: var(--yellow); }
.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 18px;
  font-size: .85rem;
  color: #9db8a9;
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------- CART DRAWER ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(18,53,36,.45);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
  z-index: 90;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; right: -420px; width: 100%; max-width: 400px; height: 100%;
  background: var(--white); z-index: 91; box-shadow: -10px 0 30px rgba(0,0,0,.2);
  display: flex; flex-direction: column; transition: right .3s ease;
}
.cart-drawer.open { right: 0; }
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px; border-bottom: 3px solid var(--dark);
}
.cart-head h3 { margin: 0; }
.cart-close { background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--dark); }

.cart-items { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-empty { text-align: center; color: #6b756d; padding: 40px 0; }

.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #eee; }
.cart-item img { width: 60px; height: 60px; object-fit: contain; background: var(--cream); border-radius: var(--radius-sm); padding: 6px; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: .95rem; margin: 0 0 2px; }
.cart-item-meta { font-size: .8rem; color: #6b756d; margin-bottom: 6px; }
.qty-control { display: flex; align-items: center; gap: 10px; }
.qty-control button {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--dark);
  background: var(--white); cursor: pointer; font-weight: 700; line-height: 1;
}
.remove-item { background: none; border: none; color: var(--red); cursor: pointer; font-size: .8rem; font-weight: 700; margin-left: 10px; }
.cart-item-price { font-weight: 800; color: var(--dark); white-space: nowrap; }

.cart-footer { padding: 18px 20px 22px; border-top: 3px solid var(--dark); }
.cart-subtotal { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.1rem; margin-bottom: 14px; }

/* ---------- CHECKOUT PAGE ---------- */
.checkout-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 50px 24px 90px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
}
.checkout-title { text-align: left; margin-bottom: 26px; grid-column: 1 / -1; }

.checkout-form, .order-summary {
  background: var(--white);
  border: 3px solid var(--dark);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .92rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid #d9dcd6;
  font-family: inherit;
  font-size: .95rem;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.order-summary h3 { margin-bottom: 16px; }
.summary-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: .95rem; border-bottom: 1px dashed #e2e2e2; }
.summary-total { display: flex; justify-content: space-between; padding-top: 14px; font-weight: 800; font-size: 1.2rem; color: var(--dark); }

.empty-cart-msg { text-align: center; padding: 80px 24px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .concept-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .checkout-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links, .cart-btn span.label { display: none; }
  .nav-toggle { display: block; }
  .nav-links.mobile-open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); flex-direction: column; padding: 18px 24px;
    border-bottom: 4px solid var(--dark); gap: 16px;
  }
}
