/* =========================================================
   Radius E-Commerce – Frontend Styles
   ========================================================= */

/* ── Base ──────────────────────────────────────────────── */
.rec-wrap { max-width: 1100px; margin: 0 auto; padding: 20px 16px; font-family: inherit; }

/* ── Buttons ───────────────────────────────────────────── */
.rec-btn {
    display: inline-block; padding: 11px 22px; border-radius: 6px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    border: 2px solid transparent; text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}
.rec-btn:active { transform: scale(0.97); }
.rec-btn-cart    { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.rec-btn-cart:hover { background: #1558b0; border-color: #1558b0; color: #fff; }
.rec-btn-buy     { background: #e65100; color: #fff; border-color: #e65100; }
.rec-btn-buy:hover { background: #bf360c; border-color: #bf360c; color: #fff; }
.rec-btn-checkout { display: block; width: 100%; text-align: center;
    background: #2e7d32; color: #fff; border-color: #2e7d32; padding: 14px; font-size: 17px; }
.rec-btn-checkout:hover { background: #1b5e20; border-color: #1b5e20; color: #fff; }
.rec-btn-secondary { background: #f5f5f5; color: #333; border-color: #ccc; }
.rec-btn-secondary:hover { background: #e0e0e0; color: #333; }
.rec-btn-icon { background: none; border: none; cursor: pointer; color: #e53935; font-size: 16px; padding: 4px 8px; }
.rec-btn-icon:hover { color: #b71c1c; }

/* ── Product buttons ───────────────────────────────────── */
.rec-product-actions {
    background: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 8px;
    padding: 20px; margin: 24px 0;
}
.rec-price-display { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.rec-price { font-size: 28px; font-weight: 700; color: #1a73e8; }
.rec-stock { font-size: 13px; padding: 3px 10px; border-radius: 12px; font-weight: 600; }
.rec-stock.in-stock { background: #e8f5e9; color: #2e7d32; }
.rec-stock.out-of-stock { background: #fce4ec; color: #c62828; }
.rec-qty-row { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.rec-qty-input { width: 70px; padding: 8px; border: 1px solid #ccc; border-radius: 5px; font-size: 15px; text-align: center; }
.rec-btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.rec-btn-row .rec-btn { flex: 1; min-width: 140px; text-align: center; }
.rec-atc-feedback { margin-top: 12px; padding: 10px 14px; border-radius: 5px; font-size: 14px; }
.rec-atc-feedback.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.rec-atc-feedback.error   { background: #fce4ec; color: #c62828; border: 1px solid #ef9a9a; }
.rec-sold-out { color: #c62828; font-weight: 600; }

/* ── Cart page ─────────────────────────────────────────── */
.rec-cart-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.rec-cart-table th, .rec-cart-table td { padding: 12px 10px; border-bottom: 1px solid #e0e0e0; }
.rec-cart-table thead th { background: #f5f5f5; font-weight: 700; text-align: left; }
.rec-cart-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; }
.rec-cart-qty { width: 65px; padding: 6px; border: 1px solid #ccc; border-radius: 4px; text-align: center; }
.rec-cart-actions { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.rec-cart-totals { margin-left: auto; max-width: 340px; background: #f9f9f9; border: 1px solid #e0e0e0; padding: 20px; border-radius: 8px; }
.rec-cart-totals table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.rec-cart-totals th, .rec-cart-totals td { padding: 9px 0; border-bottom: 1px solid #e9e9e9; }
.rec-cart-totals th { text-align: left; }
.rec-cart-totals td { text-align: right; }
.rec-total-row th, .rec-total-row td { font-size: 17px; border-bottom: 2px solid #ccc; }
.rec-empty-cart { text-align: center; padding: 60px 0; color: #888; }
.rec-empty-cart p { font-size: 20px; margin-bottom: 20px; }

/* ── Checkout ──────────────────────────────────────────── */
.rec-checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 40px; }
@media (max-width: 860px) { .rec-checkout-grid { grid-template-columns: 1fr; } }
.rec-billing-section h3, .rec-order-summary h3 { font-size: 18px; border-bottom: 2px solid #1a73e8; padding-bottom: 8px; margin-top: 0; margin-bottom: 18px; }
.rec-form-row { margin-bottom: 16px; }
.rec-form-row label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 14px; }
.rec-form-row input, .rec-form-row textarea, .rec-form-row select {
    width: 100%; padding: 10px 12px; border: 1px solid #ccc; border-radius: 6px;
    font-size: 15px; box-sizing: border-box; font-family: inherit;
}
.rec-form-row input:focus, .rec-form-row textarea:focus { border-color: #1a73e8; outline: none; box-shadow: 0 0 0 3px rgba(26,115,232,0.15); }
.rec-form-row-half { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rec-payment-methods { margin-top: 10px; }
.rec-payment-option { display: block; background: #fff; border: 2px solid #e0e0e0; border-radius: 8px;
    padding: 14px 16px; margin-bottom: 10px; cursor: pointer; transition: border-color 0.15s; }
.rec-payment-option:hover { border-color: #1a73e8; }
.rec-payment-option input[type="radio"] { margin-right: 10px; }
.rec-payment-panel, .rec-notice { background: #fff8e1; border: 1px solid #ffe082; border-radius: 6px; padding: 14px; margin: -4px 0 12px; font-size: 14px; }
.rec-stripe-panel { background: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 6px; padding: 16px; margin: -4px 0 12px; }
.rec-card-element { padding: 10px; background: #fff; border: 1px solid #ccc; border-radius: 5px; }
.rec-order-summary { background: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 10px; padding: 24px; align-self: start; }
.rec-summary-table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.rec-summary-table th, .rec-summary-table td { padding: 9px 6px; border-bottom: 1px solid #e0e0e0; font-size: 14px; }
.rec-summary-table tfoot .rec-total-row th, .rec-summary-table tfoot .rec-total-row td { font-size: 16px; font-weight: 700; border-top: 2px solid #ccc; border-bottom: none; }
.rec-secure-note { text-align: center; font-size: 12px; color: #888; margin-top: 10px; }
.rec-errors { background: #fce4ec; border: 1px solid #ef9a9a; color: #c62828; border-radius: 6px; padding: 12px 16px; margin-bottom: 14px; font-size: 14px; }
.rec-errors ul { margin: 0; padding-left: 18px; }

/* ── Order received ────────────────────────────────────── */
.rec-order-received { text-align: center; }
.rec-success-icon { font-size: 64px; margin-bottom: 8px; }
.rec-order-meta { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap;
    background: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 8px;
    padding: 20px; margin: 24px auto; max-width: 600px; }
.rec-order-meta div { text-align: center; }
.rec-order-meta span { display: block; font-size: 12px; color: #888; margin-bottom: 4px; }
.rec-order-meta strong { font-size: 16px; }
.rec-confirm-note { color: #555; margin: 20px 0; }
.rec-order-received .rec-summary-table { max-width: 600px; margin: 0 auto 20px; text-align: left; }

/* ── My Orders ─────────────────────────────────────────── */
.rec-orders-table { width: 100%; border-collapse: collapse; }
.rec-orders-table th, .rec-orders-table td { padding: 12px 10px; border-bottom: 1px solid #e0e0e0; text-align: left; }
.rec-orders-table thead th { background: #f5f5f5; font-weight: 700; }
.rec-status { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.rec-status-pending    { background: #fff3cd; color: #856404; }
.rec-status-processing { background: #cce5ff; color: #004085; }
.rec-status-completed  { background: #d4edda; color: #155724; }
.rec-status-cancelled  { background: #f8d7da; color: #721c24; }
.rec-status-on-hold    { background: #e2d9f3; color: #432874; }
.rec-status-refunded   { background: #f5c6cb; color: #721c24; }

/* ── Cart icon ─────────────────────────────────────────── */
.rec-cart-icon-link { position: relative; display: inline-flex; align-items: center; gap: 6px;
    text-decoration: none; color: inherit; padding: 6px; }
.rec-cart-count { background: #e53935; color: #fff; border-radius: 50%; width: 20px; height: 20px;
    font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.rec-cart-count[data-count="0"] { display: none; }

/* ── Loading state ─────────────────────────────────────── */
.rec-loading { opacity: 0.6; pointer-events: none; cursor: wait; }
.rec-btn.loading::after { content: ' ⏳'; }
