/* Styles for shop */
.shop {
    padding: 80px 0;
    background: linear-gradient(180deg, #0f1419 0%, #090b0f 100%);
}

.shop-payment-status {
    max-width: 1100px;
    margin: 0 auto 16px auto;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(0, 153, 255, 0.35);
    background: rgba(0, 153, 255, 0.12);
    color: #e4f6ff;
    font-size: 14px;
    line-height: 1.5;
}
.shop-payment-status[data-state="success"] {
    border-color: rgba(0, 200, 120, 0.45);
    background: rgba(0, 200, 120, 0.14);
    color: #dcffe9;
}
.shop-payment-status[data-state="error"] {
    border-color: rgba(255, 86, 96, 0.5);
    background: rgba(255, 86, 96, 0.12);
    color: #ffdfe2;
}

.shop-lkh-promo {
    position: relative;
    max-width: 1100px;
    margin: 0 auto 22px auto;
    padding: 20px 22px;
    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, 0.5);
    background: linear-gradient(140deg, rgba(9, 19, 38, 0.96) 0%, rgba(16, 33, 68, 0.94) 55%, rgba(7, 120, 190, 0.32) 100%);
    box-shadow: 0 20px 48px rgba(2, 8, 20, 0.52);
    overflow: hidden;
}

.shop-lkh-promo::after {
    content: '';
    position: absolute;
    right: -74px;
    top: -86px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(125, 211, 252, 0.3) 0%, rgba(125, 211, 252, 0) 70%);
    pointer-events: none;
}

.shop-lkh-promo__badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.55);
    background: rgba(125, 211, 252, 0.12);
    color: #d7eeff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 10px;
}

.shop-lkh-promo__title {
    margin: 0 0 10px 0;
    color: #ffffff;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.2;
}

.shop-lkh-promo__text {
    margin: 0 0 8px 0;
    color: #dbe9ff;
    line-height: 1.6;
    font-size: 15px;
    max-width: 900px;
}

.shop-lkh-promo__actions {
    margin-top: 12px;
}

.shop-lkh-promo__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 800;
    color: #ffffff;
    border: 1px solid rgba(125, 211, 252, 0.7);
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.95), rgba(37, 99, 235, 0.9));
}

.shop-lkh-promo__btn:hover {
    filter: brightness(1.06);
}

.shop-payment-modal[hidden] {
    display: none;
}

.shop-payment-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.shop-payment-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 16, 0.74);
    backdrop-filter: blur(3px);
}

.shop-payment-modal__card {
    position: relative;
    width: min(100%, 560px);
    padding: 24px 24px 22px;
    border-radius: 18px;
    border: 1px solid rgba(0, 153, 255, 0.45);
    background: linear-gradient(180deg, #111a26 0%, #0d121a 100%);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    color: #e4f6ff;
    animation: shop-payment-modal-in 0.22s ease-out;
}

@keyframes shop-payment-modal-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.shop-payment-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: #d7e2f3;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.shop-payment-modal__close:hover {
    background: rgba(255, 255, 255, 0.09);
}

.shop-payment-modal__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    margin-bottom: 14px;
    border: 2px solid rgba(0, 153, 255, 0.45);
    position: relative;
}

.shop-payment-modal__icon::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 3px solid rgba(0, 153, 255, 0.3);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: shop-payment-spin 0.95s linear infinite;
}

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

.shop-payment-modal__title {
    margin: 0 0 8px 0;
    font-size: 26px;
    line-height: 1.2;
    color: #ffffff;
    font-weight: 800;
}

.shop-payment-modal__message {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #d9e7f7;
}

.shop-payment-modal__meta {
    margin: 14px 0 0 0;
    font-size: 13px;
    color: #90b0cc;
}


.shop-payment-modal[data-state="success"] .shop-payment-modal__card {
    border-color: rgba(0, 200, 120, 0.5);
    background: linear-gradient(180deg, #0f221c 0%, #0c1713 100%);
    color: #e9fff2;
}

.shop-payment-modal[data-state="success"] .shop-payment-modal__icon {
    border-color: rgba(0, 200, 120, 0.5);
}

.shop-payment-modal[data-state="success"] .shop-payment-modal__icon::before {
    content: '';
    border: 0;
    animation: none;
    inset: 0;
}

.shop-payment-modal[data-state="success"] .shop-payment-modal__icon::after {
    content: '';
    position: absolute;
    left: 18px;
    top: 12px;
    width: 12px;
    height: 22px;
    border-right: 4px solid #72f0a2;
    border-bottom: 4px solid #72f0a2;
    transform: rotate(45deg);
}

.shop-payment-modal[data-state="error"] .shop-payment-modal__card {
    border-color: rgba(255, 86, 96, 0.55);
    background: linear-gradient(180deg, #261116 0%, #170d0f 100%);
    color: #ffe7ea;
}

.shop-payment-modal[data-state="error"] .shop-payment-modal__icon {
    border-color: rgba(255, 86, 96, 0.55);
}

.shop-payment-modal[data-state="error"] .shop-payment-modal__icon::before {
    content: '';
    border: 0;
    animation: none;
    inset: 0;
}

.shop-payment-modal[data-state="error"] .shop-payment-modal__icon::after {
    content: '!';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 32px;
    font-weight: 900;
    color: #ff8a94;
}

@media (max-width: 680px) {
    .shop-payment-modal {
        padding: 14px;
    }

    .shop-payment-modal__card {
        width: min(100%, 94vw);
        padding: 18px 18px 16px;
        border-radius: 14px;
    }

    .shop-payment-modal__title {
        font-size: 22px;
    }

    .shop-payment-modal__message {
        font-size: 15px;
        line-height: 1.55;
    }
}

.shop-action-modal[hidden] {
    display: none;
}

.shop-action-modal {
    position: fixed;
    inset: 0;
    z-index: 1210;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.shop-action-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 16, 0.78);
    backdrop-filter: blur(4px);
}

.shop-action-modal__card {
    position: relative;
    width: min(100%, 560px);
    border-radius: 16px;
    border: 1px solid rgba(0, 153, 255, 0.38);
    background: radial-gradient(circle at top right, rgba(0, 160, 255, 0.12), rgba(12, 18, 28, 0.96) 42%);
    box-shadow: 0 28px 78px rgba(0, 0, 0, 0.55);
    padding: 22px 22px 18px;
    color: #e8f3ff;
    animation: shop-action-modal-in 0.2s ease-out;
}

@keyframes shop-action-modal-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.shop-action-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: #d7e2f3;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.shop-action-modal__close:hover {
    background: rgba(255, 255, 255, 0.09);
}

.shop-action-modal__title {
    margin: 0 0 8px 0;
    font-size: 25px;
    line-height: 1.2;
    font-weight: 800;
    color: #ffffff;
    max-width: calc(100% - 44px);
}

.shop-action-modal__message {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: #dbe9f8;
}

.shop-action-modal__details {
    margin: 14px 0 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.24);
    font-size: 13px;
    line-height: 1.5;
    color: #a9c2da;
    white-space: pre-line;
}

.shop-action-modal__actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.shop-action-modal__btn {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.shop-action-modal__btn--ghost {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    color: #d9e7f7;
}

.shop-action-modal__btn--ghost:hover {
    background: rgba(255, 255, 255, 0.08);
}

.shop-action-modal__btn--primary {
    border-color: rgba(0, 212, 255, 0.35);
    background: linear-gradient(180deg, #00a8ff 0%, #007ad1 100%);
    color: #ffffff;
}

.shop-action-modal__btn--primary:hover {
    filter: brightness(1.05);
}

.shop-action-modal[data-state="success"] .shop-action-modal__card {
    border-color: rgba(0, 200, 120, 0.5);
    background: radial-gradient(circle at top right, rgba(0, 200, 120, 0.16), rgba(12, 23, 18, 0.96) 45%);
}

.shop-action-modal[data-state="error"] .shop-action-modal__card {
    border-color: rgba(255, 86, 96, 0.55);
    background: radial-gradient(circle at top right, rgba(255, 86, 96, 0.16), rgba(26, 12, 14, 0.96) 45%);
}

@media (max-width: 680px) {
    .shop-action-modal {
        padding: 14px;
    }

    .shop-action-modal__card {
        width: min(100%, 94vw);
        border-radius: 14px;
        padding: 18px 16px 16px;
    }

    .shop-action-modal__title {
        font-size: 21px;
    }

    .shop-action-modal__message {
        font-size: 15px;
    }
}

/* Discount banner */
.discount-banner {
    max-width: 1100px;
    margin: 0 auto 30px auto;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(0, 153, 255, 0.15) 0%, rgba(0, 200, 100, 0.1) 100%);
    border: 1px solid rgba(0, 153, 255, 0.3);
    border-radius: 12px;
    text-align: center;
}
.discount-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 15px;
    color: #e4e6eb;
}
.discount-banner-content strong {
    color: #00d4ff;
    font-size: 18px;
}
.discount-icon {
    font-size: 24px;
}

.shop-section + .shop-section {
    margin-top: 50px;
}
.shop-section.shop-section-hidden {
    display: none;
}
.shop-section-head {
    max-width: 1100px;
    margin: 0 auto 18px auto;
}
.shop-subtitle {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}
.shop-subdesc {
    margin-top: 8px;
    color: #b0b3b8;
    font-size: 14px;
    line-height: 1.6;
}
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}
.product-empty {
    margin: 0 auto;
    color: #b0b3b8;
    font-size: 14px;
    padding: 24px;
    border: 1px dashed #2a3142;
    border-radius: 12px;
    text-align: center;
    background: rgba(15, 20, 25, 0.6);
}
.product-card {
    background: #1a1f2e;
    border: 1px solid #2a3142;
    padding: 20px;
    border-radius: 12px;
    color: #e4e6eb;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.product-card:hover {
    transform: translateY(-2px);
    border-color: #0099ff;
}
.product-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f1419;
    border: 1px solid #2a3142;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease;
}

.product-media { position: relative; }

/* Inner decorative frame + subtle vignette */
.product-media::before {
    content: '';
    position: absolute;
    inset: 12px; /* inner inset to create frame */
    border-radius: 12px;
    pointer-events: none;
    z-index: 4;
    background: linear-gradient(180deg, rgba(8,12,16,0.02), rgba(8,12,16,0.12));
    box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
    border: 1px solid rgba(0,0,0,0.25);
}

/* Ensure media sits below frame */
.product-media > img,
.product-media > video { position: relative; z-index: 0; display: block; width:100%; height:100%; }

@media (max-width: 600px) {
    .product-media::before { inset: 8px; border-radius: 10px; }
}

/* -- Styles for products with video: black border + letterbox bars -- */
.product-media.has-video {
    background: none;
    border: 1px solid #2a3142;
    border-radius: 10px;
}

/* letterbox bars removed per request */

/* (removed opaque corner cover per request) */
.product-card:hover .product-media {
    border-color: #0099ff;
}
.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.product-title {
    font-size: 18px;
    margin-bottom: 0;
    font-weight: 700;
}
.product-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.product-badge {
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 212, 255, 0.25);
    background: rgba(0, 212, 255, 0.08);
    color: #00d4ff;
    white-space: nowrap;
}
.product-price {
    color: #00d4ff;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Old price (strikethrough) and new price highlight when discount applied */
.price-old {
    color: #9aa0a6;
    text-decoration: line-through;
    margin-right: 8px;
    font-weight: 600;
}
.price-new {
    color: #00d4ff;
    font-weight: 800;
}
.product-meta {
    color: #b0b3b8;
    font-size: 13px;
    margin-bottom: 14px;
}
.product-description {
    color: #b0b3b8;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 12px;
}
.product-features {
    list-style: none;
    display: grid;
    gap: 8px;
    padding: 0;
    margin: 0 0 16px 0;
}
.product-features li {
    color: #b0b3b8;
    font-size: 13px;
    line-height: 1.4;
    position: relative;
    padding-left: 18px;
}
.product-features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    top: 0;
    color: #00d4ff;
    font-weight: 900;
}
.buy-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 16px;
    background: #0099ff;
    color: white;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-weight: 700;
}
.buy-btn:hover {
    background: #0088ee;
}
.owned-keys {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}
.key-item {
    background: #0f1419;
    border: 1px solid #2a3142;
    padding: 12px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.key-meta {
    color: #b0b3b8;
    font-size: 13px;
}
.copy-key-btn {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #2a3142;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    align-self: center;
}

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