:root {
    --primary: #5b21b6;
    /* Deep Violet */
    --primary-light: #f5f3ff;
    --bg: #ffffff;
    --text-main: #111827;
    /* Darker for better contrast */
    --text-muted: #6b7280;
    --border: #f3f4f6;
    /* Lighter border */
    --input-bg: #f9fafb;
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation;
    /* Global double-tap-to-zoom prevention */
}

button,
.btn-qty,
.btn-submit,
.btn-search,
.checkbox-container {
    user-select: none;
    /* Prevent text selection during fast clicks */
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
}

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

.header {
    text-align: left;
    margin-bottom: 64px;
    /* 헤더 아래 여백 확대 */
}

.logo {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 12px;
}

.header p {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 72px;
    /* 섹션(1, 2, 3...) 간 간격 확대하여 구분감 강화 */
}

.form-section h2 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 28px;
    /* 제목과 내용 사이 여백 살짝 확대 */
    letter-spacing: -0.02em;
    color: var(--text-main);
}

/* Product Cards - No border, subtle shadow */
.product-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-card {
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding: 12px 0 24px 0;
    /* 상하 여백 조정으로 카드 가시성 개선 */
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.product-price {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-qty {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-main);
    border-radius: 50%;
    /* Circle for minimal look */
    cursor: pointer;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    touch-action: manipulation;
    /* Disable double-tap-to-zoom */
    user-select: none;
    /* Prevent text selection during fast clicks */
}

.btn-qty:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.quantity-control input {
    width: 24px;
    text-align: center;
    border: none;
    font-weight: 700;
    font-size: 1rem;
}

/* Summary Box - Very Minimal */
.order-summary {
    margin-top: 32px;
    padding: 24px;
    background: var(--input-bg);
    border-radius: var(--radius);
}

.summary-line {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.summary-line.total {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    margin-top: 12px;
}

.bank-info {
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-copy {
    background: none;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-left: 8px;
    font-weight: 600;
}

/* Inputs - Clean Flat Look */
.field-group {
    margin-bottom: 28px;
    /* 필드 그룹 간 간격 확대 */
}

.field-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    /* 라벨 색상 선명하게 */
    margin-bottom: 10px;
    /* 라벨과 인풋 사이 간격 최적화 */
    letter-spacing: -0.01em;
}

input[type="text"],
input[type="tel"] {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--input-bg);
    color: var(--text-main);
    font-family: inherit;
}

input:focus {
    outline: 2px solid var(--primary-light);
    background: white;
    box-shadow: 0 4px 12px rgba(91, 33, 182, 0.05);
}

.address-input-group {
    display: grid;
    grid-template-columns: 80px 1fr 60px;
    gap: 12px;
    margin-bottom: 12px;
}

.btn-search {
    background: var(--text-main);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.8rem;
}

/* Privacy */
.privacy-section {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 24px;
    /* 아래로 살짝 띄우기 */
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin-top: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.checkbox-container input {
    margin-top: 4px;
}

/* Actions */
.btn-submit {
    width: 100%;
    padding: 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(91, 33, 182, 0.3);
    transition: all 0.3s;
    margin-top: 16px;
    /* 버튼 상단 여백 추가 */
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(91, 33, 182, 0.4);
}

.btn-submit:disabled {
    background: var(--text-muted);
    opacity: 0.3;
    cursor: not-allowed;
    box-shadow: none;
}

/* Address Layer */
#addressLayer {
    display: none;
    border: 1px solid var(--border);
    width: 100%;
    height: 420px;
    margin: 20px 0;
    border-radius: var(--radius);
    overflow: hidden;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 400px;
}

.confirm-info-list {
    text-align: left;
    background: var(--input-bg);
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.confirm-item {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.confirm-item:last-child {
    margin-bottom: 0;
}

.confirm-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
}

.confirm-value {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.4;
}

.modal-buttons {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
}

.btn-edit {
    background: white;
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .container {
        padding: 40px 20px;
    }

    .header h1 {
        font-size: 2rem;
    }
}