/* ═══════════════════════════════════════════
   PRICING PAGE — Redesign
═══════════════════════════════════════════ */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes dots {
    0%, 20% { content: ''; }
    40%      { content: '.'; }
    60%      { content: '..'; }
    80%,100% { content: '...'; }
}

body {
    font-family: var(--font-family);
    background: #f1f5f9;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* ── Hero strip ── */





/* ── Page container ── */
.pr-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 24px 48px;
    animation: fadeUp 0.35s ease;
}

/* ── Section heading ── */
.pr-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 12px;
}

.pr-section-head::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Stats grid ── */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s, transform 0.15s;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    /* overridden inline per card */
}

.stat-label {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* ── Operational costs ── */
.op-costs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.op-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}

.op-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.op-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* keep .op-icon for any JS that uses it */
.op-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.op-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 3px;
}

.op-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
}

/* ── Info banner ── */
.info-banner {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #3730a3;
    line-height: 1.7;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.info-banner strong { color: #312e81; }
.info-banner-icon { font-size: 16px; flex-shrink: 0; margin-top: 2px; }

/* ── Controls bar ── */
.controls-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
}

/* SVG icon in search */
.search-icon-svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* old emoji search icon */
.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--text-primary);
    background: #f9fafb;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    box-sizing: border-box;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.filter-select,
.sort-select {
    padding: 9px 32px 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13.5px;
    font-family: inherit;
    background: #f9fafb;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.filter-select:focus,
.sort-select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.results-count {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* ── Loading / Error / Empty ── */
.state-box {
    text-align: center;
    padding: 56px 24px;
    color: var(--text-muted);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}

.state-box h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.state-box p {
    font-size: 13.5px;
    margin: 0;
}

.pr-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

.error-box {
    background: #fee2e2;
    color: #b91c1c;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid #fca5a5;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
}

/* ── Platform Grid ── */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 4px;
}

/* ── Platform Card (rendered by JS) ── */
.platform-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.platform-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.platform-card:hover::after { transform: scaleX(1); }

.platform-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(99, 102, 241, 0.3);
}

.platform-card.no-stock {
    opacity: 0.55;
    background: #f8fafc;
}

.platform-card.no-stock:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
    border-color: var(--border);
}

.platform-card.no-stock::after { display: none; }

.platform-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 10px;
}

.platform-name-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.platform-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.platform-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-badge {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.stock-badge.in-stock {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.stock-badge.out-stock {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.price-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.12s, padding 0.12s;
}

.price-row:last-child { border-bottom: none; }

.price-row:hover {
    background: #f8fafc;
    border-radius: 6px;
    padding-left: 6px;
    padding-right: 6px;
}

.price-label {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.price-value {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
}

.price-value.highlight {
    font-size: 15px;
    color: var(--primary);
}

/* ── Footer ── */
.pr-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 20px 24px;
    text-align: center;
}

.pr-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.pr-footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.pr-footer-links a:hover { color: var(--text-primary); }

.pr-footer-copy {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* ── Utility ── */
.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .stats-summary { grid-template-columns: repeat(2, 1fr); }
    .op-costs { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .pr-page { padding: 16px 16px 40px; }
    .stats-summary { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .op-costs { grid-template-columns: 1fr 1fr; gap: 8px; }
    .controls-bar { flex-direction: column; align-items: stretch; padding: 12px; }
    .filter-select, .sort-select { width: 100%; }
    .platform-grid { grid-template-columns: 1fr; }
}
