/* ==========================================================================
   PERFIDIA.WEB — cart.css
   Drawer del carrito lateral
   ========================================================================== */

/* -------- CART DRAWER -------- */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100vh;
  background: var(--white);
  z-index: 500;
  border-left: 1px solid var(--gray-mid);
  transition: right 0.35s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { right: 0; }

.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 499;
}
.cart-overlay.open { display: block; }

/* -------- CART HEADER -------- */
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-mid);
}
.cart-header h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cart-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  opacity: 0.4;
}
.cart-close:hover { opacity: 1; }

/* -------- CART ITEMS -------- */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}
.cart-empty {
  text-align: center;
  padding: 60px 0;
  opacity: 0.4;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cart-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-light);
}
.cart-item-img {
  width: 72px;
  height: 90px;
  background: var(--gray-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item-info { flex: 1; }
.cart-item-name {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}
.cart-item-variant {
  font-size: 11px;
  color: var(--gray-text);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Quantity control */
.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--gray-mid);
}
.qty-btn {
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: var(--gray-light); }
.qty-num {
  width: 32px;
  text-align: center;
  font-size: 13px;
  border-left: 1px solid var(--gray-mid);
  border-right: 1px solid var(--gray-mid);
  line-height: 28px;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 700;
}
.cart-item-remove {
  font-size: 11px;
  color: var(--gray-text);
  cursor: pointer;
  text-decoration: underline;
  margin-top: 6px;
  background: none;
  border: none;
  font-family: var(--font);
}

/* -------- CART FOOTER -------- */
.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--gray-mid);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.cart-total-label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
}
.cart-total-price {
  font-size: 20px;
  font-weight: 700;
}
.cart-shipping-note {
  font-size: 11px;
  color: var(--gray-text);
  text-align: center;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* -------- RESPONSIVE -------- */
@media (max-width: 600px) {
  .cart-drawer {
    width: 100%;
    right: -100%;
  }
}
