: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;
    }
}
