/* --- PROMĚNNÉ --- */
:root {
    --page-bg: #ffffff;
    --text-main: #000000;
    --text-muted: #666666;
    --card-bg: #f5f5f7;
    --border: rgba(0, 0, 0, 0.1);
    --btn-bg: #000000;
    --btn-text: #ffffff;
}

body.dark-mode {
    --page-bg: #0a0a0a;
    --text-main: #ffffff;
    --text-muted: #888888;
    --card-bg: #161616;
    --border: rgba(255, 255, 255, 0.1);
    --btn-bg: #ffffff;
    --btn-text: #000000;
}

body {
    font-family: "Google Sans Flex", sans-serif;
    background-color: var(--page-bg);
    color: var(--text-main);
    margin: 0;
    transition: background 0.4s ease;
}

/* --- NAVIGACE (Sjednocená animace) --- */
.top-nav {
    position: fixed; top: 30px; left: 50%; transform: translateX(-50%);
    z-index: 2100; display: flex; gap: 40px;
}

.nav-link {
    color: var(--text-muted); text-decoration: none;
    font-family: "Funnel Sans", sans-serif; font-size: 0.85rem;
    letter-spacing: 2px; font-weight: 600; text-transform: uppercase;
    padding-bottom: 5px; position: relative;
    transition: color 0.4s ease;
}

.nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 50%;
    width: 0; height: 2px; background: var(--text-main);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.nav-link:hover { color: var(--text-main); }
.nav-link:hover::after { width: 100%; }

/* --- THEME SWITCH (Sjednocený) --- */
.theme-switch-wrapper {
    position: fixed; bottom: 30px; left: 30px; z-index: 2200;
    background: rgba(128, 128, 128, 0.1); padding: 10px; border-radius: 50px;
    backdrop-filter: blur(5px); transition: 0.3s;
}

.theme-switch { display: inline-block; height: 20px; width: 44px; position: relative; }
.theme-switch input { display: none; }
.slider { background-color: #ccc; bottom: 0; cursor: pointer; left: 0; position: absolute; right: 0; top: 0; transition: .4s; border-radius: 34px; }
.slider:before { background-color: white; bottom: 3px; content: ""; height: 14px; left: 4px; position: absolute; transition: .4s; width: 14px; border-radius: 50%; }
input:checked + .slider { background-color: #444; }
input:checked + .slider:before { transform: translateX(22px); }

/* --- HLAVIČKA --- */
.shop-container { padding: 140px 5% 100px; max-width: 1200px; margin: 0 auto; }

.page-title {
    font-size: clamp(3rem, 10vw, 8rem); font-weight: 800;
    letter-spacing: -3px; margin-bottom: 40px; text-align: left;
}

/* --- FILTRY (Animované) --- */
.shop-filters { display: flex; align-items: center; gap: 15px; margin-bottom: 60px; }

.filter-btn {
    padding: 10px 25px; border-radius: 50px; border: 1px solid var(--border);
    background: transparent; color: var(--text-muted); cursor: pointer;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover { transform: scale(1.05); color: var(--text-main); border-color: var(--text-main); }
.filter-btn.active { background: var(--text-main); color: var(--page-bg); border-color: var(--text-main); }

/* --- PRODUKTY --- */
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.product-card {
    background: var(--card-bg); border-radius: 24px; padding: 40px;
    position: relative; transition: all 0.4s ease;
}

.product-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }

.product-image { height: 250px; display: flex; align-items: center; justify-content: center; margin-bottom: 30px; }
.product-image img { max-width: 100%; max-height: 100%; object-fit: contain; }

.badge {
    position: absolute; top: 25px; left: 25px; background: var(--text-main);
    color: var(--page-bg); padding: 5px 12px; border-radius: 6px;
    font-size: 0.6rem; font-weight: 900; text-transform: uppercase;
}

.product-info h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.price { font-size: 1rem; color: var(--text-muted); font-weight: 500; }

.add-to-cart {
    position: absolute; bottom: 35px; right: 35px; width: 48px; height: 48px;
    border-radius: 50%; border: none; background: var(--btn-bg);
    color: var(--btn-text); font-size: 1.5rem; cursor: pointer;
    transition: transform 0.2s;
}

.add-to-cart:active { transform: scale(0.9); }

/* --- FLOATING BAR --- */
.floating-shop-bar {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: var(--btn-bg); padding: 15px 40px; border-radius: 100px;
    display: flex; gap: 40px; box-shadow: 0 10px 50px rgba(0,0,0,0.3); z-index: 1000;
}

.f-btn { background: transparent; border: none; color: var(--btn-text); cursor: pointer; position: relative; transition: 0.3s; }
.f-btn:hover { transform: scale(1.1); }

#cart-count {
    position: absolute; top: -8px; right: -12px; background: #ff3b30;
    color: white; font-size: 0.6rem; width: 18px; height: 18px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 900; border: 2px solid var(--btn-bg);
}



/* --- 3D MODEL OVERLAY --- */
.model-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: none; /* Skryto defaultně */
    opacity: 0;
    transition: opacity 0.4s ease;
    justify-content: center;
    align-items: center;
}

.model-overlay.active {
    display: flex;
    opacity: 1;
}

.model-container {
    width: 80%;
    height: 70%;
    max-width: 1000px;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.model-container iframe {
    width: 100%;
    height: 100%;
}

.close-model {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 50px;
    color: white;
    cursor: pointer;
    z-index: 3001;
    transition: transform 0.3s ease;
}

.close-model:hover {
    transform: scale(1.2);
}

/* Update card for clickability */
.product-card {
    cursor: pointer;
}

@media (max-width: 768px) { .page-title { font-size: 4rem; } .shop-filters { flex-wrap: wrap; } }

