/**
 * TFC Point Redemption Catalog - Frontend Styles
 *
 * @package TFC_Point_Redemption
 */

/* ====================================
   Rewards Catalog Container
   ==================================== */

.tfc-rewards-catalog {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ====================================
   Rewards Catalog Header
   ==================================== */

.tfc-rewards-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 40px;
}

.tfc-points-display {
    text-align: center;
    color: white;
}

.tfc-points-display .tfc-points-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.8;
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #ffffff;
}

.tfc-points-display .tfc-points-value {
    font-size: 42px;
    font-weight: bold;
    line-height: 1;
    color: #ffffff;
}

.tfc-points-display .tfc-points-unit {
    font-size: 16px;
    font-weight: normal;
    opacity: 0.8;
    margin-left: 8px;
    color: #ffffff;
}

/* ====================================
   Login Prompt
   ==================================== */

.tfc-login-prompt {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-bottom: 40px;
}

.tfc-login-prompt p {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 20px;
}

.tfc-login-prompt .button {
    background: #1a1a1a;
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.tfc-login-prompt .button:hover {
    background: #2d2d2d;
    transform: translateY(-2px);
}

/* ====================================
   Products Grid
   ==================================== */

.tfc-rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.tfc-rewards-grid[data-columns="2"] {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

.tfc-rewards-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* ====================================
   Reward Item Card
   ==================================== */

.tfc-reward-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.tfc-reward-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.tfc-reward-item.insufficient-points {
    opacity: 0.6;
}

.tfc-reward-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f8f9fa;
}

.tfc-reward-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.tfc-reward-item:hover .tfc-reward-image img {
    transform: scale(1.05);
}

.tfc-out-of-stock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

/* ====================================
   Reward Info
   ==================================== */

.tfc-reward-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tfc-reward-title {
    font-size: 18px;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.tfc-reward-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s;
}

.tfc-reward-title a:hover {
    color: #1a1a1a;
}

.tfc-reward-excerpt {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.6;
    flex-grow: 1;
}

.tfc-reward-price {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 15px;
}

.tfc-reward-price .tfc-points-amount {
    font-size: 28px;
    font-weight: bold;
    color: #1a1a1a;
}

.tfc-reward-price .tfc-points-label {
    font-size: 14px;
    color: #6c757d;
    margin-left: 5px;
}

/* ====================================
   Action Buttons
   ==================================== */

.tfc-reward-action {
    margin-top: auto;
}

.tfc-reward-action .button {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.tfc-redeem-button {
    background: #1a1a1a;
    color: white !important;
}

.tfc-redeem-button:hover {
    background: #2d2d2d;
    transform: translateY(-2px);
}

.tfc-login-button {
    background: #6c757d;
    color: white !important;
}

.tfc-login-button:hover {
    background: #5a6268;
}

.tfc-insufficient-button {
    background: #e9ecef;
    color: #6c757d !important;
    cursor: not-allowed;
}

.button.disabled {
    background: #e9ecef;
    color: #6c757d !important;
    cursor: not-allowed;
}

.tfc-points-needed {
    font-size: 12px;
    color: #dc3545;
    text-align: center;
    margin-top: 8px;
    margin-bottom: 0;
}

/* ====================================
   Product Page Redemption Info
   ==================================== */

.tfc-redemption-info {
    background: #f7f9fc;
    border: 2px solid #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.tfc-your-points {
    font-size: 16px;
    margin-bottom: 10px;
}

.tfc-insufficient-points.warning {
    color: #dc2626;
    padding: 10px;
    background: #fef2f2;
    border-radius: 6px;
    margin: 10px 0 0 0;
}

.tfc-can-redeem.success {
    color: #059669;
    padding: 10px;
    background: #ecfdf5;
    border-radius: 6px;
    margin: 10px 0 0 0;
}

.tfc-redemption-notice {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 15px;
    margin-bottom: 20px;
}

/* ====================================
   Redemption Badge
   ==================================== */

.tfc-redemption-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ====================================
   Points Price Display
   ==================================== */

.tfc-points-price {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-block;
    font-size: 18px;
}

.tfc-cart-points-price {
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 600;
}

/* ====================================
   Cart Points Info
   ==================================== */

.tfc-points-deduction td,
.tfc-points-balance td,
.tfc-points-after td {
    font-size: 15px;
    padding: 10px;
}

.tfc-points-after td strong {
    color: #10b981;
    font-size: 18px;
}

/* ====================================
   No Products
   ==================================== */

.tfc-no-products {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
}

.tfc-no-products p {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}

/* ====================================
   Responsive Design
   ==================================== */

@media (max-width: 1024px) {
    .tfc-rewards-grid,
    .tfc-rewards-grid[data-columns="2"],
    .tfc-rewards-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .tfc-rewards-grid,
    .tfc-rewards-grid[data-columns="2"],
    .tfc-rewards-grid[data-columns="4"] {
        grid-template-columns: 1fr;
    }
    
    .tfc-points-display .tfc-points-value {
        font-size: 36px;
    }
    
    .tfc-rewards-header {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .tfc-rewards-catalog {
        padding: 10px;
    }
    
    .tfc-reward-item {
        border-radius: 8px;
    }
    
    .tfc-reward-info {
        padding: 15px;
    }
    
    .tfc-reward-price .tfc-points-amount {
        font-size: 24px;
    }
}