/* ==========================================================================
   cart-v2.css — Terrabox Kids | Carrito de Compras v2
   AISLADO: No usa ni modifica ninguna clase de cart-custom.css
   Prefijo exclusivo: cv2-  /  Selector raíz: #cartModalV2
   ========================================================================== */

/* ── Modal contenedor ──────────────────────────────────────────────────────── */
#cartModalV2 .modal-content {
  border: none;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

#cartModalV2 .modal-dialog {
  max-width: 600px;
}

/* ── Header ────────────────────────────────────────────────────────────────── */
.cv2-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 18px;
  background: linear-gradient(135deg, #8dc63f 0%, #6aaa2a 100%);
  border-bottom: none;
}

.cv2-header-text {
  flex: 1;
}

.cv2-title {
  margin: 0 0 4px;
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
}

.cv2-subtitle {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.cv2-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
  margin-left: 12px;
  line-height: 1;
}

.cv2-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* ── Body ──────────────────────────────────────────────────────────────────── */
.cv2-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #ffffff;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.cv2-footer {
  padding: 12px 20px;
  border-top: 1px solid #f0f0f0;
  background: #ffffff;
}

/* ── Estado vacío ──────────────────────────────────────────────────────────── */
.cv2-empty-state {
  text-align: center;
  padding: 36px 16px;
}

.cv2-empty-icon {
  font-size: 52px;
  color: #c8e49a;
  margin-bottom: 14px;
}

.cv2-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: #333333;
  margin-bottom: 8px;
}

.cv2-empty-desc {
  color: #888888;
  font-size: 14px;
  margin-bottom: 24px;
  max-width: 310px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.cv2-btn-add-empty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #8dc63f 0%, #6aaa2a 100%);
  color: #ffffff;
  border: none;
  border-radius: 30px;
  padding: 13px 30px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(141, 198, 63, 0.4);
}

.cv2-btn-add-empty:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(141, 198, 63, 0.5);
}

/* ── Tarjeta del producto ──────────────────────────────────────────────────── */
.cv2-product-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #ffffff;
  border: 1.5px solid #eeeeee;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  flex-wrap: wrap;
}

.cv2-product-img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  border: 1px solid #eeeeee;
}

.cv2-product-info {
  flex: 1;
  min-width: 0;
}

.cv2-product-name {
  font-size: 14px;
  font-weight: 700;
  color: #222222;
  margin: 0 0 3px;
  line-height: 1.4;
}

.cv2-product-detail {
  font-size: 12px;
  color: #999999;
  display: block;
  margin-bottom: 6px;
}

.cv2-product-price {
  font-size: 15px;
  font-weight: 700;
  color: #8dc63f;
}

.cv2-per-unit {
  font-size: 12px;
  font-weight: 400;
  color: #aaaaaa;
}

.cv2-product-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Grupo de cantidad */
.cv2-qty-group {
  display: flex;
  align-items: center;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.cv2-btn-qty {
  background: #f5f5f5;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  color: #444444;
  transition: background 0.15s ease;
  flex-shrink: 0;
  line-height: 1;
}

.cv2-btn-qty:hover {
  background: #e8f5d6;
  color: #6aaa2a;
}

.cv2-qty-display {
  min-width: 34px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #333333;
  padding: 0 4px;
  line-height: 32px;
}

/* Botón eliminar */
.cv2-btn-remove {
  background: none;
  border: 1.5px solid #ffcccc;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e57373;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cv2-btn-remove:hover {
  background: #fff0f0;
  border-color: #e57373;
}

/* ── Banner de envío ────────────────────────────────────────────────────────── */
.cv2-shipping-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: #f0fbe6;
  border: 1px solid #c3e89a;
  border-radius: 10px;
  font-size: 13px;
  color: #4a6b20;
  line-height: 1.4;
}

.cv2-shipping-icon {
  font-size: 16px;
  color: #6aaa2a;
  flex-shrink: 0;
}

/* ── Accordion: Qué incluye tu caja ─────────────────────────────────────────── */
.cv2-accordion {
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  background: #fafafa;
}

.cv2-accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: #fafafa;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  transition: background 0.15s ease;
  text-align: left;
  gap: 8px;
}

.cv2-accordion-toggle:hover {
  background: #f2f2f2;
}

.cv2-acc-icon {
  color: #8dc63f;
  margin-right: 7px;
}

.cv2-chevron {
  font-size: 11px;
  color: #aaaaaa;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.cv2-accordion--open > .cv2-accordion-toggle .cv2-chevron {
  transform: rotate(180deg);
}

.cv2-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.cv2-accordion--open > .cv2-accordion-body {
  max-height: 500px;
}

.cv2-contents-list {
  list-style: none;
  margin: 0;
  padding: 4px 16px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.cv2-contents-list li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #555555;
}

.cv2-item-icon {
  font-size: 15px;
  flex-shrink: 0;
}

/* ── Sección datos opcionales ────────────────────────────────────────────────── */
.cv2-optional-section {
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  background: #fafafa;
}

.cv2-optional-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: #fafafa;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  transition: background 0.15s ease;
  text-align: left;
  gap: 8px;
}

.cv2-optional-toggle:hover {
  background: #f2f2f2;
}

.cv2-opt-icon {
  color: #8dc63f;
  margin-right: 7px;
}

.cv2-opt-label {
  font-weight: 400;
  color: #aaaaaa;
  font-size: 12px;
  margin-left: 4px;
}

.cv2-optional--open > .cv2-optional-toggle .cv2-chevron {
  transform: rotate(180deg);
}

.cv2-optional-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.cv2-optional--open > .cv2-optional-body {
  max-height: 320px;
}

.cv2-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 16px 6px;
}

.cv2-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 16px 12px;
}

.cv2-form-row .cv2-form-field {
  padding: 0;
}

.cv2-label {
  font-size: 11px;
  font-weight: 600;
  color: #777777;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.cv2-input {
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  color: #333333;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #ffffff;
  width: 100%;
}

.cv2-input:focus {
  border-color: #8dc63f;
  box-shadow: 0 0 0 3px rgba(141, 198, 63, 0.12);
}

.cv2-input::placeholder {
  color: #cccccc;
}

/* ── Resumen del pedido ──────────────────────────────────────────────────────── */
.cv2-summary {
  background: #f8faf4;
  border-radius: 12px;
  padding: 14px 16px;
  border: 1.5px solid #e2efcf;
}

.cv2-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
}

.cv2-summary-label {
  font-size: 13px;
  color: #888888;
}

.cv2-summary-value {
  font-size: 13px;
  color: #444444;
  font-weight: 500;
}

.cv2-summary-divider {
  height: 1px;
  background: #ddefc0;
  margin: 9px 0;
}

.cv2-summary-total-row .cv2-summary-total-label {
  font-size: 15px;
  font-weight: 700;
  color: #222222;
}

.cv2-summary-total-row .cv2-summary-total-value {
  font-size: 18px;
  font-weight: 800;
  color: #6aaa2a;
}

/* ── Botón principal WhatsApp ────────────────────────────────────────────────── */
.cv2-btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #8dc63f 0%, #6aaa2a 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(141, 198, 63, 0.4);
  letter-spacing: 0.2px;
}

.cv2-btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(141, 198, 63, 0.5);
}

.cv2-wa-icon {
  font-size: 20px;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 576px) {
  #cartModalV2 .modal-dialog {
    margin: 8px;
    max-width: calc(100% - 16px);
  }

  .cv2-header {
    padding: 16px 18px 14px;
  }

  .cv2-product-card {
    gap: 10px;
    padding: 12px;
  }

  .cv2-product-img {
    width: 60px;
    height: 60px;
  }

  .cv2-contents-list {
    grid-template-columns: 1fr;
  }

  .cv2-form-row {
    grid-template-columns: 1fr;
    padding: 10px 16px 4px;
  }

  .cv2-btn-whatsapp {
    font-size: 14px;
    padding: 12px 16px;
  }

  .cv2-summary-total-row .cv2-summary-total-value {
    font-size: 16px;
  }
}

@media (max-width: 400px) {
  .cv2-product-actions {
    width: 100%;
    justify-content: space-between;
  }
}
