/* Resellers Modal Styles */
.resellers-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    padding: 1.25rem;
    background-color: rgba(10, 9, 10, 0.78);
    backdrop-filter: blur(3px);
}

.resellers-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.resellers-modal-content {
    /* Restrained, layered dark surfaces with one accent color for hierarchy. */
    --modal-bg: rgba(10, 9, 10, 0.98);
    --panel-bg: rgba(18, 16, 18, 0.96);
    --surface-muted: rgba(25, 22, 24, 0.92);
    --stroke: rgba(201, 51, 66, 0.2);
    --stroke-strong: rgba(201, 51, 66, 0.34);
    --text-main: var(--text);
    --text-muted: var(--text-secondary);
    --text-soft: rgba(166, 158, 159, 0.78);
    --accent: var(--primary);
    --accent-strong: var(--primary-light);
    --radius-md: 10px;
    --radius-sm: 8px;
    background: var(--modal-bg);
    border: 1px solid var(--stroke-strong);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.resellers-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--stroke);
    padding-bottom: 1rem;
}

.resellers-header-copy {
    flex: 1;
    min-width: 0;
}

.resellers-modal-kicker {
    color: var(--accent);
    font-size: 0.72rem;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    margin: 0 0 0.55rem 0;
}

.resellers-modal-title {
    color: var(--text-main);
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 650;
    letter-spacing: 0.01em;
    line-height: 1.2;
    margin: 0 0 0.35rem 0;
}

.resellers-modal-subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.35;
    margin: 0;
}

.resellers-close {
    background: var(--surface-muted);
    border: 1px solid var(--stroke-strong);
    color: var(--text-muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.resellers-close:hover {
    color: var(--text-main);
    border-color: var(--accent);
    background: #221E21;
}

.resellers-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.resellers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 0.9rem;
    margin-bottom: 1.15rem;
}

.reseller-card {
    background: var(--panel-bg);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 164px;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.reseller-card:hover {
    border-color: var(--stroke-strong);
    background: rgba(25, 22, 24, 0.96);
    transform: translateY(-1px);
}

.reseller-card:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(201, 51, 66, 0.38) inset;
}

.reseller-card.is-featured {
    border-color: rgba(201, 51, 66, 0.55);
    background: linear-gradient(180deg, rgba(201, 51, 66, 0.12), rgba(18, 16, 18, 0.98) 40%);
}

.reseller-card.is-promo {
    border-style: dashed;
}

.reseller-card-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.reseller-headline {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 44px;
}

.reseller-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--stroke-strong);
    object-fit: cover;
}

.reseller-name {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 600;
    min-height: 2.5em;
    margin: 0 0 0.2rem 0;
}

.reseller-status {
    color: var(--text-soft);
    font-size: 0.8rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.reseller-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #34D399;
    border-radius: 50%;
}

.reseller-tag {
    color: var(--text-muted);
    background: #191618;
    border: 1px solid var(--stroke-strong);
    border-radius: 999px;
    font-size: 0.68rem;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 650;
    padding: 0.3rem 0.45rem;
    white-space: nowrap;
}

.reseller-card.is-featured .reseller-tag {
    border-color: rgba(201, 51, 66, 0.55);
    color: var(--accent);
    background: rgba(201, 51, 66, 0.12);
}

.reseller-card-footer {
    border-top: 1px solid var(--stroke);
    padding-top: 0.75rem;
    margin-top: auto;
}

.reseller-contact {
    background: var(--accent);
    color: var(--text);
    border: 1px solid var(--accent);
    padding: 0.64rem 0.9rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
    width: 100%;
    min-height: 40px;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.reseller-contact:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

.reseller-contact:active {
    transform: translateY(1px);
}

.reseller-contact:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.reseller-contact.is-secondary {
    background: rgba(25, 22, 24, 0.92);
    color: var(--text-main);
    border-color: var(--stroke-strong);
}

.reseller-contact.is-secondary:hover {
    background: rgba(34, 30, 33, 0.96);
    border-color: rgba(201, 51, 66, 0.5);
}

.resellers-footer {
    text-align: center;
    padding-top: 0.95rem;
    border-top: 1px solid var(--stroke);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.resellers-footer-text {
    color: var(--text-soft);
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0 0 0.65rem 0;
    text-align: center;
}

.direct-purchase-btn {
    background: rgba(25, 22, 24, 0.92);
    color: var(--text-main);
    border: 1px solid var(--stroke-strong);
    padding: 0.76rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.84rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.direct-purchase-btn:hover {
    background: rgba(34, 30, 33, 0.96);
    border-color: rgba(201, 51, 66, 0.5);
}

.direct-purchase-btn:active {
    transform: translateY(1px);
}

.direct-purchase-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .resellers-modal-content {
        width: min(100%, 620px);
        padding: 1.15rem;
        margin: 0;
    }

    .resellers-modal {
        padding: 0.8rem;
    }

    .resellers-modal-header {
        gap: 0.75rem;
    }

    .resellers-modal-title {
        font-size: 1.2rem;
    }

    .resellers-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 0.75rem;
    }

    .reseller-card-header {
        grid-template-columns: auto 1fr;
        align-items: flex-start;
    }

    .reseller-tag {
        grid-column: 2;
        justify-self: start;
    }

    .reseller-card {
        padding: 0.85rem;
    }
}