:root {
  --hgs-pink: #ec168c;
  --hgs-yellow: #ffc400;
  --hgs-cyan: #06afc5;
  --hgs-text: #202027;
  --hgs-muted: #71717a;
  --hgs-line: #ececf0;
}

.hgs-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin: 0 0 22px !important;
  color: #6f6f77;
  font-size: 12px;
}

.hgs-breadcrumbs a {
  color: #3f3f46;
  text-decoration: none;
}

.hgs-breadcrumbs a:hover {
  color: var(--hgs-pink);
}

/* Cabecera de tienda con accesos a categorías. */
.hgs-category-hero {
  position: relative;
  width: 100%;
  margin: 0 0 28px;
  color: var(--hgs-text);
}

.hgs-category-hero__banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(270px, .85fr) minmax(440px, 1.6fr);
  min-height: 132px;
  overflow: hidden;
  border: 1px solid #edf0f3;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background:
    radial-gradient(circle at 72% 100%, rgba(15, 187, 213, .23), transparent 35%),
    linear-gradient(100deg, #fff 0%, #fafdff 58%, #eefbfe 100%);
}

.hgs-category-hero__banner::after {
  position: absolute;
  right: -4%;
  bottom: -46px;
  width: 70%;
  height: 95px;
  border: 13px solid rgba(12, 180, 208, .10);
  border-radius: 50%;
  content: "";
  transform: rotate(-5deg);
}

.hgs-category-hero__copy {
  z-index: 2;
  align-self: center;
  padding: 22px 26px 25px;
}

.hgs-category-hero__copy h2 {
  margin: 0 0 5px;
  color: #1d2b39;
  font-size: clamp(29px, 3vw, 43px);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -.035em;
}

.hgs-category-hero__copy h2 span {
  color: var(--hgs-pink);
}

.hgs-category-hero__copy p {
  max-width: 340px;
  margin: 0;
  color: #36414c;
  font-size: 14px;
  line-height: 1.4;
}

.hgs-category-hero__products {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  min-width: 0;
  padding: 5px 36px 5px 0;
}

.hgs-category-hero__products .hgs-hero-product {
  width: clamp(92px, 11vw, 148px);
  height: 122px;
  margin-left: -20px;
  object-fit: contain;
  filter: drop-shadow(0 8px 7px rgba(21, 48, 68, .12));
}

.hgs-category-hero__products .hgs-hero-product:first-child {
  margin-left: 0;
}

.hgs-category-cards {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
}

.hgs-category-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 18px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 88px;
  padding: 8px 9px 8px 4px;
  border: 1px solid #e9edf1;
  border-radius: 10px;
  background: #fff;
  color: var(--hgs-text);
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(27, 38, 50, .045);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.hgs-category-card:hover {
  transform: translateY(-2px);
  border-color: rgba(236, 22, 140, .35);
  color: var(--hgs-text);
  box-shadow: 0 8px 22px rgba(27, 38, 50, .10);
}

.hgs-category-card__image {
  display: grid;
  width: 76px;
  height: 72px;
  place-items: center;
}

.hgs-category-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hgs-category-card__content {
  display: block;
  min-width: 0;
}

.hgs-category-card__content strong,
.hgs-category-card__content small {
  display: block;
}

.hgs-category-card__content strong {
  overflow: hidden;
  color: #17202a;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hgs-category-card__content small {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  color: #68717b;
  font-size: 9px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hgs-category-card__arrow {
  color: var(--hgs-pink);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  transition: transform .2s ease;
}

.hgs-category-card:hover .hgs-category-card__arrow {
  transform: translateX(3px);
}

.hgs-shop-archive .hgs-shop-layout {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}

.hgs-filter-panel {
  color: var(--hgs-text);
  font-size: 13px;
}

.hgs-filter-heading {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  font-size: 18px;
  text-transform: uppercase;
}

.hgs-filter-close {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.hgs-filter-form fieldset {
  margin: 0 0 17px;
  padding: 0 0 15px;
  border: 0;
  border-bottom: 1px solid var(--hgs-line);
}

.hgs-filter-form {
  position: relative;
  transition: opacity .18s ease;
}

.hgs-filter-form.is-submitting {
  opacity: .48;
  pointer-events: none;
}

.hgs-filter-form.is-submitting::after {
  position: fixed;
  z-index: 100003;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid rgba(236, 22, 140, .22);
  border-top-color: var(--hgs-pink);
  border-radius: 50%;
  content: "";
  animation: hgs-filter-spin .7s linear infinite;
}

@keyframes hgs-filter-spin {
  to { transform: rotate(360deg); }
}

.hgs-filter-form legend {
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  color: var(--hgs-text);
  font-size: 15px;
  font-weight: 700;
}

.hgs-filter-option {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 7px;
  align-items: center;
  min-height: 25px;
  margin: 0;
  cursor: pointer;
}

.hgs-filter-option input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--hgs-pink);
}

.hgs-filter-option small {
  color: #8c8c94;
  font-size: 11px;
}

.hgs-price-slider {
  position: relative;
  height: 49px;
  padding-top: 7px;
}

.hgs-price-track {
  position: absolute;
  top: 11px;
  right: 7px;
  left: 7px;
  height: 3px;
  border-radius: 999px;
  background: #dedee3;
}

.hgs-price-track span {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: var(--hgs-pink);
}

.hgs-price-slider input[type="range"] {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  pointer-events: none;
}

.hgs-price-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  background: transparent;
}

.hgs-price-slider input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -6px;
  border: 2px solid var(--hgs-pink);
  border-radius: 50%;
  background: #fff;
  appearance: none;
  pointer-events: auto;
  cursor: grab;
}

.hgs-price-slider input[type="range"]::-moz-range-track {
  height: 3px;
  background: transparent;
}

.hgs-price-slider input[type="range"]::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 2px solid var(--hgs-pink);
  border-radius: 50%;
  background: #fff;
  pointer-events: auto;
  cursor: grab;
}

.hgs-price-slider input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 2px solid #222;
  outline-offset: 2px;
}

.hgs-price-values {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  color: #65656d;
  font-size: 10px;
}

.hgs-price-values .woocommerce-Price-currencySymbol {
  margin-right: 1px;
}

.hgs-filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hgs-filter-actions button,
.hgs-filter-toggle {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--hgs-line);
  border-radius: 7px;
  background: #fff;
  color: var(--hgs-text);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.hgs-filter-actions button {
  border-color: var(--hgs-pink);
  background: var(--hgs-pink);
  color: #fff;
}

.hgs-filter-actions a {
  color: var(--hgs-muted);
  font-size: 12px;
  text-decoration: underline;
}

.hgs-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hgs-filter-toggle span {
  color: var(--hgs-pink);
  font-size: 18px;
}

.hgs-shop-archive .woocommerce .hgs-filter-toggle {
  float: right;
  margin: 0 8px 20px 0;
}

.hgs-filter-overlay {
  display: none;
}

/* Cabecera de resultados y orden. */
.hgs-shop-archive .woocommerce .woocommerce-result-count {
  margin: 14px 0 20px;
  color: #55555d;
  font-size: 12px;
}

.hgs-shop-archive .woocommerce .woocommerce-ordering {
  margin: 0 0 20px;
}

.hgs-shop-archive .woocommerce .woocommerce-ordering select {
  min-width: 230px;
  height: 42px;
  padding: 0 38px 0 14px;
  border: 1px solid var(--hgs-line);
  border-radius: 7px;
  background-color: #fff;
  color: #55555d;
  font-size: 12px;
}

/* Grilla y tarjeta. */
.hgs-shop-archive .elementor-widget-woocommerce-archive-products ul.products,
.hgs-shop-archive .elementor-widget-woocommerce-products ul.products,
.hgs-shop-archive ul.products.hgs-products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.hgs-shop-archive ul.products::before,
.hgs-shop-archive ul.products::after {
  display: none !important;
}

.hgs-shop-archive ul.products li.product {
  position: relative;
  display: flex !important;
  float: none !important;
  flex-direction: column;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  padding: 12px 12px 11px !important;
  overflow: hidden;
  border: 1px solid var(--hgs-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(26, 30, 42, 0.025);
  transition: transform .2s ease, box-shadow .2s ease;
}

.hgs-shop-archive ul.products li.product:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 30, 42, 0.09);
}

.hgs-card-tools {
  position: absolute;
  z-index: 3;
  top: 9px;
  right: 9px;
  left: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hgs-category-badge {
  max-width: calc(100% - 36px);
  padding: 4px 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--hgs-badge, var(--hgs-pink));
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hgs-favorite {
  display: grid;
  width: 29px;
  height: 29px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--hgs-pink);
  font-size: 24px;
  line-height: 1;
  place-items: center;
  pointer-events: auto;
  cursor: pointer;
}

.hgs-favorite.is-active {
  transform: scale(1.06);
}

.hgs-shop-archive ul.products li.product a.woocommerce-loop-product__link {
  display: flex;
  flex: 1;
  flex-direction: column;
  color: inherit;
}

.hgs-shop-archive ul.products li.product a img {
  width: 100% !important;
  height: clamp(125px, 12vw, 175px) !important;
  margin: 8px 0 6px !important;
  object-fit: contain;
}

/*
 * En el catálogo solo debe verse la imagen destacada. Algunos temas o Loop Items
 * imprimen el contenido largo del producto, incluyendo sus imágenes editoriales.
 */
.hgs-shop-archive ul.products li.product
img:not(.wp-post-image):not(.attachment-woocommerce_thumbnail),
.hgs-shop-archive ul.products li.product
.woocommerce-product-details__short-description img,
.hgs-shop-archive ul.products li.product
.product-description img,
.hgs-shop-archive ul.products li.product
.entry-content img,
.hgs-shop-archive .e-loop-item
.elementor-widget-theme-post-content img,
.hgs-shop-archive .e-loop-item
.elementor-widget-woocommerce-product-content img,
.hgs-shop-archive .e-loop-item
.elementor-widget-text-editor img {
  display: none !important;
}

/* Oculta por completo el contenido largo si fue añadido accidentalmente al Loop Item. */
.hgs-shop-archive .e-loop-item .elementor-widget-theme-post-content,
.hgs-shop-archive .e-loop-item .elementor-widget-woocommerce-product-content {
  display: none !important;
}

/* La miniatura principal queda siempre contenida dentro de la tarjeta. */
.hgs-shop-archive ul.products li.product
> a.woocommerce-loop-product__link
> img.wp-post-image,
.hgs-shop-archive ul.products li.product
> a.woocommerce-loop-product__link
> img.attachment-woocommerce_thumbnail {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: clamp(125px, 12vw, 175px) !important;
  max-height: 175px !important;
  object-fit: contain !important;
}

.hgs-shop-archive ul.products li.product .woocommerce-loop-product__title {
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--hgs-text);
  font-size: 15px !important;
  font-weight: 600;
  line-height: 1.22;
  text-align: center;
}

.hgs-card-description {
  min-height: 29px;
  margin-top: 3px;
  color: var(--hgs-muted);
  font-size: 10px;
  line-height: 1.3;
  text-align: center;
}

.hgs-shop-archive ul.products li.product .star-rating {
  display: none;
}

.hgs-shop-archive ul.products li.product .price {
  margin: auto 0 8px !important;
  color: var(--hgs-text) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.2;
}

.hgs-shop-archive ul.products li.product .price del {
  color: #9a9aa1;
  font-size: 11px;
  font-weight: 400;
}

.hgs-shop-archive ul.products li.product .price ins {
  text-decoration: none;
}

.hgs-buy-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.hgs-quantity {
  display: grid;
  grid-template-columns: 21px 27px 21px;
  height: 30px;
  overflow: hidden;
  border: 1px solid var(--hgs-line);
  border-radius: 999px;
}

.hgs-quantity button,
.hgs-quantity input {
  min-width: 0;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #7a7a82;
  font-size: 12px;
  text-align: center;
  box-shadow: none;
}

.hgs-quantity button {
  cursor: pointer;
}

.hgs-quantity input::-webkit-inner-spin-button,
.hgs-quantity input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.hgs-shop-archive ul.products li.product .hgs-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  margin: 0 !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--hgs-yellow) !important;
  color: #222 !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.hgs-shop-archive ul.products li.product .hgs-add-button.is-added {
  background: #32b76d !important;
  color: #fff !important;
}

.hgs-shop-archive ul.products li.product .added_to_cart {
  display: none;
}

/* Paginación. */
.hgs-shop-archive nav.woocommerce-pagination {
  margin-top: 28px;
}

.hgs-shop-archive nav.woocommerce-pagination ul {
  border: 0;
}

.hgs-shop-archive nav.woocommerce-pagination ul li {
  margin: 0 3px;
  overflow: hidden;
  border: 1px solid var(--hgs-line);
  border-radius: 50%;
}

.hgs-shop-archive nav.woocommerce-pagination ul li span,
.hgs-shop-archive nav.woocommerce-pagination ul li a {
  width: 36px;
  height: 36px;
  padding: 0;
  line-height: 36px;
}

.hgs-shop-archive nav.woocommerce-pagination ul li span.current {
  background: var(--hgs-pink);
  color: #fff;
}

/* Franja inferior. */
.hgs-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 90px;
  padding: 17px max(24px, calc((100vw - 1200px) / 2));
  background: linear-gradient(115deg, #06aabd, #09bfd1);
  color: #fff;
}

.hgs-benefit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 0 30px;
  border-right: 1px solid rgba(255,255,255,.6);
}

.hgs-benefit:last-child {
  border-right: 0;
}

.hgs-benefit > span {
  font-size: 38px;
  line-height: 1;
}

.hgs-benefit p,
.hgs-benefit strong,
.hgs-benefit small {
  display: block;
  margin: 0;
  color: #fff;
}

.hgs-benefit strong {
  font-size: 17px;
}

.hgs-benefit small {
  margin-top: 2px;
  font-size: 11px;
}

@media (max-width: 1100px) {

  .hgs-category-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hgs-shop-archive .elementor-widget-woocommerce-archive-products ul.products,
  .hgs-shop-archive .elementor-widget-woocommerce-products ul.products,
  .hgs-shop-archive ul.products.hgs-products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {

  .hgs-category-hero__banner {
    display: block;
    min-height: 250px;
    border-bottom: 1px solid #edf0f3;
    border-radius: 13px;
  }

  .hgs-category-hero__copy {
    padding: 22px 20px 5px;
  }

  .hgs-category-hero__copy h2 {
    font-size: 32px;
  }

  .hgs-category-hero__products {
    position: absolute;
    right: 0;
    bottom: 3px;
    left: 0;
    height: 132px;
    padding: 0 16px;
  }

  .hgs-category-hero__products .hgs-hero-product {
    width: 28%;
    height: 118px;
    margin-left: -13px;
  }

  .hgs-category-cards {
    grid-template-columns: none;
    grid-auto-columns: minmax(240px, 78vw);
    grid-auto-flow: column;
    gap: 9px;
    margin-top: 10px;
    padding: 2px 2px 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .hgs-category-card {
    scroll-snap-align: start;
  }
  .hgs-shop-archive .hgs-shop-layout {
    display: block;
  }

  .hgs-shop-archive .woocommerce .hgs-filter-toggle {
    float: none;
    margin: 0 0 14px;
  }

  .hgs-filter-panel {
    position: fixed;
    z-index: 100002;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(88vw, 340px);
    padding: 22px;
    overflow-y: auto;
    background: #fff;
    transform: translateX(-105%);
    transition: transform .25s ease;
  }

  .hgs-filter-heading {
    display: flex;
  }

  .hgs-filter-overlay {
    position: fixed;
    z-index: 100001;
    inset: 0;
    background: rgba(12, 18, 28, .48);
  }

  .hgs-filters-open {
    overflow: hidden;
  }

  .hgs-filters-open .hgs-filter-panel {
    transform: translateX(0);
  }

  .hgs-filters-open .hgs-filter-overlay {
    display: block;
  }

  .hgs-shop-archive .elementor-widget-woocommerce-archive-products ul.products,
  .hgs-shop-archive .elementor-widget-woocommerce-products ul.products,
  .hgs-shop-archive ul.products.hgs-products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }

  .hgs-shop-archive ul.products li.product {
    padding: 9px !important;
  }

  .hgs-shop-archive ul.products li.product a img {
    height: 125px !important;
  }

  .hgs-shop-archive ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px !important;
  }

  .hgs-card-description {
    min-height: 27px;
    font-size: 9px;
  }

  .hgs-buy-row {
    align-items: stretch;
    flex-direction: column;
  }

  .hgs-quantity {
    align-self: center;
  }

  .hgs-benefits {
    grid-template-columns: 1fr;
    padding: 10px 22px;
  }

  .hgs-benefit {
    justify-content: flex-start;
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.45);
  }

  .hgs-benefit:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 390px) {
  .hgs-shop-archive .elementor-widget-woocommerce-archive-products ul.products,
  .hgs-shop-archive .elementor-widget-woocommerce-products ul.products,
  .hgs-shop-archive ul.products.hgs-products {
    grid-template-columns: 1fr !important;
  }
}
