/* =========================================================
   PBTECH — SECCIÓN DE CATEGORÍAS
   Versión 1.0
   Escritorio: 4 columnas | Móvil: cuadrícula 2 x 2
   ========================================================= */

:root {
  --pb-cat-bg: #02050b;
  --pb-cat-panel: rgba(8, 18, 33, 0.78);
  --pb-cat-panel-hover: rgba(10, 25, 47, 0.92);
  --pb-cat-text: #ffffff;
  --pb-cat-soft: rgba(255, 255, 255, 0.66);
  --pb-cat-blue: #168bff;
  --pb-cat-cyan: #38cfff;
  --pb-cat-purple: #7357ff;
  --pb-cat-border: rgba(128, 186, 255, 0.18);
}

/* Se extiende hasta los bordes de la ventana incluso dentro de Elementor. */
#pb-home-categorias {
  position: relative;
  isolation: isolate;

  width: 100vw !important;
  max-width: 100vw !important;
  margin: 0 calc(50% - 50vw) !important;
  padding: 72px 24px 92px !important;

  color: var(--pb-cat-text);
  background: var(--pb-cat-bg);

  overflow: hidden;
}

#pb-home-categorias,
#pb-home-categorias * {
  box-sizing: border-box;
}

.pb-categories-background {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background:
    radial-gradient(circle at 12% 35%, rgba(22, 139, 255, 0.12), transparent 28%),
    radial-gradient(circle at 88% 62%, rgba(115, 87, 255, 0.12), transparent 30%),
    linear-gradient(180deg, #02050b 0%, #040914 100%);
}

.pb-categories-container {
  width: min(100%, 1400px);
  margin: 0 auto;
}

.pb-categories-heading {
  max-width: 720px;
  margin: 0 auto 42px;
  text-align: center;
}

.pb-categories-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: #8fd6ff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.16em;
}

.pb-categories-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(32px, 3.2vw, 48px);
  font-weight: 780;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.pb-categories-heading p {
  max-width: 620px;
  margin: 14px auto 0;
  color: var(--pb-cat-soft);
  font-size: 16px;
  line-height: 1.6;
}

.pb-categories-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pb-category-card {
  position: relative;
  min-width: 0;
  min-height: 270px;
  display: block;

  color: #ffffff;
  border: 1px solid var(--pb-cat-border);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)),
    var(--pb-cat-panel);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 20px 46px rgba(0, 0, 0, 0.22);

  text-decoration: none;
  overflow: hidden;
  isolation: isolate;

  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease,
    box-shadow 0.28s ease;
}

.pb-category-card::before {
  content: "";
  position: absolute;
  inset: auto -20% -58% 18%;
  z-index: -1;
  height: 88%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 135, 255, 0.28), transparent 70%);
  filter: blur(18px);
  opacity: 0.68;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.pb-category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 24%, transparent 74%, rgba(79, 106, 255, 0.05));
}

.pb-category-copy {
  position: relative;
  z-index: 3;
  width: 58%;
  height: 100%;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px 0 24px 24px;
}

.pb-category-title {
  font-size: 20px;
  font-weight: 760;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.pb-category-description {
  max-width: 145px;
  margin-top: 11px;
  color: var(--pb-cat-soft);
  font-size: 13px;
  line-height: 1.55;
}

.pb-category-arrow {
  width: 38px;
  height: 38px;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: var(--pb-cat-cyan);
  border: 1px solid rgba(56, 207, 255, 0.18);
  border-radius: 50%;
  background: rgba(22, 139, 255, 0.09);

  transition: transform 0.28s ease, background 0.28s ease, color 0.28s ease;
}

.pb-category-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pb-category-media {
  position: absolute;
  z-index: 2;
  right: -11%;
  bottom: -7%;
  width: 75%;
  height: 88%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.pb-category-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.38));
  transform: translateZ(0);
  transition: transform 0.38s cubic-bezier(0.2, 0.75, 0.25, 1), filter 0.38s ease;
}

/* Ajustes particulares para equilibrar las distintas proporciones. */
.pb-category-cellphones .pb-category-media {
  right: -2%;
  bottom: -13%;
  width: 67%;
  height: 98%;
}

.pb-category-smartwatch .pb-category-media {
  right: -15%;
  bottom: -7%;
  width: 82%;
  height: 85%;
}

.pb-category-audio .pb-category-media {
  right: -17%;
  bottom: -8%;
  width: 86%;
  height: 84%;
}

.pb-category-gaming .pb-category-media {
  right: -20%;
  bottom: -8%;
  width: 91%;
  height: 86%;
}

@media (hover: hover) and (pointer: fine) {
  .pb-category-card:hover {
    transform: translateY(-7px);
    border-color: rgba(88, 184, 255, 0.42);
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
      var(--pb-cat-panel-hover);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.09),
      0 26px 58px rgba(0, 0, 0, 0.32),
      0 0 34px rgba(22, 139, 255, 0.11);
  }

  .pb-category-card:hover::before {
    opacity: 1;
    transform: scale(1.12);
  }

  .pb-category-card:hover .pb-category-media img {
    transform: translateY(-6px) scale(1.045);
    filter:
      drop-shadow(0 22px 25px rgba(0, 0, 0, 0.42))
      drop-shadow(0 0 15px rgba(36, 139, 255, 0.16));
  }

  .pb-category-card:hover .pb-category-arrow {
    color: #ffffff;
    background: rgba(22, 139, 255, 0.56);
    transform: translateX(4px);
  }
}

.pb-category-card:focus-visible {
  outline: 2px solid var(--pb-cat-cyan);
  outline-offset: 4px;
}

/* Tablet: dos columnas para conservar el tamaño de los productos. */
@media (max-width: 1099px) {
  #pb-home-categorias {
    padding-top: 64px !important;
    padding-bottom: 76px !important;
  }

  .pb-categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pb-category-card,
  .pb-category-copy {
    min-height: 250px;
  }
}

/* Móvil: cuadrícula 2 x 2. */
@media (max-width: 680px) {
  #pb-home-categorias {
    padding: 50px 12px 62px !important;
  }

  .pb-categories-heading {
    margin-bottom: 28px;
  }

  .pb-categories-heading h2 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .pb-categories-heading p {
    max-width: 340px;
    font-size: 14px;
  }

  .pb-categories-grid {
    gap: 10px;
  }

  .pb-category-card,
  .pb-category-copy {
    min-height: 205px;
  }

  .pb-category-card {
    border-radius: 19px;
  }

  .pb-category-copy {
    width: 67%;
    padding: 18px 0 15px 15px;
  }

  .pb-category-title {
    font-size: clamp(15px, 4.5vw, 18px);
  }

  .pb-category-description {
    max-width: 110px;
    margin-top: 7px;
    font-size: 11px;
    line-height: 1.4;
  }

  .pb-category-arrow {
    width: 31px;
    height: 31px;
  }

  .pb-category-arrow svg {
    width: 17px;
    height: 17px;
  }

  .pb-category-cellphones .pb-category-media {
    right: -9%;
    bottom: -11%;
    width: 76%;
    height: 91%;
  }

  .pb-category-smartwatch .pb-category-media {
    right: -22%;
    bottom: -8%;
    width: 94%;
    height: 76%;
  }

  .pb-category-audio .pb-category-media {
    right: -24%;
    bottom: -7%;
    width: 98%;
    height: 73%;
  }

  .pb-category-gaming .pb-category-media {
    right: -29%;
    bottom: -6%;
    width: 105%;
    height: 74%;
  }
}

@media (max-width: 390px) {
  #pb-home-categorias {
    padding-inline: 8px !important;
  }

  .pb-categories-grid {
    gap: 8px;
  }

  .pb-category-card,
  .pb-category-copy {
    min-height: 190px;
  }

  .pb-category-copy {
    padding-left: 12px;
  }

  .pb-category-description {
    max-width: 92px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pb-category-card,
  .pb-category-card::before,
  .pb-category-media img,
  .pb-category-arrow {
    transition: none !important;
  }
}





#pb-categorias-inicio {
    scroll-margin-top: 75px;
}