/**
 * SnapStore Frontend CSS — MyCityGov branded
 *
 * @package SnapStore
 * @since 1.0.0
 * 2026-03-13 19:00:00
 */

:root {
    --ss-navy: #0B1D3A;
    --ss-blue: #1258C2;
    --ss-gold: #E8A838;
    --ss-green: #2ECC71;
    --ss-red: #DC2626;
    --ss-body: #4B5563;
    --ss-subtle: #6B7280;
    --ss-border: #E5E7EB;
    --ss-bg: #F9FAFB;
    --ss-card: #FFFFFF;
    --ss-radius: 10px;
}

/* =========================================================================
 * BASE
 * ====================================================================== */

.ss-portal, .ss-products, .ss-checkout, .ss-confirmation {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ss-body);
    line-height: 1.6;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.ss-portal h2, .ss-products h2, .ss-checkout h2, .ss-confirmation h2 {
    font-family: 'DM Serif Display', Georgia, serif;
    color: var(--ss-navy);
    font-weight: 400;
    font-size: 28px;
    margin-bottom: 16px;
}

.ss-portal h3, .ss-products h3 {
    color: var(--ss-navy);
    font-weight: 700;
    font-size: 18px;
    margin: 0 0 8px;
}

.ss-portal h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ss-subtle);
    margin: 16px 0 8px;
}

/* =========================================================================
 * CARDS
 * ====================================================================== */

.ss-card {
    background: var(--ss-card);
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* =========================================================================
 * BUTTONS
 * ====================================================================== */

.ss-btn {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    text-align: center;
}

.ss-btn--primary {
    background: var(--ss-blue) !important;
    color: #fff !important;
}
.ss-btn--primary:hover, .ss-btn--primary:focus {
    background: var(--ss-navy) !important;
    color: #fff !important;
}

.ss-btn--gold {
    background: var(--ss-gold) !important;
    color: var(--ss-navy) !important;
}
.ss-btn--gold:hover, .ss-btn--gold:focus {
    background: #F0B84D !important;
    color: var(--ss-navy) !important;
}

.ss-btn--outline {
    background: transparent !important;
    color: var(--ss-body) !important;
    border: 1px solid var(--ss-border);
}
.ss-btn--outline:hover, .ss-btn--outline:focus {
    background: var(--ss-bg) !important;
    color: var(--ss-navy) !important;
}

.ss-btn--sm {
    font-size: 12px;
    padding: 5px 12px;
}

.ss-btn--lg {
    font-size: 16px;
    padding: 14px 32px;
    width: 100%;
}

.ss-btn--danger {
    background: transparent !important;
    color: var(--ss-red) !important;
    border: 1px solid #FCA5A5;
    font-size: 12px;
    padding: 4px 10px;
}
.ss-btn--danger:hover, .ss-btn--danger:focus {
    background: #FEE2E2 !important;
    color: var(--ss-red) !important;
}

.ss-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =========================================================================
 * STATUS BADGES
 * ====================================================================== */

.ss-status {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ss-status--active { background: #D1FAE5; color: #065F46; }
.ss-status--expired { background: #FEF3C7; color: #92400E; }
.ss-status--disabled { background: #FEE2E2; color: #991B1B; }

/* =========================================================================
 * PORTAL — HEADER
 * ====================================================================== */

.ss-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.ss-portal-actions {
    display: flex;
    gap: 8px;
}

.ss-portal-login {
    max-width: 480px;
    margin: 40px auto;
    text-align: center;
}

.ss-portal-login .login {
    text-align: left;
}

/* =========================================================================
 * PORTAL — LICENSES
 * ====================================================================== */

.ss-licenses-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ss-license-card { }

.ss-license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.ss-license-key-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    background: var(--ss-bg);
    padding: 10px 14px;
    border-radius: 6px;
}

.ss-license-key {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    color: var(--ss-navy);
    letter-spacing: 0.5px;
    flex: 1;
    word-break: break-all;
}

.ss-license-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.ss-meta-item {
    display: flex;
    flex-direction: column;
}

.ss-meta-label {
    font-size: 12px;
    color: var(--ss-subtle);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ss-meta-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--ss-navy);
}

.ss-activations {
    border-top: 1px solid var(--ss-border);
    padding-top: 12px;
    margin-top: 8px;
}

.ss-activation-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: var(--ss-body);
}

.ss-license-renew {
    margin-top: 16px;
    padding: 14px 18px;
    background: #FEF3C7;
    border-radius: 6px;
    border-left: 4px solid var(--ss-gold);
}

.ss-license-renew p {
    margin: 0 0 10px;
    font-size: 14px;
}

/* =========================================================================
 * PRODUCTS GRID
 * ====================================================================== */

.ss-products-section {
    margin-bottom: 40px;
}

.ss-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .ss-products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .ss-products-grid { grid-template-columns: 1fr; }
}

.ss-product-card {
    display: flex;
    flex-direction: column;
}

.ss-product-icon-wrap {
    margin-bottom: 14px;
}

.ss-product-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
}

.ss-product-title-link {
    text-decoration: none;
}

.ss-product-title-link h3 {
    transition: color 0.15s;
}

.ss-product-title-link:hover h3 {
    color: var(--ss-blue) !important;
}

.ss-product-desc {
    flex: 1;
    font-size: 14px;
    color: var(--ss-body);
    margin: 0 0 12px;
    line-height: 1.55;
}

.ss-product-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.ss-product-version,
.ss-product-category {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--ss-bg);
    color: var(--ss-subtle);
}

.ss-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--ss-border);
    padding-top: 14px;
}

.ss-product-actions {
    display: flex;
    gap: 6px;
}

.ss-product-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--ss-blue);
}

.ss-product-price small {
    font-size: 13px;
    font-weight: 400;
    color: var(--ss-subtle);
}

/* =========================================================================
 * PREMIUM CATALOG
 * ====================================================================== */

.ss-catalog {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ss-body);
    max-width: 1200px;
    margin: 0 auto;
}

.ss-catalog-hero {
    background: linear-gradient(160deg, var(--ss-navy) 0%, #162D54 100%);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 32px;
}

.ss-catalog-hero h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 38px;
    font-weight: 400;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.2;
}

.ss-catalog-hero p {
    color: #C5CED6;
    font-size: 17px;
    margin: 0 0 28px;
}

.ss-catalog-search {
    max-width: 480px;
    margin: 0 auto;
}

.ss-catalog-search input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 15px;
    font-family: 'Outfit', sans-serif;
    transition: border-color 0.2s, background 0.2s;
}

.ss-catalog-search input::placeholder { color: rgba(255,255,255,0.45); }
.ss-catalog-search input:focus {
    outline: none;
    border-color: var(--ss-gold);
    background: rgba(255,255,255,0.12);
}

/* Filters */
.ss-catalog-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ss-border);
}

.ss-catalog-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid var(--ss-border);
    border-radius: 100px;
    background: var(--ss-card);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--ss-subtle);
    cursor: pointer;
    transition: all 0.15s;
}

.ss-catalog-filter:hover { border-color: var(--ss-blue); color: var(--ss-blue); }

.ss-catalog-filter--active {
    background: var(--ss-navy) !important;
    border-color: var(--ss-navy) !important;
    color: #fff !important;
}

.ss-filter-icon { font-size: 15px; }
.ss-filter-count {
    background: rgba(0,0,0,0.06);
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.ss-catalog-filter--active .ss-filter-count {
    background: rgba(255,255,255,0.15);
}

/* Card Grid */
.ss-catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 960px) { .ss-catalog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .ss-catalog-grid { grid-template-columns: 1fr; } }

/* Card */
.ss-catalog-card {
    background: var(--ss-card);
    border: 1px solid var(--ss-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ss-catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.10);
}

/* Card Banner */
.ss-catalog-card-banner {
    display: block;
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #EFF6FF 0%, #F0F4FF 100%);
}

.ss-catalog-card-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.ss-catalog-card:hover .ss-catalog-card-banner img {
    transform: scale(1.05);
}

.ss-catalog-card-banner--empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ss-catalog-card-icon-large {
    width: 72px !important;
    height: 72px !important;
    object-fit: contain !important;
    border-radius: 14px;
}

.ss-catalog-card-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    background: var(--ss-navy);
    color: var(--ss-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}

.ss-catalog-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 29, 58, 0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
    text-decoration: none;
}

.ss-catalog-card:hover .ss-catalog-card-overlay {
    opacity: 1;
}

/* Card Body */
.ss-catalog-card-body {
    padding: 18px 20px 12px;
}

.ss-catalog-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ss-catalog-card-cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--ss-blue);
}

.ss-catalog-card-ver {
    font-size: 11px;
    color: var(--ss-subtle);
    background: var(--ss-bg);
    padding: 2px 8px;
    border-radius: 20px;
}

.ss-catalog-card-title {
    text-decoration: none;
    display: block;
}

.ss-catalog-card-title h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--ss-navy);
    margin: 0 0 6px;
    line-height: 1.3;
    transition: color 0.15s;
}

.ss-catalog-card-title:hover h3 {
    color: var(--ss-blue);
}

.ss-catalog-card-desc {
    font-size: 13px;
    color: var(--ss-subtle);
    line-height: 1.55;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ss-catalog-card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
}

.ss-catalog-card-stars { display: flex; align-items: center; gap: 2px; }
.ss-catalog-card-rating-num { color: var(--ss-subtle); margin-left: 4px; font-weight: 600; }
.ss-catalog-card-sales { color: var(--ss-subtle); }

/* Card Footer */
.ss-catalog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid var(--ss-border);
    background: var(--ss-bg);
}

.ss-catalog-card-price strong {
    font-size: 20px;
    color: var(--ss-navy);
}

.ss-catalog-card-price span {
    font-size: 13px;
    color: var(--ss-subtle);
    font-weight: 400;
}

.ss-catalog-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--ss-subtle);
    font-size: 15px;
}

@media (max-width: 600px) {
    .ss-catalog-hero { padding: 40px 20px; }
    .ss-catalog-hero h1 { font-size: 26px; }
    .ss-catalog-card-banner { height: 140px; }
}

/* =========================================================================
 * CHECKOUT
 * ====================================================================== */

.ss-checkout { max-width: 560px; margin: 40px auto; }

.ss-checkout-summary {
    border: 1px solid var(--ss-border);
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
}

.ss-checkout-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 18px;
    font-size: 15px;
}

.ss-checkout-total {
    background: var(--ss-bg);
    font-weight: 700;
    border-top: 1px solid var(--ss-border);
}

.ss-checkout-price {
    font-weight: 700;
    color: var(--ss-navy);
}

.ss-checkout-details {
    font-size: 14px;
    color: var(--ss-subtle);
    margin-bottom: 20px;
}

.ss-checkout-email {
    margin-bottom: 20px;
}

.ss-checkout-email label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--ss-navy);
}

.ss-checkout-email input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--ss-border);
    border-radius: 6px;
    font-size: 15px;
    font-family: 'Outfit', sans-serif;
}

.ss-checkout-email input:focus {
    outline: none;
    border-color: var(--ss-blue);
    box-shadow: 0 0 0 3px rgba(18, 88, 194, 0.15);
}

.ss-checkout-secure {
    text-align: center;
    font-size: 12px;
    color: var(--ss-subtle);
    margin-top: 14px;
}

/* =========================================================================
 * CHECKOUT — DISCOUNT CODE
 * ====================================================================== */

.ss-checkout-discount {
    margin-bottom: 20px;
}

.ss-checkout-discount label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--ss-navy);
}

.ss-discount-input-row {
    display: flex;
    gap: 8px;
}

.ss-discount-input-row input {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid var(--ss-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ss-discount-input-row input:focus {
    outline: none;
    border-color: var(--ss-blue);
    box-shadow: 0 0 0 3px rgba(18, 88, 194, 0.15);
}

.ss-discount-input-row input:disabled {
    background: var(--ss-bg);
    color: var(--ss-subtle);
}

.ss-discount-message {
    font-size: 13px;
    margin: 6px 0 0;
    min-height: 18px;
}

.ss-discount-row {
    color: var(--ss-green);
}

.ss-discount-amount {
    color: var(--ss-green) !important;
    font-weight: 700;
}

/* =========================================================================
 * CONFIRMATION
 * ====================================================================== */

.ss-confirmation { max-width: 560px; margin: 40px auto; }

.ss-confirmation-success { text-align: center; }

.ss-license-key-display {
    background: var(--ss-bg);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.ss-license-key-display .ss-label {
    font-size: 12px;
    color: var(--ss-subtle);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
}

.ss-license-key-display .ss-license-key {
    display: block;
    font-size: 18px;
    margin-bottom: 12px;
}

.ss-confirm-instructions {
    font-size: 14px;
    color: var(--ss-subtle);
    margin: 16px 0;
}

.ss-confirmation-pending { text-align: center; }

.ss-loading {
    text-align: center;
    padding: 40px;
    color: var(--ss-subtle);
}

/* =========================================================================
 * RESPONSIVE
 * ====================================================================== */

@media (max-width: 600px) {
    .ss-portal-header { flex-direction: column; align-items: flex-start; }
    .ss-license-meta { gap: 16px; }
    .ss-product-footer { flex-direction: column; gap: 10px; align-items: flex-start; }
}
