/* ==========================================================================
   Primible — ficha de producto completa (includes/product-page.php)
   Íconos, despacho, personalizar, secciones bajo la compra, opiniones y
   barra fija en el celular.
   ========================================================================== */

.single-product {
  --pdp-card: #2f2f31;
  --pdp-line: rgba(255, 255, 255, .09);
  --pdp-p: #b114ff;
  --pdp-p2: #d66bff;
  --pdp-p3: #8d0dcc;
  --pdp-mut: #b9b9c0;
  --pdp-ok: #3ccf91;
  --pdp-gold: #f5b83d;
}

/* ---------- Parte superior ---------- */
/* Con colección, su nombre reemplaza el «Impresión 3D · hecho a pedido». */
.single-product div.product .summary:has(.pdp-eyebrow)::before { display: none; }
.pdp-eyebrow {
  display: block;
  margin: 0 0 10px;
  color: var(--pdp-p2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.single-product .pdp-hook {
  max-width: 46ch;
  margin: 0 0 18px !important;
  color: #e8e8ee;
  font-size: 16.5px;
  line-height: 1.55;
}

.single-product .pdp-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 20px !important;
  padding: 0 !important;
  list-style: none !important;
}
.pdp-chip {
  display: grid;
  justify-items: center;
  gap: 2px;
  margin: 0 !important;
  padding: 12px 8px;
  border: 1px solid var(--pdp-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .035);
  text-align: center;
  line-height: 1.2;
}
.pdp-chip__ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 6px;
  border-radius: 10px;
  background: rgba(177, 20, 255, .16);
  color: var(--pdp-p2);
}
.pdp-chip strong { color: #fff; font-size: 13.5px; font-weight: 600; }
.pdp-chip small { color: var(--pdp-mut); font-size: 12px; }

.pdp-ship {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--pdp-line);
  border-radius: 20px;
  background: var(--pdp-card);
}
.pdp-ship__row { display: flex; gap: 12px; align-items: flex-start; }
.pdp-ship__ico { flex: none; width: 24px; font-size: 17px; line-height: 1.4; text-align: center; }
.single-product .pdp-ship p { margin: 0 !important; color: var(--pdp-mut); font-size: 14px; line-height: 1.5; }
.pdp-ship strong { color: #fff; font-weight: 500; }
.pdp-ship .woocommerce-Price-amount { color: #fff; }

.single-product a.pdp-custom {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 0;
  padding: 14px 16px;
  border: 1px dashed rgba(214, 107, 255, .55);
  border-radius: 18px;
  background: linear-gradient(110deg, rgba(177, 20, 255, .18), rgba(177, 20, 255, .04));
  color: var(--pdp-mut) !important;
  text-decoration: none !important;
  transition: border-color .2s, background .2s;
}
.single-product a.pdp-custom:hover { border-color: var(--pdp-p2); background: linear-gradient(110deg, rgba(177, 20, 255, .26), rgba(177, 20, 255, .06)); }
.pdp-custom__ico { font-size: 24px; }
.pdp-custom__txt { flex: 1; font-size: 13.5px; line-height: 1.45; }
.pdp-custom__txt strong { display: block; color: #fff; font-size: 15px; font-weight: 600; }
.pdp-custom__go { color: var(--pdp-p2); font-size: 14px; font-weight: 600; white-space: nowrap; }

/* Botón de video bajo la galería */
.pdp-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  padding: 10px 18px;
  border: 1px solid rgba(214, 107, 255, .5);
  border-radius: 999px;
  background: rgba(177, 20, 255, .14);
  color: #fff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.pdp-video { max-width: min(92vw, 520px); padding: 0; border: 0; border-radius: 20px; background: #000; }
.pdp-video::backdrop { background: rgba(0, 0, 0, .75); }
.pdp-video video { display: block; width: 100%; }
.pdp-video__close { position: absolute; top: 8px; right: 8px; z-index: 1; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 22px; cursor: pointer; }

/* ---------- Secciones ---------- */
.single-product div.product > .pdp-plus { grid-column: 1 / -1; clear: both; width: 100%; min-width: 0; padding-top: 48px; }

.pdp-jump {
  position: sticky;
  top: var(--pdp-jump-top, 0px);
  z-index: 20;
  margin: 0 0 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--pdp-line);
  background: rgba(41, 41, 41, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.admin-bar .pdp-jump { --pdp-jump-top: 32px; }
.pdp-jump__in { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pdp-jump__in::-webkit-scrollbar { display: none; }
.single-product .pdp-jump a {
  flex: none;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--pdp-mut) !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  transition: background .2s, color .2s;
}
.single-product .pdp-jump a:hover { color: #fff !important; }
.single-product .pdp-jump a.is-on { background: var(--pdp-p); color: #fff !important; }

.pdp-sec, .single-product #reviews { scroll-margin-top: var(--pdp-offset, 170px); }
.pdp-sec { padding: 48px 0 8px; }
.single-product .pdp-sec h2 {
  margin: 8px 0 18px !important;
  color: #fff !important;
  font-size: clamp(26px, 3vw, 36px) !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
}
.pdp-kicker { color: var(--pdp-p2); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.pdp-card { border: 1px solid var(--pdp-line); border-radius: 22px; background: var(--pdp-card); }
.single-product .pdp-muted { margin: 0; color: var(--pdp-mut); font-size: 15px; }
.single-product .pdp-muted a { color: var(--pdp-p2) !important; font-weight: 500; }

/* Detalle */
.pdp-detail { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.single-product .pdp-detail__desc p { margin: 0 0 14px; color: #dcdce2; font-size: 16.5px; line-height: 1.65; }
.pdp-feat { padding: 26px; }
.single-product .pdp-feat h3 { margin: 0 0 10px !important; color: #fff !important; font-size: 18px !important; }
.single-product .pdp-feat ul { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.single-product .pdp-feat li {
  display: flex;
  gap: 12px;
  margin: 0 !important;
  padding: 11px 0;
  border-top: 1px solid var(--pdp-line);
  color: #e5e5ea;
  font-size: 15px;
}
.single-product .pdp-feat li:first-child { border-top: 0; }
.pdp-feat li::before {
  content: "✓";
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(60, 207, 145, .16);
  color: var(--pdp-ok);
  font-size: 12px;
  font-weight: 700;
}

/* Tamaño */
.pdp-size { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; padding: 28px; }
.pdp-size__vis {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 40px;
  min-height: 280px;
  padding: 24px 24px 44px;
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px) 0 0 / 20px 20px,
    #262627;
}
.pdp-size__obj { position: relative; height: var(--h); }
.pdp-size__obj img {
  width: auto !important;
  height: 100% !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  -webkit-mask: radial-gradient(circle, #000 58%, transparent 72%);
  mask: radial-gradient(circle, #000 58%, transparent 72%);
}
.pdp-size__h { position: absolute; top: 4px; bottom: 4px; left: -22px; border-left: 2px solid var(--pdp-p2); }
.pdp-size__h::before, .pdp-size__h::after { content: ""; position: absolute; left: -6px; width: 10px; border-top: 2px solid var(--pdp-p2); }
.pdp-size__h::before { top: 0; }
.pdp-size__h::after { bottom: 0; }
.pdp-size__h span { position: absolute; top: 50%; left: -10px; transform: translate(-100%, -50%); color: var(--pdp-p2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pdp-size__coin {
  display: grid;
  flex: none;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f0d98a, #b8963a);
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, .12);
  color: #5a4612;
  font-size: 13px;
  font-weight: 700;
}
.pdp-size__cap { position: absolute; right: 0; bottom: 12px; left: 0; color: var(--pdp-mut); font-size: 12px; text-align: center; }
.pdp-dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin: 0 0 16px; }
.pdp-dim { padding: 14px; border: 1px solid var(--pdp-line); border-radius: 14px; background: rgba(255, 255, 255, .035); text-align: center; }
.pdp-dim small { display: block; color: var(--pdp-mut); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.pdp-dim strong { color: #fff; font-size: 22px; font-weight: 700; }

/* Colección */
.pdp-coll { padding: 28px; background: radial-gradient(120% 140% at 100% 0%, rgba(177, 20, 255, .24), transparent 55%), var(--pdp-card); }
.pdp-coll__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }
.single-product .pdp-coll h2 { margin-bottom: 0 !important; }
.pdp-prog { flex: 1; min-width: 200px; max-width: 340px; }
.pdp-prog small { color: var(--pdp-mut); font-size: 13px; }
.pdp-prog strong { color: #fff; }
.pdp-prog__bar { display: block; height: 10px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.pdp-prog__bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--pdp-p), var(--pdp-p2)); }
.pdp-strip { display: flex; gap: 14px; padding: 22px 2px 6px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: rgba(214, 107, 255, .4) transparent; }
.single-product a.pdp-mini { flex: none; width: 140px; color: #fff !important; text-decoration: none !important; }
.pdp-mini__img { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; border: 2px solid transparent; border-radius: 16px; background: #1f1f1f; transition: border-color .2s; }
.pdp-mini__img img { width: 100% !important; height: 100% !important; margin: 0 !important; object-fit: cover; }
.pdp-mini:hover .pdp-mini__img { border-color: rgba(214, 107, 255, .5); }
.pdp-mini.is-on .pdp-mini__img { border-color: var(--pdp-p); }
.pdp-mini__n { position: absolute; top: 8px; left: 8px; z-index: 1; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6); font-size: 11px; font-weight: 600; }
.pdp-mini__name { display: block; margin-top: 8px; font-size: 14px; font-weight: 500; }
.pdp-mini small { color: var(--pdp-mut); font-size: 13px; }

/* Cómo se hace */
.single-product .pdp-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 !important; padding: 0 !important; list-style: none !important; counter-reset: pdp; }
.pdp-step { position: relative; margin: 0 !important; padding: 22px; }
.pdp-step::before { content: "0" counter(pdp); counter-increment: pdp; position: absolute; top: 12px; right: 18px; color: rgba(255, 255, 255, .06); font-size: 34px; font-weight: 800; }
.pdp-step__ico { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px; border-radius: 14px; background: rgba(177, 20, 255, .16); font-size: 22px; }
.single-product .pdp-step h3 { margin: 0 0 6px !important; color: #fff !important; font-size: 17px !important; }
.single-product .pdp-step p { margin: 0 !important; color: var(--pdp-mut); font-size: 14px; }

/* Preguntas */
.pdp-faq { display: grid; gap: 10px; max-width: 860px; }
.pdp-faq details { padding: 0 22px; }
.pdp-faq summary { display: flex; justify-content: space-between; gap: 12px; padding: 18px 0; color: #fff; font-size: 16px; font-weight: 500; list-style: none; cursor: pointer; }
.pdp-faq summary::-webkit-details-marker { display: none; }
.pdp-faq summary::after { content: "+"; color: var(--pdp-p2); font-size: 22px; line-height: 1; }
.pdp-faq details[open] summary::after { content: "–"; }
.single-product .pdp-faq p { margin: 0 !important; padding: 0 0 18px; color: var(--pdp-mut); font-size: 15px; }

/* ---------- Opiniones ---------- */
.pdp-rev { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.pdp-rev__sum { padding: 26px; text-align: center; }
.pdp-rev__big { display: block; color: #fff; font-size: 54px; font-weight: 800; line-height: 1; }
.pdp-rev__stars { position: relative; display: inline-block; margin: 8px 0; color: rgba(255, 255, 255, .18); font-size: 22px; letter-spacing: 3px; }
.pdp-rev__stars::before { content: "★★★★★"; }
.pdp-rev__stars::after { content: "★★★★★"; position: absolute; top: 0; left: 0; width: var(--r); overflow: hidden; color: var(--pdp-gold); white-space: nowrap; }
.single-product .pdp-rev__sum p { margin: 0 0 16px !important; color: var(--pdp-mut); font-size: 14px; }
.pdp-pill { display: inline-flex; padding: 4px 12px; border: 1px solid rgba(177, 20, 255, .4); border-radius: 999px; background: rgba(177, 20, 255, .15); color: var(--pdp-p2); font-size: 12px; font-weight: 500; }
.pdp-rev__body { padding: 26px; }

/* El formulario de WooCommerce dentro de la tarjeta */
.single-product .pdp-rev__body #reviews { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
.single-product .pdp-rev__body .woocommerce-Reviews-title { display: none; }
.single-product .pdp-rev__body .woocommerce-noreviews { display: none; }
.single-product .pdp-rev__body #comments ol.commentlist { margin: 0 0 24px !important; padding: 0 !important; }
.single-product .pdp-rev__body #review_form_wrapper,
.single-product .pdp-rev__body #review_form { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
.single-product .pdp-rev__body .comment-reply-title {
  display: block;
  margin: 0 0 4px !important;
  color: #fff !important;
  font-size: 20px !important;
  font-weight: 700 !important;
}
.single-product .pdp-rev__body .comment-notes { margin: 0 0 16px !important; color: var(--pdp-mut); font-size: 14px; }
.single-product .pdp-rev__body .required-field-message { display: none; }
.single-product .pdp-rev__body form.comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.single-product .pdp-rev__body form.comment-form > * { grid-column: 1 / -1; margin: 0 0 14px !important; }
.single-product .pdp-rev__body form.comment-form > .comment-form-author { grid-column: 1; }
.single-product .pdp-rev__body form.comment-form > .comment-form-email { grid-column: 2; }
.single-product .pdp-rev__body label { color: var(--pdp-mut) !important; font-size: 13px !important; font-weight: 400 !important; }
.single-product .pdp-rev__body .comment-form-rating label { color: #fff !important; font-size: 14px !important; font-weight: 500 !important; }
.single-product .pdp-rev__body .comment-form-cookies-consent { display: flex; gap: 8px; align-items: center; }
.single-product .pdp-rev__body .comment-form-cookies-consent label { margin: 0 !important; }
.single-product .pdp-rev__body textarea { min-height: 110px; }
.single-product .pdp-rev__body input[type="text"],
.single-product .pdp-rev__body input[type="email"],
.single-product .pdp-rev__body textarea {
  width: 100%;
  padding: 12px 14px !important;
  border: 1px solid var(--pdp-line) !important;
  border-radius: 14px !important;
  background: #262627 !important;
  color: #fff !important;
  font: inherit;
}
.single-product .pdp-rev__body textarea:focus,
.single-product .pdp-rev__body input:focus { border-color: var(--pdp-p2) !important; outline: 0; }
.single-product .pdp-rev__body .form-submit { margin: 0 !important; }
.single-product .pdp-rev__body .form-submit input[type="submit"] {
  width: auto !important;
  height: 48px;
  padding: 0 28px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, var(--pdp-p), var(--pdp-p3)) !important;
  color: #fff !important;
  font-weight: 600 !important;
  cursor: pointer;
}

/* ---------- Barra fija en el celular ---------- */
.pdp-bar { display: none; }

@media (max-width: 900px) {
  .pdp-detail, .pdp-size, .pdp-rev { grid-template-columns: 1fr; }
  .single-product .pdp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .single-product .pdp-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .single-product a.pdp-custom { flex-wrap: wrap; }
  .pdp-custom__txt { flex-basis: calc(100% - 40px); }
  .pdp-custom__go { margin-left: 38px; }
  .pdp-sec { padding-top: 36px; }
  .pdp-coll, .pdp-size, .pdp-feat, .pdp-rev__body, .pdp-rev__sum { padding: 20px; }
  .single-product .pdp-steps { grid-template-columns: 1fr; }
  .single-product a.pdp-mini { width: 128px; }
  .single-product .pdp-rev__body form.comment-form > .comment-form-author,
  .single-product .pdp-rev__body form.comment-form > .comment-form-email { grid-column: 1 / -1; }

  .pdp-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--pdp-line);
    background: rgba(33, 33, 35, .96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateY(110%);
    transition: transform .25s ease;
  }
  .pdp-bar[hidden] { display: none; }
  .pdp-bar.is-on { transform: none; }
  .pdp-bar__img { width: 44px !important; height: 44px !important; border-radius: 10px; object-fit: cover; }
  .pdp-bar__txt { flex: 1; min-width: 0; overflow: hidden; color: #fff; font-size: 13px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
  .pdp-bar__txt strong { display: block; font-size: 16px; }
  .pdp-bar__txt del { opacity: .6; font-size: 12px; }
  .pdp-bar__btn {
    height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--pdp-p), var(--pdp-p3));
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
  }
  /* Con la barra visible, el botón flotante de WhatsApp sube. */
  body.single-product:has(.pdp-bar.is-on) .whatsapp-float,
  body.single-product:has(.pdp-bar.is-on) .wa-float { bottom: 92px !important; transition: bottom .25s; }
}

/* Colección: producto sin foto */
.pdp-mini__ph {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 40%, rgba(177, 20, 255, .22), transparent 70%), #252527;
  color: rgba(214, 107, 255, .55);
}
.pdp-mini__ph small { color: var(--pdp-mut); font-size: 11px; letter-spacing: .04em; }

/* Ficha sin foto: la imagen de reemplazo de WooCommerce en tono oscuro. */
.single-product .woocommerce-product-gallery__image--placeholder { overflow: hidden; border-radius: inherit; background: #252527; }
.single-product .woocommerce-product-gallery__image--placeholder img { filter: invert(.87); opacity: .55; }
