/* ==========================================================================
   WooCommerce Homepage Hero
   3-column layout: Categories | Slider | También te puede gustar
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* ── Root vars ── */
.wc-hero {
  --hero-font:        'Nunito', system-ui, sans-serif;
  --hero-border:      #e4e4e4;
  --hero-bg:          #ffffff;
  --hero-text:        #222222;
  --hero-muted:       #777777;
  --hero-accent:      #1677ff;
  --hero-accent-dark: #0052cc;
  --hero-cat-hover:   #f0f7ff;
  --hero-shadow:      0 2px 12px rgba(0,0,0,0.07);
  --hero-radius:      10px;
  --hero-slide-rad:   10px;

  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 0;
  width: 100%;
  border: 1px solid var(--hero-border);
  border-radius: var(--hero-radius);
  overflow: hidden;
  background: var(--hero-bg);
  font-family: var(--hero-font);
  box-shadow: var(--hero-shadow);
  box-sizing: border-box;
}

/* ================================================================== */
/*  LEFT — Categories                                                   */
/* ================================================================== */
.wc-hero__cats {
  border-right: 1px solid var(--hero-border);
  padding: 0;
  min-width: 0;
}

.wc-hero__cats-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 10px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--hero-text);
  border-bottom: 1px solid var(--hero-border);
}
.wc-hero__cats-header svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.wc-hero__cats-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.wc-hero__cats-list > li {
  margin: 0;
  padding: 0;
}

.wc-hero__cat-link {
  display: block;
  padding: 6px 16px;
  font-size: 0.82rem;
  color: var(--hero-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.12s ease, color 0.12s ease;
  line-height: 1.4;
}
.wc-hero__cat-link:hover {
  background: var(--hero-cat-hover);
  color: var(--hero-accent);
  text-decoration: none;
}

.wc-hero__cats-more-item {
  padding: 0;
}
.wc-hero__cats-more-item[hidden] { display: none; }

.wc-hero__cats-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 7px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--hero-font);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--hero-accent);
  text-align: left;
  transition: color 0.12s ease;
}
.wc-hero__cats-toggle:hover { color: var(--hero-accent-dark); }
.wc-hero__cats-toggle-arrow {
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.2s ease;
  display: inline-block;
}
.wc-hero__cats-toggle.is-open .wc-hero__cats-toggle-arrow {
  transform: rotate(90deg);
}

/* ================================================================== */
/*  CENTER — Slider                                                     */
/* ================================================================== */
.wc-hero__slider {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* ── Slide container ── */
.wc-hero__slides {
  position: relative;
  flex: 1;
  min-height: 300px;
}

.wc-hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 24px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
  overflow: hidden;
}
.wc-hero__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Gradient bg layer */
.wc-hero__slide-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* geometric squares overlay like the screenshot */
  background-color: #7b2fc9; /* fallback */
}
.wc-hero__slide-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 70% 20%, rgba(255,255,255,0.07) 0%, transparent 50%),
    radial-gradient(circle at 30% 80%, rgba(255,255,255,0.05) 0%, transparent 40%);
  /* Square geometric pattern */
  --sq: rgba(255,255,255,0.06);
  background-image:
    linear-gradient(var(--sq) 1px, transparent 1px),
    linear-gradient(90deg, var(--sq) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── Slide text ── */
.wc-hero__slide-content {
  position: relative;
  z-index: 1;
  max-width: 55%;
}

.wc-hero__slide-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  margin: 0 0 6px;
}

.wc-hero__slide-title {
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin: 0 0 14px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.wc-hero__slide-cta {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(255,255,255,0.6);
  border-radius: 20px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(4px);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.wc-hero__slide-cta:hover {
  background: rgba(255,255,255,0.35);
  border-color: #fff;
  text-decoration: none;
  color: #fff;
}

/* ── Product thumbs in slide ── */
.wc-hero__slide-products {
  position: absolute;
  right: 12px;
  bottom: 20px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 110px);
  gap: 8px;
}

.wc-hero__slide-product {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wc-hero__slide-product:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.25);
}
.wc-hero__slide-product img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  display: block;
}

/* ── Dots ── */
.wc-hero__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 8px;
  background: transparent;
  position: relative;
  z-index: 2;
  /* sits just below the slide area */
  margin-top: -32px;
}

.wc-hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.wc-hero__dot.is-active {
  background: #ffffff;
  transform: scale(1.3);
}

/* ── Badges row ── */
.wc-hero__badges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--hero-border);
}

.wc-hero__badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  text-decoration: none;
  color: var(--hero-text);
  border-right: 1px solid var(--hero-border);
  transition: background 0.12s ease;
  text-align: center;
}
.wc-hero__badge:last-child { border-right: none; }
.wc-hero__badge:hover { background: #fafafa; text-decoration: none; }

.wc-hero__badge-img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  background: #f0f0f0;
  flex-shrink: 0;
}
.wc-hero__badge-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wc-hero__badge-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8e8e8, #d0d0d0);
}

.wc-hero__badge-label {
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--hero-text);
  text-align: center;
}

/* ================================================================== */
/*  RIGHT — También te puede gustar                                     */
/* ================================================================== */
.wc-hero__liked {
  border-left: 1px solid var(--hero-border);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wc-hero__liked-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--hero-text);
  margin: 0 0 10px;
  padding: 0;
  border: none;
}

.wc-hero__liked-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.wc-hero__liked-item {
  margin: 0;
  border-bottom: 1px solid #f0f0f0;
}
.wc-hero__liked-item:last-child { border-bottom: none; }

.wc-hero__liked-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease;
  border-radius: 6px;
  padding: 7px 6px;
}
.wc-hero__liked-link:hover { background: var(--hero-cat-hover); text-decoration: none; }

.wc-hero__liked-img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--hero-border);
  flex-shrink: 0;
  background: #f5f5f5;
}

.wc-hero__liked-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wc-hero__liked-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--hero-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.wc-hero__liked-count {
  font-size: 0.7rem;
  color: var(--hero-muted);
  display: block;
}

/* ── Footer of right column ── */
.wc-hero__liked-footer {
  border-top: 1px solid var(--hero-border);
  padding-top: 10px;
  margin-top: 6px;
}

.wc-hero__liked-noproducts {
  font-size: 0.75rem;
  color: var(--hero-muted);
  margin: 0 0 8px;
  text-align: center;
}

.wc-hero__liked-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1.5px solid var(--hero-accent);
  border-radius: 20px;
  color: var(--hero-accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: center;
  line-height: 1.2;
}
.wc-hero__liked-cta svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.wc-hero__liked-cta:hover {
  background: var(--hero-accent);
  color: #fff;
  text-decoration: none;
}

/* ================================================================== */
/*  Responsive                                                          */
/* ================================================================== */
@media (max-width: 1024px) {
  .wc-hero {
    grid-template-columns: 180px 1fr 180px;
  }
  .wc-hero__slide-products {
    grid-template-columns: repeat(2, 90px);
  }
  .wc-hero__slide-product img { width: 90px; height: 90px; }
}

@media (max-width: 768px) {
  .wc-hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .wc-hero__cats   { border-right: none; border-bottom: 1px solid var(--hero-border); }
  .wc-hero__liked  { border-left: none;  border-top:    1px solid var(--hero-border); }
  .wc-hero__slides { min-height: 260px; }
  .wc-hero__slide-products { grid-template-columns: repeat(2, 80px); right: 8px; bottom: 16px; }
  .wc-hero__slide-product img { width: 80px; height: 80px; }
  .wc-hero__badges { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .wc-hero__slide-products { display: none; }
  .wc-hero__slide-content  { max-width: 100%; }
}
