/* =========================
   HEADER COMPLETO VMC
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1400;
  width: 100%;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  background: rgba(0, 0, 0, 0.92);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}

.site-header.menu-open {
  background: #000;
}

/* CONTENEDOR */
.header-wrap {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* LOGO */
.logo {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -1px;
  display: inline-flex;
  align-items: center;
}

.logo-v {
  color: var(--white);
}

.logo-rest {
  color: var(--orange);
}

/* NAV DESKTOP */
.desktop-nav {
  display: flex;
  gap: 28px;
}

.desktop-nav a {
  color: #f7ede3;
  font-weight: 600;
  position: relative;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--red-2));
  transition: 0.3s;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--orange-2);
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  width: 100%;
}

/* HEADER ACTIONS */
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* BOTÓN HAMBURGUESA */
.menu-toggle {
  display: none;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(255, 170, 40, 0.75);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  position: relative;
}

.menu-toggle span {
  position: absolute;
  left: 50%;
  width: 24px;
  height: 2px;
  background: white;
  transform: translateX(-50%);
  transition: 0.3s;
}

.menu-toggle span:nth-child(1) {
  top: 18px;
}
.menu-toggle span:nth-child(2) {
  top: 27px;
}
.menu-toggle span:nth-child(3) {
  top: 36px;
}

.menu-toggle.active span:nth-child(1) {
  top: 27px;
  transform: translateX(-50%) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  top: 27px;
  transform: translateX(-50%) rotate(-45deg);
}

/* =========================
     MOBILE MENU FULLSCREEN
  ========================= */

.mobile-menu {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 1401;
  background: #000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.3s;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* CONTENIDO */
.mobile-menu-inner {
  min-height: 100dvh;
  padding: 110px 24px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 34px;
  text-align: center;
}

/* NAV MOBILE */
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mobile-nav-link {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  transition: 0.3s;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--orange-2);
}

/* =========================
     CARRITO PREMIUM
  ========================= */

.mobile-extra-links {
  width: 100%;
  max-width: 420px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: center;
}

.mobile-secondary-link {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.015)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: 0.3s ease;
}

.mobile-secondary-link:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 122, 26, 0.4);
}

.mobile-cart-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  background: linear-gradient(
    135deg,
    rgba(255, 122, 26, 0.25),
    rgba(210, 70, 28, 0.15)
  );
  border: 1px solid rgba(255, 122, 26, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mobile-cart-count {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange), var(--red-2));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(255, 122, 26, 0.28);
}

/* BLOQUEAR SCROLL */
body.menu-open {
  overflow: hidden;
}

/* BOTÓN X SIEMPRE VISIBLE */
.menu-toggle {
  position: relative;
  z-index: 1500; /* más alto que el menú */
}

/* cuando el menú está abierto */
.site-header.menu-open .menu-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1600;
}

/* =========================
     RESPONSIVE
  ========================= */

@media (max-width: 1150px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }
}

/* =========================
   BOTÓN CARRITO DESKTOP
========================= */

.header-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.055),
    rgba(255, 255, 255, 0.02)
  );
  color: #f7ede3;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.header-cart-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 26, 0.28);
  background: linear-gradient(
    180deg,
    rgba(255, 122, 26, 0.12),
    rgba(210, 70, 28, 0.08)
  );
  color: #ffffff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
}

.header-cart-btn .icon {
  font-size: 1rem;
  line-height: 1;
}

.header-cart-btn #headerCartCount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--red-2));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(255, 122, 26, 0.22);
}

@media (max-width: 1150px) {
  .header-cart-btn {
    display: none;
  }
}

/* =========================
   LINK ACTIVO HEADER
========================= */

.nav-link,
.mobile-nav-link {
  position: relative;
  transition: all 0.25s ease;
}

.nav-link.active,
.mobile-nav-link.active {
  color: var(--orange-2);
}

/* underline desktop */
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--red-2));
  border-radius: 999px;
  animation: navUnderline 0.3s ease;
}

/* active mobile */
.mobile-nav-link.active {
  color: var(--orange-2);
  background: rgba(255, 122, 26, 0.12);
  border-radius: 12px;
  padding: 8px 14px;
}

@keyframes navUnderline {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 100%;
    opacity: 1;
  }
}

/* =========================================================
   CARRITO VMC
========================================================= */

body.modal-open {
  overflow: hidden;
}

/* DRAWER */
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 6000;
  pointer-events: none;
}

.cart-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.cart-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(480px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #111111 0%, #0b0b0b 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.34);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.cart-drawer.is-open {
  pointer-events: auto;
}

.cart-drawer.is-open .cart-drawer__backdrop {
  opacity: 1;
}

.cart-drawer.is-open .cart-drawer__panel {
  transform: translateX(0);
}

.cart-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cart-drawer__title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff7f0;
}

.cart-drawer__subtitle {
  margin: 0;
  color: #bdaea0;
  line-height: 1.55;
  font-size: 0.92rem;
}

.cart-drawer__close {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.cart-drawer__close:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(1.04);
}

.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 18px 0;
}

.cart-drawer__items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-drawer__empty {
  min-height: 220px;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
  color: #bcaea1;
  padding: 20px;
}

.cart-drawer__footer {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
}

.cart-drawer__summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cart-drawer__summaryRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #ddcec1;
  font-size: 0.94rem;
}

.cart-drawer__summaryRow strong {
  color: #fff7f0;
}

.cart-drawer__actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.cart-drawer__clear,
.cart-drawer__whatsapp {
  flex: 1;
  min-height: 50px;
  border-radius: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease,
    border-color 0.2s ease;
}

.cart-drawer__clear {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
}

.cart-drawer__clear:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 122, 26, 0.25);
}

.cart-drawer__whatsapp {
  border: none;
  background: linear-gradient(135deg, var(--orange), var(--red-2));
  color: #fff;
  box-shadow: 0 16px 30px rgba(255, 122, 26, 0.18);
}

.cart-drawer__whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 38px rgba(255, 122, 26, 0.24);
}

.cart-drawer__whatsapp.is-disabled {
  pointer-events: none;
  opacity: 0.45;
  box-shadow: none;
}

/* ITEMS */
.cart-item {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 14px;
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.025)
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cart-item__media {
  width: 94px;
  height: 94px;
  border-radius: 18px;
  overflow: hidden;
  background: #171717;
}

.cart-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-item__content {
  min-width: 0;
}

.cart-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cart-item__category {
  margin: 0 0 4px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--orange-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cart-item__title {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.25;
  color: #fff7f0;
}

.cart-item__brand {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #bcaea1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cart-item__remove {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.cart-item__discount {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.cart-item__discountBadge {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.cart-item__discountText {
  color: #bcaea1;
  font-size: 0.78rem;
}

.cart-item__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.cart-item__qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cart-item__qtyBtn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
}

.cart-item__qtyInput {
  width: 56px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-align: center;
  font-weight: 800;
  outline: none;
}

.cart-item__prices {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

.cart-item__unitOld {
  color: #9d8f83;
  text-decoration: line-through;
  font-size: 0.78rem;
}

.cart-item__unit {
  color: #bcaea1;
  font-size: 0.84rem;
  font-weight: 700;
}

.cart-item__save {
  color: #4ade80;
  font-size: 0.74rem;
  font-weight: 700;
}

.cart-item__subtotal {
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}

/* CHECKOUT MODAL */
.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 6100;
  pointer-events: none;
}

.checkout-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.checkout-modal__panel {
  position: relative;
  z-index: 2;
  width: min(640px, calc(100% - 24px));
  margin: 28px auto;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  background: linear-gradient(180deg, #111111 0%, #0b0b0b 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.42);
  transform: translateY(24px) scale(0.96);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.checkout-modal.is-open {
  pointer-events: auto;
}

.checkout-modal.is-open .checkout-modal__backdrop {
  opacity: 1;
}

.checkout-modal.is-open .checkout-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.checkout-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  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;
}

.checkout-modal__title {
  margin: 0 0 10px;
  color: #fff7f0;
  font-size: 1.65rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.checkout-modal__text {
  margin: 0 0 20px;
  color: #bcaea1;
  line-height: 1.7;
}

.checkout-modal__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.checkout-modal__option {
  min-height: 68px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  color: #fff7f0;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.checkout-modal__option:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 26, 0.28);
}

.checkout-form__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.checkout-form__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkout-form__group label {
  font-size: 0.86rem;
  font-weight: 800;
  color: #fff7f0;
}

.checkout-form__group input {
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  outline: none;
}

.checkout-form__group input:focus {
  border-color: rgba(255, 122, 26, 0.35);
}

.checkout-form__actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.checkout-form__back,
.checkout-form__submit {
  flex: 1;
  min-height: 50px;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.checkout-form__back {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.checkout-form__submit {
  border: none;
  background: linear-gradient(135deg, var(--orange), var(--red-2));
  color: #fff;
}

.checkout-form__back:hover,
.checkout-form__submit:hover {
  transform: translateY(-1px);
}

/* TOAST */
.cart-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 6200;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 18px;
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    rgba(15, 15, 15, 0.96),
    rgba(8, 8, 8, 0.96)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
}

.cart-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cart-toast__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
}

.cart-toast__text {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff7f0;
}

/* RESPONSIVE SOLO CARRITO */
@media (max-width: 760px) {
  .cart-drawer__actions,
  .checkout-form__actions {
    flex-direction: column;
  }

  .checkout-modal__options {
    grid-template-columns: 1fr;
  }

  .checkout-form__grid {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: 78px 1fr;
  }

  .cart-item__media {
    width: 78px;
    height: 78px;
  }
}

@media (max-width: 640px) {
  .cart-drawer__panel {
    width: 100%;
  }

  .cart-drawer__header,
  .cart-drawer__footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cart-drawer__body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cart-item__bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .cart-item__prices {
    align-items: flex-start;
    text-align: left;
  }

  .checkout-modal__panel {
    width: calc(100% - 18px);
    margin: 9px auto;
    padding: 18px;
    border-radius: 22px;
  }

  .cart-toast {
    right: 12px;
    left: 12px;
    bottom: 12px;
    justify-content: center;
  }
}
