/* ============================================
   PRE-ORDER PAGE - Sidebar Layout
   Based on etrade/shop-sidebar.html structure
   Uses CEO Toys dark/orange theme vars from custom.css
   ============================================ */

/* ============================================
   BREADCRUMB BANNER
   ============================================ */
.preorder-banner {
    background: linear-gradient(135deg, var(--ceo-black) 0%, #1a1a1a 50%, #2d2d2d 100%);
    padding: 48px 0;
    position: relative;
    overflow: hidden;
}

.preorder-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,107,0,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.preorder-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.preorder-banner .inner {
    position: relative;
    z-index: 2;
}

.preorder-banner .breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    margin: 0 0 12px 0;
    padding: 0;
}

.preorder-banner .breadcrumb-list li a {
    color: var(--ceo-gray-300, #999);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.preorder-banner .breadcrumb-list li a:hover {
    color: var(--ceo-orange);
}

.preorder-banner .breadcrumb-list .separator {
    width: 4px;
    height: 4px;
    background: var(--ceo-gray-500, #777);
    border-radius: 50%;
    display: inline-block;
}

.preorder-banner .breadcrumb-list .current {
    color: var(--ceo-orange);
    font-weight: 600;
    font-size: 14px;
}

.preorder-banner .banner-title {
    font-family: var(--ceo-font);
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.preorder-banner .banner-title .accent {
    color: var(--ceo-orange);
}

.preorder-banner .banner-subtitle {
    color: var(--ceo-gray-300, #999);
    font-size: 15px;
    margin: 8px 0 0 0;
}

/* ============================================
   SIDEBAR
   ============================================ */
.preorder-sidebar {
    background: var(--ceo-black);
    border-radius: var(--ceo-radius);
    padding: 24px;
    position: sticky;
    top: 80px;
}

.sidebar-section {
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 20px;
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-section .section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    padding: 0;
    margin: 0 0 14px 0;
}

.sidebar-section .section-head h6 {
    font-family: var(--ceo-font);
    font-size: 13px;
    font-weight: 700;
    color: var(--ceo-orange);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.sidebar-section .section-head i {
    color: var(--ceo-gray-500, #777);
    font-size: 12px;
    transition: transform 0.3s;
}

.sidebar-section.collapsed .section-head i {
    transform: rotate(-90deg);
}

.sidebar-section.collapsed .section-body {
    display: none;
}

/* Category Checkboxes */
.sidebar-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-categories li {
    margin-bottom: 8px;
}

.sidebar-categories label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--ceo-gray-300, #bbb);
    font-size: 14px;
    font-weight: 400;
    transition: color 0.3s;
}

.sidebar-categories label:hover {
    color: var(--ceo-orange);
}

.sidebar-categories input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--ceo-gray-500, #777);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s;
}

.sidebar-categories input[type="checkbox"]:checked {
    background: var(--ceo-orange);
    border-color: var(--ceo-orange);
}

.sidebar-categories input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 10px;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.sidebar-categories .cat-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--ceo-gray-500, #777);
    background: rgba(255,255,255,0.06);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Price Range */
.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.price-range-inputs input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: #fff;
    font-family: var(--ceo-font);
    font-size: 13px;
    text-align: center;
    width: 100%;
}

.price-range-inputs input:focus {
    outline: none;
    border-color: var(--ceo-orange);
}

.price-range-inputs .separator {
    color: var(--ceo-gray-500, #777);
    font-size: 14px;
    font-weight: 600;
}

.price-apply-btn {
    width: 100%;
    padding: 10px;
    background: var(--ceo-orange);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: var(--ceo-font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.price-apply-btn:hover {
    background: #e06000;
}

/* Sort Radios */
.sidebar-sort-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-sort-list li {
    margin-bottom: 8px;
}

.sidebar-sort-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--ceo-gray-300, #bbb);
    font-size: 14px;
    transition: color 0.3s;
}

.sidebar-sort-list label:hover {
    color: var(--ceo-orange);
}

.sidebar-sort-list input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--ceo-gray-500, #777);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s;
}

.sidebar-sort-list input[type="radio"]:checked {
    border-color: var(--ceo-orange);
}

.sidebar-sort-list input[type="radio"]:checked::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--ceo-orange);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Reset Button */
.sidebar-reset-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px solid var(--ceo-orange);
    border-radius: var(--ceo-radius-sm);
    color: var(--ceo-orange);
    font-family: var(--ceo-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sidebar-reset-btn:hover {
    background: var(--ceo-orange);
    color: #fff;
}

/* ============================================
   PRODUCT GRID TOP BAR
   ============================================ */
.preorder-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.preorder-topbar .results-count {
    font-size: 14px;
    color: var(--ceo-gray-500, #777);
}

.preorder-topbar .results-count strong {
    color: var(--ceo-black);
    font-weight: 700;
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--ceo-black);
    color: var(--ceo-orange);
    border: 2px solid var(--ceo-orange);
    border-radius: var(--ceo-radius-sm);
    font-family: var(--ceo-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-filter-toggle:hover {
    background: var(--ceo-orange);
    color: #fff;
}

/* ============================================
   PRE-ORDER BADGE ON PRODUCT CARD
   ============================================ */
.badge-preorder {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #7C3AED, #A855F7);
    color: #fff;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.35);
}

.badge-preorder i {
    font-size: 10px;
}

/* Release Date on Card */
.preorder-release-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #F5F3FF, #EDE9FE);
    border: 1px solid #C4B5FD;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #7C3AED;
}

.preorder-release-date i {
    font-size: 10px;
}

/* Deposit Info */
.preorder-deposit-info {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 11px;
    color: var(--ceo-gray-500, #777);
}

.preorder-deposit-info strong {
    color: var(--ceo-orange);
}

/* Pre-Order Action Button */
.btn-preorder-card {
    background: linear-gradient(135deg, #7C3AED, #A855F7) !important;
    color: #fff !important;
}

.btn-preorder-card:hover {
    background: linear-gradient(135deg, #6D28D9, #9333EA) !important;
    transform: scale(1.02);
}

/* Quick View Pre-Order Info */
.qv-preorder-info {
    margin: 12px 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, #F5F3FF, #EDE9FE);
    border: 1px solid #C4B5FD;
    border-radius: 10px;
}

.qv-preorder-info .preorder-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: linear-gradient(135deg, #7C3AED, #A855F7);
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.qv-preorder-info .info-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #5B21B6;
    margin-top: 6px;
}

.qv-preorder-info .info-row i {
    width: 16px;
    text-align: center;
    font-size: 12px;
}

.qv-preorder-info .info-row strong {
    color: #7C3AED;
}

.qv-preorder-btn {
    background: linear-gradient(135deg, #7C3AED, #A855F7) !important;
    border: none !important;
}

.qv-preorder-btn:hover {
    background: linear-gradient(135deg, #6D28D9, #9333EA) !important;
}

/* ============================================
   PREORDER SHOP SECTION
   ============================================ */
.preorder-shop-section {
    padding: 40px 0 80px;
}

/* Deposit Price (แสดงแทนราคา) */
.preorder-deposit-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--ceo-orange);
    margin-top: 6px;
    font-family: var(--ceo-font);
    letter-spacing: -0.5px;
}

/* Price Note (ราคา ณ จุดจำหน่าย) */
.preorder-price-note {
    font-size: 11px;
    font-weight: 700;
    color: #DC2626;
    margin-top: 2px;
}

/* No Refund Note (ในแต่ละ card) */
.preorder-no-refund {
    font-size: 10px;
    font-weight: 600;
    color: #DC2626;
    margin-top: 6px;
    line-height: 1.4;
}

/* Cart Pre-Order Badge */
.preorder-cart-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 700;
    background: linear-gradient(135deg, #7C3AED, #A855F7);
    color: #fff;
    margin-top: 4px;
    width: fit-content;
}

/* Disclaimer */
.preorder-disclaimer {
    text-align: center;
    color: #DC2626;
    font-size: 14px;
    font-weight: 600;
    margin-top: 40px;
    padding: 16px;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .mobile-filter-toggle {
        display: inline-flex;
    }

    .preorder-sidebar-col {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        height: 100vh;
        z-index: 9998;
        overflow-y: auto;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 0;
    }

    .preorder-sidebar-col.open {
        left: 0;
    }

    .preorder-sidebar {
        border-radius: 0;
        min-height: 100vh;
        padding-top: 60px;
    }

    .sidebar-mobile-close {
        display: flex;
        position: absolute;
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        border: none;
        background: rgba(255,255,255,0.1);
        color: #fff;
        font-size: 16px;
        cursor: pointer;
        z-index: 10;
        transition: background 0.3s;
    }

    .sidebar-mobile-close:hover {
        background: var(--ceo-orange);
    }

    .preorder-sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9997;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    .preorder-sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .preorder-banner .banner-title {
        font-size: 28px;
    }
}

@media (min-width: 992px) {
    .sidebar-mobile-close {
        display: none;
    }

    .preorder-sidebar-overlay {
        display: none;
    }
}

@media (max-width: 576px) {
    .preorder-banner {
        padding: 32px 0;
    }

    .preorder-banner .banner-title {
        font-size: 24px;
    }

    .preorder-topbar {
        margin-bottom: 20px;
    }
}
