/* ═══════════════════════════════════════════════════════
   PRICELIO – Product Detail Page Styles
═══════════════════════════════════════════════════════ */

/* NAV */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(8,3,18,.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-logo-mark {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
}

.nav-logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-hover);
    border-radius: 100px;
    color: var(--text-secondary);
    font-family: 'Manrope', sans-serif;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s ease;
}

.btn-back:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: var(--accent-primary-glow);
}

/* CONTENT AREA */
.page {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
    position: relative;
    z-index: 1;
}

/* LOADING & ERROR */
#loading, #error {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin: 0 auto 1.25rem;
}

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

/* HERO SECTION */
.product-hero {
    text-align: center;
    padding: 2rem 0 1.5rem;
    animation: fadeUp .4s ease;
}

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

.product-img-wrap {
    width: 160px;
    height: 160px;
    margin: 0 auto 1.5rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-img-wrap img { width: 100%; height: 100%; object-fit: contain; padding: .75rem; }

.product-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.25rem, 4vw, 1.7rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1.25rem;
    letter-spacing: -.01em;
}

.best-price-wrap {
    display: inline-flex;
    align-items: baseline;
    gap: .5rem;
    background: linear-gradient(135deg, rgba(0,212,170,.1), rgba(0,212,170,.05));
    border: 1px solid rgba(0,212,170,.25);
    border-radius: var(--radius-lg);
    padding: .75rem 1.5rem;
    margin-bottom: .5rem;
}

.best-price-val {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-secondary);
}

.best-price-store { font-size: .9rem; color: var(--text-secondary); font-weight: 600; }

/* PRICE CARDS */
.price-card {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem 1.1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: .6rem;
    transition: all .2s ease;
    animation: fadeUp .35s ease both;
}

.price-card.best {
    border-color: rgba(0,234,208,0.55);
    background: rgba(0,234,208,0.08);
    box-shadow:
        0 12px 32px rgba(0,0,0,0.22),
        0 0 24px rgba(0,234,208,0.18),
        inset -1px -1px 4px rgba(0,140,120,0.20),
        inset 1px 1px 4px rgba(100,255,230,0.15);
}

.price-card:hover { border-color: var(--border-hover); transform: translateX(3px); }

.chain-badge {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: .8rem;
    flex-shrink: 0;
    color: #fff;
}

.price-card-body { flex: 1; min-width: 0; }

.price-chain { font-weight: 700; font-size: .95rem; display: flex; align-items: center; gap: .4rem; }

.price-val { font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; font-weight: 700; }

.price-card.best .price-val { color: var(--accent-secondary); }

.price-old { font-size: .78rem; color: var(--text-muted); text-decoration: line-through; display: block; margin-bottom: .1rem; }

.save-badge { display: inline-block; font-size: .65rem; font-weight: 700; padding: .15rem .45rem; background: rgba(255,179,71,.15); color: #ffb347; border-radius: 100px; margin-top: .2rem; }

/* INFO BOX */
.info-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.info-row { display: flex; gap: .75rem; font-size: .85rem; }

.info-label { color: var(--text-muted); min-width: 100px; flex-shrink: 0; }

.info-value { color: var(--text-secondary); }

.mobile-nav-link { color: var(--text-secondary); text-decoration: none; font-weight: 600; transition: color .2s; }
.mobile-nav-link:hover { color: #fff; }

/* ── Šviesi tema: product page override ─────────────────── */
:root[data-theme="light"] nav { background: var(--nav-bg, rgba(243,240,251,0.85)); }
:root[data-theme="light"] .product-img-wrap { background: var(--bg-card); }
:root[data-theme="light"] .mobile-nav-link:hover { color: var(--accent-primary); }
