/* ─────────────────────────────────────────────────────────────────────
 * Audubon Audio — Checkout styles
 *
 * Single source of truth for cart sidebar + auth/blocked/guest modals.
 * All classes are namespaced with .ck- to avoid collisions with existing
 * page styles.
 * ───────────────────────────────────────────────────────────────────── */

/* ─── Cart sidebar ─────────────────────────────────────────────────── */
.ck-cart {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: #0d0f13;
    border-left: 1px solid rgba(212, 175, 55, 0.18);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9000;
    display: flex;
    flex-direction: column;
    color: #f4f4f4;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
.ck-cart.active { transform: translateX(0); }

.ck-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ck-cart-header h3 {
    margin: 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.15rem;
    letter-spacing: 3px;
    color: #d4af37;
}

.ck-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}
.ck-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.ck-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.ck-empty {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    text-align: center;
    margin-top: 30px;
}

.ck-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.ck-item:last-child { border-bottom: none; }

.ck-item-name {
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 4px;
}
.ck-item-price {
    color: #d4af37;
    font-size: 0.78rem;
    letter-spacing: 1px;
}
.ck-remove {
    background: transparent;
    border: none;
    color: #ff5d5d;
    font-size: 0.7rem;
    letter-spacing: 1px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 3px;
    transition: background 0.15s;
}
.ck-remove:hover { background: rgba(255, 93, 93, 0.1); }

.ck-checkout {
    padding: 18px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.25);
}
.ck-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
}
.ck-total-label {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}
.ck-total-amount {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    color: #d4af37;
    letter-spacing: 1px;
}

/* ─── Buttons ──────────────────────────────────────────────────────── */
.ck-btn-primary {
    background: #d4af37;
    color: #0a0a0a;
    border: none;
    padding: 13px 22px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease, transform 0.1s ease;
    font-family: inherit;
    min-height: 44px;
}
.ck-btn-primary:hover { background: #e5c65a; }
.ck-btn-primary:active { transform: translateY(1px); }
.ck-btn-primary:disabled {
    background: rgba(212, 175, 55, 0.4);
    cursor: not-allowed;
}

.ck-btn-secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 13px 22px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease, border-color 0.2s ease;
    font-family: inherit;
    min-height: 44px;
}
.ck-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.32);
}

/* ─── Modal (auth / already-owned / guest email) ───────────────────── */
.ck-modal {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ck-modal.active { display: flex; }

.ck-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ck-modal-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: #0d0f13;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 12px;
    padding: 38px 32px 30px;
    color: #f4f4f4;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.ck-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
}

#ck-modal-title {
    margin: 0 0 14px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.7rem;
    letter-spacing: 1.5px;
}

.ck-modal-sub {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0 0 18px;
}

.ck-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.ck-owned-list {
    margin: 0 0 18px;
    padding-left: 22px;
    color: #d4af37;
    font-size: 0.92rem;
}
.ck-owned-list li { margin-bottom: 4px; }

/* ─── Tabs (login / signup) ────────────────────────────────────────── */
.ck-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ck-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(255, 255, 255, 0.45);
    padding: 10px 0;
    font-family: inherit;
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.ck-tab.active {
    color: #d4af37;
    border-bottom-color: #d4af37;
}
.ck-tab:hover:not(.active) { color: rgba(255, 255, 255, 0.7); }

/* ─── Form ─────────────────────────────────────────────────────────── */
.ck-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ck-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}
.ck-form input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f4f4f4;
    padding: 12px 14px;
    border-radius: 4px;
    font-size: 16px;   /* prevents iOS auto-zoom */
    font-family: inherit;
    transition: border-color 0.2s;
    min-height: 44px;
    box-sizing: border-box;
}
.ck-form input:focus {
    outline: none;
    border-color: #d4af37;
}
.ck-form small {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.7rem;
    text-transform: none;
    letter-spacing: 0;
}

.ck-form-msg {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    min-height: 1em;
}
.ck-form-msg.error { color: #ff7a7a; }

/* ─── Mobile responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
    .ck-cart {
        width: 100vw;
        max-width: 100vw;
        border-left: none;
    }
    .ck-modal-card {
        padding: 32px 22px 24px;
        max-height: 95vh;
    }
    #ck-modal-title { font-size: 1.5rem; }
}
