/* styliste.lv 3D PoC - clean minimal UI */

:root {
    --bg: #fafaf7;
    --surface: #ffffff;
    --border: #e5e1da;
    --text: #2a2a2a;
    --text-muted: #6b6b6b;
    --accent: #d63384;        /* matching magenta */
    --accent-soft: #f8d7e6;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
}

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    overflow: hidden;
}

header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 32px;
    z-index: 10;
    display: flex;
    align-items: baseline;
    gap: 16px;
}

header h1 {
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

header .subtitle {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

main {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 100vh;
}

/* Products sidebar */
.products {
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 80px 24px 24px;
    overflow-y: auto;
}

.products h2 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.product-card:hover {
    box-shadow: var(--shadow);
}

.product-thumb {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: #f5f3ee;
    display: block;
}

.product-info {
    padding: 14px 16px 16px;
}

.product-info h3 {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.product-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
    margin-bottom: 12px;
}

.btn-toggle {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.btn-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-toggle.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-toggle.active::before {
    content: "* ";
}

.calibration {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: space-between;
}

.cal-group {
    display: flex;
    gap: 2px;
    flex: 1;
}

.cal-btn {
    flex: 1;
    padding: 6px 0;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 6px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.1s ease;
    min-width: 32px;
}

.cal-btn:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.cal-btn:active {
    transform: scale(0.95);
}

/* Stage / 3D scene */
.stage {
    position: relative;
    background: linear-gradient(180deg, #f0eee8 0%, #e6e3da 100%);
}

#canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.stage-status {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    pointer-events: none;
    transition: opacity 0.3s;
}

.stage-status.hidden {
    opacity: 0;
}

@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 220px;
    }
    .products {
        order: 2;
        border-right: none;
        border-top: 1px solid var(--border);
        padding: 16px;
        display: flex;
        gap: 12px;
        overflow-x: auto;
    }
    .products h2 { display: none; }
    .product-card {
        flex: 0 0 200px;
        margin-bottom: 0;
    }
    .product-thumb {
        height: 120px;
    }
}
