/* Bubulóon theme — visual match of bubuloon.cl */
:root {
  --bb-navy: #16325c;
  --bb-navy-soft: #5b6b86;
  --bb-green: #2db54a;
  --bb-green-logo: #3dcf4a;
  --bb-lime: #7ed957;
  --bb-orange: #ff7a1a;
  --bb-orange-hot: #ff8a2b;
  --bb-bg: #f4f9ff;
  --bb-white: #ffffff;
  --bb-mint: #c8f59a;
  --bb-mint-2: #b6f0a0;
  --bb-sun: #ffe08a;
  --bb-sun-2: #ffd56a;
  --bb-sky: #9ad4ff;
  --bb-sky-2: #b9e7ff;
  --bb-rose: #ffc2de;
  --bb-rose-2: #ffd0e6;
  --bb-hero-a: #3aa0f5;
  --bb-hero-b: #1d4f9c;
  --bb-hero-c: #163a7a;
  --bb-radius: 22px;
  --bb-shadow: 0 10px 30px rgba(22, 50, 92, 0.08);
  --bb-font: "Nunito", system-ui, sans-serif;
  --bb-display: "Fredoka", "Nunito", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.bubuloon-theme {
  margin: 0;
  background: var(--bb-bg);
  color: var(--bb-navy);
  font-family: var(--bb-font);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--bb-navy); text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

.bb-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}
.bb-narrow { width: min(760px, calc(100% - 32px)); }

/* Header */
.bb-header {
  background: var(--bb-white);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 0 rgba(22,50,92,0.06);
}
.bb-header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.bb-logo {
  font-family: var(--bb-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.02em;
  color: var(--bb-green-logo);
  line-height: 1;
}
.bb-logo span { color: var(--bb-green-logo); }
.bb-logo sup {
  font-size: 11px;
  color: var(--bb-green);
  margin-left: 2px;
}
.bb-header .custom-logo { max-height: 42px; width: auto; }

.bb-nav {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.bb-nav a {
  font-weight: 700;
  color: var(--bb-navy);
  padding: 6px 0;
  position: relative;
}
.bb-nav .current-menu-item a,
.bb-nav a:hover {
  color: var(--bb-green);
}
.bb-nav .current-menu-item a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  border-radius: 3px;
  background: var(--bb-green);
}

.bb-header-actions { display: flex; gap: 10px; }
.bb-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #eef4fb;
  display: grid;
  place-items: center;
  color: #4b6a9a;
  position: relative;
}
.bb-icon-btn:hover { background: #e3edf8; color: var(--bb-navy); }
.bb-cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  background: var(--bb-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: none;
  place-items: center;
  padding: 0 4px;
}
.bb-cart-count.is-visible { display: grid; }

/* Hero */
.bb-hero-wrap {
  background: var(--bb-bg);
  padding: 18px 0 4px;
}
.bb-hero {
  position: relative;
  background: linear-gradient(180deg, var(--bb-hero-a) 0%, var(--bb-hero-b) 55%, var(--bb-hero-c) 100%);
  color: #fff;
  overflow: hidden;
  min-height: 380px;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  border-radius: 24px;
}
.bb-hero-wrap .bb-container {
  display: block;
}
.bb-hero-banners {
  min-height: 0;
  width: 100%;
  max-width: none;
  aspect-ratio: 1600 / 533;
  max-height: none;
  margin-left: 0;
  margin-right: 0;
}
.bb-hero-banners .bb-hero-wave { display: none; }
.bb-hero-banners .bb-slider-dots { bottom: 14px; }
.bb-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.bb-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .7s ease, transform 6s ease;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  pointer-events: none;
}
.bb-slide.is-active {
  opacity: 1;
  transform: scale(1);
}
.bb-hero-banners .bb-slide.has-image::after { display: none; }
.bb-slide.has-image { pointer-events: auto; }
.bb-slide.tone-blue { background: linear-gradient(180deg, var(--bb-hero-a) 0%, var(--bb-hero-b) 55%, var(--bb-hero-c) 100%); }
.bb-slide.tone-mint { background: linear-gradient(180deg, #7ed957 0%, #2f8f46 55%, #16325c 100%); }
.bb-slide.tone-sun { background: linear-gradient(180deg, #ffb347 0%, #ff7a1a 45%, #16325c 100%); }
.bb-slide.tone-sky { background: linear-gradient(180deg, #7ec8ff 0%, #2b6fbf 50%, #16325c 100%); }
.bb-slide.tone-rose { background: linear-gradient(180deg, #ff8ec8 0%, #e85aaa 50%, #16325c 100%); }
.bb-hero-inner,
.bb-hero-glow,
.bb-hero-wave,
.bb-slider-btn,
.bb-slider-dots { position: relative; z-index: 2; }
.bb-slider-btn {
  position: absolute;
  top: 46%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: var(--bb-navy);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(22,50,92,.18);
}
.bb-slider-prev { left: 16px; }
.bb-slider-next { right: 16px; }
.bb-slider-btn:hover { background: #fff; }
.bb-slider-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 78px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 3;
}
.bb-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.45);
  cursor: pointer;
  padding: 0;
}
.bb-dot.is-active { background: #fff; transform: scale(1.15); }
.bb-hero-inner {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 28px 8px 64px;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
  gap: 12px;
}
.bb-hero-copy {
  text-align: center;
}
.bb-hero-copy h1 {
  font-family: var(--bb-display);
  font-weight: 700;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.05;
  margin: 0 0 10px;
  color: #fff;
}
.bb-hero-copy h1 + p,
.bb-hero-copy p {
  margin: 0 0 22px;
  font-size: 18px;
  color: rgba(255,255,255,.92);
}
.bb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 12px 26px;
}
.bb-btn-orange {
  background: linear-gradient(180deg, #ff9a3d, var(--bb-orange));
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(255,122,26,.35);
}
.bb-btn-orange:hover { filter: brightness(1.05); }

.bb-orb { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bb-circle {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: #8ee24b;
  display: grid;
  place-items: center;
  font-size: 86px;
  box-shadow: 0 10px 0 rgba(0,0,0,.05);
}
.bb-bubble-label {
  font-size: 13px;
  line-height: 1.25;
  color: rgba(255,255,255,.92);
  text-align: center;
}
.bb-bubble-label.left { align-self: flex-start; padding-left: 18px; }
.bb-bubble-label.right { align-self: flex-end; padding-right: 8px; }

.bb-hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 70px;
  background:
    radial-gradient(120% 90px at 50% 0, transparent 62%, var(--bb-bg) 63%);
}

/* Families */
.bb-families { margin-top: 0; padding: 28px 0 22px; }
.bb-catalog-title {
  font-family: var(--bb-display);
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 700;
  text-align: center;
  color: var(--bb-navy);
  margin: 0 0 22px;
}
.bb-family-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.bb-family-card {
  background: #fff;
  border-radius: 26px;
  box-shadow: var(--bb-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 210px;
  transition: transform .18s ease;
}
.bb-family-card:hover { transform: translateY(-3px); }
.bb-family-emoji {
  flex: 1;
  width: 100%;
  display: grid;
  place-items: center;
  font-size: 72px;
  min-height: 150px;
}
.tone-mint .bb-family-emoji,
.tone-mint.bb-card-media { background: linear-gradient(180deg, #d8f7b3, var(--bb-mint)); }
.tone-sun .bb-family-emoji,
.tone-sun.bb-card-media { background: linear-gradient(180deg, #ffe9a8, var(--bb-sun)); }
.tone-sky .bb-family-emoji,
.tone-sky.bb-card-media { background: linear-gradient(180deg, #c8ecff, var(--bb-sky)); }
.tone-rose .bb-family-emoji,
.tone-rose.bb-card-media { background: linear-gradient(180deg, #ffd7ea, var(--bb-rose)); }

.bb-family-btn {
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(22,50,92,.08);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .04em;
  padding: 10px 18px;
  margin: 14px 0 0;
  position: relative;
  z-index: 1;
}

/* Learn banner */
.bb-learn-banner { padding: 8px 0 10px; }
.bb-learn-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #e7f3ff;
  border-radius: 28px;
  padding: 22px 28px;
}
.bb-learn-left { font-size: 54px; }
.bb-learn-copy strong {
  display: block;
  font-family: var(--bb-display);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: .02em;
  color: var(--bb-navy);
}
.bb-learn-copy em {
  font-style: normal;
  color: #ff4fa3;
}
.bb-learn-copy small {
  color: var(--bb-navy);
  font-weight: 600;
}
.bb-learn-right {
  font-size: 34px;
  font-weight: 800;
  color: var(--bb-navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Video boxes */
.bb-videos { padding: 10px 0 8px; }
.bb-videos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: center;
  align-items: start;
  gap: 22px;
  width: 100%;
}
.bb-video-box {
  width: 100%;
  min-width: 0;
}
.bb-mid-square {
  background: #fff8ee;
}
.bb-mid-square img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.bb-video-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}
.bb-video-head h2 {
  margin: 0;
  font-family: var(--bb-display);
  font-size: 22px;
}
.bb-video-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
.bb-video-badge.yt { background: #ff0033; }
.bb-video-badge.tt { background: #111; }
.bb-video-square {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--bb-shadow);
  overflow: hidden;
}
.bb-video-frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.bb-video-frame.is-active {
  opacity: 1;
  pointer-events: auto;
}
.bb-video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.bb-video-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}
.bb-video-dots .bb-dot {
  background: rgba(22,50,92,.25);
}
.bb-video-dots .bb-dot.is-active { background: var(--bb-navy); }
.bb-video-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  background:
    radial-gradient(circle at 30% 30%, #e7f3ff, #fff 60%);
  color: var(--bb-navy);
}
.bb-video-empty strong {
  font-family: var(--bb-display);
  font-size: 20px;
}
.bb-video-empty span {
  font-size: 13px;
  color: var(--bb-navy-soft);
}

/* Perks */
.bb-perks { padding: 28px 0 36px; }
.bb-perks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}
.bb-perk-ico { font-size: 22px; margin-bottom: 6px; }
.bb-perk h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}
.bb-perk p {
  margin: 4px 0 0;
  color: var(--bb-navy-soft);
  font-size: 13px;
}

.bb-featured { padding: 0 0 48px; }
.bb-section-title {
  font-family: var(--bb-display);
  font-size: 28px;
  margin: 0 0 16px;
}

/* Footer */
.bb-footer {
  background: #fff;
  border-top: 1px solid #e8eef6;
  padding: 22px 0 28px;
}
.bb-footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--bb-navy-soft);
  font-weight: 700;
  font-size: 14px;
}
.bb-mobile-nav { display: none; }

/* Generic pages */
.bb-main { padding: 28px 0 64px; min-height: 50vh; }
.bb-page-title {
  font-family: var(--bb-display);
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 6px;
}
.bb-page-sub { margin: 0 0 16px; color: var(--bb-navy-soft); }
.bb-content-card,
.bb-learn-panel {
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--bb-shadow);
  padding: 22px;
}

.bb-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 18px;
}
.bb-chip {
  background: #eef4fb;
  color: var(--bb-navy);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 14px;
}
.bb-chip.is-active,
.bb-chip:hover {
  background: var(--bb-navy);
  color: #fff;
}

.bb-topic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.bb-topic-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(22,50,92,.06);
}
.bb-topic-visual {
  background: #e7f3ff;
  min-height: 120px;
  display: grid;
  place-items: center;
  font-family: var(--bb-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--bb-navy);
}
.bb-topic-card h2 {
  margin: 0;
  padding: 12px 14px 14px;
  font-size: 16px;
}

/* WooCommerce catalog */
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.woocommerce ul.products li.product,
.bb-product-card {
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--bb-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 0 !important;
  width: auto !important;
  float: none !important;
}
.bb-card-media {
  display: grid;
  place-items: center;
  min-height: 148px;
  height: 148px;
  overflow: hidden;
}
.bb-card-media img {
  width: 100%;
  height: 148px;
  object-fit: cover;
}
.bb-emoji { font-size: 72px; line-height: 1; }
.bb-product-body {
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.woocommerce-loop-product__title {
  font-size: 16px !important;
  font-weight: 800;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.25;
}
.woocommerce ul.products li.product .price,
.price {
  color: var(--bb-green);
  font-weight: 800;
  font-size: 15px;
}
.woocommerce ul.products li.product .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit,
.single_add_to_cart_button,
.bb-product-body .button {
  background: var(--bb-navy) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 14px !important;
  font-weight: 700 !important;
  text-align: center;
  padding: 10px 12px !important;
  margin-top: auto;
  display: block;
  width: 100%;
}
.woocommerce ul.products li.product .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.single_add_to_cart_button:hover {
  background: #0f2140 !important;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-radius: 14px;
  border: 0;
  background: #fff;
  box-shadow: var(--bb-shadow);
}

/* Single product */
.woocommerce div.product {
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--bb-shadow);
}
.woocommerce div.product .product_title {
  font-family: var(--bb-display);
  font-size: 34px;
}
.woocommerce div.product p.price { color: var(--bb-green); }

/* Cart / checkout / account */
.woocommerce-cart .bb-container,
.woocommerce-checkout .bb-container,
.woocommerce-account .bb-container {
  width: min(980px, calc(100% - 32px));
}
.woocommerce-cart-form,
.cart-collaterals,
.woocommerce-checkout,
.woocommerce-MyAccount-content,
.woocommerce-MyAccount-navigation {
  background: #fff;
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--bb-shadow);
}
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; margin: 0; }
.woocommerce-MyAccount-navigation a {
  display: block;
  padding: 8px 0;
  font-weight: 700;
}

.added_to_cart { display: none !important; }

/* Featured products on home reuse same grid */
.bb-featured ul.products {
  grid-template-columns: repeat(4, 1fr);
}

/* Responsive */
@media (max-width: 1100px) {
  .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); }
  .bb-hero-inner { grid-template-columns: 1fr; text-align: center; }
  .bb-orb { display: none; }
  .bb-hero { min-height: 280px; }
  .bb-hero-banners {
    aspect-ratio: 2 / 1;
    min-height: 210px;
    max-height: none;
  }
}
@media (max-width: 800px) {
  .bb-nav-wrap { display: none; }
  .bb-family-grid,
  .bb-perks-grid,
  .bb-topic-grid,
  .bb-featured ul.products { grid-template-columns: repeat(2, 1fr); }
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
  .bb-learn-card { grid-template-columns: 1fr; text-align: center; }
  .bb-videos-grid { grid-template-columns: 1fr; justify-items: center; }
  .bb-video-box { width: min(340px, 100%); }
  .bb-slider-btn { display: none; }
  .bb-footer-inner { flex-direction: column; text-align: center; }
  .bb-mobile-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #e8eef6;
    z-index: 50;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  }
  .bb-mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--bb-navy-soft);
    gap: 2px;
  }
  .bb-mobile-nav a.is-active { color: var(--bb-green); }
  body { padding-bottom: 72px; }
}
@media (max-width: 520px) {
  .bb-family-grid { grid-template-columns: 1fr 1fr; }
  .woocommerce ul.products,
  .bb-featured ul.products { grid-template-columns: 1fr 1fr; }
}
