/* ═══════════════════════════════════════════════════════════════════════════
   GILGAMEZ COMMERCE — Game Voucher & Store Catalog Styles
   Enforces Rule #1 (Isolated CSS), Rule #6 (5-Tier Responsive), Rule #7 (Sci-Fi Aesthetic)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Store View Container ───────────────────────────────────────────────── */
.store-view-container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 10px 4px 40px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* ── 2. Store Header Banner ────────────────────────────────────────────────── */
.store-header-panel {
    background: linear-gradient(135deg, rgba(22, 24, 34, 0.95) 0%, rgba(15, 23, 42, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px 32px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.store-header-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #a855f7, #ddaf31, #6366f1);
    background-size: 200% 100%;
    animation: store-gradient-shift 8s ease infinite;
}

@keyframes store-gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.store-header-info {
    max-width: 620px;
}

.store-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.store-main-title {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.store-main-tagline {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.6;
}

/* Search Bar */
.store-search-wrapper {
    position: relative;
    min-width: 300px;
    max-width: 380px;
    flex: 1;
}

.store-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.store-search-field {
    width: 100%;
    height: 48px;
    padding: 12px 18px 12px 46px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.store-search-field:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
    background: rgba(15, 23, 42, 1);
}

/* ── 3. Category Filter Pills Bar ─────────────────────────────────────────── */
.store-categories-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    overflow-x: auto;
    padding: 4px 2px 14px;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.store-categories-bar::-webkit-scrollbar {
    height: 4px;
}

.store-categories-bar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.store-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.store-cat-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.store-cat-pill.is-active {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-color: rgba(99, 102, 241, 0.5);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

/* ── 4. Games Catalog Grid ─────────────────────────────────────────────────── */
.store-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
    margin-bottom: 40px;
}

.store-game-card {
    background: rgba(22, 24, 34, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    position: relative;
}

.store-game-card:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.2);
}

.store-card-image-wrap {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #0f131a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.store-game-card:hover .store-card-image-wrap img {
    transform: scale(1.06);
}

.store-card-cat-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(10, 11, 14, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #c7d2fe;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.store-card-details {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    background: rgba(15, 17, 24, 0.95);
}

.store-card-title {
    font-size: 16.5px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

.store-card-variants {
    font-size: 12.5px;
    color: #94a3b8;
    margin: 0 0 14px;
}

.btn-select-game {
    width: 100%;
    height: 40px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    color: #a5b4fc;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.store-game-card:hover .btn-select-game,
.btn-select-game:hover {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* No Results Box */
.store-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: rgba(22, 24, 34, 0.5);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.store-no-results-icon {
    font-size: 44px;
    margin-bottom: 12px;
}

.store-no-results h3 {
    font-size: 18px;
    color: #f8fafc;
    margin: 0 0 6px;
}

.store-no-results-desc {
    font-size: 13.5px;
    color: #94a3b8;
    margin: 0;
}

/* ── 5. Checkout Modal Overlay & Card ──────────────────────────────────────── */
/* Modal Overlay for Store Checkout */
.store-checkout-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 11, 14, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.store-checkout-modal-overlay.is-open {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.store-checkout-modal-card {
    background: #131620;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    max-width: 660px;
    width: 100%;
    padding: 30px 28px;
    position: relative;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(99, 102, 241, 0.1);
    box-sizing: border-box;
    transform: scale(0.96) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.4) rgba(15, 23, 42, 0.6);
}

.store-checkout-modal-overlay.is-open .store-checkout-modal-card {
    transform: scale(1) translateY(0);
}

.store-checkout-modal-card::-webkit-scrollbar {
    width: 6px;
}
.store-checkout-modal-card::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
}
.store-checkout-modal-card::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 8px;
}
.store-checkout-modal-card::-webkit-scrollbar-thumb:hover {
    background: rgba(129, 140, 248, 0.7);
}

.store-modal-close {
    position: static;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.store-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
    transform: scale(1.05);
}

.checkout-modal-header {
    padding: 16px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #181b2a;
    flex-shrink: 0;
}

.checkout-modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.4) rgba(15, 23, 42, 0.6);
}

.checkout-modal-body::-webkit-scrollbar {
    width: 6px;
}
.checkout-modal-body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 6px;
}
.checkout-modal-body::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 6px;
}
.checkout-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(129, 140, 248, 0.7);
}

.checkout-modal-footer {
    padding: 14px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    background: #181b2a;
    flex-shrink: 0;
}

.btn-checkout-secondary {
    padding: 11px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-checkout-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.checkout-brand-img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.checkout-modal-title {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 4px;
}

.checkout-modal-subtitle {
    font-size: 13px;
    color: #94a3b8;
}

/* Dynamic 2-Fields Input Grid */
.checkout-id-grid {
    display: grid;
    gap: 12px;
}

.checkout-id-grid.two-fields {
    grid-template-columns: 2fr 1fr;
}

.form-field-group {
    margin-bottom: 18px;
}

.form-field-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 8px;
}

.form-field-input {
    width: 100%;
    height: 46px;
    padding: 11px 14px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.form-field-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(15, 23, 42, 1);
}

/* Denomination Options Grid */
.denom-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    max-height: 240px;
    overflow-y: auto;
    padding: 3px;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.4) rgba(15, 23, 42, 0.6);
}

.denom-options-grid::-webkit-scrollbar {
    width: 5px;
}
.denom-options-grid::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 6px;
}
.denom-options-grid::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 6px;
}

.denom-radio-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 64px;
}

.denom-radio-card input {
    display: none;
}

.denom-radio-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.denom-radio-card.is-selected {
    background: rgba(99, 102, 241, 0.15);
    border-color: #6366f1;
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.35);
}

.denom-card-name {
    font-weight: 700;
    font-size: 13px;
    color: #ffffff;
    margin-bottom: 4px;
    line-height: 1.3;
}

.denom-card-price {
    font-size: 12px;
    font-weight: 600;
    color: #fbbf24;
}

.btn-checkout-submit {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-checkout-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* ── 6. 5-Tier Responsive System (Rule #6) ─────────────────────────────────── */
@media (max-width: 900px) {
    .store-header-panel {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }

    .store-search-wrapper {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .store-catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 16px;
    }

    .store-card-image-wrap {
        height: 130px;
    }

    .denom-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .store-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .store-card-details {
        padding: 12px;
    }

    .store-card-title {
        font-size: 14px;
    }

    .store-card-variants {
        font-size: 11.5px;
        margin-bottom: 8px;
    }

    .checkout-id-grid.two-fields {
        grid-template-columns: 1fr;
    }
}
