/* css/pages/shop.css */

/* =========
   Shop layout + categorías
   ========= */

.shop-title {
  font-size: 34px;
  margin: 18px 0 6px;
  letter-spacing: -0.02em;
}

.shop-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
}

/* Fondo: que se vea el gradient del body */
.shop,
main {
  background: transparent;
}

/* Layout */
.shop-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 18px;
  align-items: start;
  padding: 10px 0 38px;
}

/* Panels */
.shop-categories,
.shop-products-head {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 10px);
  background: rgba(255, 255, 255, 0.14);
  padding: 14px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.shop-categories {
  position: sticky;
  top: 92px;
  align-self: start;
}

.shop-products {
  padding: 0;
  border: 0;
  background: transparent;
}

.shop-side-title {
  margin: 6px 6px 12px;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.72);
}

/* Head de categorías + botón “Ver todo” */
.shop-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 6px 6px;
}

.shop-cat-clear {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  color: rgba(0, 0, 0, 0.78);

  padding: 8px 10px;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;

  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.shop-cat-clear:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(17, 17, 17, 0.22);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.1);
}

.shop-cat-clear:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(107, 78, 61, 0.14);
}

/* Head productos */
.shop-products-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.muted.tiny {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* Categorías */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px;
}

.category-btn {
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.2);
  color: rgba(0, 0, 0, 0.78);

  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 650;

  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease;
}

.category-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.32);
}

.category-btn.is-active {
  background: rgba(0, 0, 0, 0.86);
  color: #fff;
  border-color: rgba(0, 0, 0, 0.3);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

/* Grid productos */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-content: start;
}

/* =========
   Product card (Shop)
   ========= */
.shop .product-card {
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: calc(var(--radius) + 10px);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.shop .product-card.is-out {
  opacity: 0.9;
}

 .shop .product-media {
  height: 140px;
  background: rgba(255, 255, 255, 0.22);
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

 .shop .product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop .product-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.08), transparent 42%);
  pointer-events: none;
}

.shop .product-badges {
  position: absolute;
  inset: 10px 10px auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
}

.shop .product-placeholder {
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  border-radius: 18px;
  border: 1px dashed rgba(17, 17, 17, 0.16);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.16));
  display: grid;
  place-items: center;
  color: rgba(0, 0, 0, 0.48);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shop .product-body {
  padding: 14px;
}

.shop .product-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

 .shop .product-title {
  font-size: 15px;
  line-height: 1.2;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop .product-category {
  margin: -2px 0 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.58);
}

 .shop .product-tag {
  border: 1px solid rgba(17, 17, 17, 0.1);
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: rgba(0, 0, 0, 0.7);
}

.shop .product-stock-pill {
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: rgba(0, 0, 0, 0.7);
}

.shop .product-stock-pill.is-out {
  background: rgba(255, 140, 120, 0.18);
  border-color: rgba(255, 140, 120, 0.25);
  color: rgba(128, 44, 28, 0.92);
}

.shop .product-bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px;
}

.shop .product-price {
  margin: 0;
  font-weight: 800;
  color: var(--text);
}

.shop .product-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.shop .product-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Botones en card (solo micro-ajustes sobre base.css) */
.shop .product-card .btn-primary {
  min-width: 92px;
}

/* Empty state */
 .shop-empty {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 10px);
  background: rgba(255, 255, 255, 0.14);
  padding: 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  display: grid;
  gap: 14px;
  place-items: center;
  text-align: center;
}

.shop-empty[hidden] {
  display: none !important;
}

.shop-empty__icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(17, 17, 17, 0.08);
  font-size: 24px;
}

.shop-empty__copy {
  display: grid;
  gap: 4px;
}

.shop-empty__copy h3 {
  font-family: var(--font-serif);
  font-size: 18px;
}

.shop-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.shop-empty__actions .btn,
.shop-empty__actions .btn-secondary {
  min-width: 124px;
}

/* =========
   Animaciones: agregar al carrito
   ========= */
@keyframes btnPop {
  0% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-1px) scale(1.06);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}
.shop .btn-pop {
  animation: btnPop 260ms ease-out;
}

@keyframes cardGlow {
  0% {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  }
  50% {
    box-shadow: 0 18px 40px rgba(107, 78, 61, 0.22);
  }
  100% {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  }
}
.shop .product-card.is-added {
  animation: cardGlow 380ms ease-out;
}

@keyframes badgePop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}
.cart-badge.is-pop {
  animation: badgePop 220ms ease-out;
}

/* Responsive */
@media (max-width: 980px) {
  .shop-title {
    font-size: 30px;
    margin: 12px 0 6px;
  }

  .shop-subtitle {
    margin-bottom: 14px;
  }

  .shop-layout {
    grid-template-columns: 1fr;
  }

  .shop-categories {
    position: static;
  }

  .category-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
    gap: 10px;
  }

  .category-btn {
    white-space: nowrap;
    text-align: center;
  }

  .shop-products-head {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-products-actions {
    width: 100%;
  }

  .shop-sort {
    width: 100%;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .shop-layout {
    gap: 14px;
    padding: 8px 0 28px;
  }

  .shop-categories,
  .shop-products-head,
  .shop-empty,
  .shop .product-card {
    border-radius: 22px;
  }

  .shop-categories,
  .shop-products-head {
    padding: 12px;
  }

  .shop-cat-head {
    padding: 0 2px 8px;
    flex-wrap: wrap;
  }

  .shop-side-title {
    margin: 4px 4px 10px;
    font-size: 13px;
  }

  .shop-cat-clear {
    padding: 8px 12px;
    width: auto;
    white-space: nowrap;
  }

  .category-list {
    gap: 8px;
    padding: 4px 2px 2px;
  }

  .category-btn {
    padding: 10px 12px;
    font-size: 14px;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .shop .product-media {
    height: 180px;
  }

  .shop .product-body {
    padding: 12px;
  }

  .shop .product-top {
    margin-bottom: 8px;
  }

  .shop .product-title {
    font-size: 16px;
  }

  .shop .product-desc-preview {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.45;
  }

  .shop .product-bottom {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .shop .product-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .shop .product-actions .btn-primary,
  .shop .product-actions .btn-secondary {
    width: 100%;
    min-width: 0;
  }

  .shop-empty__actions {
    width: 100%;
  }

  .shop-empty__actions .btn,
  .shop-empty__actions .btn-secondary {
    width: 100%;
  }
}
/* =========
   FIX: botones planos en Shop (mata el 3D/gradiente viejo)
   PÉGALO AL FINAL de shop.css
   ========= */
.shop .product-card button,
.shop .product-card .btn,
.shop .product-card .btn-primary,
.shop .product-card .btn-secondary {
  appearance: none;
  -webkit-appearance: none;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
}

/* Secondary (Ver) */
.shop .product-card .btn-secondary {
  border: 1px solid rgba(17, 17, 17, 0.14) !important;
  background: rgba(255, 255, 255, 0.55) !important;
  color: rgba(0, 0, 0, 0.82) !important;
}

/* Primary (Agregar) */
.shop .product-card .btn-primary {
  border: 1px solid rgba(107, 78, 61, 0.35) !important;
  background: var(--accent) !important;
  color: #fff !important;
}

/* Hover */
.shop .product-card .btn-primary:hover,
.shop .product-card .btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.1) !important;
}

/* Disabled */
.shop .product-card .btn-primary:disabled,
.shop .product-card .btn-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none !important;
}
 .shop .product-card .btn-secondary {
  backdrop-filter: blur(8px);
}

@keyframes shopSkeletonPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.shop .product-card.is-skeleton {
  pointer-events: none;
  opacity: 0.95;
}

.shop .product-card.is-skeleton .product-media,
.shop .product-card.is-skeleton .product-title,
.shop .product-card.is-skeleton .product-category,
.shop .product-card.is-skeleton .product-desc-preview,
.shop .product-card.is-skeleton .product-price,
.shop .product-card.is-skeleton .product-meta,
.shop .product-card.is-skeleton .btn-primary,
.shop .product-card.is-skeleton .btn-secondary {
  color: transparent !important;
  background: linear-gradient(90deg, rgba(255,255,255,0.34), rgba(255,255,255,0.7), rgba(255,255,255,0.34));
  background-size: 220% 100%;
  animation: shopSkeletonPulse 1.4s ease-in-out infinite;
}

.shop .product-card.is-skeleton .product-media {
  min-height: 140px;
}

.shop .product-card.is-skeleton .product-body {
  display: grid;
  gap: 10px;
}

.shop .product-card.is-skeleton .product-top,
.shop .product-card.is-skeleton .product-bottom {
  display: grid;
  gap: 8px;
}
