/*
Theme Name: Happiness Play Store
Theme URI: https://www.happinessplay.es/tienda/
Author: Happiness Play
Description: Tema editorial y accesible para la tienda digital de Happiness Play.
Version: 1.0.0
Text Domain: happiness-play-store
Requires at least: 6.6
Requires PHP: 8.2
*/

:root {
  --hp-blue: #004fa0;
  --hp-blue-dark: #00396f;
  --hp-navy: #032d55;
  --hp-ink: #0f172a;
  --hp-copy: #475569;
  --hp-muted: #64748b;
  --hp-canvas: #f8fafc;
  --hp-surface: #ffffff;
  --hp-ice: #eaf4ff;
  --hp-line: #d9e4ef;
  --hp-warm: #e8ad35;
  --hp-pink: #e90087;
  --hp-green: #16a63a;
  --hp-radius: 18px;
  --hp-shadow: 0 24px 70px rgba(3, 45, 85, 0.12);
  --hp-wrap: min(1240px, calc(100% - 48px));
  --hp-font: Inter, Avenir Next, Avenir, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--hp-canvas);
  color: var(--hp-ink);
  font-family: var(--hp-font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.admin-bar .hp-site-header { top: 32px; }

img { max-width: 100%; height: auto; }
a { color: var(--hp-blue); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--hp-blue-dark); }
button, input, select, textarea { font: inherit; }

.screen-reader-text,
.hp-skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hp-skip-link:focus {
  position: fixed;
  z-index: 99999;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  border-radius: 8px;
  background: #fff;
  color: var(--hp-blue-dark);
  box-shadow: var(--hp-shadow);
}

:focus-visible {
  outline: 3px solid #147cc9;
  outline-offset: 3px;
}

.hp-wrap { width: var(--hp-wrap); margin-inline: auto; }

.hp-site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.hp-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  min-height: 86px;
}

.hp-brand { display: inline-flex; align-items: center; text-decoration: none; }
.hp-brand img { display: block; width: 164px; max-height: 60px; object-fit: contain; }

.hp-nav { justify-self: center; }
.hp-nav ul { display: flex; gap: 8px; align-items: center; padding: 0; margin: 0; list-style: none; }
.hp-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--hp-ink);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}
.hp-nav a:hover { background: var(--hp-ice); color: var(--hp-blue-dark); }

.hp-header-actions { display: flex; gap: 10px; align-items: center; }
.hp-account-link,
.hp-cart-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}
.hp-account-link { padding: 8px 14px; color: var(--hp-ink); }
.hp-cart-link { gap: 8px; padding: 8px 17px; background: var(--hp-navy); color: #fff; }
.hp-cart-link:hover { background: var(--hp-blue); color: #fff; }
.hp-cart-count {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--hp-navy);
  font-size: 0.74rem;
  line-height: 1;
}

.hp-menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--hp-line);
  border-radius: 12px;
  background: #fff;
  color: var(--hp-navy);
  cursor: pointer;
}
.hp-menu-toggle span,
.hp-menu-toggle::before,
.hp-menu-toggle::after {
  display: block;
  width: 23px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  content: "";
}

.hp-hero {
  position: relative;
  overflow: hidden;
  min-height: 720px;
  background: var(--hp-navy);
  color: #fff;
}
.hp-hero::before {
  position: absolute;
  inset: auto -12vw -38vw auto;
  width: 68vw;
  height: 68vw;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  content: "";
}
.hp-hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 56%, rgba(37, 139, 196, 0.22));
  content: "";
  pointer-events: none;
}
.hp-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.95fr);
  gap: clamp(48px, 7vw, 110px);
  align-items: center;
  min-height: 720px;
  padding-block: 92px;
}
.hp-eyebrow {
  margin: 0 0 24px;
  color: #b8dcff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hp-eyebrow--blue { color: var(--hp-blue); }
.hp-hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(4rem, 7.2vw, 7.4rem);
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 0.88;
}
.hp-hero h1 em {
  display: block;
  color: transparent;
  font-style: normal;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.88);
}
.hp-hero-copy { max-width: 680px; margin: 34px 0 0; color: #dcecff; font-size: clamp(1.05rem, 1.6vw, 1.32rem); }
.hp-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hp-button,
.button,
button.button,
input.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--hp-blue);
  color: #fff;
  font-weight: 850;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(.2,.8,.2,1), background-color 200ms cubic-bezier(.2,.8,.2,1);
}
.hp-button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover { transform: translateY(-2px); background: var(--hp-blue-dark); color: #fff; }
.hp-button--light { background: #fff; color: var(--hp-navy); }
.hp-button--light:hover { background: var(--hp-ice); color: var(--hp-navy); }
.hp-button:active,
.woocommerce a.button:active,
.woocommerce button.button:active,
.woocommerce input.button:active { transform: scale(0.97); }
.hp-text-link { display: inline-flex; min-height: 50px; align-items: center; color: #fff; font-weight: 800; }

.hp-cover-stage { position: relative; min-height: 520px; }
.hp-cover-stage::before {
  position: absolute;
  inset: 7% 2% 4% 9%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  content: "";
}
.hp-floating-cover {
  position: absolute;
  width: clamp(155px, 16vw, 225px);
  aspect-ratio: 0.74;
  overflow: hidden;
  border: 10px solid rgba(255, 255, 255, 0.98);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.35);
  transform: rotate(var(--r, 0deg));
  transition: transform 320ms cubic-bezier(.2,.8,.2,1);
}
.hp-floating-cover img { width: 100%; height: 100%; object-fit: contain; }
.hp-floating-cover:nth-child(1) { z-index: 4; top: 9%; left: 28%; --r: -4deg; }
.hp-floating-cover:nth-child(2) { z-index: 3; top: 20%; right: 3%; --r: 6deg; }
.hp-floating-cover:nth-child(3) { z-index: 2; bottom: 2%; left: 8%; --r: -10deg; }
.hp-floating-cover:nth-child(4) { z-index: 1; right: 18%; bottom: -2%; --r: 10deg; }

.hp-proof-strip { border-bottom: 1px solid var(--hp-line); background: #fff; }
.hp-proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.hp-proof-item { padding: 30px 36px; border-right: 1px solid var(--hp-line); }
.hp-proof-item:last-child { border-right: 0; }
.hp-proof-item strong { display: block; color: var(--hp-blue-dark); font-size: 1.15rem; }
.hp-proof-item span { color: var(--hp-copy); font-size: 0.95rem; }

.hp-section { padding-block: clamp(78px, 10vw, 140px); }
.hp-section--white { background: #fff; }
.hp-section--ice { background: var(--hp-ice); }
.hp-section--navy { background: var(--hp-navy); color: #fff; }
.hp-section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 0.55fr); gap: 40px; align-items: end; margin-bottom: 58px; }
.hp-section-head h2,
.hp-page-title {
  max-width: 900px;
  margin: 0;
  font-size: clamp(3.2rem, 6.8vw, 6.6rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.94;
}
.hp-section-head p { margin: 0; color: var(--hp-copy); font-size: 1.12rem; }
.hp-section--navy .hp-section-head p { color: #cfe6ff; }

.hp-product-grid,
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px !important;
  margin: 0 !important;
  background: var(--hp-line);
  list-style: none;
}
.hp-product-card,
.woocommerce ul.products li.product {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  width: auto !important;
  min-height: 410px;
  padding: clamp(28px, 4vw, 54px) !important;
  margin: 0 !important;
  background: #fff;
  float: none !important;
}
.hp-product-art {
  display: grid;
  min-height: 280px;
  place-items: center;
  padding: 22px;
  background: linear-gradient(145deg, #f7fbff, #e7f2fd);
}
.hp-product-art img,
.woocommerce ul.products li.product a img {
  width: 100% !important;
  max-width: 230px;
  height: 270px !important;
  margin: 0 auto !important;
  object-fit: contain;
  filter: drop-shadow(0 22px 22px rgba(3, 45, 85, 0.16));
  transition: transform 320ms cubic-bezier(.2,.8,.2,1);
}
.hp-product-meta { align-self: stretch; display: flex; flex-direction: column; justify-content: center; min-width: 0; /* 17/09/2026: sin esto la celda crece con la palabra mas larga y la portada desborda a 320 px */ }
.hp-product-kicker { margin: 0 0 16px; color: var(--hp-blue); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; }
.hp-product-card h3,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  margin: 0 0 18px;
  overflow-wrap: anywhere; /* 17/09/2026: «ConseguirLaFelicidad.com» salia por la derecha */
  color: var(--hp-ink);
  font-size: clamp(1.55rem, 2.2vw, 2.35rem) !important;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.03;
}
.hp-product-card h3 a { color: inherit; text-decoration: none; }
.hp-product-excerpt { color: var(--hp-copy); font-size: 0.98rem; }
.hp-product-buy { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 24px; }
.hp-price,
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price { color: var(--hp-blue-dark) !important; font-size: 1.28rem !important; font-weight: 900 !important; }
.hp-product-link { min-height: 44px; display: inline-flex; align-items: center; font-weight: 850; }

.woocommerce ul.products li.product.hp-loop-product { display: grid; }
.hp-loop-product .hp-product-art { min-height: 260px; }
.hp-loop-product .hp-product-meta { min-width: 0; }
.hp-loop-product .hp-product-buy { justify-content: space-between; }

.hp-method-band { overflow: hidden; }
.hp-method-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: center; }
.hp-method-grid h2 { margin: 0 0 28px; font-size: clamp(3.4rem, 7vw, 7rem); line-height: 0.9; letter-spacing: -0.065em; }
.hp-method-grid p { max-width: 660px; color: #d4e7fb; font-size: 1.12rem; }
.hp-method-steps { border-top: 1px solid rgba(255, 255, 255, 0.3); }
.hp-method-step { display: grid; grid-template-columns: 80px 1fr; gap: 20px; align-items: center; min-height: 112px; border-bottom: 1px solid rgba(255, 255, 255, 0.3); }
.hp-method-step b { color: #94c8ff; font-size: 0.8rem; letter-spacing: 0.12em; }
.hp-method-step span { font-size: clamp(1.35rem, 2.4vw, 2rem); font-weight: 850; }

.hp-shop-shell { padding-block: 72px 120px; }
.hp-shop-header { margin-bottom: 48px; }
.hp-shop-header .hp-eyebrow { color: var(--hp-blue); }
.hp-shop-content { min-width: 0; }

.hp-content-shell {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
  padding-block: 64px 120px;
}

.woocommerce .woocommerce-breadcrumb { margin: 0 0 30px; color: var(--hp-muted); font-size: 0.9rem; }
.woocommerce .woocommerce-breadcrumb a { color: var(--hp-blue); }
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering { margin-bottom: 32px; }
.woocommerce .woocommerce-ordering select,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.select2-container--default .select2-selection--single {
  min-height: 50px;
  padding: 11px 14px;
  border: 1px solid var(--hp-line);
  border-radius: 10px;
  background: #fff;
  color: var(--hp-ink);
}

.woocommerce div.product { display: grid; grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr); gap: clamp(48px, 7vw, 100px); }
.woocommerce div.product div.images,
.woocommerce div.product div.summary { width: auto; float: none; }
.woocommerce div.product div.images { padding: 40px; background: #fff; box-shadow: var(--hp-shadow); }
.woocommerce div.product div.summary { display: flex; flex-direction: column; justify-content: center; }
.woocommerce div.product .product_title { margin: 0 0 24px; font-size: clamp(2.8rem, 5vw, 5.4rem); line-height: 0.95; letter-spacing: -0.055em; }
.woocommerce div.product form.cart { display: flex; gap: 12px; align-items: stretch; margin-top: 28px; }
.woocommerce .quantity .qty { min-height: 50px; border: 1px solid var(--hp-line); border-radius: 10px; }
.woocommerce-tabs { grid-column: 1 / -1; margin-top: 40px; }
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before { border-color: var(--hp-line); }

.woocommerce table.shop_table {
  overflow: hidden;
  border: 1px solid var(--hp-line);
  border-collapse: separate;
  border-radius: 14px;
  background: #fff;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td { padding: 18px; border-color: var(--hp-line); }
.woocommerce-cart .cart-collaterals .cart_totals,
.woocommerce-checkout #order_review,
.woocommerce-account .woocommerce-MyAccount-content {
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius);
  background: #fff;
}
.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
  border-top-color: var(--hp-blue);
  background: #fff;
  color: var(--hp-ink);
  box-shadow: 0 10px 30px rgba(3, 45, 85, 0.07);
}
.woocommerce-info::before,
.woocommerce-message::before { color: var(--hp-blue); }

.hp-site-footer { padding-block: 76px 30px; background: #032d55; color: #dbeafe; }
.hp-footer-brand { margin: 0 0 48px; color: #fff; font-size: 2.1rem; font-weight: 900; letter-spacing: -0.04em; }
.hp-footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 48px; }
.hp-footer-group h2 { margin: 0 0 22px; color: #91b7dc; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; }
.hp-footer-group ul { display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; }
.hp-footer-group a { color: #fff; font-size: 1.02rem; text-decoration: none; }
.hp-footer-group a:hover { text-decoration: underline; }
.hp-footer-bottom { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; margin-top: 62px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.18); color: #a9c4df; font-size: 0.88rem; }
.hp-footer-legal { display: flex; flex-wrap: wrap; gap: 18px; }
.hp-footer-legal a { color: inherit; }

.hp-reveal { opacity: 0; transform: translateY(22px); }
.hp-reveal.is-visible { opacity: 1; transform: translateY(0); transition: opacity 420ms cubic-bezier(.2,.8,.2,1), transform 420ms cubic-bezier(.2,.8,.2,1); }

@media (hover: hover) and (pointer: fine) {
  .hp-cover-stage:hover .hp-floating-cover:nth-child(1) { transform: translateY(-8px) rotate(-5deg); }
  .hp-cover-stage:hover .hp-floating-cover:nth-child(2) { transform: translate(6px, -4px) rotate(7deg); }
  .hp-cover-stage:hover .hp-floating-cover:nth-child(3) { transform: translate(-6px, 4px) rotate(-11deg); }
  .hp-product-card:hover .hp-product-art img,
  .woocommerce ul.products li.product:hover .hp-product-art img { transform: translateY(-7px) rotate(-1deg); }
}

@media (max-width: 1023px) {
  body.admin-bar .hp-site-header { top: 46px; }
  .hp-header-inner { grid-template-columns: 1fr auto auto; min-height: 74px; }
  .hp-brand img { width: 142px; }
  .hp-menu-toggle { display: block; }
  .hp-nav {
    position: absolute;
    inset: 74px 0 auto;
    display: none;
    padding: 18px 24px 26px;
    border-bottom: 1px solid var(--hp-line);
    background: #fff;
  }
  .hp-nav.is-open { display: block; }
  .hp-nav ul { display: grid; }
  .hp-nav a { justify-content: center; }
  .hp-account-link { display: none; }
  .hp-hero-grid { grid-template-columns: 1fr; min-height: auto; padding-block: 82px; }
  .hp-cover-stage { min-height: 430px; max-width: 620px; width: 100%; margin-inline: auto; }
  .hp-proof-grid { grid-template-columns: 1fr; }
  .hp-proof-item { border-right: 0; border-bottom: 1px solid var(--hp-line); }
  .hp-proof-item:last-child { border-bottom: 0; }
  .hp-section-head,
  .hp-method-grid { grid-template-columns: 1fr; }
  .hp-product-card,
  .woocommerce ul.products li.product { grid-template-columns: 1fr; }
  .woocommerce div.product { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --hp-wrap: min(100% - 32px, 1240px); }
  body { font-size: 16px; }
  .hp-header-inner { gap: 9px; }
  .hp-brand img { width: 122px; }
  .hp-cart-link { padding-inline: 13px; }
  .hp-cart-label { display: none; }
  .hp-hero { min-height: auto; }
  .hp-hero-grid { gap: 34px; padding-block: 64px 74px; }
  .hp-hero h1 { font-size: clamp(3.65rem, 17vw, 5.4rem); }
  .hp-hero-copy { margin-top: 26px; }
  .hp-actions { align-items: stretch; flex-direction: column; }
  .hp-button, .hp-text-link { width: 100%; justify-content: center; }
  .hp-cover-stage { min-height: 350px; }
  .hp-floating-cover { width: 42%; border-width: 6px; }
  .hp-floating-cover:nth-child(1) { left: 24%; }
  .hp-floating-cover:nth-child(2) { right: 0; }
  .hp-section { padding-block: 72px; }
  .hp-section-head { gap: 24px; margin-bottom: 38px; }
  .hp-section-head h2,
  .hp-page-title { font-size: clamp(3rem, 15vw, 4.7rem); }
  .hp-product-grid,
  .woocommerce ul.products { grid-template-columns: 1fr; }
  .hp-product-card,
  .woocommerce ul.products li.product { min-height: 0; padding: 28px !important; }
  .hp-product-art { min-height: 250px; }
  .hp-method-grid { gap: 36px; }
  .hp-method-step { grid-template-columns: 50px 1fr; }
  .hp-shop-shell { padding-block: 50px 84px; }
  .hp-content-shell { width: min(100% - 32px, 1120px); padding-block: 44px 84px; }
  .woocommerce div.product div.images { padding: 22px; }
  .woocommerce div.product .product_title { font-size: clamp(2.5rem, 13vw, 4rem); }
  .woocommerce div.product form.cart { flex-direction: column; }
  .woocommerce table.shop_table_responsive tr td { padding: 14px; }
  .hp-footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .hp-footer-group:last-child { grid-column: 1 / -1; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.18); }
  .hp-footer-bottom { display: grid; justify-content: stretch; }
}

@media (max-width: 430px) {
  .hp-footer-grid { grid-template-columns: 1fr; }
  .hp-footer-group:last-child { grid-column: auto; }
  .hp-cover-stage { min-height: 320px; }
  .hp-floating-cover { width: 44%; }
}

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

@media print {
  .hp-site-header, .hp-site-footer, .hp-actions, .hp-cart-link { display: none !important; }
  body { background: #fff; color: #000; }
}
