:root {
    --bg-color: #05070a;
    --text-primary: #ffffff;
    --text-secondary: #8a94a6;
    --accent-cyan: #00e5ff;
    --accent-blue: #00a3ff;
    --gold-color: #ffd700;
    --card-bg: rgba(15, 20, 30, 0.6);
    --grid-color: rgba(255, 255, 255, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 8rem 2rem 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.header {
    text-align: center;
    margin-bottom: 4rem;
}

.title {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 0.2rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    display: inline-block;
}

.subtitle {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.3rem;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* Store Layout - Single Product Detail */
.store-layout {
    width: 100%;
    display: flex;
    justify-content: center;
}

.product-page-container {
    display: flex;
    gap: 4rem;
    width: 100%;
    max-width: 1100px;
    align-items: flex-start;
}

/* Left: Gallery */
.product-gallery {
    flex: 1;
    background: #0d1117;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.main-image {
    width: 100%;
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(0, 163, 255, 0.1) 0%, transparent 60%);
    border-radius: 12px;
}

.main-image svg {
    width: 50%;
    height: 50%;
    color: #ffffff;
    filter: drop-shadow(0 0 20px rgba(0, 163, 255, 0.6));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.image-counter {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.5);
    padding: 0.3rem 0.8rem;
    border-radius: 16px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.gallery-nav:hover { background: rgba(0,0,0,0.7); }
.gallery-nav.prev { left: 1rem; }
.gallery-nav.next { right: 1rem; }

.thumbnail-list {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.thumbnail {
    width: 72px;
    height: 48px;
    background: #0a0e14;
    border: 2px solid transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.thumbnail.active {
    border-color: var(--accent-blue);
    background: rgba(0, 163, 255, 0.05);
}

.thumbnail svg {
    width: 24px;
    height: 24px;
    color: #ffffff;
    filter: drop-shadow(0 0 5px rgba(0, 163, 255, 0.4));
}

/* Right: Product Details */
.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.p-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.p-price {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.stars {
    display: flex;
    gap: 4px;
}

.stars svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    opacity: 0.3;
}

.badge-standard {
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    padding: 0.1rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.variant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.qty-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: rgba(255,255,255,0.1);
}

.qty-input {
    background: transparent;
    border: none;
    color: white;
    width: 20px;
    text-align: center;
    font-family: inherit;
    font-size: 0.875rem;
    outline: none;
}

.variant-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.variant-item {
    background: #11141a;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.variant-item:hover {
    background: #161a22;
}

.variant-item.selected {
    border-color: var(--accent-blue);
    background: rgba(0, 163, 255, 0.05);
}

.v-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.v-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 1rem;
}

.v-stock {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.stock-dot {
    width: 6px;
    height: 6px;
    background-color: #2ea043;
    border-radius: 50%;
}

.v-price {
    font-weight: 700;
    color: #ffffff;
    font-size: 1.125rem;
}

.variant-item.selected .v-price {
    color: var(--accent-blue);
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.btn-buy-now {
    flex: 1;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-buy-now:hover {
    background: #2563eb;
}

.btn-add-cart {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-add-cart:hover {
    background: rgba(255,255,255,0.05);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    letter-spacing: 0.1rem;
    width: 100%;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(0, 229, 255, 0.1);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .product-page-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .product-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Direct Payment Link shop */
.payment-panel {
    width: 100%;
    max-width: 980px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.section-kicker {
    color: var(--accent-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14rem;
    text-transform: uppercase;
    align-self: flex-start;
}

.section-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    align-self: flex-start;
}

.payment-card,
.license-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(13, 17, 23, 0.86);
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.payment-card:hover,
.payment-card:focus-visible,
.payment-card.selected,
.license-card:hover,
.license-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(0, 229, 255, 0.55);
    background: rgba(13, 23, 32, 0.96);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.38), 0 0 24px rgba(0, 229, 255, 0.12);
    outline: none;
}

.card-glow {
    position: absolute;
    inset: -1px;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(120deg, rgba(0, 229, 255, 0.2), transparent 38%, rgba(0, 163, 255, 0.16));
    transition: opacity 0.2s ease;
}

.payment-card:hover .card-glow,
.payment-card:focus-visible .card-glow,
.payment-card.selected .card-glow,
.license-card:hover .card-glow,
.license-card:focus-visible .card-glow {
    opacity: 1;
}

.payment-card {
    width: min(100%, 320px);
    min-height: 260px;
    border-radius: 8px;
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 1.1rem;
    text-align: center;
}

.pix-mark {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    align-self: center;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.22);
}

.pix-mark img {
    width: 44px;
    height: 44px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(52, 211, 153, 0.28));
}

.payment-copy,
.license-card-top,
.license-features,
.license-cta {
    position: relative;
    z-index: 1;
}

.payment-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.payment-name {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
}

.payment-desc {
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.45;
}

.payment-arrow {
    position: relative;
    z-index: 1;
    color: var(--accent-cyan);
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    align-self: center;
    background: rgba(0, 163, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.18);
}

.license-panel {
    width: 100%;
    margin-top: 2rem;
}

.license-panel[hidden] {
    display: none;
}

.license-panel.is-visible {
    animation: revealPanel 0.24s ease-out;
}

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

.license-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.license-card {
    min-height: 360px;
    border-radius: 8px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    appearance: none;
}

.license-card-top {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
}

.license-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: var(--accent-cyan);
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.2);
}

.license-icon svg {
    width: 24px;
    height: 24px;
}

.plan-badge {
    color: #05070a;
    background: var(--accent-cyan);
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05rem;
}

.license-name {
    position: relative;
    z-index: 1;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
}

.license-duration {
    position: relative;
    z-index: 1;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.license-price {
    position: relative;
    z-index: 1;
    color: var(--accent-blue);
    font-size: 2rem;
    font-weight: 800;
    margin-top: 1.2rem;
}

.license-stock {
    position: relative;
    z-index: 1;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    margin-top: 0.6rem;
}

.license-features {
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 1.2rem 0 1.4rem;
    padding-left: 1rem;
    font-size: 0.82rem;
    line-height: 1.35;
}

.license-cta {
    margin-top: auto;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(0, 163, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.22);
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: 700;
}

.license-card:hover .license-cta,
.license-card:focus-visible .license-cta {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

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

@media (max-width: 560px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .payment-card {
        width: min(100%, 280px);
        min-height: 236px;
    }

    .pix-mark {
        width: 60px;
        height: 60px;
    }

    .license-card {
        min-height: 330px;
    }
}
