/* =========================================================
   50-cart.css — BeautyTrouvailles Cart Section
   Version: 3.0 — Premium CTAs, No Theme Conflicts
   
   Contents:
   1. Cart Container
   2. Quantity Controls
   3. Buttons Row
   4. Primary CTA (Add to Cart)
   5. WhatsApp CTA
   6. Secondary Actions
   7. Payment Section
   ========================================================= */

/* =========================
   1. CART CONTAINER
   ========================= */
.bt-custom-product-page .bt-cart-section {
  padding: var(--bt-card-padding);
  border-radius: var(--bt-card-radius);
  background: var(--bt-bg-card);
  border: var(--bt-card-border);
  box-shadow: var(--bt-shadow-card);
}

.bt-custom-product-page .bt-cart-form {
  display: grid;
  gap: var(--bt-space-4);
}

/* =========================
   2. QUANTITY CONTROLS
   ========================= */
.bt-custom-product-page .bt-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bt-space-4);
}

.bt-custom-product-page .bt-qty-label {
  font-weight: 900;
  font-size: var(--bt-text-md);
  color: var(--bt-navy);
}

.bt-custom-product-page .bt-qty-wrapper {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: var(--bt-radius-full);
  overflow: hidden;
  background: var(--bt-bg-card);
  box-shadow: var(--bt-shadow-xs);
}

.bt-custom-product-page .bt-qty-btn {
  width: 46px;
  height: 42px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--bt-navy);
  transition: background var(--bt-transition-fast),
              transform var(--bt-transition-fast);
}

.bt-custom-product-page .bt-qty-btn svg {
  width: 16px;
  height: 16px;
}

.bt-custom-product-page .bt-qty-btn:hover {
  background: rgba(17, 24, 39, 0.04);
}

.bt-custom-product-page .bt-qty-btn:active {
  transform: scale(0.95);
}

.bt-custom-product-page .bt-qty-input {
  width: 56px;
  height: 42px;
  border: none;
  outline: none;
  text-align: center;
  font-weight: 900;
  font-size: var(--bt-text-md);
  color: var(--bt-navy);
  background: transparent;
  -moz-appearance: textfield;
}

.bt-custom-product-page .bt-qty-input::-webkit-outer-spin-button,
.bt-custom-product-page .bt-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* =========================
   3. BUTTONS WRAPPER
   Contains both Add to Cart + WhatsApp
   ========================= */
.bt-custom-product-page .bt-buttons-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--bt-space-5); /* 20px consistent gap */
}

/* Kill any WooCommerce default margins */
.bt-custom-product-page .bt-buttons-wrapper > * {
  margin: 0 !important;
}

/* Legacy class support */
.bt-custom-product-page .bt-buttons-row {
  display: contents; /* Let children flow into parent flex */
}

/* Base button reset for cart section */
.bt-custom-product-page .bt-cart-section button,
.bt-custom-product-page .bt-cart-section .button,
.bt-custom-product-page .bt-cart-section a.bt-btn {
  font-family: var(--bt-font-body);
  font-weight: 900;
  line-height: var(--bt-leading-tight);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Shared button base */
.bt-custom-product-page .bt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--bt-space-3);
  
  width: 100%;
  min-height: var(--bt-btn-height-lg);
  padding: var(--bt-space-4);
  border: none;
  border-radius: var(--bt-radius-full);
  
  font-weight: 900;
  transition: transform var(--bt-transition-base),
              box-shadow var(--bt-transition-base),
              filter var(--bt-transition-base);
  will-change: transform, box-shadow, filter;
  /* GPU acceleration */
  transform: translateZ(0);
  contain: layout style paint;
}

.bt-custom-product-page .bt-btn:hover {
  transform: translateY(-2px);
}

.bt-custom-product-page .bt-btn:active {
  transform: translateY(0);
}

/* =========================
   4. PRIMARY CTA — ADD TO CART
   Three-column grid: icon | label | price
   ========================= */
.bt-custom-product-page .bt-btn-cart {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: var(--bt-space-3);
  
  background: linear-gradient(90deg, var(--bt-pink), var(--bt-pink-2));
  color: #fff;
  box-shadow: var(--bt-shadow-pink);
  
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bt-custom-product-page .bt-btn-cart:hover {
  box-shadow: var(--bt-shadow-pink-lg);
  filter: brightness(1.05);
}

.bt-custom-product-page .bt-btn-cart:active {
  filter: brightness(0.98);
  box-shadow: 0 12px 24px var(--bt-pink-glow);
}

.bt-custom-product-page .bt-btn-cart:focus-visible {
  outline: 3px solid rgba(212, 20, 90, 0.3);
  outline-offset: 3px;
}

/* Cart icon */
.bt-custom-product-page .bt-btn-cart i {
  justify-self: start;
  font-size: var(--bt-text-lg);
  line-height: 1;
}

/* Cart label */
.bt-custom-product-page .bt-btn-cart > span:first-of-type {
  justify-self: center;
  font-size: var(--bt-text-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Price chip */
.bt-custom-product-page .bt-btn-price {
  justify-self: end;
  padding: 7px 12px;
  border-radius: var(--bt-radius-full);
  
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  
  font-weight: 900;
  font-size: var(--bt-text-sm);
  letter-spacing: 0.2px;
  white-space: nowrap;
  line-height: 1;
}

/* =========================
   5. WHATSAPP CTA
   ========================= */
.bt-custom-product-page .bt-btn-whatsapp {
  background: linear-gradient(90deg, #25D366, #16A34A);
  color: #fff;
  box-shadow: 0 16px 32px rgba(22, 163, 74, 0.2);
}

.bt-custom-product-page .bt-btn-whatsapp:hover {
  box-shadow: 0 20px 40px rgba(22, 163, 74, 0.25);
  filter: brightness(1.05);
}

.bt-custom-product-page .bt-btn-whatsapp:active {
  filter: brightness(0.98);
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.2);
}

.bt-custom-product-page .bt-btn-whatsapp:focus-visible {
  outline: 3px solid rgba(34, 197, 94, 0.3);
  outline-offset: 3px;
}

.bt-custom-product-page .bt-btn-whatsapp svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.bt-custom-product-page .bt-btn-whatsapp span {
  font-size: var(--bt-text-md);
  letter-spacing: 0.1px;
}

/* =========================
   6. SECONDARY ACTIONS
   Wishlist & Share
   ========================= */
.bt-custom-product-page .bt-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--bt-space-3);
  margin-top: var(--bt-space-5); /* 20px - more separation from WhatsApp */
}

.bt-custom-product-page .bt-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--bt-space-2);
  
  padding: var(--bt-space-3) var(--bt-space-4);
  border-radius: var(--bt-radius-lg);
  border: 1px solid var(--bt-border);
  background: var(--bt-bg-card);
  
  font-weight: 900;
  font-size: var(--bt-text-sm);
  color: var(--bt-navy);
  cursor: pointer;
  
  transition: transform var(--bt-transition-base),
              box-shadow var(--bt-transition-base),
              border-color var(--bt-transition-base);
  will-change: transform, box-shadow, border-color;
  /* GPU acceleration */
  transform: translateZ(0);
  contain: layout style paint;
}

.bt-custom-product-page .bt-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--bt-shadow-md);
  border-color: var(--bt-pink-border);
}

.bt-custom-product-page .bt-action-btn:focus-visible {
  outline: 2px solid var(--bt-pink);
  outline-offset: 2px;
}

.bt-custom-product-page .bt-action-btn i {
  font-size: var(--bt-text-base);
  color: var(--bt-pink);
  transition: transform var(--bt-transition-fast);
}

.bt-custom-product-page .bt-wishlist-btn.active i,
.bt-custom-product-page .bt-wishlist-btn:hover i {
  transform: scale(1.15);
}

/* =========================
   7. PAYMENT SECTION
   ========================= */
.bt-custom-product-page .bt-payment-section {
  margin-top: var(--bt-space-4);
  padding: var(--bt-space-4);
  border-radius: var(--bt-radius-lg);
  border: 1px solid var(--bt-border);
  background: var(--bt-bg-card);
}

.bt-custom-product-page .bt-payment-title {
  margin-bottom: var(--bt-space-3);
  font-weight: 900;
  font-size: var(--bt-text-sm);
  color: var(--bt-navy);
}

.bt-custom-product-page .bt-payment-icons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bt-space-3);
}

.bt-custom-product-page .bt-payment-icon {
  display: inline-flex;
  align-items: center;
  gap: var(--bt-space-2);
  
  padding: var(--bt-space-2) var(--bt-space-3);
  border-radius: var(--bt-radius-lg);
  border: 1px solid var(--bt-border);
  background: rgba(26, 26, 46, 0.03);
  
  font-weight: 800;
  font-size: var(--bt-text-sm);
  color: var(--bt-navy);
}

.bt-custom-product-page .bt-payment-icon i {
  color: var(--bt-pink);
}

/* =========================
   8. OUT OF STOCK STATE
   ========================= */
.bt-custom-product-page .bt-out-of-stock-notice {
  display: flex;
  flex-direction: column;
  gap: var(--bt-space-4);
}

.bt-custom-product-page .bt-btn-out-of-stock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--bt-space-3);
  
  width: 100%;
  min-height: var(--bt-btn-height-lg);
  padding: var(--bt-space-4);
  border: 2px dashed rgba(17, 24, 39, 0.2);
  border-radius: var(--bt-radius-full);
  
  background: var(--bt-bg-soft);
  color: var(--bt-muted);
  font-weight: 800;
  font-size: var(--bt-text-md);
  
  cursor: not-allowed;
}

.bt-custom-product-page .bt-btn-out-of-stock i {
  font-size: var(--bt-text-lg);
}

/* Notify Me button (optional waitlist) */
.bt-custom-product-page .bt-btn-notify {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--bt-space-3);
  
  width: 100%;
  min-height: var(--bt-btn-height);
  padding: var(--bt-space-4);
  border: 2px solid var(--bt-pink);
  border-radius: var(--bt-radius-full);
  
  background: transparent;
  color: var(--bt-pink);
  font-weight: 900;
  font-size: var(--bt-text-sm);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  
  cursor: pointer;
  transition: background var(--bt-transition-base),
              color var(--bt-transition-base);
}

.bt-custom-product-page .bt-btn-notify:hover {
  background: var(--bt-pink);
  color: #fff;
}

.bt-custom-product-page .bt-btn-notify i {
  font-size: var(--bt-text-lg);
}

/* Hide quantity row via body class */
.bt-out-of-stock .bt-qty-row {
  display: none;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 767px) {
  .bt-custom-product-page .bt-qty-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .bt-custom-product-page .bt-cart-section {
    padding: var(--bt-space-4);
  }
  
  .bt-custom-product-page .bt-btn-cart {
    grid-template-columns: 20px 1fr auto;
    gap: var(--bt-space-2);
    padding: var(--bt-space-4) var(--bt-space-3);
  }
  
  .bt-custom-product-page .bt-btn-cart > span:first-of-type {
    font-size: var(--bt-text-xs);
  }
  
  .bt-custom-product-page .bt-btn-price {
    padding: 6px 10px;
    font-size: var(--bt-text-xs);
  }
  
  .bt-custom-product-page .bt-secondary-actions {
    grid-template-columns: 1fr;
  }
}