/* ==================================================
   RS2 PRODUCTS — AMAZON MARKETPLACE (ELITE)
   Archivo: products.css
================================================== */

/* ==================================================
   CONTENEDOR
================================================== */

.rs2-products {
  position: relative;
  scroll-margin-top: 90px;
}

.products-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.rs2-smart-packs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 34px;
}

.rs2-bundle {
  padding: 22px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035)),
    rgba(15, 76, 129, 0.35);
  border: 1px solid rgba(79, 179, 255, 0.18);
}

.rs2-bundle.featured {
  border-color: rgba(255, 122, 24, 0.55);
  box-shadow: 0 18px 36px rgba(255, 122, 24, 0.16);
}

.rs2-bundle span {
  display: inline-flex;
  margin-bottom: 10px;
  color: rgba(234, 242, 248, 0.72);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rs2-bundle h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 950;
}

.rs2-bundle p {
  min-height: 44px;
  margin: 8px 0 16px;
  color: rgba(234, 242, 248, 0.72);
  line-height: 1.5;
  font-size: .9rem;
}

.rs2-bundle strong {
  display: block;
  margin-bottom: 14px;
  font-size: 1.35rem;
  font-weight: 950;
}

.rs2-bundle .btn {
  width: 100%;
}

@media (max-width: 900px) {
  .rs2-smart-packs { grid-template-columns: 1fr; }
}

.rs2-flavor-finder,
.rs2-build-box {
  margin-bottom: 34px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(79,179,255,.16);
  background: rgba(255,255,255,.04);
}

.rs2-product-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.rs2-product-filter button {
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(79,179,255,.2);
  background: rgba(255,255,255,.055);
  color: rgba(234,242,248,.82);
  font-weight: 850;
  cursor: pointer;
}

.rs2-product-filter button:hover,
.rs2-product-filter button.is-active {
  border-color: rgba(255,122,24,.55);
  background: rgba(255,122,24,.16);
  color: #fff;
}

.rs2-empty-products {
  grid-column: 1 / -1;
  padding: 28px;
  border-radius: 18px;
  border: 1px solid rgba(79,179,255,.16);
  background: rgba(255,255,255,.045);
  text-align: center;
}

.rs2-empty-products strong,
.rs2-empty-products span {
  display: block;
}

.rs2-empty-products span {
  margin-top: 6px;
  color: rgba(234,242,248,.68);
}

.rs2-flavor-finder {
  display: grid;
  grid-template-columns: .65fr 1.35fr;
  gap: 18px;
  align-items: center;
}

.rs2-flavor-finder h3,
.rs2-build-box h3 {
  margin: 6px 0 0;
  font-size: 1.35rem;
  font-weight: 950;
}

.rs2-goal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.rs2-goal-grid article {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.09);
}

.rs2-goal-grid strong,
.rs2-goal-grid span {
  display: block;
}

.rs2-goal-grid span,
.rs2-build-box p {
  margin-top: 6px;
  color: rgba(234,242,248,.72);
  line-height: 1.5;
}

.rs2-build-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.rs2-box-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .rs2-smart-packs,
  .rs2-goal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .rs2-flavor-finder,
  .rs2-build-box {
    grid-template-columns: 1fr;
    display: grid;
  }

  .rs2-smart-packs,
  .rs2-goal-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================================================
   GRID — LIMPIO Y RESPONSIVE
================================================== */

#productsGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1200px) {
  #productsGrid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  #productsGrid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  #productsGrid { grid-template-columns: 1fr; }
}

/* ==================================================
   PRODUCT CARD — BASE
================================================== */

.product-card {
  position: relative;
  height: 100%;

  padding: 14px;
  border-radius: 18px;

  display: flex;
  flex-direction: column;
  gap: 6px;

  background: linear-gradient(
    180deg,
    rgba(15, 76, 129, 0.75),
    rgba(6, 31, 51, 0.92)
  );

  border: 1px solid rgba(79, 179, 255, 0.14);
  overflow: hidden;

  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.18s ease;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(240px 160px at 50% 0%, var(--flavor-color, rgba(79,179,255,.45)), transparent 70%);
  opacity: .24;
  pointer-events: none;
}

.product-card > * {
  position: relative;
  z-index: 1;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(79, 179, 255, 0.28);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ==================================================
   IMAGEN — ZOOM AMAZON REAL
================================================== */

.product-image {
  height: 180px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 6px;
  overflow: hidden;
}

.product-swatch {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--flavor-color, var(--rs2-glow));
  border: 2px solid rgba(255,255,255,.75);
  box-shadow: 0 10px 20px rgba(0,0,0,.25);
}

.product-image img {
  max-height: 165px;
  width: auto;
  object-fit: contain;
  cursor: zoom-in;

  transform-origin: bottom center;
  transition: transform 0.28s ease, filter 0.28s ease;

  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.35));
}

/* Hover solo desktop */
@media (hover: hover) and (pointer: fine) {
  .product-image:hover img {
    transform: scale(1.18) translateY(-10px);
    filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 0.45));
  }
}

/* ==================================================
   INFO — JERARQUÍA
================================================== */

.product-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-use {
  color: rgba(234, 242, 248, 0.62);
  font-size: .68rem;
  font-weight: 800;
  text-align: right;
}

.product-badge {
  align-self: flex-start;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 800;
  opacity: 0.85;

  background: rgba(79, 179, 255, 0.14);
  border: 1px solid rgba(79, 179, 255, 0.22);
  color: rgba(234, 242, 248, 0.95);
}

.product-name {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.96);
}

.product-flavor {
  font-size: 0.78rem;
  opacity: 0.8;
}

.product-desc {
  font-size: 0.75rem;
  line-height: 1.35;
  opacity: 0.65;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 0;
}

.product-facts div {
  padding: 7px 6px;
  border-radius: 10px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.08);
  min-width: 0;
}

.product-facts dt {
  color: rgba(234,242,248,.52);
  font-size: .58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.product-facts dd {
  margin: 2px 0 0;
  color: rgba(255,255,255,.9);
  font-size: .68rem;
  font-weight: 850;
  line-height: 1.1;
}

/* ==================================================
   FOOTER — PRECIO + CTA
================================================== */

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.product-price {
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

/* ==================================================
   CTA — ESTADOS PRO
================================================== */

.product-footer .btn {
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: 999px;

  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-detail-btn {
  margin-left: auto;
}

.rs2-modal {
  width: min(560px, calc(100% - 32px));
  border: 0;
  border-radius: 22px;
  padding: 0;
  color: #fff;
  background: transparent;
}

.rs2-modal::backdrop {
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
}

.rs2-modal-panel {
  position: relative;
  padding: 26px;
  background: linear-gradient(180deg, rgba(15,76,129,.98), rgba(6,31,51,.98));
  border: 1px solid rgba(79,179,255,.22);
  border-radius: 22px;
  box-shadow: var(--shadow-hard);
}

.rs2-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
}

.rs2-modal h3 {
  margin: 8px 0 16px;
  font-size: 1.4rem;
  font-weight: 950;
}

.rs2-nutrition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.rs2-nutrition-grid div {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.09);
}

.rs2-nutrition-grid dt {
  color: rgba(234,242,248,.56);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.rs2-nutrition-grid dd {
  margin: 4px 0 0;
  font-weight: 950;
}

.rs2-modal p {
  color: rgba(234,242,248,.78);
  line-height: 1.6;
}

.rs2-modal-note {
  font-size: .85rem;
  opacity: .75;
}

.product-footer .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(255, 122, 24, 0.35);
}

.product-footer .btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(255, 122, 24, 0.28);
}

.product-footer .btn:disabled,
.product-footer .btn[data-state="added"] {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  cursor: default;
  box-shadow: none;
  transform: none;
}

/* ==================================================
   FUTURO (FEATURED / BEST SELLER)
================================================== */

.product-card[data-featured="true"] {
  outline: 2px solid rgba(255, 122, 24, 0.45);
  outline-offset: -2px;
}

.product-card[data-best="true"] .product-badge {
  background: rgba(255, 122, 24, 0.85);
  border-color: rgba(255, 122, 24, 0.9);
  color: #000;
}

/* ==================================================
   PRÓXIMAMENTE
================================================== */

.product-card[data-coming-soon="true"] {
  opacity: 0.72;
  border-style: dashed;
  border-color: rgba(79, 179, 255, 0.25);
}

.product-card[data-coming-soon="true"] .product-image {
  filter: grayscale(0.4);
}

.rs2-coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rs2-glow);
  background: rgba(79, 179, 255, 0.1);
  border: 1px dashed rgba(79, 179, 255, 0.4);
  width: 100%;
  justify-content: center;
}

.rs2-coming-soon-badge::before {
  content: "⏳";
  font-size: 0.9rem;
}

