/**
 * Kinetix Athletics — Cart Drawer & Free Shipping Meter Styles
 * Luxury Obsidian Navy & Electric Ice Cyan Aesthetic
 * Conforms to ISO 9241 Ergonomic Interface Principles & Spring Motion Dynamics
 */

.kinetix-drawer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0.35s ease;
}
.kinetix-drawer.open {
    pointer-events: auto;
    visibility: visible;
}

.kinetix-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 12, 24, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.kinetix-drawer.open .kinetix-drawer-backdrop {
    opacity: 1;
}

.kinetix-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 440px;
    background: rgba(10, 20, 36, 0.96);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border-left: 1px solid var(--border-glass);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.8), inset 1px 0 0 rgba(255, 255, 255, 0.08);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-drawer);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}
.kinetix-drawer.open .kinetix-drawer-panel {
    transform: translateX(0);
}

/* Drawer Header */
.kinetix-drawer-header {
    padding: 1.5rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-glass);
    background: #08111f;
}
.drawer-heading-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.heading-glyph {
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.drawer-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.drawer-count-tag {
    color: var(--accent-primary);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 800;
}
.drawer-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    transition: all 0.2s ease;
}
.drawer-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

/* Dynamic Free Shipping Progress Meter */
.kinetix-shipping-meter-wrap {
    background: rgba(56, 189, 248, 0.04);
    border-bottom: 1px solid var(--border-glass);
    padding: 0.95rem 1.75rem;
}
.meter-text-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}
.meter-msg { font-weight: 600; color: var(--text-secondary); }
.meter-msg strong { color: var(--text-primary); }
.meter-pct { font-family: var(--font-sans); font-weight: 800; color: var(--accent-primary); }
.meter-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}
.meter-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #38bdf8 100%);
    border-radius: 9999px;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
    transition: width 0.4s var(--ease-spring);
}

/* Items Scroll Area */
.kinetix-drawer-items {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-deep);
}

/* Cart Item Card */
.kinetix-cart-item {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-glass);
    border-radius: 1.25rem;
    padding: 1rem 1.15rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    transition: border-color 0.2s ease, transform 0.2s var(--ease-spring);
}
.kinetix-cart-item:hover {
    border-color: var(--border-subtle);
    transform: translateY(-2px);
}
.item-gear-badge {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    flex-shrink: 0;
}
.item-meta-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.cart-item-title {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
}
.cart-item-variants {
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    color: var(--text-muted);
}
.cart-item-price {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--accent-primary);
}
.cart-qty-stepper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.35rem;
}
.stepper-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.75rem;
    touch-action: manipulation;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stepper-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-deep);
    border-color: var(--accent-primary);
}
.stepper-val {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
    color: var(--text-primary);
}
.cart-remove-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.4rem;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}
.cart-remove-btn:hover { color: var(--accent-crimson); }

/* Empty Bag State */
.kinetix-bag-empty {
    text-align: center;
    padding: 4.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.empty-bolt {
    color: var(--accent-primary);
    margin-bottom: 1.25rem;
    opacity: 0.7;
    filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.4));
}
.empty-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.empty-sub {
    font-size: 0.84375rem;
    color: var(--text-secondary);
    max-width: 280px;
    margin-bottom: 1.5rem;
    line-height: 1.55;
}

/* Drawer Footer */
.kinetix-drawer-footer {
    padding: 1.5rem 1.75rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border-glass);
    background: #08111f;
}
.drawer-subtotal-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}
.subtotal-label { font-size: 0.9375rem; font-weight: 700; color: var(--text-secondary); }
.subtotal-val {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}
.drawer-shipping-note {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}
.kinetix-btn-checkout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--text-primary);
    color: var(--bg-deep);
    border: none;
    border-radius: 9999px;
    padding: 0.95rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.6), 0 0 20px rgba(248, 250, 252, 0.2);
    transition: transform 0.25s var(--ease-spring), background-color 0.2s, box-shadow 0.25s;
}
.kinetix-btn-checkout:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -4px var(--accent-primary-glow), 0 0 25px rgba(56, 189, 248, 0.35);
}
.kinetix-btn-checkout:active {
    transform: scale(0.98);
}
.checkout-arrow {
    font-size: 1.125rem;
    font-weight: 900;
}
.drawer-security-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* Floating Toast Notification */
.kinetix-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(14, 28, 49, 0.96);
    border: 1px solid var(--border-highlight);
    border-radius: 9999px;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7), 0 0 25px var(--accent-primary-glow);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.35s var(--ease-spring), opacity 0.3s ease;
}
.kinetix-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.toast-inner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary);
}
.toast-bolt { color: var(--accent-primary); }

/* Responsive Drawer & Mobile Touch Ergonomics */
@media (max-width: 480px) {
    .kinetix-drawer-panel {
        max-width: 100%;
        width: 100%;
        border-left: none;
    }
    .kinetix-drawer-header {
        padding: 1.15rem 1.25rem;
    }
    .drawer-close-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
    .kinetix-drawer-footer {
        padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    }
    .kinetix-cart-item {
        padding: 0.85rem;
        gap: 0.75rem;
    }
    .cart-item-title {
        font-size: 0.875rem;
    }
    .cart-qty-stepper {
        padding: 0.15rem;
    }
    .stepper-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }
    .kinetix-btn-checkout {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }
    .kinetix-toast {
        left: 1rem;
        right: 1rem;
        width: auto;
        max-width: calc(100vw - 2rem);
        transform: translateY(100px);
        padding: 0.75rem 1rem;
        border-radius: 12px;
    }
    .kinetix-toast.show {
        transform: translateY(0);
    }
}
