/* =========================================================
   STREAM BY YURI — carrito.css
   Cart page + product cards (productos.html) styling.
   ========================================================= */

.cart-layout {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 32px;
  align-items: flex-start;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr auto auto;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(20, 14, 28, 0.6);
  border: 1px solid rgba(255, 47, 179, 0.2);
}

.cart-item img {
  width: 100%;
  height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 47, 179, 0.5));
}

.cart-item-info h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.cart-item-info .cart-item-meta {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.cart-item-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.cart-item-price strong {
  color: var(--color-pink-light);
}

.remove-btn {
  background: none;
  border: none;
  color: var(--color-danger);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
}

.cart-summary {
  position: sticky;
  top: calc(var(--header-height) + 30px);
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(28, 18, 38, 0.85), rgba(8, 5, 12, 0.75));
  border: var(--border-pink);
  box-shadow: var(--glow-pink-soft);
}

.cart-summary h2 {
  font-size: 1.2rem;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--color-muted);
}

.summary-row.total {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-white);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 14px;
  margin-top: 14px;
}

.summary-row.total span:last-child {
  color: var(--color-pink-light);
}

/* ---------- Product catalog (productos.html) ---------- */
.category-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 50px;
}

.category-nav a {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 47, 179, 0.3);
  font-size: 0.82rem;
  font-weight: 600;
}

.category-nav a:hover {
  background: rgba(255, 47, 179, 0.15);
  color: var(--color-pink-light);
}

.category-nav a.is-active {
  background: var(--color-pink);
  border-color: var(--color-pink);
  color: var(--color-black);
}

.product-category {
  padding: 50px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.product-category:first-of-type {
  border-top: none;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}

.category-header img {
  height: 54px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 47, 179, 0.6));
  mix-blend-mode: screen;
}

.category-header h2 {
  font-size: 1.5rem;
  text-transform: uppercase;
  margin: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-width: 0;
  padding: 22px 20px 20px;
  border-radius: var(--radius-md);
  background: rgba(20, 14, 28, 0.6);
  border: 1px solid rgba(255, 47, 179, 0.18);
  transition: transform var(--transition), border-color var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 47, 179, 0.5);
}

.product-top-badges {
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  z-index: 2;
}

.product-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-pink-strong), var(--color-danger));
  box-shadow: var(--glow-pink-soft);
}

.product-type-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--color-white);
  background: linear-gradient(135deg, rgba(77, 201, 255, 0.85), rgba(94, 120, 255, 0.85));
  box-shadow: 0 0 10px rgba(77, 201, 255, 0.35);
  border: none;
}

/* ---------- Descripción del producto (debajo del precio) ---------- */
.product-desc {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--color-muted);
  margin: 0 0 14px;
}

.product-card .product-img-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 18px 0 12px;
}

.product-card img {
  max-height: 170px;
  max-width: 100%;
  width: auto;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.product-card h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.product-card p {
  font-size: 0.82rem;
  margin-bottom: 14px;
}

.product-no-stock {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 12px;
}

/* ---------- Botones de plan (reemplazan el <select>) ---------- */
.plan-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  width: 100%;
}

.plan-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 28px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  background: transparent;
  color: var(--color-muted);
  border: none;
  transition: background var(--transition), color var(--transition);
}

.plan-pill.is-active {
  background: linear-gradient(135deg, var(--color-pink-strong), var(--color-pink));
  color: var(--color-white);
}

/* ---------- Precio con descuento ---------- */
.price-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

.price-original {
  font-size: 0.85rem;
  color: var(--color-muted);
  text-decoration: line-through;
}

.price-discount {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-black);
  background: var(--color-warning);
}

.product-card .product-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-pink-light);
  margin-bottom: 6px;
}

.stock-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--color-success);
  font-weight: 500;
  text-shadow: 0 0 4px rgba(55, 226, 164, 0.6), 0 0 9px rgba(55, 226, 164, 0.35);
  margin-bottom: 14px;
}

.stock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 4px rgba(55, 226, 164, 0.7), 0 0 9px rgba(55, 226, 164, 0.4);
  flex-shrink: 0;
}

.stock-line.is-empty .stock-dot {
  background: var(--color-danger);
}

.stock-line.is-manual {
  color: #f59e0b;
  font-weight: 500;
  text-shadow: 0 0 4px rgba(245, 158, 11, 0.6), 0 0 9px rgba(245, 158, 11, 0.35);
}

.stock-line.is-manual .stock-dot {
  background: #f59e0b;
  box-shadow: 0 0 4px rgba(245, 158, 11, 0.7), 0 0 9px rgba(245, 158, 11, 0.4);
}

.stock-line.is-low {
  color: var(--color-warning);
  font-weight: 500;
  text-shadow: 0 0 4px rgba(255, 207, 77, 0.6), 0 0 9px rgba(255, 207, 77, 0.35);
}

.stock-line.is-low .stock-dot {
  background: var(--color-warning);
  box-shadow: 0 0 4px rgba(255, 207, 77, 0.7), 0 0 9px rgba(255, 207, 77, 0.4);
}

.stock-line.is-critical {
  color: var(--color-danger);
  font-weight: 500;
  text-shadow: 0 0 4px rgba(255, 84, 112, 0.6), 0 0 9px rgba(255, 84, 112, 0.35);
}

.stock-line.is-critical .stock-dot {
  background: var(--color-danger);
  box-shadow: 0 0 4px rgba(255, 84, 112, 0.7), 0 0 9px rgba(255, 84, 112, 0.4);
}

/* ---------- Selector de cantidad ---------- */
.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 14px;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 6px;
  border-radius: var(--radius-pill);
  background: rgba(5, 3, 8, 0.6);
  border: 1px solid rgba(255, 47, 179, 0.25);
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, var(--color-pink-strong), var(--color-pink));
  color: var(--color-white);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.qty-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.qty-value {
  min-width: 16px;
  text-align: center;
  font-weight: 700;
  color: var(--color-white);
}

.btn-add-cart {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.add-toast {
  position: fixed;
  bottom: 26px;
  right: 26px;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  border: var(--border-pink);
  box-shadow: var(--glow-pink);
  color: var(--color-white);
  font-size: 0.88rem;
  font-weight: 600;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition), opacity var(--transition);
  z-index: 2000;
}

.add-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* ---------- Modal "Añadido al carrito" ---------- */
.cart-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.cart-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.cart-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 8, 0.75);
  backdrop-filter: blur(4px);
}

.cart-modal-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 40px 32px 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(32, 12, 30, 0.97), rgba(8, 5, 12, 0.98));
  border: var(--border-pink);
  box-shadow: var(--glow-pink), 0 24px 60px rgba(0, 0, 0, 0.6);
  text-align: center;
  transform: scale(0.92) translateY(10px);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cart-modal.is-visible .cart-modal-card {
  transform: scale(1) translateY(0);
}

.cart-modal-icon {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: rgba(255, 47, 179, 0.12);
  border: 1px solid rgba(255, 47, 179, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-modal-icon svg:first-child {
  width: 40px;
  height: 40px;
  color: var(--color-pink-light);
  filter: drop-shadow(0 0 8px rgba(255, 47, 179, 0.7));
}

.cart-modal-check {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 30px;
  height: 30px;
  padding: 5px;
  border-radius: 50%;
  background: #1ee08a;
  color: var(--color-black);
  box-shadow: 0 0 12px rgba(30, 224, 138, 0.7);
}

.cart-modal-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--color-white);
  text-shadow: 0 0 12px rgba(255, 47, 179, 0.5);
  margin-bottom: 8px;
}

.cart-modal-card p {
  font-size: 0.92rem;
  color: var(--color-muted);
  margin-bottom: 28px;
}

.cart-modal-card p strong {
  color: var(--color-pink-light);
}

.cart-modal-actions {
  display: flex;
  gap: 12px;
}

.cart-modal-actions .btn {
  flex: 1;
  padding: 13px 10px;
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .cart-modal-actions {
    flex-direction: column;
  }
}
