/* Ümba — tienda (cargado en páginas de WooCommerce y en /personalizados/) */

/* Botón "¿Quieres personalizar este producto?" en la ficha: contorno verde; al pasar el cursor se rellena de verde. */
body.single-product { --umba-btn: #C9D395; }
.umba-customize {
  margin: 26px 0 28px;   /* separado del bloque cantidad + carrito */
}
.umba-customize__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid var(--umba-btn);
  color: #343D57;
  font-family: var(--font-heading, 'Nunito', sans-serif);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.umba-customize__btn:hover,
.umba-customize__btn:focus-visible {
  background: var(--umba-btn);
  border-color: var(--umba-btn);
  color: #fff;
  transform: translateY(-1px);
}
.umba-customize__hint {
  margin: 10px 0 0;
  font-size: 14px;
  color: #343D57;
  transition: color .2s ease;
}
.umba-customize__hint:hover { color: #E2725B; }

/* Galería: imagen más pequeña, completa y a la altura del bloque de texto */
body.single-product .woocommerce-product-gallery { max-width: 480px; }
body.single-product .woocommerce-product-gallery__image img,
body.single-product .woocommerce-product-gallery__image a { display: block; width: 100%; max-width: 100%; height: auto; }

/* Ficha: título en negrita y mayor que el precio; precio sutil;
   sin categorías/etiquetas; pestaña activa en terracota; pestañas sin título interior */
body.single-product .ms-single-product_title { font-weight: 800; font-size: clamp(30px, 3vw, 42px); line-height: 1.1; }
body.single-product .ms-single-product__content .price,
body.single-product .ms-single-product__content .price bdi,
body.single-product .ms-single-product__content .price .amount { font-size: 24px; font-weight: 400; color: rgba(52, 61, 87, .8); }
body.single-product .product_meta { display: none !important; }
body.single-product .wc-tabs li.active a { color: #E2725B !important; border-color: #E2725B !important; }
.umba-tab > :first-child { margin-top: 0; }
.umba-tab--info ul { margin: 0; padding-left: 1.2em; }
.umba-tab--info li { margin: 0 0 8px; }

/* "Crea tu Ümba": "Cotiza tu idea" en lugar de precio, con el mismo estilo (verde) que los precios */
.umba-quote {
  display: inline-block;
  font-family: var(--font-primary, 'Inter', sans-serif);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.35;
  color: #C9D395;
  letter-spacing: 0;
}
.ms-single-product__content .price .umba-quote { font-size: 24px; font-weight: 400; color: rgba(52, 61, 87, .8); }

/* ---------- Tienda: ancho completo, 3 por fila y barra de filtros ---------- */
body.woocommerce.archive .ms-sidebar,
body.woocommerce.archive .pl-lg-5.col-lg-4 { display: none !important; }
body.woocommerce.archive .col-lg-8 { flex: 0 0 100%; max-width: 100%; }
@media (min-width: 992px) {
  body.woocommerce.archive .ms-woo-feed > .col-sm-6 { flex: 0 0 33.3333%; max-width: 33.3333%; }
}
/* La plantilla de Most imprime su propia cabecera (resultados + orden): la ocultamos, van en la barra */
body.woocommerce.archive .woocommerce-content-loop-header { display: none !important; }

.umba-shopbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 0 0 32px;
  padding: 0 0 20px;
  border-bottom: 1px solid rgba(52, 61, 87, .12);
}
.umba-shopbar__cats { display: flex; flex-wrap: wrap; gap: 8px; }
.umba-chip {
  display: inline-flex; align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(52, 61, 87, .16);
  color: #343D57 !important;
  font-family: var(--font-heading, 'Nunito', sans-serif);
  font-weight: 700; font-size: 14px; line-height: 1;
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.umba-chip:hover { border-color: #C9D395; background: #C9D395; }
.umba-chip.is-active { background: #343D57; border-color: #343D57; color: #fff !important; }
/* "Personalizados": lleva a "Crea tu Ümba" y se distingue en terracota */
.umba-chip--custom { border-color: #E2725B; color: #E2725B !important; }
.umba-chip--custom:hover { background: #E2725B; border-color: #E2725B; color: #fff !important; }

.umba-shopbar__tools { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.umba-shopbar .woocommerce-ordering { margin: 0; }
.umba-shopbar .woocommerce-ordering select {
  -webkit-appearance: none; appearance: none;
  padding: 9px 42px 9px 18px;
  border-radius: 999px; border: 1px solid #C9D395;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23343D57' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px 14px;
  color: #343D57;
  font-family: var(--font-heading, 'Nunito', sans-serif); font-weight: 700; font-size: 14px;
  cursor: pointer;
}
.umba-shopbar .woocommerce-ordering select:hover { border-color: #b9c77e; }
@media (max-width: 767px) {
  .umba-shopbar { gap: 14px; }
  .umba-shopbar__tools { width: 100%; gap: 14px; }
}

/* ---------------------------------------------------------------- reseñas de producto */
#reviews, .woocommerce-Reviews { font-family: var(--font-primary, 'Inter', sans-serif); color: #343D57; }
#reviews .woocommerce-Reviews-title,
#reviews #reply-title {
  font-family: var(--font-heading, 'Nunito', sans-serif);
  font-weight: 800;
  font-size: clamp(20px, 2.2vw, 26px);
  color: #343D57;
}
#reviews .woocommerce-noreviews { color: #6b6f7d; }
#reviews .star-rating span,
#reviews .comment-form-rating .stars a { color: #E2725B; }
#reviews .comment-form-rating .stars.selected a.active ~ a { color: #d9d4d0; }
#reviews label { display: block; margin-bottom: 6px; font-weight: 600; color: #343D57; }
#reviews input[type=text],
#reviews input[type=email],
#reviews textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e4e0dd;
  border-radius: 12px;
  background: #fff;
  color: #343D57;
  font-family: var(--font-primary, 'Inter', sans-serif);
  font-size: 16px;
}
#reviews input[type=text]:focus,
#reviews input[type=email]:focus,
#reviews textarea:focus { outline: none; border-color: #E2725B; box-shadow: 0 0 0 3px rgba(226,114,91,.18); }
#reviews textarea { min-height: 140px; }
#reviews textarea::placeholder { color: #9a9ba4; }
#reviews .comment-form-comment label { display: none; }
#reviews .comment-form-cookies-consent { display: flex; align-items: center; gap: 10px; }
#reviews .comment-form-cookies-consent input[type=checkbox] { accent-color: #E2725B; width: 18px; height: 18px; }
#reviews .comment-form-cookies-consent label { margin: 0; font-weight: 400; font-size: 14px; color: #6b6f7d; }
#reviews input[type=submit] {
  -webkit-appearance: none; appearance: none;
  display: inline-block;
  margin-top: 8px;
  padding: 16px 30px;
  border: 0 !important;
  border-radius: 999px;
  background: #343D57 !important;
  color: #fff !important;
  font-family: var(--font-heading, 'Nunito', sans-serif);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: normal;   /* con interletraje el texto de un <input> queda descentrado */
  text-align: center;
  cursor: pointer;
  box-shadow: 0 12px 30px -14px rgba(52, 61, 87, .8);
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
#reviews input[type=submit]:hover { background: #C9D395 !important; color: #343D57 !important; transform: translateY(-2px); }
#reviews .commentlist { margin: 0; padding: 0; list-style: none; }
#reviews .commentlist .comment_container {
  display: flex; gap: 16px;
  padding: 20px;
  border: 1px solid #e4e0dd;
  border-radius: 16px;
  margin-bottom: 16px;
  background: #fff;
}
#reviews .commentlist img.avatar { width: 48px; height: 48px; border-radius: 50%; }
#reviews .woocommerce-review__author { font-family: var(--font-heading, 'Nunito', sans-serif); font-weight: 800; }
#reviews .woocommerce-review__published-date { color: #8a8a8a; font-size: 13px; }

/* ================================================================ móvil */
@media (max-width: 767px) {
  /* márgenes laterales más holgados en tienda y ficha (Most deja 12 px) */
  body.woocommerce .ms-page-content .container,
  body.woocommerce-page .ms-page-content .container { padding-left: 22px !important; padding-right: 22px !important; }

  /* título de la sección: más presencia y más cerca de las categorías */
  body.woocommerce.archive .ms-sp--title { font-size: 34px !important; margin-bottom: 22px !important; }
  body.woocommerce.archive .ms-sp--header { margin-bottom: 0 !important; padding-bottom: 0 !important; }
  .umba-shopbar { margin-top: 0; gap: 16px; }

  /* "Ordenar": relleno verde para que no se confunda con los chips de categoría */
  .umba-shopbar .woocommerce-ordering select {
    background-color: #C9D395 !important;
    border-color: #C9D395 !important;
    padding: 11px 44px 11px 20px;
  }

  /* dos productos por fila */
  body.woocommerce.archive .ms-woo-feed { margin-left: -6px; margin-right: -6px; }
  body.woocommerce.archive .ms-woo-feed > [class*="col-"] {
    flex: 0 0 50%;
    max-width: 50%;
    padding-left: 6px;
    padding-right: 6px;
  }
  body.woocommerce.archive .ms-product-title { font-size: 15px; line-height: 1.3; }
  body.woocommerce.archive .ms-product-cat {
    font-size: 11px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* pestañas de la ficha: en fila deslizable, pegadas al recuadro como en escritorio
     (Most las pone en columna en móvil) */
  body.single-product .woocommerce-tabs ul.wc-tabs {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0;
    padding: 0;
  }
  body.single-product .woocommerce-tabs ul.wc-tabs::-webkit-scrollbar { display: none; }
  body.single-product .woocommerce-tabs ul.wc-tabs li {
    flex: 0 0 auto;
    align-self: flex-end;
    width: auto !important;
    max-width: none !important;
    height: 44px;
    margin: 0 !important;
  }
  /* misma altura en todas para que el texto no baile (Most da distinto relleno a la activa) */
  body.single-product .woocommerce-tabs ul.wc-tabs li a {
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    padding: 0 16px !important;
    margin: 0 !important;        /* Most sube la pestaña inactiva unos píxeles */
    position: static !important;
    top: auto !important;
    font-size: 14px;
    line-height: 1.2;
  }

  /* productos relacionados: tres por fila aunque salgan pequeños */
  body.single-product .related .ms-woo-feed > [class*="col-"],
  body.single-product .related [class*="col-"] {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
    padding-left: 5px;
    padding-right: 5px;
  }
  /* solo tres: el cuarto sobra y caía en una segunda fila */
  body.single-product .related [class*="col-"]:nth-child(n+4) { display: none; }
  body.single-product .related .ms-product-cat { display: none; }
  body.single-product .related .ms-product-title { font-size: 13px; line-height: 1.25; }
  body.single-product .related .ms-product-price,
  body.single-product .related .price { font-size: 13px; }
}

/* ---------- Nota de envíos en la ficha de producto ---------- */
.umba-envio-nota {
  margin: 18px 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-primary, 'Inter', sans-serif);
  line-height: 1.4;
}
.umba-envio-nota__eu {
  font-size: 14px;
  font-weight: 500;
  color: var(--umba-azul, #343D57);
}
.umba-envio-nota__fuera {
  font-size: 12px;
  color: var(--umba-azul, #343D57);
  opacity: .6;
  text-decoration: underline;
  text-underline-offset: 2px;
  width: fit-content;
  transition: opacity .2s ease, color .2s ease;
}
.umba-envio-nota__fuera:hover,
.umba-envio-nota__fuera:focus-visible { opacity: 1; color: var(--umba-terracota, #E2725B); }
