/*
Theme Name: GB Estepona
Theme URI: https://invalid.local/
Author: Equipo V2
Description: Tema de bloques limpio y local para la fase técnica inicial.
Version: 0.3.9
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: gb-estepona
*/

:root {
  /* Regla cromatica GB 60-30-10: neutros, estructura y acento. */
  --gb-color-canvas: #f7f8f6;
  --gb-color-surface: #ffffff;
  --gb-color-surface-raised: #fbfcf9;
  --gb-color-structure: #0f1f1a;
  --gb-color-structure-soft: #173f35;
  --gb-color-structure-alt: #1d4b3e;
  --gb-color-mint: #e8f7ef;
  --gb-color-mint-muted: #eef3ee;
  --gb-color-accent: #19c37d;
  --gb-color-accent-hover: #15a96d;
  --gb-color-accent-active: #118c5b;
  --gb-color-accent-soft: #65e6b2;
  --gb-color-action: #08724a;
  --gb-color-action-hover: #065f3f;
  --gb-color-ink: #10211b;
  --gb-color-muted: #52665d;
  --gb-color-border: #dfe7e2;
  --gb-color-border-strong: #b8ccc1;

  /* Alias historicos: una sola fuente de verdad sin romper componentes. */
  --gb-color-primary: var(--gb-color-accent);
  --gb-color-dark: var(--gb-color-structure);
  --gb-color-text: var(--gb-color-ink);
  --gb-color-bg: var(--gb-color-canvas);
  --gb-color-offer: #f4b000;
  --gb-color-error: #b42318;
  --gb-color-success: #067647;
  --gb-color-warning: #b54708;
  --gb-stock-full: #067647;
  --gb-stock-partial: #b54708;
  --gb-stock-none: #b42318;
  --gb-stock-pending: var(--gb-color-muted);
  --gb-font-heading: Poppins, Arial, sans-serif;
  --gb-font-body: Inter, Arial, sans-serif;
  --gb-radius-sm: 8px;
  --gb-radius-md: 14px;
  --gb-radius-lg: 22px;
  --gb-radius-pill: 999px;
  --gb-shadow-sm: 0 1px 2px rgba(15, 31, 26, 0.08);
  --gb-shadow-md: 0 12px 32px rgba(15, 31, 26, 0.1);
}

body {
  background: var(--gb-color-bg);
  color: var(--gb-color-text);
  font-family: var(--gb-font-body);
}

.wp-site-blocks {
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--gb-font-heading);
  letter-spacing: -0.025em;
}

a {
  text-underline-offset: 0.18em;
}

.gb-skip-link {
  background: var(--gb-color-surface);
  border: 2px solid var(--gb-color-dark);
  border-radius: var(--gb-radius-sm);
  color: var(--gb-color-dark);
  font-weight: 700;
  left: 1rem;
  padding: 0.75rem 1rem;
  position: fixed;
  top: 1rem;
  transform: translateY(-180%);
  transition: transform 120ms ease;
  z-index: 100000;
}

.gb-skip-link:focus {
  transform: translateY(0);
}

.gb-official-site-header {
  background: color-mix(in srgb, var(--gb-color-canvas) 98%, transparent);
  border-bottom: 1px solid var(--gb-color-border);
  position: relative;
  z-index: 20;
}

.gb-official-site-header__inner {
  align-items: center;
  display: grid;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  grid-template-columns: auto 1fr auto;
  margin: 0 auto;
  max-width: 1440px;
  min-height: 92px;
  padding: 10px clamp(1rem, 4vw, 3.5rem);
}

.gb-official-logo-link {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
}

.gb-official-logo {
  display: block;
  height: auto;
  max-height: 72px;
  object-fit: contain;
  width: auto;
}

.gb-official-desktop-nav,
.gb-official-header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.88rem;
  font-weight: 700;
  gap: clamp(0.8rem, 1.7vw, 1.65rem);
}

.gb-official-desktop-nav {
  justify-content: center;
}

.gb-official-header-actions {
  justify-content: flex-end;
}

.gb-official-desktop-nav a,
.gb-official-header-actions a {
  white-space: nowrap;
}

.gb-official-cart-link {
  background: var(--gb-color-dark);
  border-radius: var(--gb-radius-pill);
  color: var(--gb-color-surface);
  padding: 0.72rem 1rem;
}

.gb-official-mobile-menu {
  display: none;
  justify-self: end;
  position: relative;
}

.gb-official-mobile-menu summary {
  background: var(--gb-color-dark);
  border-radius: var(--gb-radius-pill);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  padding: 0.72rem 1rem;
}

.gb-official-mobile-menu summary::-webkit-details-marker {
  display: none;
}

.gb-official-mobile-menu nav {
  background: #fff;
  border: 1px solid var(--gb-color-border);
  border-radius: var(--gb-radius-md);
  box-shadow: var(--gb-shadow-md);
  display: grid;
  gap: 0.2rem;
  min-width: min(280px, calc(100vw - 2rem));
  padding: 0.65rem;
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
}

.gb-official-mobile-menu nav a {
  border-radius: var(--gb-radius-sm);
  font-weight: 700;
  padding: 0.7rem 0.8rem;
}

.gb-official-mobile-menu nav a:hover,
.gb-official-mobile-menu nav a:focus-visible {
  background: #e1f8ec;
}

.gb-official-footer {
  background: var(--gb-color-dark);
  color: #a8b8b0;
  padding: 3rem clamp(1rem, 5vw, 4rem);
}

.gb-official-footer__inner {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto 1fr auto;
  margin: 0 auto;
  max-width: 1200px;
}

.gb-official-footer__brand img {
  background: #fff;
  border-radius: 50%;
  display: block;
  height: auto;
  max-height: 76px;
  width: auto;
}

.gb-official-footer p {
  margin: 0;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(25, 195, 125, 0.4);
  outline-offset: 3px;
}

.wp-block-button__link {
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.wp-block-button__link:hover {
  background: #15a96d;
  transform: translateY(-1px);
}

.wp-block-button__link:active {
  background: #118c5b;
  transform: none;
}

.wp-block-button__link[aria-disabled="true"] {
  background: #c8d2cc;
  cursor: not-allowed;
}

.gb-card {
  background: #fff;
  border: 1px solid var(--gb-color-border);
  border-radius: var(--gb-radius-lg);
  box-shadow: var(--gb-shadow-sm);
  overflow: hidden;
}

.gb-eyebrow {
  color: var(--gb-color-success);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gb-placeholder {
  align-items: center;
  background:
    radial-gradient(circle at 80% 15%, rgba(25, 195, 125, 0.28), transparent 32%),
    linear-gradient(135deg, #183a30, #0f1f1a);
  border-radius: var(--gb-radius-lg);
  color: #fff;
  display: flex;
  min-height: 280px;
  padding: clamp(1.5rem, 5vw, 4rem);
}

.gb-hero {
  box-sizing: border-box;
  overflow: hidden;
  padding-block: clamp(3rem, 7vw, 6.5rem);
  width: 100%;
}

.gb-hero > .wp-block-columns {
  align-items: center;
  box-sizing: border-box;
  gap: clamp(1.5rem, 4vw, 4rem);
  max-width: min(1200px, calc(100vw - 2rem));
  min-width: 0;
  width: 100%;
}

.gb-hero .wp-block-column,
.gb-hero-copy,
.gb-hero-showcase {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

.gb-hero h1 {
  font-size: clamp(2.35rem, 5.5vw, 4.75rem);
  max-width: 12ch;
  overflow-wrap: anywhere;
}

.gb-hero-copy > p {
  max-width: 42rem;
}

.gb-hero-copy .gb-hero-lead {
  color: #dcebe4 !important;
}

.gb-hero .wp-block-buttons {
  gap: 0.75rem;
}

.gb-hero .wp-block-button {
  min-width: 0;
}

.gb-hero .wp-block-button__link {
  box-sizing: border-box;
  white-space: normal;
}

.gb-hero-showcase {
  background:
    radial-gradient(circle at 82% 15%, rgba(25, 195, 125, 0.36), transparent 32%),
    linear-gradient(145deg, #204a3d, #142820);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: clamp(18px, 3vw, 30px);
  color: #fff;
  min-height: clamp(260px, 31vw, 390px);
  padding: clamp(1.4rem, 4vw, 3rem);
}

.gb-hero-showcase h2 {
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  margin-block: 0.4rem 1rem;
  max-width: 12ch;
}

.gb-hero-showcase p {
  color: #dcebe4;
  max-width: 30rem;
}

.gb-hero-showcase ul {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.gb-hero-showcase li {
  align-items: center;
  display: flex;
  font-size: 0.9rem;
  gap: 0.65rem;
}

.gb-hero-showcase li::before {
  background: var(--gb-color-primary);
  border-radius: 50%;
  content: "";
  flex: 0 0 auto;
  height: 0.55rem;
  width: 0.55rem;
}

.gb-dynamic-section,
.gb-banner-stack {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 1200px;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 3vw, 2rem);
  width: 100%;
}

.gb-dynamic-section__heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.gb-dynamic-section__heading h2 {
  margin: 0;
}

.gb-dynamic-products {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gb-dynamic-card {
  background: #fff;
  border: 1px solid var(--gb-color-border);
  border-radius: var(--gb-radius-lg);
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
  padding: 1rem;
}

.gb-dynamic-card img {
  aspect-ratio: 1 / 1;
  display: block;
  height: auto;
  object-fit: contain;
  width: 100%;
}

.gb-dynamic-card h3 {
  font-size: 1rem;
  margin: 1rem 0 0.45rem;
  overflow-wrap: anywhere;
}

.gb-dynamic-card p {
  color: var(--gb-color-muted);
  font-size: 0.84rem;
}

.gb-dynamic-card__price {
  color: var(--gb-color-dark) !important;
  font-weight: 800;
}

.gb-dynamic-brands {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.gb-dynamic-brands a {
  align-items: center;
  background: #fff;
  border: 1px solid var(--gb-color-border);
  border-radius: var(--gb-radius-md);
  display: grid;
  gap: 0.7rem;
  justify-items: center;
  min-width: 0;
  padding: 1rem;
  text-align: center;
}

.gb-dynamic-brands img {
  height: auto;
  max-height: 70px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.gb-responsive-banner {
  background: var(--gb-banner-fallback, var(--gb-color-dark));
  border-radius: var(--gb-radius-lg);
  min-height: clamp(300px, 38vw, 520px);
  overflow: hidden;
  position: relative;
}

.gb-responsive-banner picture,
.gb-responsive-banner picture img {
  display: block;
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.gb-responsive-banner picture img {
  object-fit: cover;
  object-position: var(--gb-banner-focal, 50% 50%);
}

.gb-responsive-banner__content {
  background: linear-gradient(90deg, rgba(15, 31, 26, 0.92), rgba(15, 31, 26, 0.08));
  box-sizing: border-box;
  color: #fff;
  display: grid;
  min-height: inherit;
  padding: clamp(1.5rem, 5vw, 4rem);
  place-content: center start;
  position: relative;
}

.gb-responsive-banner__content > * {
  max-width: 34rem;
}

.gb-responsive-banner__content a {
  background: var(--gb-color-primary);
  border-radius: var(--gb-radius-pill);
  color: var(--gb-color-dark);
  font-weight: 800;
  padding: 0.75rem 1rem;
  width: fit-content;
}

.gb-responsive-banner--content-center .gb-responsive-banner__content {
  place-content: center;
  text-align: center;
}

.gb-responsive-banner--content-center .gb-responsive-banner__content > * {
  margin-inline: auto;
}

.gb-responsive-banner--content-right .gb-responsive-banner__content {
  place-content: center end;
  text-align: right;
}

.gb-responsive-banner--content-right .gb-responsive-banner__content > * {
  margin-left: auto;
}

/**
 * Single product layout.
 *
 * The selectors owned by this theme form the stable boundary around the
 * WooCommerce Product Gallery block. Product media is never cropped.
 */
.gb-product-layout {
  align-items: flex-start;
  gap: clamp(1.25rem, 4vw, 3.5rem);
  max-width: 100%;
}

.gb-product-gallery,
.gb-product-summary {
  max-width: 100%;
  min-width: 0;
}

.gb-product-gallery {
  display: grid;
  place-items: center;
}

.gb-product-gallery > * {
  margin-inline: auto;
  max-width: min(100%, 560px);
  min-height: 0;
  width: 100%;
}

.gb-product-gallery :where(img) {
  display: block;
  height: auto;
  margin-inline: auto;
  max-height: clamp(300px, 45vw, 560px);
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.gb-product-image-placeholder {
  align-items: center;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 78% 18%, rgba(25, 195, 125, 0.2), transparent 34%),
    #eef3ef;
  border: 1px dashed #a8b8b0;
  border-radius: var(--gb-radius-md);
  box-sizing: border-box;
  color: var(--gb-color-dark);
  display: grid;
  font-weight: 700;
  justify-items: center;
  max-height: clamp(180px, 25vw, 300px);
  min-height: 160px;
  padding: clamp(1rem, 4vw, 2rem);
  text-align: center;
  width: 100%;
}

.gb-product-image-placeholder__label {
  max-width: 18rem;
}

.gb-section {
  padding-block: clamp(2.75rem, 7vw, 6rem);
}

.gb-state--error {
  background: #fee4e2;
  color: var(--gb-color-error);
}

.gb-state--success {
  background: #d1fadf;
  color: var(--gb-color-success);
}

.gb-state--warning {
  background: #fef0c7;
  color: var(--gb-color-warning);
}

@media (max-width: 700px) {
  .gb-desktop-only {
    display: none;
  }
}

@media (max-width: 781px) {
  .gb-product-main {
    padding-top: clamp(1rem, 4vw, 1.5rem) !important;
  }

  .gb-product-layout {
    gap: clamp(0.9rem, 3.5vw, 1.4rem);
  }

  .gb-product-gallery > * {
    height: auto !important;
    min-height: 0 !important;
  }

  .gb-product-gallery :where(img) {
    max-height: clamp(190px, 56vw, 260px);
  }

  .gb-product-image-placeholder {
    aspect-ratio: 16 / 9;
    max-height: clamp(150px, 44vw, 210px);
    min-height: 140px;
  }

  .gb-product-summary > :first-child {
    margin-top: 0;
  }
}

@media (max-width: 1050px) {
  .gb-official-site-header__inner {
    grid-template-columns: auto 1fr auto;
    min-height: 78px;
  }

  .gb-official-logo {
    max-height: 58px;
  }

  .gb-official-desktop-nav,
  .gb-official-header-actions {
    display: none;
  }

  .gb-official-mobile-menu {
    display: block;
    grid-column: 3;
  }

  .gb-official-footer__inner {
    grid-template-columns: auto 1fr;
  }

  .gb-official-footer__inner p:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1024px) {
  .gb-hero > .wp-block-columns {
    gap: clamp(1.25rem, 3vw, 2rem);
  }

  .gb-hero h1 {
    font-size: clamp(2.35rem, 5.3vw, 3.7rem);
  }

  .gb-dynamic-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gb-dynamic-brands {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 781px) {
  .gb-hero {
    padding-block: clamp(2.25rem, 8vw, 3.5rem);
  }

  .gb-hero > .wp-block-columns {
    display: grid;
    grid-template-columns: 1fr;
    max-width: calc(100vw - 1.5rem);
  }

  .gb-hero .wp-block-column {
    flex-basis: auto !important;
    width: 100%;
  }

  .gb-hero h1 {
    font-size: clamp(2.25rem, 11vw, 3.7rem);
    max-width: 11ch;
  }

  .gb-hero-showcase {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .gb-official-site-header__inner {
    gap: 0.75rem;
    min-height: 70px;
    padding-inline: 0.9rem;
  }

  .gb-official-logo {
    max-height: 50px;
  }

  .gb-official-mobile-menu summary {
    padding: 0.65rem 0.9rem;
  }

  .gb-official-footer__inner {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .gb-official-footer__inner p:last-child {
    grid-column: auto;
  }

  .gb-hero .wp-block-buttons,
  .gb-hero .wp-block-button,
  .gb-hero .wp-block-button__link {
    width: 100%;
  }

  .gb-dynamic-products,
  .gb-dynamic-brands {
    grid-template-columns: 1fr;
  }

  .gb-responsive-banner {
    min-height: 430px;
  }

  .gb-responsive-banner__content {
    background: linear-gradient(0deg, rgba(15, 31, 26, 0.96), rgba(15, 31, 26, 0.15));
    place-content: end start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
