/* eSIM Price Comparison - Main Styles */
:root {
    --esim-primary: #1a1a2e;
    --esim-accent: #6B4EFF;
    --esim-best: #f59e0b;
    --esim-card-bg: #ffffff;
    --esim-border: #e5e7eb;
    --esim-text: #1f2937;
    --esim-muted: #6b7280;
    --esim-radius: 14px;
    --esim-shadow: 0 2px 16px rgba(0,0,0,0.08);
    --esim-shadow-hover: 0 8px 32px rgba(107, 78, 255, 0.18);
}

/* ===== Wrapper ===== */
.esim-comparison-wrap,
.esim-best-deals-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--esim-text);
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== Section Title ===== */
.esim-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--esim-primary);
}

/* ===== Filter Bar ===== */
.esim-filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.esim-filter-btn {
    padding: 8px 20px;
    border-radius: 999px;
    border: 2px solid var(--esim-border);
    background: #fff;
    color: var(--esim-muted);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.esim-filter-btn:hover {
    border-color: var(--esim-accent);
    color: var(--esim-accent);
}

.esim-filter-btn.active {
    background: var(--esim-accent);
    border-color: var(--esim-accent);
    color: #fff;
}

/* ===== Validity Group ===== */
.esim-validity-group {
    margin-bottom: 40px;
}

.esim-validity-heading {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.esim-validity-badge {
    background: linear-gradient(135deg, #6B4EFF, #a78bfa);
    color: #fff;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ===== Plan Section (data vs unlimited) ===== */
.esim-plan-section {
    margin-bottom: 24px;
}

.esim-plan-type-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--esim-muted);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Cards Grid ===== */
.esim-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.esim-cards--best {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* ===== Card ===== */
.esim-card {
    background: var(--esim-card-bg);
    border-radius: var(--esim-radius);
    border: 1.5px solid var(--esim-border);
    box-shadow: var(--esim-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.esim-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--esim-shadow-hover);
}

.esim-card--best {
    border-color: var(--esim-best);
    box-shadow: 0 4px 24px rgba(245, 158, 11, 0.2);
}

/* ===== Best Price Badge ===== */
.esim-best-badge {
    position: absolute;
    top: -1px;
    right: 12px;
    background: var(--esim-best);
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 0 0 8px 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

/* ===== Card Provider Header ===== */
.esim-card-provider {
    padding: 14px 16px 10px;
    background: #fafafa;
}

.esim-provider-name {
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

/* ===== Card Body ===== */
.esim-card-body {
    padding: 12px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.esim-data-amount {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--esim-primary);
    line-height: 1;
}

.esim-validity {
    font-size: 0.875rem;
    color: var(--esim-muted);
    font-weight: 500;
}

.esim-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: 6px;
}

.esim-price-amount {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--esim-primary);
    line-height: 1;
}

.esim-price-currency {
    font-size: 0.75rem;
    color: var(--esim-muted);
    font-weight: 600;
}

.esim-per-day {
    font-size: 0.8rem;
    color: var(--esim-muted);
}

/* ===== Plan Type Tags ===== */
.esim-type-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-top: 4px;
    width: fit-content;
}

.esim-type-unlimited {
    background: #e0e7ff;
    color: #4338ca;
}

.esim-type-data {
    background: #dcfce7;
    color: #166534;
}

/* ===== Card Footer / Buy Button ===== */
.esim-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--esim-border);
}

.esim-buy-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #6B4EFF, #818cf8);
    color: #fff !important;
    text-decoration: none !important;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
    transition: opacity 0.2s, transform 0.1s;
}

.esim-buy-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
    color: #fff !important;
}

/* ===== Notices ===== */
.esim-updated-notice {
    font-size: 0.8rem;
    color: var(--esim-muted);
    margin-top: 20px;
    text-align: center;
}

.esim-disclaimer-link {
    color: var(--esim-muted);
    text-decoration: underline dotted;
}

.esim-no-data {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 16px 20px;
    color: #92400e;
}

/* ===== Hidden / Filtered ===== */
.esim-card.esim-hidden {
    display: none;
}

.esim-validity-group.esim-group-hidden {
    display: none;
}

/* ===== Dark mode support ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --esim-card-bg: #1e1e2e;
        --esim-border: #374151;
        --esim-text: #f9fafb;
        --esim-muted: #9ca3af;
    }
    .esim-card-provider { background: #16162a; }
    .esim-filter-btn { background: #1e1e2e; color: #9ca3af; }
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .esim-cards,
    .esim-cards--best {
        grid-template-columns: 1fr 1fr;
    }
    .esim-section-title { font-size: 1.4rem; }
    .esim-price-amount { font-size: 1.5rem; }
    .esim-data-amount  { font-size: 1.3rem; }
}

@media (max-width: 400px) {
    .esim-cards,
    .esim-cards--best {
        grid-template-columns: 1fr;
    }
}
