/* =========================================================
   Quantity — Tokens / Component / Utilities
   - No ID selectors
   - No !important
   - Token-based sizing mapped to nova-ui
   ========================================================= */

/* ===== Tokens (local) ===== */
.enhanced-product-card { --qty-h: var(--control-h-xl); --qty-gap: 16px; --qty-font: 0.9rem; }

/* ===== Component ===== */
.enhanced-product-card .card-title { font-weight: 700; color: var(--color-text, #3d2f1e); line-height: 1.3; text-shadow: 0 1px 2px rgba(0,0,0,0.05); margin-bottom: 16px; }

/* Hide stock quantity display under size chooser (scoped) */
.enhanced-product-card .stock-badge { display: none; }

/* Description block */
.enhanced-product-card .description-section { background: rgba(255,255,255,0.4); border-radius: var(--radius, 16px); padding: 20px; margin-bottom: 28px; border-left: 4px solid rgba(212,175,55,0.6); }
.enhanced-product-card .description-title { font-size: 1.1rem; font-weight: 600; color: var(--color-gold, #D4AF37); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.enhanced-product-card .description-text { color: rgba(61,47,30,0.85); font-size: 1rem; line-height: 1.6; margin: 0; }

/* Size + Stock row */
.enhanced-product-card .size-stock-row { display: flex; align-items: end; gap: var(--qty-gap); }
.enhanced-product-card .size-selector { flex-grow: 1; min-width: 0; }
.enhanced-product-card .stock-status { flex-shrink: 0; display: flex; flex-direction: column; }

/* Stock badge dimensions (leverage global badge styles) */
.enhanced-product-card .size-stock-row .stock-badge,
.enhanced-product-card .stock-status .stock-badge { display: inline-flex; align-items: center; justify-content: center; height: var(--qty-h); min-height: var(--qty-h); padding: 10px 16px; border-radius: var(--radius, 16px); font-weight: 600; font-size: var(--qty-font); line-height: 1; gap: 6px; white-space: nowrap; }
.enhanced-product-card .stock-badge i { font-size: 1.1em; }

/* Form layout */
.enhanced-product-card .form-section { margin-bottom: 24px; }

/* Actions: quantity beside submit */
.enhanced-product-card .action-section { display: flex; align-items: end; gap: 20px; margin-top: 32px; }
.enhanced-product-card .quantity-controls { flex-shrink: 0; min-width: 160px; }
.enhanced-product-card .submit-controls { flex-grow: 1; display: flex; flex-direction: column; justify-content: flex-end; min-height: calc(var(--qty-h) + 1rem + 0.5rem); }

/* Input group integration */
.enhanced-product-card .input-group { border-radius: var(--radius, 16px); overflow: hidden; box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2); height: var(--qty-h); max-height: var(--qty-h); display: flex; align-items: center; }
.enhanced-product-card .input-group .nova-btn { --btn-h: var(--qty-h); min-width: var(--qty-h); padding: 0; height: var(--qty-h); display: flex; align-items: center; justify-content: center; }
.enhanced-product-card .input-group .nova-btn:first-child { border-radius: var(--radius, 16px) 0 0 var(--radius, 16px); }
.enhanced-product-card .input-group .nova-btn:last-child { border-radius: 0 var(--radius, 16px) var(--radius, 16px) 0; }

/* Quantity input (class-based) */
.enhanced-product-card .custom-qty-input { height: var(--qty-h); min-height: var(--qty-h); max-height: var(--qty-h); width: 80px; text-align: center; border: none; border-top: 1px solid rgba(212,175,55,.4); border-bottom: 1px solid rgba(212,175,55,.4); border-left: none; border-right: none; border-radius: 0; font-size: var(--qty-font); font-weight: 500; padding: 0 12px; background: rgba(212, 175, 55, 0.1); color: var(--color-text, #3d2f1e); outline: none; box-shadow: none; appearance: textfield; line-height: 1; box-sizing: border-box; }
.enhanced-product-card .custom-qty-input:focus { background: rgba(212, 175, 55, 0.1); border-color: rgba(212,175,55,.7); border-top-color: rgba(212,175,55,.7); border-bottom-color: rgba(212,175,55,.7); box-shadow: 0 0 0 2px rgba(212,175,55,.25); }
.enhanced-product-card .custom-qty-input::-webkit-outer-spin-button,
.enhanced-product-card .custom-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Submit button sizing */
.enhanced-product-card .submit-btn { width: 100%; font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; --btn-h: var(--qty-h); height: var(--qty-h); min-height: var(--qty-h); }
.enhanced-product-card .submit-btn i { font-size: 1.3em; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .enhanced-product-card .input-group { height: var(--qty-h); max-height: var(--qty-h); }
  .enhanced-product-card .input-group .nova-btn { --btn-h: var(--qty-h); height: var(--qty-h); min-width: var(--qty-h); }
  .enhanced-product-card .custom-qty-input { height: var(--qty-h); min-height: var(--qty-h); max-height: var(--qty-h); font-size: 15px; }
  .enhanced-product-card .submit-btn { --btn-h: var(--qty-h); height: var(--qty-h); }
  .enhanced-product-card .size-stock-row { gap: 12px; }
  .enhanced-product-card .size-select { min-height: var(--qty-h); padding: 11px 16px; font-size: 15px; }
}
@media (max-width: 576px) {
  .enhanced-product-card .action-section { flex-direction: row; align-items: end; gap: 8px; }
  .enhanced-product-card .quantity-controls { flex-shrink: 0; min-width: auto; }
  .enhanced-product-card .submit-controls { flex-grow: 1; }
  .enhanced-product-card .submit-btn .submit-text { display: none; }
  .enhanced-product-card .submit-btn { min-width: var(--qty-h); padding: 0 8px; font-size: 1.2rem; }
  .enhanced-product-card .size-stock-row { flex-direction: row; align-items: end; gap: 8px; }
  .enhanced-product-card .stock-status { flex-shrink: 0; }
  .enhanced-product-card .stock-status .form-label { display: none; }
  .enhanced-product-card .stock-status .stock-badge,
  .enhanced-product-card .size-stock-row .stock-badge { font-size: 0.85rem; padding: 8px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1; }
  .enhanced-product-card .size-select { min-height: var(--qty-h); padding: 12px 16px; font-size: 16px; }
}

/* ===== Product Page — Live Stock UI ===== */
/* Qty panels visibility (now JS toggles .active) */
.qty-panel { display: none; }
.qty-panel.active { display: block; }

/* Badges used to display live stock status */
.badge-stock { display:inline-block; padding:.25rem .5rem; border-radius:.5rem; background:rgba(25,135,84,.1); color: #198754; }
.badge-out   { display:inline-block; padding:.25rem .5rem; border-radius:.5rem; background:rgba(220,53,69,.1); color: #dc3545; }

/* Ensure badges inside qty panels are visible within enhanced card */
.enhanced-product-card .qty-panel .stock-badge { display: inline-block; }
