/* ============================================================
   SOLODOME — product checkout page
   Amazon-style layout, Solodome colors
   ============================================================ */

:root {
    --ck-bg: #0A0A0A;
    --ck-surface: #1A1A1A;
    --ck-surface-2: #141414;
    --ck-border: rgba(255, 255, 255, 0.08);
    --ck-text: #FAFAFA;
    --ck-muted: #B8B8B8;
    --ck-blue: #0D47A1;
    --ck-blue-bright: #2E6EC4;
    --ck-gold: #D4AF37;
    --ck-green: #3AA76D;
    --ck-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
    --ck-radius: 10px;
    --ck-max: 1280px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--ck-bg);
    color: var(--ck-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--ck-blue-bright); text-decoration: none; }
a:hover { color: var(--ck-gold); text-decoration: underline; }

.ck-container { max-width: var(--ck-max); margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
.ck-topbar {
    background: #0D0D0D;
    color: var(--ck-muted);
    font-size: 0.78rem;
    padding: 6px 0;
    border-bottom: 1px solid var(--ck-border);
}
.ck-topbar .ck-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ck-topbar i { color: var(--ck-gold); margin-right: 4px; }
.ck-topbar-right { white-space: nowrap; }

/* ---------- Header ---------- */
.ck-header {
    background: rgba(10, 10, 10, 0.92);
    border-bottom: 1px solid var(--ck-border);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.ck-header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 60px;
}
.ck-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    letter-spacing: 1px;
    color: var(--ck-text);
    font-size: 1.05rem;
}
.ck-logo:hover { text-decoration: none; color: var(--ck-text); }
.ck-logo img { filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.25)); }
.ck-header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--ck-muted);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ck-sep { color: #555; }
.ck-current { color: var(--ck-text); font-weight: 600; }
.ck-back-link {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--ck-gold);
}
.ck-back-link:hover { color: var(--ck-text); }

/* ---------- Main layout ---------- */
.ck-main { padding: 24px 0 60px; }
.ck-mobile-title { display: none; }

.ck-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
    gap: 40px;
    align-items: start;
}

/* ---------- Gallery ---------- */
.ck-gallery { position: sticky; top: 80px; }

.ck-gallery-main {
    position: relative;
    background: var(--ck-surface);
    border: 1px solid var(--ck-border);
    border-radius: var(--ck-radius);
    overflow: hidden;
    aspect-ratio: 1 / 1;
}
.ck-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.25s ease;
}
.ck-gallery-main:hover img { transform: scale(1.05); }

.ck-gallery-main img.ck-main-contain {
    object-fit: contain;
    object-position: center;
}
.ck-gallery-main:hover img.ck-main-contain { transform: none; }

.ck-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--ck-border);
    background: rgba(10, 10, 10, 0.72);
    color: var(--ck-text);
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.15s, color 0.15s;
    backdrop-filter: blur(4px);
}
.ck-gallery-nav:hover { background: rgba(26, 26, 26, 0.9); color: var(--ck-gold); }
.ck-gallery-prev { left: 12px; }
.ck-gallery-next { right: 12px; }

.ck-gallery-zoom {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
    pointer-events: none;
}

.ck-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
.ck-thumbs::-webkit-scrollbar { height: 6px; }
.ck-thumbs::-webkit-scrollbar-track { background: transparent; }
.ck-thumbs::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.ck-thumb {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    scroll-snap-align: start;
    border: 1px solid var(--ck-border);
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background: var(--ck-surface);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ck-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.ck-thumb img.ck-thumb-contain {
    object-fit: contain;
}
.ck-thumb:hover { border-color: var(--ck-blue-bright); }
.ck-thumb.active {
    border: 2px solid var(--ck-gold);
    box-shadow: 0 0 0 1px var(--ck-gold);
}

/* ---------- Buy box ---------- */
.ck-title { font-size: 1.5rem; font-weight: 700; line-height: 1.25; }

.ck-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 14px;
    flex-wrap: wrap;
}
.ck-reviews-link { font-size: 0.85rem; }
.ck-badge-made {
    margin-left: auto;
    background: rgba(13, 71, 161, 0.18);
    color: var(--ck-blue-bright);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.ck-price-block { margin-bottom: 4px; }
.ck-price { font-size: 1.9rem; font-weight: 700; }
.ck-price-note { color: var(--ck-muted); font-size: 0.85rem; }

.ck-rule { border: none; border-top: 1px solid var(--ck-border); margin: 18px 0; }

/* ---------- Bullets ---------- */
.ck-bullets { list-style: none; margin: 4px 0; }
.ck-bullets li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 7px;
    font-size: 0.9rem;
    color: var(--ck-muted);
}
.ck-bullets li::before {
    content: "\f058";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--ck-gold);
    font-size: 0.88rem;
}

/* ---------- Buy summary ---------- */
.ck-buy-summary {
    border: 1px solid var(--ck-border);
    border-radius: var(--ck-radius);
    padding: 16px 18px;
    background: var(--ck-surface);
}
.ck-buy-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--ck-muted);
}
.ck-buy-row.ck-buy-total {
    border-top: 1px solid var(--ck-border);
    padding-top: 12px;
    margin: 12px 0 16px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ck-text);
}
.ck-buy-row.ck-buy-total span:last-child { color: var(--ck-gold); }

.ck-buy-btn {
    display: block;
    width: 100%;
    border: none;
    border-radius: 50px;
    background: var(--ck-blue);
    color: var(--ck-text);
    cursor: pointer;
    padding: 13px 16px;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: background 0.15s, transform 0.05s;
    box-shadow: 0 2px 8px rgba(13, 71, 161, 0.35);
}
.ck-buy-btn:hover { background: var(--ck-blue-bright); }
.ck-buy-btn:active { transform: translateY(1px); }
.ck-buy-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.ck-buy-btn .ck-buy-btn-main { display: block; }
.ck-buy-btn .ck-buy-btn-sub { display: block; font-size: 0.72rem; font-weight: 500; opacity: 0.8; margin-top: 1px; }
.ck-buy-btn .ck-buy-btn-main i { color: var(--ck-gold); }

.ck-trust {
    display: flex;
    gap: 14px;
    margin: 14px 0 4px;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--ck-muted);
}
.ck-trust i { color: var(--ck-gold); }

.ck-stock { color: var(--ck-green); font-size: 0.88rem; font-weight: 600; margin-top: 10px; }
.ck-stock i { font-size: 0.55rem; vertical-align: middle; }

/* ---------- Details / tabs ---------- */
.ck-details { margin-top: 48px; border-top: 1px solid var(--ck-border); padding-top: 24px; }
.ck-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--ck-border);
    margin-bottom: 20px;
    overflow-x: auto;
}
.ck-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ck-muted);
    cursor: pointer;
    white-space: nowrap;
}
.ck-tab.active { color: var(--ck-text); border-bottom-color: var(--ck-gold); }
.ck-tab-panel { display: none; animation: ckfade 0.2s ease; color: var(--ck-muted); }
.ck-tab-panel.active { display: block; }
@keyframes ckfade { from { opacity: 0; } to { opacity: 1; } }

.ck-tab-panel p { margin-bottom: 12px; }
.ck-tab-panel ul { padding-left: 20px; margin-bottom: 12px; }
.ck-tab-panel li { margin-bottom: 6px; }

.ck-spec-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0;
    border: 1px solid var(--ck-border);
    border-radius: var(--ck-radius);
    overflow: hidden;
}
.ck-spec-row { display: contents; }
.ck-spec-key {
    background: var(--ck-surface);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ck-text);
    border-bottom: 1px solid var(--ck-border);
}
.ck-spec-val {
    padding: 12px 16px;
    font-size: 0.88rem;
    color: var(--ck-muted);
    border-bottom: 1px solid var(--ck-border);
}

/* ---------- Reviews ---------- */
.ck-reviews { margin-top: 40px; border-top: 1px solid var(--ck-border); padding-top: 24px; }
.ck-reviews h2 { font-size: 1.3rem; margin-bottom: 20px; }
.ck-review-list { display: flex; flex-direction: column; gap: 18px; }
.ck-review { border-bottom: 1px solid var(--ck-border); padding-bottom: 16px; }
.ck-review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ck-review-head strong { color: var(--ck-text); }
.ck-review p { margin-bottom: 6px; color: var(--ck-muted); }
.ck-review-meta { color: var(--ck-muted); font-size: 0.78rem; opacity: 0.75; }

/* ---------- Sticky mobile bar ---------- */
.ck-stickybar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.96);
    border-top: 1px solid var(--ck-border);
    padding: 10px 16px;
    align-items: center;
    gap: 16px;
    z-index: 60;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}
.ck-sticky-price { display: flex; flex-direction: column; font-weight: 700; }
.ck-sticky-sub { font-size: 0.72rem; color: var(--ck-muted); font-weight: 400; }
.ck-sticky-buy { flex: 1; }

/* ---------- Footer ---------- */
.ck-footer {
    background: #0D0D0D;
    color: var(--ck-muted);
    text-align: center;
    padding: 24px 0;
    font-size: 0.82rem;
    border-top: 1px solid var(--ck-border);
}
.ck-footer span { color: var(--ck-gold); }

/* ---------- Loading overlay ---------- */
.ck-loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 200;
    align-items: center;
    justify-content: center;
}
.ck-loading.show { display: flex; }
.ck-loading-box {
    background: var(--ck-surface);
    border: 1px solid var(--ck-border);
    border-radius: 12px;
    padding: 30px 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.ck-loading-box i { font-size: 2rem; color: var(--ck-gold); margin-bottom: 12px; }
.ck-loading-box p { font-weight: 600; color: var(--ck-text); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .ck-header-nav { display: none; }
    .ck-header-inner { justify-content: center; }

    .ck-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .ck-gallery { position: static; min-width: 0; }
    .ck-buybox { min-width: 0; }
    .ck-mobile-title { display: block; margin-bottom: 12px; }
    .ck-mobile-title h1 { font-size: 1.3rem; }
    .ck-buybox .ck-title { display: none; }
    .ck-back-link { display: none; }
    .ck-stickybar { display: flex; }
    .ck-main { padding-bottom: 90px; }
    .ck-footer { padding-bottom: 84px; }
}

@media (max-width: 480px) {
    .ck-topbar-right { display: none; }
    .ck-spec-grid { grid-template-columns: 130px 1fr; }
    .ck-gallery-main:hover img { transform: none; }
}
