:root{
  --ps-bg:#ffffff;
  --ps-surface:#ffffff;
  --ps-text:#1f1f1f;
  --ps-muted:#6b6b6b;

  --ps-pink-50:#fff1f7;
  --ps-pink-100:#ffd6ea;
  --ps-pink-300:#ff7db7;
  --ps-pink-500:#ff3d9a;
  --ps-pink-700:#d81b74;

  --ps-border:rgba(0,0,0,.08);
  --ps-radius:18px;
  --ps-shadow:0 18px 50px rgba(0,0,0,.10);
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:linear-gradient(180deg,var(--ps-pink-50),#fff 35%);
  color:var(--ps-text);
}
a{ color:var(--ps-pink-700); text-decoration:none; }
a:hover{ color:var(--ps-pink-500); }

.ps-container{ width:min(1140px,92%); margin:0 auto; }
.ps-main{ padding:24px 0 52px; }

.ps-card{
  background:rgba(255,255,255,.82);
  backdrop-filter:blur(14px);
  border:1px solid rgba(255,61,154,.14);
  border-radius:var(--ps-radius);
  box-shadow:var(--ps-shadow);
  padding:22px;
  margin:18px 0;
}

.ps-h1{ margin:0; font-size:34px; }
.ps-h2{ margin:0; font-size:20px; }
.ps-muted{ color:var(--ps-muted); }
.ps-small{ font-size:13px; }

/* ===== Header ===== */
.ps-header{
  position:sticky; top:0; z-index:999;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(0,0,0,.06);
  box-shadow:0 8px 24px rgba(0,0,0,.04);
}
.ps-header__inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; padding:10px 0;
}
.ps-brand img{ display:block; }

.ps-social{ display:flex; align-items:center; gap:10px; }
.ps-social a{
  width:38px; height:38px;
  display:flex; align-items:center; justify-content:center;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  color:var(--ps-pink-700);
  transition:.2s;
}
.ps-social a:hover{
  background:var(--ps-pink-500);
  color:#fff;
  transform:translateY(-2px);
  box-shadow:0 12px 22px rgba(255,61,154,.22);
}

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

.ps-cart{
  position:relative;
  width:46px; height:46px;
  display:flex; align-items:center; justify-content:center;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  font-size:20px;
  transition:.18s;
}
.ps-cart:hover{ background:var(--ps-pink-500); color:#fff; }

.ps-badge{
  position:absolute; top:-6px; right:-6px;
  min-width:20px; height:20px;
  border-radius:999px;
  display:flex; align-items:center; justify-content:center;
  padding:0 6px;
  font-size:12px;
  background:var(--ps-pink-700);
  color:#fff;
  border:2px solid #fff;
}

.ps-btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
  border:0;
  cursor:pointer;
  user-select:none;
  text-decoration:none !important;
  transition:transform .16s ease, box-shadow .16s ease, filter .16s ease, background .16s ease;
}
.ps-btn--primary{
  color:#fff !important;
  background:linear-gradient(135deg,var(--ps-pink-700),var(--ps-pink-500));
  border-radius:999px;
  padding:12px 18px;
  font-weight:900;
  box-shadow:0 18px 34px rgba(255,61,154,.25);
  position:relative;
}
.ps-btn--primary::after{
  content:"";
  position:absolute; inset:-1px;
  border-radius:999px;
  background:linear-gradient(135deg,rgba(255,255,255,.55),rgba(255,255,255,0));
  opacity:.45;
  pointer-events:none;
}
.ps-btn--ghost{
  background:rgba(255,255,255,.90);
  border:1px solid rgba(255,61,154,.22);
  color:var(--ps-pink-700) !important;
  border-radius:999px;
  padding:12px 18px;
  font-weight:900;
  box-shadow:0 10px 22px rgba(0,0,0,.06);
}
.ps-btn:hover{ transform:translateY(-2px); filter:brightness(1.03); }
.ps-btn--small{ padding:10px 14px; }
.ps-btn--full{ width:100%; min-height:48px; }

/* Woo buttons (fallback) */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit{
  border-radius:999px !important;
  font-weight:900 !important;
}

/* ===== Drawer (mini cart) ===== */
.ps-overlay{
  position:fixed; inset:0;
  background:rgba(0,0,0,.28);
  opacity:0; pointer-events:none;
  transition:.18s;
  z-index:1000;
}
.ps-overlay.is-open{ opacity:1; pointer-events:auto; }

.ps-drawer{
  position:fixed; top:0; right:0;
  width:min(420px, 92vw);
  height:100vh;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(16px);
  border-left:1px solid rgba(255,61,154,.18);
  box-shadow:-30px 0 80px rgba(0,0,0,.18);
  transform:translateX(110%);
  transition:.22s;
  z-index:1001;
  display:flex;
  flex-direction:column;
}
.ps-drawer.is-open{ transform:translateX(0); }

.ps-drawer__head{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid rgba(0,0,0,.06);
}
.ps-drawer__title{ font-weight:1000; font-size:18px; }
.ps-drawer__close{
  width:38px; height:38px;
  border-radius:999px;
  border:1px solid rgba(255,61,154,.22);
  background:#fff;
  font-size:20px;
  cursor:pointer;
}
.ps-drawer__body{ padding:14px 18px; overflow:auto; flex:1; }
.ps-drawer__foot{ padding:14px 18px; border-top:1px solid rgba(0,0,0,.06); display:grid; gap:10px; }


/* Busy state: allow close, but show subtle loading */
.ps-drawer.is-busy .ps-mini-cart-body{ opacity:.65; }
.ps-mini-item.is-busy{ opacity:.55; }
.ps-mini-item.is-busy .ps-mini-actions{ pointer-events:none; }

.ps-drawer__summary{
  margin-top:12px;
  background:rgba(255,241,247,.85);
  border:1px solid rgba(255,61,154,.18);
  border-radius:16px;
  padding:12px 14px;
}
.ps-sum-row{ display:flex; align-items:center; justify-content:space-between; padding:6px 0; }
.ps-sum-row strong{ font-weight:1000; color:var(--ps-pink-700); }

/* ===== Shop layout ===== */
.ps-grid{
  display:grid;
  grid-template-columns:.95fr 2.05fr;
  gap:18px;
  align-items:start;
}
@media (max-width:980px){
  .ps-grid{ grid-template-columns:1fr; }
}

.ps-search{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.ps-field{ position:relative; }
.ps-input,.ps-select{
  height:44px;
  border-radius:999px;
  border:1px solid rgba(255,61,154,.18);
  padding:0 14px;
  background:rgba(255,255,255,.86);
  outline:none;
  transition:box-shadow .16s ease,border-color .16s ease;
}
.ps-input{ min-width:260px; }
.ps-select{ min-width:230px; }
.ps-field__glow{
  position:absolute; inset:-2px;
  border-radius:999px;
  background:radial-gradient(120px 60px at 30% 40%, rgba(255,61,154,.22), transparent 65%);
  opacity:0; pointer-events:none; transition:.16s;
}
.ps-input:focus,.ps-select:focus{
  border-color:rgba(255,61,154,.35);
  box-shadow:0 0 0 6px rgba(255,61,154,.12);
}
.ps-input:focus + .ps-field__glow,
.ps-select:focus + .ps-field__glow{ opacity:1; }

.ps-cat__pill{
  font-size:12px;
  padding:3px 8px;
  border-radius:999px;
  background:rgba(255,61,154,.10);
  border:1px solid rgba(255,61,154,.18);
  color:var(--ps-pink-700);
  font-weight:900;
}

/* ===== Product cards ===== */
.ps-products{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:18px;
}
@media (max-width:980px){ .ps-products{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:560px){ .ps-products{ grid-template-columns:1fr; } }

.ps-product{
  border-radius:20px;
  overflow:hidden;
  border:1px solid rgba(255,61,154,.16);
  background:rgba(255,255,255,.86);
  box-shadow:0 18px 46px rgba(0,0,0,.10);
  transform:translateZ(0);
  transition:.22s;
  display:flex;
  flex-direction:column;
}
.ps-product:hover{
  transform:translateY(-4px);
  box-shadow:0 26px 62px rgba(0,0,0,.14);
}
.ps-product__img{
  display:block;
  background:radial-gradient(420px 220px at 20% 10%, rgba(255,61,154,.18), transparent 60%),
             linear-gradient(180deg, rgba(255,241,247,.95), rgba(255,255,255,.9));
}
.ps-product__img img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  display:block;
  max-height:260px;
  transition:transform .25s ease;
}
.ps-product:hover .ps-product__img img{ transform:scale(1.03); }

.ps-product__body{
  padding:14px 14px 16px;
  display:flex;
  flex-direction:column;
  gap:10px;
  flex:1;
}
.ps-product__title{
  margin:0;
  font-size:16px;
  font-weight:1000;
  line-height:1.25;
}
.ps-product__title a{ color:var(--ps-text); }
.ps-product__title a:hover{ color:var(--ps-pink-700); }

.ps-product__price{
  font-weight:1000;
  color:var(--ps-pink-700);
}
.ps-product__actions{
  margin-top:auto;
  display:flex;
  gap:10px;
}
.ps-product__actions .ps-btn{
  flex:1 1 auto;
  min-width:120px;
  height:42px;
  padding:0 16px;
  border-radius:999px;
  font-weight:1000;
  box-shadow:0 12px 26px rgba(255,61,154,.15);
}
.ps-product__actions .ps-btn--ghost{ height:42px; padding:0 16px; }

/* Added feedback */
.ps-product__actions a.is-added{
  filter:brightness(1.02);
  box-shadow:0 18px 36px rgba(255,61,154,.28);
}

/* ===== Skeleton ===== */
.ps-skeleton{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:18px;
}
@media (max-width:980px){ .ps-skeleton{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:560px){ .ps-skeleton{ grid-template-columns:1fr; } }

.ps-skel-card{
  border-radius:20px;
  overflow:hidden;
  border:1px solid rgba(0,0,0,.06);
  background:#fff;
  padding:14px;
  box-shadow:0 18px 46px rgba(0,0,0,.06);
}
.ps-skel-img{ width:100%; aspect-ratio:1/1; border-radius:16px; background:#f3f3f3; margin-bottom:12px; }
.ps-skel-line{ height:12px; border-radius:999px; background:#f3f3f3; margin:10px 0; }
.ps-skel-line.sm{ width:60%; }
.ps-skel-line.md{ width:85%; }

.ps-shimmer{
  position:relative;
  overflow:hidden;
}
.ps-shimmer:after{
  content:"";
  position:absolute; inset:0;
  transform:translateX(-120%);
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  animation:psShimmer 1.1s infinite;
}
@keyframes psShimmer{ 100%{ transform:translateX(120%);} }

@media (max-width:820px){
  .ps-header__inner{ flex-wrap:wrap; justify-content:center; }
  .ps-actions{ width:100%; justify-content:center; }
}

/* ===============================
   MINI-CART (drawer) FIX
   - evita textos encimados
   - oculta botones default de Woo (usamos los nuestros)
   - ordena subtotal/total
   =============================== */

/* Redes: visibles aunque el href sea # (deshabilitado) */
.ps-social__icon.is-disabled{ opacity:.45; filter: grayscale(.15); pointer-events:none; }

/* Oculta los botones default del mini cart (Woo) que salen pegados */
#psMiniCart .woocommerce-mini-cart__buttons{ display:none !important; }

/* Lista limpia */
#psMiniCart ul.woocommerce-mini-cart{ margin:0 !important; padding:0 !important; list-style:none !important; }
#psMiniCart ul.woocommerce-mini-cart li{ list-style:none !important; }

/* Item del mini-cart */
#psMiniCart .woocommerce-mini-cart-item{
  display:grid !important;
  grid-template-columns: 64px 1fr 20px;
  gap: 12px;
  align-items:center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
#psMiniCart .woocommerce-mini-cart-item:last-child{ border-bottom: 0; }

#psMiniCart .woocommerce-mini-cart-item img{
  width:64px !important;
  height:64px !important;
  object-fit: cover;
  border-radius: 14px;
  background: var(--ps-pink-50);
}

/* Nombre + qty */
#psMiniCart .woocommerce-mini-cart-item a:not(.remove){
  font-weight: 900;
  color: var(--ps-text);
  line-height: 1.2;
}
#psMiniCart .woocommerce-mini-cart-item .quantity{
  display:block;
  margin-top: 4px;
  color: var(--ps-muted);
  font-weight: 700;
}

/* Remove: sin bullets ni offsets raros */
#psMiniCart .woocommerce-mini-cart-item a.remove{
  grid-column: 3;
  grid-row: 1;
  justify-self:end;
  width: 28px !important;
  height: 28px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,61,154,.25) !important;
  color: var(--ps-pink-700) !important;
  background: rgba(255,255,255,.9) !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  line-height: 1 !important;
}
#psMiniCart .woocommerce-mini-cart-item a.remove:hover{
  background: var(--ps-pink-500) !important;
  color:#fff !important;
}

/* Total */
#psMiniCart .woocommerce-mini-cart__total{
  margin: 12px 0 0 !important;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,241,247,.9);
  border: 1px solid rgba(255,61,154,.18);
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-weight: 900;
}


/* =========================================
   FIX: Woo agrega link "Ver carrito" (added_to_cart)
   y descuadra los botones del grid
   ========================================= */

/* 1) Oculta el link automático "Ver carrito" que Woo inserta tras agregar */
.ps-product__actions a.added_to_cart,
.woocommerce ul.products li.product a.added_to_cart{
  display: none !important;
}

/* 2) Layout fijo: solo 2 botones (Agregar / Ver) alineados */
.ps-product__actions{
  display:flex !important;
  gap: 10px !important;
  align-items:center !important;
  flex-wrap: nowrap !important;      /* NO se bajan a otra línea */
}

.ps-product__actions a{
  flex: 1 1 0 !important;            /* ambos ocupan igual */
  min-width: 0 !important;
  height: 44px !important;
  border-radius: 999px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-weight: 900 !important;
  text-decoration:none !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  padding: 0 16px !important;
}

/* 3) Botón Agregar (Woo) */
.ps-product__actions a.add_to_cart_button{
  background: linear-gradient(135deg, #d81b74, #ff3d9a) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 14px 28px rgba(255,61,154,.20) !important;
}

/* 4) Botón Ver (tu link) */
.ps-product__actions a.ps-btn--ghost,
.ps-product__actions a.ps-view{
  background: rgba(255,255,255,.92) !important;
  color: #d81b74 !important;
  border: 1px solid rgba(255,61,154,.25) !important;
}

/* 5) Hover fino */
.ps-product__actions a:hover{
  transform: translateY(-2px) !important;
}

/* Mantén el botón estable */
.ps-product__actions a.add_to_cart_button.added{
  opacity: 1 !important;
}

.ps-mini-list{ list-style:none; padding:0; margin:0; display:grid; gap:14px; }
.ps-mini-item{ display:grid; grid-template-columns:76px 1fr; gap:12px; padding:12px; border:1px solid rgba(255,61,154,.14); border-radius:16px; background: rgba(255,255,255,.75); }
.ps-mini-thumb img{ width:76px; height:76px; object-fit:cover; border-radius:14px; background: var(--ps-pink-50); }
.ps-mini-title{ font-weight:900; line-height:1.2; margin-bottom:6px; }
.ps-mini-title a{ color: var(--ps-text); }
.ps-mini-row{ display:flex; align-items:center; gap:10px; }
.ps-mini-price{ font-weight:900; color: var(--ps-pink-700); margin-right:auto; }
.ps-mini-qty{ display:flex; align-items:center; gap:6px; }
.ps-qty-btn{ width:34px; height:34px; border-radius:999px; border:1px solid rgba(255,61,154,.22); background:#fff; font-weight:900; cursor:pointer; }
.ps-qty-input{ width:54px; height:34px; border-radius:999px; border:1px solid rgba(255,61,154,.18); text-align:center; font-weight:900; }
.ps-mini-remove{ width:34px; height:34px; border-radius:999px; border:1px solid rgba(255,61,154,.22); background:#fff; color: var(--ps-pink-700); cursor:pointer; }

.ps-mini-totals{ margin-top:14px; padding:12px; border-radius:16px; border:1px solid rgba(255,61,154,.14); background: rgba(255,241,247,.45); display:grid; gap:10px; }
.ps-trow{ display:flex; justify-content:space-between; font-weight:900; }
.ps-trow strong{ color: var(--ps-pink-700); }



/* ================= PREMIUM MODE FIXES ================= */

/* No mostrar link automático "Ver carrito" que Woo inyecta tras agregar */
.ps-product__actions a.added_to_cart,
.woocommerce ul.products li.product a.added_to_cart{
  display:none !important;
}

/* En el drawer usamos nuestro footer, ocultamos botones default del mini-cart */
#psDrawer .woocommerce-mini-cart__buttons{
  display:none !important;
}

/* Social visible aunque no tenga links */
.ps-social__icon.is-disabled{
  opacity:.55;
  pointer-events:none;
  filter: grayscale(20%);
}

/* Premium mini-cart list */
.ps-empty-cart{
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(255,61,154,.14);
  background: rgba(255,241,247,.55);
  font-weight:800;
  color:#444;
}

.ps-mini-list{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:14px;
}
.ps-mini-item{
  display:grid;
  grid-template-columns:76px 1fr;
  gap:12px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,61,154,.14);
  background: rgba(255,255,255,.74);
  box-shadow: 0 14px 34px rgba(0,0,0,.08);
}
.ps-mini-thumb img{
  width:76px !important;
  height:76px !important;
  object-fit:cover;
  border-radius:14px;
  background: var(--ps-pink-50);
}
.ps-mini-title{
  font-weight:900;
  line-height:1.2;
  margin-bottom:6px;
}
.ps-mini-title a{ color: var(--ps-text); }
.ps-mini-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.ps-mini-price{
  font-weight:900;
  color: var(--ps-pink-700);
  margin-right:auto;
}
.ps-mini-qty{
  display:flex;
  align-items:center;
  gap:6px;
}
.ps-qty-btn{
  width:34px;height:34px;
  border-radius:999px;
  border:1px solid rgba(255,61,154,.22);
  background:#fff;
  font-weight:1000;
  cursor:pointer;
  transition:.15s;
}
.ps-qty-btn:hover{
  background: var(--ps-pink-500);
  color:#fff;
  transform: translateY(-1px);
}
.ps-qty-input{
  width:58px;height:34px;
  border-radius:999px;
  border:1px solid rgba(255,61,154,.18);
  text-align:center;
  font-weight:900;
}
.ps-mini-remove{
  width:34px;height:34px;
  border-radius:999px;
  border:1px solid rgba(255,61,154,.22);
  background:#fff;
  color: var(--ps-pink-700);
  cursor:pointer;
  transition:.15s;
}
.ps-mini-remove:hover{
  background: #ff3d9a;
  color:#fff;
  transform: translateY(-1px);
}
.ps-mini-totals{
  margin-top:14px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,61,154,.14);
  background: rgba(255,241,247,.45);
  display:grid;
  gap:10px;
}
.ps-trow{
  display:flex;
  justify-content:space-between;
  font-weight:900;
}
.ps-trow strong{ color: var(--ps-pink-700); }



@media (max-width: 560px){
  .ps-drawer{
    width: 92vw;
    max-width: 92vw;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
  }
  .ps-drawer__close{
    width:42px; height:42px;
  }
}

/* =========================
   MOBILE: 1 columna REAL
   Filtro arriba / Productos abajo
   ========================= */
@media (max-width: 820px){

  /* Contenedor principal */
  .ps-container{ width: min(980px, 94%) !important; }

  /* Layout: 1 columna */
  .ps-grid{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Filtro: siempre arriba y full width */
  .ps-filter,
  aside.ps-card{
    width: 100% !important;
    order: 1 !important;
  }

  /* Productos: abajo del filtro y full width */
  .ps-products-wrap,
  section.ps-products,
  .ps-products{
    width: 100% !important;
    order: 2 !important;
  }

  /* Grid de productos: 1 por fila */
  .ps-products{
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Card producto: full width + nada se encima */
  .ps-product{
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 18px !important;
  }

  /* Imagen controlada */
  .ps-product__img img{
    max-height: 260px !important;
    object-fit: cover !important;
  }

  /* Botones: 2 en fila o 1 si no cabe */
  .ps-product__actions{
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .ps-product__actions a,
  .ps-product__actions .button{
    width: 100% !important;
    justify-content: center !important;
  }

  /* Barra de búsqueda/selector: en columna */
  .ps-search,
  .ps-searchbar{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .ps-input, .ps-select{
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* Móvil muy pequeño */
@media (max-width: 420px){
  .ps-product__actions{
    grid-template-columns: 1fr !important; /* botones uno debajo del otro */
  }
}

@media (max-width: 820px){
  .ps-mini-cart__inner{
    width: min(92vw, 420px) !important;
    max-width: 92vw !important;
  }
}
