/* ═══════════════════════════════════════════════
   takeKONTROL — cart page styles
   Loaded after tokens.css, base.css and chrome.css.
   ═══════════════════════════════════════════════ */

/* The `hidden` attribute is only `display: none` in the browser's own
           stylesheet, so ANY author rule that sets display (flex, block, grid)
           overrides it and the element stays visible. This makes `hidden`
           actually mean hidden. Must stay near the top of the sheet. */

[hidden] { display: none !important; }

* {
            box-sizing: border-box;
        }

body, html {
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            color: var(--text-main);
            line-height: 1.6;
            scroll-behavior: smooth;
            background-color: var(--primary-bg);
            transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
            overflow-x: hidden;
        }

.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* Interactive Action Elements */

.btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 12px 32px;
            text-decoration: none;
            font-weight: 500;
            border-radius: 50px;
            transition: all var(--transition-speed) ease;
            cursor: pointer;
            border: 1px solid transparent;
            font-size: 0.95rem;
            letter-spacing: 0.5px;
        }

.btn-primary:hover { background-color: var(--primary-red-hover); box-shadow: 0 4px 15px rgba(179, 32, 32, 0.4); }

/* Flush Corporate Global Header Navigation */

.tesla-header {
            position: fixed; top: 0; left: 0; width: 100%; display: flex;
            justify-content: space-between; align-items: center; padding: 16px 48px; z-index: 1000;
            background: transparent; background-image: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
            color: #ffffff; transition: background var(--transition-speed) ease, box-shadow var(--transition-speed) ease, color var(--transition-speed) ease;
        }

.tesla-header.scrolled {
            background-color: var(--header-bg-scrolled); backdrop-filter: blur(10px); background-image: none;
            box-shadow: 0 2px 20px rgba(0,0,0,0.1); border-bottom: 1px solid var(--border-color); color: var(--nav-text-scrolled);
        }

.tesla-header .logo { display: flex; align-items: center; font-weight: 700; font-size: 1.1rem; letter-spacing: 1px; }

.tesla-header a, .tesla-header .logo, .theme-toggle, .lang-toggle { color: inherit; text-decoration: none; }

.lang-toggle {
            background: none; border: none; cursor: pointer; font-size: 0.85rem; font-weight: 700;
            padding: 6px 10px; border-radius: var(--radius-corp); letter-spacing: 0.5px; transition: background var(--transition-speed) ease;
        }

.theme-toggle {
            background: none; border: none; cursor: pointer; display: flex; align-items: center;
            justify-content: center; padding: 8px; border-radius: var(--radius-corp); transition: transform 0.2s ease, background var(--transition-speed) ease;
        }

.cart-wrapper {
            position: relative; display: flex; align-items: center; cursor: pointer;
            padding: 8px; border-radius: var(--radius-corp); transition: background var(--transition-speed) ease; margin-left: 5px;
        }

.drawer-header .logo { font-weight: 700; font-size: 1.1rem; color: var(--text-heading); letter-spacing: 1px; }

/* Cart Mini Hero Cover */

.hero-mini {
            position: relative;
            height: 30vh; 
            min-height: 250px;
            width: 100vw;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            background-color: #080808;
            margin-bottom: 40px;
        }

.hero-mini h1 { font-size: 3rem; color: #ffffff; margin: 0; margin-top: 50px; }

/* Cart Specific Architecture */

.cart-grid {
            display: grid;
            grid-template-columns: 1.6fr 1fr;
            gap: 50px;
            align-items: start;
            min-height: 50vh;
        }

.cart-items-container {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

.cart-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 24px 30px;
            background-color: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-corp);
            box-shadow: var(--card-shadow);
            transition: border-color var(--transition-speed) ease;
        }

.cart-item:hover { border-color: var(--text-muted); }

.cart-item-info {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

.cart-item-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--text-heading);
        }

.cart-item-price {
            color: var(--text-muted);
            font-size: 1rem;
        }

.cart-item-actions {
            display: flex;
            align-items: center;
            gap: 30px;
        }

.qty-controls {
            display: flex;
            align-items: center;
            gap: 15px;
            background-color: var(--secondary-bg);
            border: 1px solid var(--border-color);
            border-radius: 50px;
            padding: 6px 16px;
        }

.qty-btn {
            background: none; border: none;
            color: var(--text-heading);
            font-size: 1.2rem;
            font-weight: 600;
            cursor: pointer;
            padding: 0 5px;
            transition: color var(--transition-speed);
        }

.qty-btn:hover { color: var(--primary-red); }

.qty-val { font-weight: 600; color: var(--text-heading); width: 20px; text-align: center; }

.item-total {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--text-heading);
            min-width: 90px;
            text-align: right;
        }

.remove-btn {
            background: none; border: none;
            color: var(--text-muted);
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            text-decoration: underline;
            transition: color var(--transition-speed);
        }

.remove-btn:hover { color: var(--primary-red); }

/* Order Summary Card */

.summary-card {
            background-color: var(--secondary-bg);
            padding: 40px 30px;
            border-radius: var(--radius-corp);
            border: 1px solid var(--border-color);
            position: sticky;
            top: 120px;
        }

.summary-title {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--text-heading);
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--border-color);
        }

.summary-row {
            display: flex;
            justify-content: space-between;
            color: var(--text-muted);
            margin-bottom: 15px;
            font-size: 1.05rem;
        }

.summary-total {
            display: flex;
            justify-content: space-between;
            color: var(--text-heading);
            font-size: 1.6rem;
            font-weight: 700;
            margin-top: 25px;
            padding-top: 20px;
            border-top: 1px solid var(--border-color);
        }

.checkout-btn {
            width: 100%;
            margin-top: 30px;
            padding: 16px;
            font-size: 1.1rem;
        }

.checkout-btn[disabled] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

.shipping-hint {
            font-size: 0.82rem; color: var(--text-muted);
            background: var(--card-bg); border: 1px dashed var(--border-color);
            border-radius: 8px; padding: 8px 12px; margin: -4px 0 15px;
        }

.shipping-hint.good { color: #16a34a; border-color: rgba(22,163,74,0.4); border-style: solid; }

.vat-note {
            font-size: 0.78rem; color: var(--text-muted); line-height: 1.5;
            margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--border-color);
        }

.cart-item-sku {
            font-size: 0.72rem; color: var(--text-muted); opacity: 0.7;
            letter-spacing: 0.06em; text-transform: uppercase;
        }

.qty-val {
            font-weight: 600; color: var(--text-heading); width: 34px; text-align: center;
            background: transparent; border: none; outline: none; font-size: 1rem;
            font-family: inherit; -moz-appearance: textfield;
        }

.qty-val:focus { border-bottom: 2px solid var(--primary-red); }

.empty-cart-msg { display: flex; flex-direction: column; align-items: center; }

.empty-cart-msg {
            text-align: center;
            padding: 80px 20px;
            background: var(--card-bg);
            border-radius: var(--radius-corp);
            border: 1px dashed var(--border-color);
            color: var(--text-muted);
            font-size: 1.2rem;
            font-weight: 500;
        }

.back-link {
            display: inline-block;
            margin-bottom: 25px;
            color: var(--text-muted);
            text-decoration: none;
            font-weight: 500;
            transition: color var(--transition-speed);
        }

.back-link:hover { color: var(--primary-red); }

/* Layout Footer */

footer { background-color: var(--footer-bg); border-top: 1px solid var(--border-color); padding: 80px 0 40px; color: var(--text-muted); transition: background-color var(--transition-speed) ease; }

.footer-bottom { border-top: 1px solid var(--border-color); padding-top: 30px; display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; }

/* Responsive Breakpoints */

@media (max-width: 992px) {
            .cart-grid { grid-template-columns: 1fr; }
            .tesla-header { padding: 16px 24px; }
        }

@media (max-width: 768px) {
            .container { padding: 0 24px; }
            .section-padding { padding: 50px 0; }
            .desktop-only, .center-nav { display: none !important; }
            .mobile-toggle { display: inline-flex !important; }
            .cart-item { flex-direction: column; align-items: flex-start; gap: 20px; padding: 20px; }
            .cart-item-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
            .footer-grid { grid-template-columns: 1fr; gap: 40px; }
            .footer-form { flex-direction: column; }
            .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
        }
