.psto-wrapper { width: 100%; margin: 1.25rem 0; }
.psto-grid { display: grid; grid-template-columns: repeat(var(--psto-columns, 4), minmax(0, 1fr)); gap: 1.25rem; }
.psto-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid #e6e6e6; border-radius: 8px; overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; }
.psto-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.10); transform: translateY(-2px); }
.psto-image-link { position: relative; display: block; aspect-ratio: 1/1; background: #fff; overflow: hidden; }
.psto-image-link img { width: 100%; height: 100%; object-fit: contain; }
.psto-noimg { display:flex; align-items:center; justify-content:center; height:100%; color:#777; }
.psto-discount, .psto-last-hours { position:absolute; top:.65rem; padding:.32rem .55rem; border-radius:4px; font-weight:700; font-size:.78rem; line-height:1; }
.psto-discount { left:.65rem; background:#d71962; color:#fff; }
.psto-last-hours { right:.65rem; background:#111; color:#fff; }
.psto-card-body { display:flex; flex-direction:column; flex:1; padding:1rem; }
.psto-title { margin:0 0 .75rem; font-size:1rem; line-height:1.35; min-height:2.7em; }
.psto-title a { color:inherit; text-decoration:none; }
.psto-prices { display:flex; align-items:baseline; gap:.6rem; margin-bottom:.75rem; }
.psto-old-price { text-decoration:line-through; color:#777; }
.psto-price { color:#d71962; font-size:1.35rem; font-weight:800; }
.psto-countdown { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; margin:.6rem 0 .9rem; padding:.65rem .75rem; border:1px solid #ddd; border-radius:6px; background:#fafafa; font-variant-numeric:tabular-nums; }
.psto-countdown-label { font-size:.86rem; color:#444; }
.psto-time { font-weight:800; white-space:nowrap; }
.psto-countdown.is-last-hours { border-color:#d71962; background:#fff2f7; }
.psto-urgent { font-size:.78rem; font-weight:700; color:#d71962; }
.psto-countdown.is-ended { opacity:.65; }
.psto-btn { margin-top:auto; width:100%; }
.psto-countdown-product { max-width:420px; }
.psto-countdown-miniature { margin:.4rem 0; padding:.45rem .55rem; font-size:.82rem; }
.psto-summary { margin-bottom:1rem; color:#666; }
.psto-intro { margin-bottom:1.25rem; }
.psto-pagination { display:flex; justify-content:center; align-items:center; gap:1rem; margin:2rem 0; }
.psto-wrapper .add-to-wishlist, .psto-wrapper .wishlist-button, .psto-wrapper .js-add-to-wishlist, .psto-wrapper button[data-action="add-to-wishlist"], .psto-wrapper button[data-toggle="wishlist"] { display:none !important; }
@media (max-width: 991px) { .psto-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 767px) { .psto-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap:.75rem; } .psto-card-body { padding:.75rem; } }
@media (max-width: 420px) { .psto-grid { grid-template-columns: 1fr; } }

/* Página propia: mismo ancho visual que el contenedor principal del tema. */
.psto-page-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 15px;
  padding-right: 15px;
}
.psto-page-title {
  margin: 0 0 1rem;
  font-size: 2rem;
  line-height: 1.2;
}
@media (max-width: 767px) {
  .psto-page-container { padding-left: 10px; padding-right: 10px; }
  .psto-page-title { font-size: 1.55rem; }
}

/* Contador de la ficha de producto */
.psto-countdown-product {
  max-width: 460px;
  margin: .7rem 0 1rem;
  padding: .8rem 1rem;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  background: #fff;
}
.psto-product-countdown-heading,
.psto-product-countdown-time {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.psto-product-countdown-heading { margin-bottom: .45rem; font-size: 1rem; }
.psto-product-countdown-time .psto-time { font-size: 1.3rem; font-weight: 800; letter-spacing: .02em; }
.psto-clock-icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.psto-clock-icon::before,
.psto-clock-icon::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 3px;
  width: 2px;
  background: currentColor;
  transform-origin: 50% 100%;
}
.psto-clock-icon::before { height: 6px; }
.psto-clock-icon::after { height: 5px; transform: rotate(120deg); }


/* v2.0.4: contador tipo cápsula en la ficha de producto */
.psto-countdown-product {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: .6rem;
  width: fit-content;
  max-width: 100%;
  min-height: 66px;
  margin: .75rem 0 1rem;
  padding: 3px 14px 3px 3px;
  border: 1px solid #d7d7d7;
  border-radius: 38px;
  background: #fff;
  box-shadow: none;
  color: #202020;
}
.psto-countdown-product .psto-countdown-icon-wrap {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  overflow: hidden;
  border-radius: 50%;
  background: #e8f8fc;
}
.psto-countdown-product .psto-countdown-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.psto-countdown-product .psto-countdown-content {
  min-width: 0;
  padding-right: 2px;
}
.psto-countdown-product .psto-product-countdown-heading {
  display: block;
  margin: 0 0 2px;
  font-size: .86rem;
  font-weight: 400;
  line-height: 1.15;
  white-space: nowrap;
}
.psto-countdown-product .psto-product-countdown-time {
  display: flex;
  align-items: baseline;
  gap: .5rem;
}
.psto-countdown-product .psto-product-countdown-time .psto-time {
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: nowrap;
}
.psto-countdown-product.is-last-hours {
  border-color: #d71962;
  background: #fff;
}
@media (max-width: 480px) {
  .psto-countdown-product { padding-right: 10px; }
  .psto-countdown-product .psto-countdown-icon-wrap { width: 54px; height: 54px; flex-basis: 54px; }
  .psto-countdown-product .psto-product-countdown-heading { font-size: .78rem; }
  .psto-countdown-product .psto-product-countdown-time .psto-time { font-size: 1.08rem; }
}

/* v2.0.5: cápsula de cuenta atrás también en las tarjetas de /ofertas */
.psto-countdown-card {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: .5rem;
  width: 100%;
  min-height: 58px;
  margin: .55rem 0 .9rem;
  padding: 3px 10px 3px 3px;
  border: 1px solid #d7d7d7;
  border-radius: 32px;
  background: #fff;
  color: #202020;
}
.psto-countdown-card .psto-countdown-icon-wrap {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  overflow: hidden;
  border-radius: 50%;
  background: #e8f8fc;
}
.psto-countdown-card .psto-countdown-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.psto-countdown-card .psto-countdown-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.15;
}
.psto-countdown-card .psto-countdown-label {
  overflow: hidden;
  font-size: .76rem;
  font-weight: 400;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.psto-countdown-card .psto-time {
  margin-top: 2px;
  font-size: .96rem;
  font-weight: 800;
  white-space: nowrap;
}
.psto-countdown-card.is-last-hours { border-color: #d71962; }

/* Carga progresiva por scroll */
.psto-infinite-status {
  min-height: 42px;
  padding: 1rem 0;
  text-align: center;
  color: #666;
}
.psto-scroll-sentinel { width: 100%; height: 2px; }
.psto-loading::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: .5rem;
  vertical-align: -4px;
  border: 2px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: psto-spin .8s linear infinite;
}
@keyframes psto-spin { to { transform: rotate(360deg); } }

@media (max-width: 767px) {
  .psto-countdown-card .psto-countdown-icon-wrap { width: 44px; height: 44px; flex-basis: 44px; }
  .psto-countdown-card .psto-countdown-label { font-size: .7rem; }
  .psto-countdown-card .psto-time { font-size: .82rem; }
}

/* v2.0.6: respaldo visible para la carga progresiva */
.psto-load-error { display: block; margin-bottom: .75rem; color: #a94442; }
.psto-load-more { display: inline-block; min-width: 190px; }
.psto-load-more[hidden], .psto-load-error[hidden] { display: none !important; }

/* Paginación clásica de la página de ofertas */
.psto-pagination{margin:28px 0 8px;display:flex;justify-content:center;}
.psto-pagination-list{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;list-style:none;margin:0;padding:0;}
.psto-pagination-item a,.psto-pagination-item span{display:flex;align-items:center;justify-content:center;min-width:40px;height:40px;padding:0 13px;border:1px solid #d8d8d8;border-radius:6px;background:#fff;color:inherit;text-decoration:none;line-height:1;}
.psto-pagination-item a:hover{border-color:#777;background:#f5f5f5;}
.psto-pagination-item.is-current span{background:#222;border-color:#222;color:#fff;font-weight:700;}
.psto-pagination-item.is-disabled span{opacity:.45;cursor:not-allowed;}
.psto-pagination-item.is-ellipsis span{min-width:28px;padding:0;border-color:transparent;background:transparent;}
@media (max-width:575px){.psto-pagination-item a,.psto-pagination-item span{min-width:36px;height:36px;padding:0 10px}.psto-pagination-list{gap:5px}}

/* v3.0 - cabecera comercial y acciones */
.psto-hero{display:flex;justify-content:space-between;gap:24px;align-items:center;margin:0 0 24px;padding:28px 30px;border-radius:18px;background:linear-gradient(135deg,#1f2937 0%,#111827 58%,#b91c1c 100%);color:#fff;box-shadow:0 12px 30px rgba(0,0,0,.14)}
.psto-hero-copy{min-width:0}.psto-hero-kicker{display:inline-block;margin-bottom:7px;font-size:12px;font-weight:800;letter-spacing:.12em;color:#fecaca}.psto-hero .psto-page-title{margin:0;color:#fff;font-size:clamp(28px,4vw,46px);line-height:1.05}.psto-hero-subtitle{margin:10px 0 14px;font-size:17px;opacity:.9}.psto-hero-meta{display:flex;gap:16px;flex-wrap:wrap;align-items:center;font-size:14px}.psto-global-countdown{display:inline-flex!important;width:auto!important;margin:0!important;padding:7px 11px!important;background:rgba(255,255,255,.12)!important;border:1px solid rgba(255,255,255,.25)!important;color:#fff!important}.psto-global-countdown .psto-time{margin-left:5px;color:#fff!important}
.psto-hero-actions{display:flex;min-width:230px;flex-direction:column;gap:12px;align-items:stretch}.psto-pdf-button{display:flex;align-items:center;justify-content:center;gap:10px;padding:15px 18px;border-radius:12px;background:#fff;color:#b91c1c!important;font-weight:900;text-decoration:none!important;box-shadow:0 8px 18px rgba(0,0,0,.18);transition:transform .15s ease}.psto-pdf-button:hover{transform:translateY(-2px)}.psto-pdf-icon{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:8px;background:#dc2626;color:#fff;font-size:12px;letter-spacing:.04em}.psto-share{display:flex;gap:7px;justify-content:center;flex-wrap:wrap}.psto-share a,.psto-share button{appearance:none;border:1px solid rgba(255,255,255,.38);border-radius:999px;background:rgba(255,255,255,.1);color:#fff!important;padding:7px 11px;font-size:12px;text-decoration:none;cursor:pointer}.psto-share button.is-copied{background:#15803d;border-color:#15803d}
@media(max-width:767px){.psto-hero{flex-direction:column;align-items:stretch;padding:22px 18px}.psto-hero-actions{min-width:0}.psto-hero-meta{align-items:flex-start;flex-direction:column;gap:8px}}

/* v3.0.1: acciones alineadas a la derecha */
.psto-hero-actions{margin-left:auto;align-items:flex-end;text-align:right}.psto-share{justify-content:flex-end}.psto-pdf-button{min-width:230px}.psto-share a,.psto-share button{white-space:nowrap}
@media(max-width:767px){.psto-hero-actions{margin-left:0;align-items:stretch;text-align:left}.psto-share{justify-content:flex-start}.psto-pdf-button{min-width:0}}

/* v3.0.3: grupo de acciones totalmente alineado a la derecha */
.psto-hero{position:relative}
.psto-hero-actions{position:relative;z-index:20;flex:0 0 auto;margin-left:auto;align-self:stretch;display:flex;justify-content:center;align-items:flex-end;text-align:right}
.psto-share{width:100%;justify-content:flex-end}
.psto-pdf-button,.psto-share a,.psto-share button{position:relative;z-index:21}
@media(max-width:767px){.psto-hero-actions{align-self:auto;align-items:stretch;text-align:left}.psto-share{justify-content:flex-start}}


/* v3.0.4: acciones en una fila centrada y resumen separado */
.psto-actions-row{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;justify-content:center!important;gap:12px!important;width:100%!important;margin:0 0 22px!important;padding:0!important;text-align:center!important;clear:both!important}
.psto-actions-row .psto-pdf-button{display:inline-flex!important;min-width:0!important;width:auto!important;margin:0!important;padding:10px 16px!important;border:1px solid #d6d6d6!important;border-radius:8px!important;background:#fff!important;color:#a80000!important;box-shadow:0 2px 8px rgba(0,0,0,.08)!important}
.psto-actions-row .psto-pdf-icon{width:30px!important;height:30px!important;border-radius:6px!important}
.psto-actions-row .psto-share{display:flex!important;flex:0 0 auto!important;width:auto!important;gap:12px!important;justify-content:center!important;align-items:center!important;flex-wrap:wrap!important;margin:0!important}
.psto-actions-row .psto-share a,.psto-actions-row .psto-share button{display:inline-flex!important;align-items:center!important;justify-content:center!important;margin:0!important;padding:10px 16px!important;border:1px solid #d6d6d6!important;border-radius:8px!important;background:#fff!important;color:#007c9f!important;font-size:14px!important;font-weight:600!important;line-height:1.2!important;text-decoration:none!important;cursor:pointer!important}
.psto-summary{display:block!important;clear:both!important;width:100%!important;margin:0 0 20px!important;padding-top:2px!important}
@media(max-width:575px){.psto-actions-row{gap:8px!important}.psto-actions-row .psto-pdf-button,.psto-actions-row .psto-share a,.psto-actions-row .psto-share button{padding:9px 11px!important;font-size:13px!important}}


/* v3.0.5: centrado independiente del tema */
.psto-page-container > .psto-actions-row{float:none!important;position:relative!important;left:auto!important;right:auto!important;display:flex!important;justify-content:center!important;align-items:center!important;flex-wrap:wrap!important;width:100%!important;max-width:none!important;margin-left:auto!important;margin-right:auto!important;}
.psto-page-container > .psto-actions-row > .psto-pdf-button,.psto-page-container > .psto-actions-row > .psto-share{float:none!important;position:static!important;}
.psto-page-container > .psto-actions-row .psto-share{display:flex!important;justify-content:center!important;align-items:center!important;flex-wrap:wrap!important;width:auto!important;}
.psto-page-container > .psto-summary{float:none!important;clear:both!important;display:block!important;width:100%!important;}


/* v3.0.11: contador compacto para compartir fila con ghstocks */
.gh-product-info-badges .psto-countdown-product,
.psto-countdown-product{
  flex:0 0 265px !important;
  width:265px !important;
  max-width:265px !important;
  min-height:54px !important;
  margin:0 !important;
  padding:3px 10px 3px 3px !important;
  gap:7px !important;
  border-radius:28px !important;
  box-sizing:border-box !important;
}
.psto-countdown-product .psto-countdown-icon-wrap{
  width:48px !important;
  height:48px !important;
  flex:0 0 48px !important;
}
.psto-countdown-product .psto-countdown-content{padding-right:0 !important}
.psto-countdown-product .psto-product-countdown-heading{
  margin:0 0 1px !important;
  font-size:11px !important;
  line-height:1.08 !important;
}
.psto-countdown-product .psto-product-countdown-time{gap:4px !important}
.psto-countdown-product .psto-product-countdown-time .psto-time{
  font-size:17px !important;
  line-height:1.05 !important;
}
.psto-countdown-product .psto-urgent{font-size:10px !important}
@media (max-width:991px){
  .gh-product-info-badges .psto-countdown-product,
  .psto-countdown-product{
    flex-basis:auto !important;
    width:100% !important;
    max-width:100% !important;
  }
}
