/* =========================================================
   CATALOGO VMC
========================================================= */

.catalogo-page {
  position: relative;
  padding: 130px 0 84px;
  overflow: hidden;
}

.catalogo-page .container {
  position: relative;
  z-index: 2;
}

.catalogo-page__header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 42px;
}

.catalogo-page__title {
  margin: 0 0 12px;
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 0.96;
  letter-spacing: -1.8px;
  color: #fff7f0;
  text-wrap: balance;
}

.catalogo-page__subtitle {
  margin: 0 auto 28px;
  max-width: 720px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.catalogo-page__filters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.catalogo-page__input,
.catalogo-page__select {
  min-width: 240px;
  height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: #fff3eb;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s ease, background 0.25s ease,
    box-shadow 0.25s ease;
}

.catalogo-page__input::placeholder {
  color: #bcaea1;
}

.catalogo-page__select {
  appearance: none;
  cursor: pointer;
}

.catalogo-page__input:focus,
.catalogo-page__select:focus {
  border-color: rgba(255, 122, 26, 0.4);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.08);
}

.catalogo-page__btn {
  height: 52px;
  padding: 0 22px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--orange), var(--red-2));
  color: #fff;
  font-weight: 800;
  font-size: 0.96rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(255, 122, 26, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.catalogo-page__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(255, 122, 26, 0.25);
}

.catalogo-page__results {
  margin-top: 18px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #cdbfb3;
}

.catalogo-page__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.catalogo-page__empty {
  text-align: center;
  padding: 72px 22px;
  border-radius: 28px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.catalogo-page__empty h3 {
  margin-bottom: 10px;
  font-size: 1.5rem;
  color: #fff7f0;
}

.catalogo-page__empty p {
  color: var(--muted);
  line-height: 1.7;
}

/* =========================================================
   CARD PRODUCTO
========================================================= */

.catalogo-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.025)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

.catalogo-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 122, 26, 0.28);
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.28);
}

.catalogo-card:focus-visible {
  outline: 2px solid rgba(255, 122, 26, 0.5);
  outline-offset: 3px;
}

.catalogo-card__media {
  position: relative;
  height: 260px;
  background: #111;
  overflow: hidden;
}

.catalogo-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.catalogo-card:hover .catalogo-card__media img {
  transform: scale(1.04);
}

.catalogo-card__discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 10px;
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.2);
}

.catalogo-card__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.catalogo-card__badge--ok {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.catalogo-card__badge--low {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.catalogo-card__badge--out {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.catalogo-card__body {
  padding: 18px;
}

.catalogo-card__category {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--orange-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.catalogo-card__brand {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #bfae9f;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.catalogo-card__title {
  margin: 0 0 10px;
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 900;
  color: #fff7f0;
}

.catalogo-card__desc {
  margin: 0;
  min-height: 48px;
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--muted);
}

.catalogo-card__stock {
  margin-top: 12px;
}

.catalogo-stock {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}

.catalogo-stock--ok {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.catalogo-stock--low {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.catalogo-stock--out {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
}

.catalogo-card__footer {
  margin-top: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.catalogo-card__priceWrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.catalogo-card__priceOld {
  color: #9d8f83;
  text-decoration: line-through;
  font-size: 0.9rem;
  line-height: 1;
}

.catalogo-card__price {
  font-size: 1.28rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
}

.catalogo-card__saving {
  color: #4ade80;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.catalogo-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: none;
  background: #fff;
  color: #111;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
}

.catalogo-card__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(255, 255, 255, 0.12);
}

/* =========================================================
   PAGINACION
========================================================= */

.catalogo-pagination {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.catalogo-pagination__pages {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.catalogo-pagination__btn,
.catalogo-pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #fff3eb;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.catalogo-pagination__btn:hover,
.catalogo-pagination__page:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 122, 26, 0.25);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.catalogo-pagination__page--active {
  background: linear-gradient(135deg, var(--orange), var(--red-2));
  color: #fff;
  border-color: transparent;
}

.catalogo-pagination__btn--disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* =========================================================
   MODAL PRODUCTO
========================================================= */

body.modal-open {
  overflow: hidden;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  pointer-events: none;
}

.product-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.product-modal__dialog {
  position: relative;
  z-index: 2;
  width: min(960px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: 20px auto;
  background: linear-gradient(180deg, #111111 0%, #0d0d0d 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.42);
  padding: 24px;
  transform: translateY(22px) scale(0.96);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
  will-change: transform, opacity;
}

.product-modal.is-open,
.product-modal.is-closing {
  pointer-events: auto;
}

.product-modal.is-open .product-modal__backdrop {
  opacity: 1;
}

.product-modal.is-open .product-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.product-modal.is-closing .product-modal__backdrop {
  opacity: 0;
}

.product-modal.is-closing .product-modal__dialog {
  transform: translateY(22px) scale(0.96);
  opacity: 0;
}

.product-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.product-modal__close:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.04);
}

.product-modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.product-modal__media {
  background: #171717;
  border-radius: 22px;
  overflow: hidden;
  min-height: 360px;
}

.product-modal__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-modal__content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-modal__category {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--orange-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-modal__brand {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #bcaea1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-modal__title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
  font-weight: 900;
  color: #fff7f0;
}

.product-modal__desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.product-modal__discount {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 6px;
}

.product-modal__discountBadge {
  display: inline-flex;
  align-self: flex-start;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 10px;
  border-radius: 999px;
}

.product-modal__discountName {
  color: #bcaea1;
  font-size: 0.88rem;
}

.product-modal__specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.product-modal__spec {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px;
}

.product-modal__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #bcaea1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.product-modal__value {
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
}

.product-modal__priceBox {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-modal__oldPrice {
  color: #9d8f83;
  text-decoration: line-through;
  font-size: 0.88rem;
}

.product-modal__savingText {
  color: #4ade80;
  font-size: 0.8rem;
  font-weight: 700;
}

.product-modal__qty {
  margin-top: 4px;
}

.product-modal__qtyLabel {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
  color: #fff7f0;
}

.product-modal__qtyControls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-modal__qtyBtn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.product-modal__qtyBtn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.product-modal__qtyInput {
  width: 90px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  outline: none;
}

.product-modal__qtyInput:focus {
  border-color: rgba(255, 122, 26, 0.38);
}

.product-modal__qtyHint {
  display: block;
  margin-top: 10px;
  color: #bcaea1;
  font-size: 0.84rem;
}

.product-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.product-modal__cartBtn,
.product-modal__waBtn {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.product-modal__cartBtn:hover,
.product-modal__waBtn:hover {
  transform: translateY(-1px);
}

.product-modal__cartBtn {
  background: #fff;
  color: #111;
}

.product-modal__cartBtn.is-disabled,
.product-modal__cartBtn:disabled {
  background: #4b5563;
  color: #d1d5db;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.product-modal__waBtn {
  background: linear-gradient(135deg, var(--orange), var(--red-2));
  color: #fff;
  box-shadow: 0 14px 28px rgba(255, 122, 26, 0.18);
}

.product-modal__waBtn.is-disabled,
.product-modal__waBtn:disabled {
  background: #4b5563;
  color: #d1d5db;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.product-modal__note {
  margin: 0;
  font-size: 0.84rem;
  color: #bcaea1;
  line-height: 1.6;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {
  .catalogo-page__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .product-modal__grid {
    grid-template-columns: 1fr;
  }

  .product-modal__media {
    min-height: 260px;
  }

  .product-modal__specs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .catalogo-page__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .catalogo-page {
    padding: 110px 0 62px;
  }

  .catalogo-page__filters {
    flex-direction: column;
    align-items: stretch;
  }

  .catalogo-page__input,
  .catalogo-page__select,
  .catalogo-page__btn {
    width: 100%;
    min-width: 100%;
  }

  .catalogo-page__grid {
    grid-template-columns: 1fr;
  }

  .catalogo-card__media {
    height: 220px;
  }

  .catalogo-card__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .catalogo-card__cta {
    width: 100%;
  }

  .product-modal__dialog {
    width: calc(100% - 20px);
    margin: 10px auto;
    padding: 18px;
    border-radius: 22px;
  }

  .product-modal__actions {
    flex-direction: column;
  }

  .product-modal__cartBtn,
  .product-modal__waBtn {
    width: 100%;
  }
}
