/* Matrix store — ornate metallic cards (matches store design reference) */
.store-page .bg-container {
    opacity: 0.04;
}

.store-page .bg-overlay {
    background: rgba(0, 0, 0, 0.92) !important;
}

.store-page .diagonal-lines {
    opacity: 0.08;
}

.store-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 8px 16px 56px;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 16px;
}

/* ── Ornate card shell ── */
.store-card {
    --silver-light: #eef2f7;
    --silver-mid: #aeb6c2;
    --silver-dark: #5a6270;
    --badge-slot-h: 200px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 100%;
    min-height: 430px;
    padding: 28px 12px 14px;
    border-radius: 4px;
    text-align: center;
    transform: none;
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E"),
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 3px,
            rgba(255, 255, 255, 0.012) 3px,
            rgba(255, 255, 255, 0.012) 4px
        ),
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 255, 255, 0.06) 0%, transparent 55%),
        linear-gradient(180deg, #181818 0%, #0c0c0c 42%, #101010 100%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.14),
        inset 0 0 0 3px rgba(0, 0, 0, 0.85),
        inset 0 0 0 4px rgba(130, 140, 152, 0.35),
        0 0 0 2px var(--silver-dark),
        0 0 0 3px #0a0a0a,
        0 0 0 4px var(--silver-mid),
        0 0 0 5px #1a1a1a,
        0 0 0 6px rgba(180, 190, 200, 0.55),
        0 12px 32px rgba(0, 0, 0, 0.65);
    isolation: isolate;
}

/* Corner brackets */
.store-card .store-card-frame {
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    pointer-events: none;
    z-index: 0;
}

.store-card .store-card-frame::before,
.store-card .store-card-frame::after,
.store-card .store-card-frame span::before,
.store-card .store-card-frame span::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: rgba(220, 228, 236, 0.55);
    border-style: solid;
}

.store-card .store-card-frame span {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.store-card .store-card-frame::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.store-card .store-card-frame::after {
    top: -1px;
    right: -1px;
    border-width: 2px 2px 0 0;
}

.store-card .store-card-frame span::before {
    bottom: -1px;
    left: -1px;
    border-width: 0 0 2px 2px;
}

.store-card .store-card-frame span::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.store-card > *:not(.store-card-frame) {
    position: relative;
    z-index: 1;
}

/* Prime — white glow */
.store-card-popular {
    box-shadow:
        0 0 0 2px #ffffff,
        0 0 18px 3px rgba(255, 255, 255, 0.45),
        0 0 36px 6px rgba(255, 255, 255, 0.18),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 0 0 3px rgba(0, 0, 0, 0.85),
        inset 0 0 0 4px rgba(200, 210, 220, 0.45),
        0 0 0 4px #ffffff,
        0 0 0 5px #1a1a1a,
        0 0 0 6px #d8dfe8,
        0 12px 32px rgba(0, 0, 0, 0.65);
}

.store-card-ribbon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 6px 16px 7px;
    border-radius: 0 0 5px 5px;
    background: linear-gradient(180deg, #eef2f7 0%, #aeb6c2 45%, #6a7380 100%);
    color: #0a0a0a;
    font-family: var(--font-body);
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    white-space: nowrap;
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    z-index: 4;
}

/* ── Custom badge art ── */
.store-card-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 var(--badge-slot-h);
    height: var(--badge-slot-h);
    margin-bottom: 8px;
    cursor: pointer;
}

.store-badge-img {
    display: block;
    width: 100%;
    max-width: 200px;
    height: 100%;
    max-height: var(--badge-slot-h);
    margin: 0 auto;
    object-fit: contain;
    object-position: center center;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
    user-select: none;
    -webkit-user-drag: none;
}

.store-card .card-header.card-header-accessible {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.store-card .card-header {
    margin-bottom: 12px;
}

.store-card .card-header h3 {
    margin: 0 0 6px;
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #d8dfe8 28%,
        #8a939f 52%,
        #f0f4f8 72%,
        #aeb6c2 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.85));
}

.store-card .card-subtitle {
    display: block;
    margin: 0;
    color: rgba(170, 178, 188, 0.62);
    font-family: var(--font-body);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

/* ── Pricing ── */
.store-card .card-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.store-card .price-container {
    display: block;
    min-height: auto;
    padding: 0;
    background: transparent;
}

.store-card .price-label {
    display: none;
}

.store-card .price-amount {
    display: block;
    color: #ffffff;
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.store-card .price-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 22px;
    margin-top: 7px;
}

.store-card .price-compare {
    color: rgba(140, 148, 158, 0.7);
    font-size: 0.76rem;
    font-weight: 600;
    text-decoration: line-through;
}

.store-card .price-save {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 2px;
    border: 1px solid rgba(180, 190, 200, 0.45);
    background: linear-gradient(180deg, #d0d8e2 0%, #8a939f 100%);
    color: #111;
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* ── CTA button ── */
.store-card .btn-view-contents {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    margin-top: 2px;
    padding: 0 10px;
    border-radius: 3px;
    border: 1px solid rgba(190, 200, 210, 0.55);
    background: linear-gradient(180deg, #3a3a3a 0%, #1a1a1a 35%, #0a0a0a 100%);
    color: #eef2f7;
    font-family: var(--font-body);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -2px 4px rgba(0, 0, 0, 0.5),
        0 4px 10px rgba(0, 0, 0, 0.45);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.store-card .btn-view-contents::before {
    content: none;
}

.store-card .btn-view-contents i {
    font-size: 0.52rem;
    opacity: 0.85;
}

.store-card .btn-view-contents:hover {
    border-color: rgba(230, 236, 244, 0.75);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -2px 4px rgba(0, 0, 0, 0.5),
        0 0 12px rgba(200, 210, 220, 0.12),
        0 4px 10px rgba(0, 0, 0, 0.45);
}

.store-card .card-features {
    display: none;
}

@media (max-width: 1100px) {
    .store-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .store-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .store-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* ── Override legacy styles.css ── */
.store-page .store-section {
    margin-bottom: 0;
}

.store-page .store-section[hidden] {
    display: none !important;
}

.store-page .store-grid {
    grid-auto-rows: 1fr !important;
    align-items: stretch !important;
    gap: 16px !important;
    border-top: 0 !important;
    padding-top: 0 !important;
}

.store-page #vip .store-grid,
.store-page #kits .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-width: 620px;
    margin: 0 auto;
}

.store-page #ranks .store-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.store-page .store-container .store-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    height: 100% !important;
    min-height: 430px !important;
    padding: 28px 12px 14px !important;
    border-radius: 4px !important;
    transform: none !important;
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E"),
        repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(255,255,255,0.012) 3px, rgba(255,255,255,0.012) 4px),
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255,255,255,0.06) 0%, transparent 55%),
        linear-gradient(180deg, #181818 0%, #0c0c0c 42%, #101010 100%) !important;
    border: none !important;
    overflow: visible !important;
}

.store-page .store-container .store-card-popular {
    padding-top: 28px !important;
}

.store-page .store-container .store-card:hover {
    transform: none !important;
}

.store-page .store-container .store-card::before,
.store-page .store-container .store-card::after {
    display: none !important;
}

.store-page .store-card-visual {
    position: relative !important;
    flex: 0 0 200px !important;
    height: 200px !important;
    min-height: 200px !important;
    margin-bottom: 8px !important;
    overflow: visible !important;
}

.store-page .store-card-visual::before,
.store-page .store-card-visual::after {
    display: none !important;
    content: none !important;
}

.store-page .store-container .card-subtitle {
    display: block !important;
}

.store-page .store-container .price-container {
    min-height: auto !important;
    padding: 0 !important;
    background: transparent !important;
}

.store-page .store-card .price-amount {
    color: #ffffff !important;
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
}

.store-page .store-card .card-header h3 {
    color: transparent !important;
}

.store-page .store-card .price-save {
    display: inline-block !important;
}

.store-page .store-container .store-card .btn-view-contents {
    background: linear-gradient(180deg, #3a3a3a 0%, #1a1a1a 35%, #0a0a0a 100%) !important;
    color: #eef2f7 !important;
    border: 1px solid rgba(190, 200, 210, 0.55) !important;
    border-radius: 3px !important;
    min-height: 42px !important;
}

.store-page .store-container .store-card .btn-view-contents::before {
    content: none !important;
}

@media (max-width: 1100px) {
    .store-page #ranks .store-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 820px) {
    .store-page #vip .store-grid,
    .store-page #kits .store-grid,
    .store-page #ranks .store-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .store-page #vip .store-grid,
    .store-page #kits .store-grid {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .store-page #vip .store-grid,
    .store-page #kits .store-grid,
    .store-page #ranks .store-grid {
        grid-template-columns: 1fr !important;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* Package contents modal — neutral metallic (no blue tint) */
.store-page #contents-modal .modal-container {
    background: linear-gradient(180deg, #181818 0%, #0c0c0c 42%, #101010 100%);
    border: 1px solid rgba(190, 200, 210, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

.store-page #contents-modal .modal-header,
.store-page #contents-modal .modal-footer {
    background: #121212;
    border-color: rgba(190, 200, 210, 0.15);
}

.store-page #contents-modal .modal-body {
    background: #0a0a0a;
}

.store-page #contents-modal #modal-subtitle,
.store-page #contents-modal .modal-close,
.store-page #contents-modal .tab-btn {
    color: #808994 !important;
}

.store-page #contents-modal .modal-close {
    border-color: rgba(190, 200, 210, 0.25);
}

.store-page #contents-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #eef2f7;
}

.store-page #contents-modal .tab-btn.active.tab-green,
.store-page #contents-modal .tab-btn.active.tab-red-target {
    background: linear-gradient(180deg, #3a3a3a 0%, #1a1a1a 35%, #0a0a0a 100%) !important;
    color: #eef2f7 !important;
    border: 1px solid rgba(190, 200, 210, 0.55);
}

.store-page #contents-modal .item-card {
    background: #1a1a1a;
    border-color: rgba(190, 200, 210, 0.12);
}

.store-page #contents-modal .item-name {
    color: #aeb6c2;
}

.store-page #contents-modal .modal-footer .btn {
    background: linear-gradient(180deg, #3a3a3a 0%, #1a1a1a 35%, #0a0a0a 100%) !important;
    color: #eef2f7 !important;
    border: 1px solid rgba(190, 200, 210, 0.55) !important;
}

.store-page #contents-modal .modal-footer .btn:hover {
    background: linear-gradient(180deg, #4a4a4a 0%, #2a2a2a 35%, #151515 100%) !important;
    color: #ffffff !important;
}

/* Cart / checkout modal — neutral metallic (no blue tint) */
.store-page .cart-modal-backdrop {
    background: rgba(0, 0, 0, 0.78) !important;
}

.store-page .cart-panel {
    background: linear-gradient(180deg, #181818 0%, #0c0c0c 42%, #101010 100%) !important;
    border: 1px solid rgba(190, 200, 210, 0.35) !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65) !important;
}

.store-page .cart-close {
    color: #808994 !important;
}

.store-page .cart-close:hover {
    color: #eef2f7 !important;
}

.store-page .cart-item {
    background: #1a1a1a !important;
    border-color: rgba(190, 200, 210, 0.18) !important;
}

.store-page .cart-item:hover {
    background: #252525 !important;
    border-color: rgba(190, 200, 210, 0.35) !important;
}

.store-page .cart-tags span {
    border-color: rgba(190, 200, 210, 0.28) !important;
    color: #aeb6c2 !important;
    background: rgba(255, 255, 255, 0.04);
}

.store-page .cart-secure {
    color: #aeb6c2 !important;
}

.store-page .cart-secure span {
    color: #808994 !important;
}

.store-page .cart-empty {
    color: #808994 !important;
}

.store-page .cart-checkout {
    background: linear-gradient(180deg, #3a3a3a 0%, #1a1a1a 35%, #0a0a0a 100%) !important;
    color: #eef2f7 !important;
    border: 1px solid rgba(190, 200, 210, 0.55) !important;
    border-radius: 3px !important;
}

.store-page .cart-checkout:hover {
    background: linear-gradient(180deg, #4a4a4a 0%, #2a2a2a 35%, #151515 100%) !important;
    color: #ffffff !important;
}

.store-page .cart-toast {
    background: linear-gradient(180deg, #181818 0%, #0c0c0c 100%) !important;
    border-color: rgba(190, 200, 210, 0.35) !important;
}
