/* =========================================================
   Part Pro — Diseño de tienda (tarjetas + banner)
   Se carga después del CSS de partpro-tienda.
   ========================================================= */
:root{
  --ppd-ink:#0b0e14;
  --ppd-muted:#6b7280;
  --ppd-flame:linear-gradient(135deg,#ff6b35,#e63329);
  --ppd-green:#22c55e;
  --ppd-wa:#25d366;
}

/* ---------------- BANNER ---------------- */
body .ppd-hero .ppt-hero-card{border-radius:24px !important;padding:48px 52px !important;overflow:hidden;position:relative;border:1px solid rgba(255,255,255,.06)}
body .ppd-hero .ppt-hero-card::before{opacity:.55}
body .ppd-hero .ppt-hero-card::after{opacity:.35}
.ppd-hero .ppx-row{position:relative;z-index:2;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:48px;align-items:center}
body .ppd-hero .ppt-hero-in{max-width:none !important}
.ppd-hero .ppx-eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:rgba(255,255,255,.62);margin-bottom:18px}
.ppd-hero .ppx-eyebrow span{width:7px;height:7px;border-radius:50%;background:#2ecc71;box-shadow:0 0 0 4px rgba(46,204,113,.18)}
body .ppd-hero h1{font-size:46px !important;letter-spacing:-.025em;line-height:1.05 !important;margin:0 0 16px !important;color:#fff}
body .ppd-hero h1 em{font-style:normal;color:#ff6b35}
body .ppd-hero p{color:rgba(255,255,255,.7) !important;max-width:520px;font-size:15.5px}
body .ppd-hero .ppt-hero-form{box-shadow:0 10px 30px rgba(0,0,0,.35);max-width:560px}
body .ppd-hero .ppt-hero-chips{display:flex !important;flex-wrap:wrap;gap:6px 22px !important;margin-top:22px !important}
body .ppd-hero .ppt-hero-chips>span{display:inline-flex;align-items:center;gap:6px;background:none !important;border:0 !important;padding:0 !important;box-shadow:none !important;color:rgba(255,255,255,.72) !important;font-weight:500 !important;font-size:13px !important}
.ppd-hero .ppt-hero-chips svg{color:#ff6b35}

.ppd-hero .ppx-show{position:relative;display:flex;justify-content:center}
.ppd-hero .ppx-pcard{position:relative;display:block;width:100%;max-width:330px;background:#fff;border-radius:18px;padding:14px;box-shadow:0 30px 60px rgba(0,0,0,.45);transform:rotate(1.5deg);text-decoration:none;transition:transform .25s ease}
.ppd-hero .ppx-pcard:hover{transform:rotate(0deg) translateY(-3px)}
.ppd-hero .ppx-img{position:relative;display:block}
.ppd-hero .ppx-img img{display:block;width:100%;aspect-ratio:4/3;object-fit:contain;border-radius:12px;background:#f6f7f9;padding:10px;margin:0}
.ppd-hero .ppx-tag{position:absolute;top:24px;left:24px;background:var(--ppd-ink);color:#fff;font-size:11px;font-weight:700;padding:4px 9px;border-radius:999px;z-index:3}
.ppd-hero .ppx-pinfo{display:block;padding:12px 4px 2px}
.ppd-hero .ppx-pinfo strong{display:block;font-size:14.5px;color:var(--ppd-ink);line-height:1.3}
.ppd-hero .ppx-pinfo small{display:block;color:#7a828e;font-size:12px;margin-top:4px}
.ppd-hero .ppx-prow{display:flex;align-items:center;justify-content:space-between;margin-top:12px}
.ppd-hero .ppx-prow b,.ppd-hero .ppx-prow .amount{font-size:22px;color:var(--ppd-ink);font-weight:800}
.ppd-hero .ppx-btn{background:var(--ppd-flame);color:#fff;font-weight:700;font-size:13px;padding:9px 16px;border-radius:999px}

@media (max-width:900px){
  .ppd-hero .ppx-row{grid-template-columns:1fr}
  .ppd-hero .ppx-show{display:none}
  body .ppd-hero .ppt-hero-card{padding:32px 22px !important}
  body .ppd-hero h1{font-size:34px !important}
}

/* ---------------- TARJETAS ---------------- */
body ul.products{display:grid !important;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px !important}
body ul.products::before,body ul.products::after{display:none !important;content:none !important}
body ul.products li.product.ppc{width:auto !important;float:none !important;margin:0 !important;padding:18px !important;display:flex !important;flex-direction:column;gap:12px;border-radius:20px !important;transition:transform .2s ease,box-shadow .2s ease;text-align:left}
body ul.products li.product.ppc:hover{transform:translateY(-3px);box-shadow:0 18px 40px rgba(15,20,30,.14) !important}

/* SKU */
.ppc-top{display:flex;justify-content:flex-start;min-height:22px}
.ppc-sku{font-size:11px;font-weight:600;letter-spacing:.04em;color:var(--ppd-muted);background:rgba(15,20,30,.05);border-radius:6px;padding:3px 8px;font-variant-numeric:tabular-nums}
.ppc-sku b{color:var(--ppd-ink);font-weight:700;margin-left:2px}

/* Foto */
.ppc-media{position:relative;display:block;border-radius:14px;overflow:hidden;background:#fff}
body ul.products li.product .ppc-media img{display:block;width:100%;aspect-ratio:1/1;object-fit:contain;padding:12px;margin:0 !important;border-radius:0 !important;background:#fff;transition:transform .35s ease;-webkit-user-drag:none;user-select:none;-webkit-touch-callout:none}
li.product.ppc:hover .ppc-media img{transform:scale(1.04)}
li.product.ppc.outofstock .ppc-media img{opacity:.5}
.ppc-media .ppt-stock-tag,.ppc-media .onsale{position:absolute !important;top:10px !important;left:10px !important;right:auto !important;z-index:3;margin:0 !important;min-height:0 !important;min-width:0 !important;line-height:1.4 !important}
/* Marca de agua visual (la definitiva va grabada en la foto con Image Watermark) */
.ppc-media::after,.ppd-hero .ppx-img::after{content:"partpro.cl";position:absolute;right:12px;bottom:10px;font:800 12px/1 Inter,system-ui,sans-serif;letter-spacing:.02em;color:rgba(11,14,20,.28);pointer-events:none;z-index:2}

/* Título y subtítulo */
.ppc-info{display:flex;flex-direction:column;gap:4px}
body ul.products li.product .ppc-title-wrap{margin:0 !important;padding:0 !important;font-size:15px !important;line-height:1.3 !important;min-height:2.6em}
.ppc-title{font-size:15px;font-weight:700;line-height:1.3;color:var(--ppd-ink);text-decoration:none;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;letter-spacing:-.005em}
.ppc-title:hover{color:#e63329}
.ppc-sub{font-size:13px;color:var(--ppd-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Precio, stock y envío */
.ppc-foot{display:flex;flex-direction:column;gap:8px;margin-top:auto}
body ul.products li.product .ppc-foot .price,
body ul.products li.product .ppc-foot .price .amount,
body ul.products li.product .ppc-foot .price bdi{font-size:26px !important;font-weight:800 !important;color:var(--ppd-ink) !important;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
body ul.products li.product .ppc-foot .price{margin:0 !important;line-height:1.1 !important}
body ul.products li.product .ppc-foot .price del{font-size:14px !important;opacity:.5}
body ul.products li.product .ppc-foot .price del .amount{font-size:14px !important;font-weight:500 !important}
body ul.products li.product .ppc-foot .price ins{text-decoration:none}
.ppc-foot .price + .ppc-stock{margin-top:-4px}
.ppc-stock{display:flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600;color:#15803d}
.ppc-stock i{width:7px;height:7px;border-radius:50%;background:var(--ppd-green)}
.ppc-stock.is-out{color:var(--ppd-muted);font-weight:500}
.ppc-stock.is-out i{background:#9ca3af}
.ppc-ship{display:flex;align-items:flex-start;gap:7px;font-size:12.5px;line-height:1.35;color:#4b5563;background:rgba(15,20,30,.04);border-radius:10px;padding:8px 10px}
.ppc-ship svg{flex:0 0 auto;margin-top:1px;color:var(--ppd-ink)}
.ppc-ship b{color:var(--ppd-ink);font-weight:700}

/* Botones */
.ppc-actions{display:flex;gap:8px;margin-top:4px}
body ul.products li.product .ppc-actions .button{flex:1;margin:0 !important;display:flex !important;align-items:center;justify-content:center;min-height:46px;border-radius:999px !important;font-size:14.5px !important;font-weight:700 !important;padding:0 14px !important}
body ul.products li.product .ppc-actions .button.add_to_cart_button{background:var(--ppd-flame) !important;color:#fff !important;border:0 !important;box-shadow:0 8px 18px rgba(230,51,41,.25)}
body ul.products li.product .ppc-actions .button.add_to_cart_button:hover{filter:brightness(1.05)}
body ul.products li.product .ppc-actions .button.loading{opacity:.7}
body ul.products li.product .ppc-actions .added_to_cart{display:none !important}
.ppc-wa{flex:0 0 46px;height:46px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--ppd-wa);color:#fff !important;box-shadow:0 8px 18px rgba(37,211,102,.28);transition:transform .15s ease}
.ppc-wa:hover{transform:scale(1.06)}

/* Fotos de la ficha de producto */
.woocommerce-product-gallery img{-webkit-user-drag:none;user-select:none;-webkit-touch-callout:none}

/* Responsive */
@media (max-width:1024px){body ul.products{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:768px){
  body ul.products{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px !important}
  body ul.products li.product.ppc{padding:12px !important;border-radius:16px !important;gap:10px}
  .ppc-title{font-size:13.5px}
  body ul.products li.product .ppc-foot .price,
  body ul.products li.product .ppc-foot .price .amount,
  body ul.products li.product .ppc-foot .price bdi{font-size:21px !important}
  .ppc-ship{font-size:11.5px;padding:7px 8px}
  body ul.products li.product .ppc-actions .button{font-size:13px !important;min-height:42px}
  .ppc-wa{flex-basis:42px;height:42px}
}

/* ---------------- ANIMACIONES ----------------
   Se desactivan solas si la persona pidió "reducir movimiento" en su equipo. */
@media (prefers-reduced-motion:no-preference){
  @keyframes ppUp{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
  @keyframes ppFloat{0%,100%{transform:rotate(1.5deg) translateY(0)}50%{transform:rotate(.5deg) translateY(-10px)}}
  @keyframes ppDrift1{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(-40px,30px) scale(1.15)}}
  @keyframes ppDrift2{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(50px,-25px) scale(1.1)}}
  @keyframes ppPulse{0%{box-shadow:0 0 0 0 rgba(34,197,94,.55)}70%{box-shadow:0 0 0 7px rgba(34,197,94,0)}100%{box-shadow:0 0 0 0 rgba(34,197,94,0)}}
  @keyframes ppRing{0%{box-shadow:0 0 0 0 rgba(37,211,102,.5),0 8px 18px rgba(37,211,102,.28)}80%,100%{box-shadow:0 0 0 12px rgba(37,211,102,0),0 8px 18px rgba(37,211,102,.28)}}
  @keyframes ppShine{from{transform:translateX(-120%) skewX(-20deg)}to{transform:translateX(220%) skewX(-20deg)}}

  /* Banner */
  .ppd-hero .ppt-hero-card::before{animation:ppDrift1 14s ease-in-out infinite}
  .ppd-hero .ppt-hero-card::after{animation:ppDrift2 17s ease-in-out infinite}
  .ppd-hero .ppt-hero-in>*{opacity:0;animation:ppUp .7s cubic-bezier(.2,.7,.2,1) forwards}
  .ppd-hero .ppt-hero-in>*:nth-child(1){animation-delay:.05s}
  .ppd-hero .ppt-hero-in>*:nth-child(2){animation-delay:.15s}
  .ppd-hero .ppt-hero-in>*:nth-child(3){animation-delay:.27s}
  .ppd-hero .ppt-hero-in>*:nth-child(4){animation-delay:.39s}
  .ppd-hero .ppt-hero-in>*:nth-child(5){animation-delay:.5s}
  .ppd-hero .ppx-show{opacity:0;animation:ppUp .9s .35s cubic-bezier(.2,.7,.2,1) forwards}
  .ppd-hero .ppx-pcard{animation:ppFloat 6s 1.3s ease-in-out infinite}
  .ppd-hero .ppx-pcard:hover{animation-play-state:paused}
  .ppd-hero .ppx-eyebrow span{animation:ppPulse 2s infinite}

  /* Tarjetas */
  .ppc-stock:not(.is-out) i{animation:ppPulse 2.2s infinite}
  body ul.products li.product .ppc-actions .button.add_to_cart_button{position:relative;overflow:hidden}
  body ul.products li.product .ppc-actions .button.add_to_cart_button::after{content:"";position:absolute;top:0;left:0;width:40%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.35),transparent);transform:translateX(-120%) skewX(-20deg)}
  li.product.ppc:hover .ppc-actions .button.add_to_cart_button::after{animation:ppShine .8s ease}
  li.product.ppc:hover .ppc-wa{animation:ppRing 1.4s ease-out infinite}

  /* Categorías de la portada actual */
  .ppt-cat{transition:transform .25s ease,box-shadow .25s ease}
  .ppt-cat:hover{transform:translateY(-4px)}
  .ppt-cat-img svg{transition:transform .35s cubic-bezier(.3,1.6,.5,1)}
  .ppt-cat:hover .ppt-cat-img svg{transform:scale(1.18) rotate(-8deg)}

  /* Aparecer al hacer scroll (la clase la pone diseno.js) */
  .pp-rv{opacity:0;transform:translateY(26px);transition:opacity .6s cubic-bezier(.2,.7,.2,1),transform .6s cubic-bezier(.2,.7,.2,1)}
  .pp-rv.pp-in{opacity:1;transform:none}
  body ul.products li.product.ppc.pp-rv.pp-in:hover{transform:translateY(-4px)}
}

/* ---------------- AJUSTES CELULAR (v1.2) ---------------- */
.ppc-title{overflow-wrap:anywhere}
@media (max-width:600px){
  body ul.products li.product.ppc{padding:10px !important;gap:8px}
  body ul.products li.product .ppc-media img{padding:6px}
  .ppc-sku{font-size:10px;padding:2px 6px}
  .ppc-title{font-size:13px;line-height:1.28}
  body ul.products li.product .ppc-title-wrap{min-height:2.56em}
  .ppc-sub{font-size:11.5px}
  .ppc-stock{font-size:11.5px}
  .ppc-ship{background:none;padding:0;font-size:11px;gap:5px}
  .ppc-ship-l{display:none}
  .ppc-actions{gap:6px}
  body ul.products li.product .ppc-actions .button{min-height:38px;padding:0 8px !important;white-space:nowrap}
  body ul.products li.product .ppc-actions .button.add_to_cart_button{font-size:0 !important}
  body ul.products li.product .ppc-actions .button.add_to_cart_button::before{content:"Agregar";font-size:13px;font-weight:700}
  .ppc-wa{flex:0 0 38px !important;height:38px}
  .ppc-wa svg{width:18px;height:18px}
  .ppc-media::after{font-size:10px;right:8px;bottom:6px}
}
