/* ═══════════════════════════════════════════════════════════════
   reward.css — shared styles for reward_products &
                reward_product_details pages
   Place at:  public/assets/css/reward.css
   ═══════════════════════════════════════════════════════════════ */

/* ── Palette variables ────────────────────────────────────────── */
:root {
    --reward-gold:  #ffc107;
    --reward-dark:  #856404;
    --reward-light: #fff3cd;
    --reward-mid:   #ffe8a1;
}

/* ── Sidebar balance panel ────────────────────────────────────── */
.reward-balance-panel {
    margin-bottom: 20px;
    border: 2px solid var(--reward-gold) !important;
    border-radius: 6px;
    overflow: hidden;
}
.reward-balance-body {
    background: linear-gradient(135deg, var(--reward-light) 0%, var(--reward-mid) 100%);
    text-align: center;
    padding: 18px 15px;
}
.reward-coin-icon {
    font-size: 28px;
    color: var(--reward-dark);
    margin-bottom: 6px;
}
.reward-balance-label {
    margin: 0 0 8px;
    color: var(--reward-dark);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.reward-balance-amount {
    color: var(--reward-dark);
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
}
.reward-balance-sub {
    color: var(--reward-dark);
    font-size: 12px;
}

/* ── Filter button ────────────────────────────────────────────── */
.reward-filter-btn { text-align: left; }

/* ── Grid subtitle ────────────────────────────────────────────── */
.reward-subtitle {
    color: var(--reward-dark);
    margin-bottom: 20px;
}

/* ── Points price tag (catalog cards) ────────────────────────── */
.reward-price-tag {
    color: var(--reward-gold) !important;
    font-weight: 700;
    margin-top: 10px;
    margin-bottom: 6px;
    flex-shrink: 0;
}

/* ── Brand name under card title ──────────────────────────────── */
.reward-brand-name {
    color: #999;
    font-size: 12px;
    margin: 2px 0 8px;
    min-height: 18px;   /* reserves space even when no brand */
}

/* ── Stock badges (catalog cards) ────────────────────────────── */
.reward-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 12px;
}
.badge-out { background: #dc3545; color: #fff; }
.badge-low { background: var(--reward-gold); color: var(--reward-dark); }

/* ── Uniform card height (catalog grid) ──────────────────────── */
.features_items .product-image-wrapper {
    margin-bottom: 20px;
}
.features_items .single-products {
    height: 100%;
}
.features_items .productinfo {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    min-height: 520px;
    padding-bottom: 15px;
}
.features_items .product-image-container {
    flex-shrink: 0;
}
.features_items .productinfo > p {
    flex-shrink: 0;
}
/* spacer eats leftover vertical space → buttons always at bottom */
.features_items .reward-btn-spacer {
    flex: 1 1 auto;
}
/* both catalog buttons full-width and aligned */
.features_items .reward-card-btn {
    display: block;
    width: 100%;
    margin-top: 6px;
    box-sizing: border-box;
    text-align: center;
}

/* ── Empty state ──────────────────────────────────────────────── */
.reward-empty { margin: 50px 0; }

/* ── Detail page: points price ────────────────────────────────── */
.reward-detail-price {
    display: block;
    margin: 20px 0;
    color: var(--reward-gold);
    font-size: 32px;
    font-weight: 700;
}

/* ── Detail page: points calculation box ─────────────────────── */
.reward-points-info {
    margin: 15px 0;
    padding: 15px;
    background-color: var(--reward-light);
    border-left: 4px solid var(--reward-gold);
    border-radius: 4px;
}
.reward-calc-title {
    color: var(--reward-dark);
    margin-top: 0;
    font-size: 15px;
}
.reward-calc-table {
    width: 100%;
    color: var(--reward-dark);
}
.reward-calc-value {
    text-align: right;
    font-size: 18px;
    font-weight: 700;
}
.reward-calc-minus       { color: #dc3545; }
.reward-calc-result-row  { border-top: 2px solid var(--reward-gold); }
.result-positive         { color: #28a745; }
.result-negative         { color: #dc3545; }

/* ── Detail page: exchange button ─────────────────────────────── */
.reward-detail-btn {
    display: block;
    width: 100%;
    margin-top: 5px;
    font-size: 14px;
    padding: 8px 12px;
    box-sizing: border-box;
    text-align: center;
}

/* ── Disabled buttons ─────────────────────────────────────────── */
.btn[disabled],
.btn.add-to-cart[disabled] {
    opacity: .65;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Confirmation modal ───────────────────────────────────────── */
.reward-modal-header {
    background: linear-gradient(135deg, var(--reward-light) 0%, var(--reward-mid) 100%);
    border-bottom: 2px solid var(--reward-gold);
}
.reward-modal-header .modal-title { color: var(--reward-dark); }

.reward-modal-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}
.reward-modal-price {
    color: var(--reward-gold);
    font-size: 24px;
    font-weight: 700;
}
.reward-modal-meta {
    font-size: 14px;
    color: #6c757d;
    margin: 4px 0;
}