/* ═══════════════════════════════════════════════
   USB Music Store - Style 3: White, Simple & Modern
   ═══════════════════════════════════════════════ */

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

:root {
    --bg-main: #ffffff;
    --bg-subtle: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    
    --accent: #0f172a;
    --accent-hover: #1e293b;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.08);
    
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ── Typography & Section Header ── */
.section-title {
    margin-bottom: 40px;
}

.section-title.text-center {
    text-align: center;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    margin-bottom: 8px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* ── Header / Navigation ── */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.brand-badge {
    background: var(--text-main);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800;
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color var(--transition);
}

.nav a:hover {
    color: var(--text-main);
}

.nav-cta {
    background: var(--text-main) !important;
    color: white !important;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    transition: background var(--transition) !important;
}

.nav-cta:hover {
    background: var(--accent-hover) !important;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    background: var(--bg-subtle);
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.88rem;
}

.btn-full {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
}

.btn-link {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* ── Hero Section ── */
.hero {
    padding: 80px 0 60px;
    background: linear-gradient(180deg, var(--bg-subtle) 0%, #ffffff 100%);
    border-bottom: 1px solid var(--border-color);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.hero h1 {
    font-size: clamp(2.4rem, 4.5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-main);
    margin-bottom: 20px;
}

.highlight {
    color: var(--primary);
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 580px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.features-row {
    display: flex;
    gap: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Hero Card Graphic */
.hero-card {
    display: flex;
    justify-content: center;
}

.usb-preview-box {
    width: 100%;
    max-width: 360px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.usb-graphic {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.usb-head {
    width: 40px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 4px 4px 0 0;
    border: 2px solid #94a3b8;
    border-bottom: none;
    position: relative;
}

.usb-head::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 8px;
    width: 20px;
    height: 8px;
    background: #94a3b8;
    border-radius: 2px;
}

.usb-body {
    width: 90px;
    height: 140px;
    background: var(--text-main);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
}

.usb-logo {
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.usb-led {
    width: 8px;
    height: 8px;
    background: #38bdf8;
    border-radius: 50%;
    box-shadow: 0 0 8px #38bdf8;
}

.usb-caption strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.usb-caption p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Steps ── */
.steps-section {
    padding: 80px 0;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-color);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.step-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: transform var(--transition);
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.step-badge {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.step-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ── Categories Section ── */
.categories-section {
    padding: 80px 0 100px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.category-info-only {
    cursor: pointer;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.category-info-only:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-songs-tag {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 10px;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
}

.category-name {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.category-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.category-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 4px;
}

.category-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    background: #ffffff;
    flex-shrink: 0;
}

.category-card.selected .category-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.category-checkbox svg {
    opacity: 0;
    color: white;
    transition: opacity var(--transition);
}

.category-card.selected .category-checkbox svg {
    opacity: 1;
}

/* ── Sticky Summary Bar ── */
.sticky-bar {
    position: fixed;
    bottom: 24px;
    left: 0;
    right: 0;
    z-index: 90;
    pointer-events: none;
}

.bar-content {
    pointer-events: auto;
    max-width: 680px;
    background: var(--text-main);
    color: white;
    padding: 14px 24px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-lg);
}

.bar-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
}

.bar-count {
    background: var(--primary);
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 800;
}

.bar-dot {
    color: var(--text-muted);
}

.bar-price strong {
    color: #38bdf8;
}

/* ── Order Section ── */
.order-section {
    padding: 80px 0 120px;
    background: var(--bg-subtle);
    border-top: 1px solid var(--border-color);
}

.order-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: start;
}

/* Live Selected Categories Panel */
.selected-categories-panel {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: sticky;
    top: 96px;
}

.panel-header {
    padding: 20px 24px;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
}

.badge-count {
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
}

.panel-body {
    padding: 24px;
}

.empty-selection {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 8px;
}

.empty-selection p {
    font-size: 0.9rem;
    margin-bottom: 12px;
}

/* Selected Items List */
.v3-selected-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
}

.v3-selected-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.v3-selected-item:hover {
    border-color: var(--primary);
    background: var(--bg-subtle);
}

.v3-selected-item.is-checked {
    background: var(--primary-light);
    border-color: var(--primary);
}

.v3-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-icon {
    font-size: 1.3rem;
}

.item-title {
    display: block;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-main);
}

.item-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.item-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag-selected {
    color: #16a34a;
    font-size: 0.75rem;
    font-weight: 700;
    background: #dcfce7;
    padding: 3px 10px;
    border-radius: 100px;
}

.tag-unselected {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 100px;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--transition);
}

.remove-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* Breakdown */
.price-breakdown {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

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

.text-free {
    color: #16a34a;
    font-weight: 700;
}

.breakdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 12px 0;
}

.total-row {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
}

.total-amount {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 800;
}

.panel-footer {
    padding: 16px 24px;
    background: var(--bg-subtle);
    border-top: 1px solid var(--border-color);
}

.guarantee-badge {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
}

/* Order Form Wrapper */
.order-form-wrapper {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 36px;
    box-shadow: var(--shadow-md);
}

.order-form h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-main);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    background: #ffffff;
    transition: all var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(6px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease-out;
}

.modal-success-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.modal-card h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.modal-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.order-ref-box {
    background: var(--bg-subtle);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    display: inline-block;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.modal-info-text {
    font-size: 0.85rem !important;
    margin-bottom: 24px !important;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Footer ── */
.footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 48px 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.footer-left p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--text-main);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ── Loading Spinner ── */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 0;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .order-grid {
        grid-template-columns: 1fr;
    }
    .selected-categories-panel {
        position: static;
    }
    .steps-grid {
        grid-template-columns: 1fr;
    }
    .features-row {
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .header-container {
        height: 60px;
    }
    .nav {
        display: none;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .order-form-wrapper {
        padding: 24px;
    }
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}
