/* ─────────────────────────────────────────────────────
   娘釀麵包 · 預購表單 — Stylesheet
   Linked from index.html
───────────────────────────────────────────────────── */

:root {
    /* Brand */
    --brand:         #E9460B;
    --brand-dark:    #C23809;
    --brand-light:   #FF6B37;
    --brand-glow:    rgba(233,70,11,0.22);

    /* Dark surfaces */
    --bg:            #0D0B08;
    --surface:       #181510;
    --surface-2:     #211E15;
    --surface-3:     #2A261B;

    /* Borders */
    --border:        rgba(255,255,255,0.07);
    --border-md:     rgba(255,255,255,0.12);
    --border-brand:  rgba(233,70,11,0.45);

    /* Text */
    --text:          #F2EDE3;
    --text-muted:    rgba(242,237,227,0.55);
    --text-faint:    rgba(242,237,227,0.30);
    --cream:         #F9F5EB;

    /* State */
    --danger:        #F04438;
    --danger-bg:     rgba(240,68,56,0.12);
    --success:       #17B26A;

    /* Shadows */
    --shadow-sm:     0 1px 8px rgba(0,0,0,0.35);
    --shadow-md:     0 4px 24px rgba(0,0,0,0.45);
    --shadow-brand:  0 6px 28px rgba(233,70,11,0.35);

    /* Radius */
    --r-sm:  6px;
    --r-md:  12px;
    --r-lg:  18px;
    --r-xl:  26px;

    --t: all 0.22s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'YuMincho', 'Yu Mincho', 'Hiragino Mincho ProN', 'Noto Serif TC', serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* ─── HERO ──────────────────────────────────────── */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 560px;
    max-height: 820px;
    overflow: hidden;
}

.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 38%;
    display: block;
    transform: scale(1.04);
    animation: heroZoom 18s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    from { transform: scale(1.04); }
    to   { transform: scale(1.10); }
}

.hero-grad {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(13,11,8,0.20) 0%,
            rgba(13,11,8,0.30) 40%,
            rgba(13,11,8,0.72) 75%,
            rgba(13,11,8,1.00) 100%
        );
}

.hero-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 20px 64px;
    text-align: center;
}

.hero-logo {
    position: absolute;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
}

.hero-eyebrow {
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--brand-light);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(233,107,55,0.4);
    max-width: 60px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--cream);
    line-height: 1.18;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.hero-sub {
    font-size: 0.95rem;
    color: rgba(242,237,227,0.7);
    margin-top: 6px;
    margin-bottom: 28px;
    line-height: 1.8;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    margin-top: 28px;
    padding: 8px 20px;
    border-radius: 40px;
    box-shadow: var(--shadow-brand);
    letter-spacing: 0.3px;
    font-family: system-ui, -apple-system, sans-serif;
}

/* ─── PROCESS STRIP ─────────────────────────────── */
.process-strip {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    font-family: system-ui, -apple-system, sans-serif;
}

.process-inner {
    max-width: 760px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.process-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 0;
    position: relative;
}

.process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 36px;
    width: 1px;
    background: var(--border);
}

.process-step + .process-step { padding-left: 20px; }

.ps-icon {
    width: 36px;
    height: 36px;
    background: var(--surface-3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--brand);
    font-size: 1.15rem;
}

.ps-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.ps-value {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

/* ─── CONTAINER ─────────────────────────────────── */
.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 18px;
    font-family: system-ui, -apple-system, sans-serif;
}

/* ─── TRIAL NOTICE ──────────────────────────────── */
.notice-banner {
    margin-top: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(233,70,11,0.12), rgba(233,70,11,0.06));
    border: 1px solid var(--border-brand);
    border-radius: var(--r-lg);
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.notice-icon {
    font-size: 1.3rem;
    color: var(--brand-light);
    flex-shrink: 0;
    margin-top: 1px;
}

.notice-body strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--brand-light);
    margin-bottom: 3px;
}

.notice-body p {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ─── CARDS ─────────────────────────────────────── */
.card {
    background: var(--surface);
    border-radius: var(--r-xl);
    padding: 28px 26px;
    margin-top: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--t);
}

.card:focus-within {
    border-color: var(--border-md);
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 11px;
}

.card-icon {
    width: 34px;
    height: 34px;
    background: var(--surface-3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    font-size: 1.05rem;
    flex-shrink: 0;
}

/* ─── FORM FIELDS ───────────────────────────────── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.col-2 { grid-column: span 2; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field-label {
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.req { color: var(--brand); }

.field-hint {
    font-weight: 400;
    color: var(--text-faint);
    font-size: 0.78rem;
    margin-left: auto;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface-2);
    border: 1.5px solid var(--border-md);
    border-radius: var(--r-md);
    outline: none;
    transition: var(--t);
    -webkit-appearance: none;
    appearance: none;
}

input::placeholder,
textarea::placeholder { color: var(--text-faint); }

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(242,237,227,0.4)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

select option { background: #231F17; color: var(--text); }

input:focus, select:focus, textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
    background: var(--surface-3);
}

input.err, select.err, textarea.err {
    border-color: var(--danger);
    background: var(--danger-bg);
}

.field-error {
    font-size: 0.78rem;
    color: var(--danger);
    display: none;
    align-items: center;
    gap: 4px;
}
.field-error.show { display: flex; }

/* ─── PICKUP TOGGLE ─────────────────────────────── */
.pickup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pickup-opt {
    border: 1.5px solid var(--border-md);
    border-radius: var(--r-md);
    padding: 14px 16px;
    cursor: pointer;
    transition: var(--t);
    background: var(--surface-2);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pickup-opt:hover { border-color: var(--brand); }

.pickup-opt.active {
    border-color: var(--brand);
    background: rgba(233,70,11,0.10);
}

.pickup-opt input[type="radio"] {
    width: 17px;
    height: 17px;
    accent-color: var(--brand);
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

.po-text { flex: 1; }

.po-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 7px;
}

.po-detail {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.5;
}

/* ─── PRODUCT ROWS ──────────────────────────────── */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.product-row {
    display: grid;
    grid-template-columns: 1fr 88px 70px 70px 34px;
    gap: 10px;
    align-items: center;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px 14px;
    animation: rowIn 0.22s ease;
}

@keyframes rowIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.product-row select {
    background: var(--surface-3);
    font-family: 'YuMincho', 'Yu Mincho', 'Hiragino Mincho ProN', 'Noto Serif TC', serif;
}

.row-price, .row-sub {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    color: var(--text-muted);
}

.row-sub { color: var(--brand-light); }

.btn-del {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-faint);
    font-size: 1rem;
    transition: var(--t);
}

.btn-del:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.btn-add {
    width: 100%;
    padding: 11px;
    background: transparent;
    border: 1.5px dashed var(--border-md);
    border-radius: var(--r-md);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: var(--t);
}

.btn-add:hover {
    border-color: var(--brand);
    color: var(--brand-light);
    background: rgba(233,70,11,0.06);
}

.row-headers {
    display: grid;
    grid-template-columns: 1fr 88px 70px 70px 34px;
    gap: 10px;
    padding: 0 14px 8px;
}

.row-headers span {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-faint);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-align: center;
}

.row-headers span:first-child { text-align: left; }

textarea { resize: vertical; min-height: 80px; }

/* ─── COLD CHAIN NOTE ───────────────────────────── */
.cold-note {
    margin-top: 10px;
    padding: 11px 14px;
    background: rgba(23,178,106,0.08);
    border: 1px solid rgba(23,178,106,0.2);
    border-radius: var(--r-md);
    font-size: 0.8rem;
    color: rgba(180,255,220,0.75);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── SUMMARY CARD ──────────────────────────────── */
.summary-card {
    margin-top: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
}

.summary-top {
    padding: 22px 26px 16px;
}

.sum-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.sum-row span:last-child {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text);
}

.sum-divider {
    height: 1px;
    background: var(--border);
    margin: 14px 0;
}

.sum-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sum-total-label {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text);
}

.sum-total-amount {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--brand-light);
    letter-spacing: -1px;
}

.summary-bottom {
    padding: 12px 26px 16px;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
}

.shipping-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 20px;
    background: var(--surface-3);
    border: 1px solid var(--border);
}

/* ─── SUBMIT BUTTON ─────────────────────────────── */
.submit-btn {
    width: 100%;
    margin-top: 16px;
    padding: 16px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: var(--r-lg);
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
    box-shadow: var(--shadow-brand);
    transition: var(--t);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.submit-btn:hover:not(:disabled) {
    background: var(--brand-light);
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(233,70,11,0.45);
}

.submit-btn:active:not(:disabled) { transform: translateY(0); }

.submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ─── MODAL ─────────────────────────────────────── */
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: var(--t);
    padding: 16px;
}

.modal-bg.open { opacity: 1; visibility: visible; }

.modal-box {
    background: var(--surface);
    border: 1px solid var(--border-md);
    border-radius: var(--r-xl);
    width: 100%;
    max-width: 600px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    transform: translateY(14px) scale(0.98);
    transition: var(--t);
    font-family: system-ui, -apple-system, sans-serif;
}

.modal-bg.open .modal-box {
    transform: translateY(0) scale(1);
}

.modal-head {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-head-title {
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-modal-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--surface-3);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
    transition: var(--t);
}

.btn-modal-close:hover { background: var(--surface-2); color: var(--text); }

.modal-body { padding: 22px 24px; }

.modal-foot {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-radius: 0 0 var(--r-xl) var(--r-xl);
}

/* ─── SUCCESS BANNER ────────────────────────────── */
.success-banner {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    border-radius: var(--r-lg);
    padding: 22px;
    text-align: center;
    margin-bottom: 18px;
}

.sb-icon {
    font-size: 2.4rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 6px;
}

.sb-title {
    font-weight: 900;
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 5px;
}

.sb-sub {
    font-size: 0.83rem;
    color: rgba(255,255,255,0.78);
    line-height: 1.6;
}

.order-id-chip {
    display: inline-block;
    margin-top: 10px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 3px 16px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    color: #fff;
}

/* ─── CONFIRM BLOCKS ────────────────────────────── */
.confirm-block {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 16px 18px;
    margin-bottom: 12px;
}

.cb-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--brand-light);
    margin-bottom: 12px;
}

.cb-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
}

.cb-item strong {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.cb-item span {
    font-size: 0.88rem;
    color: var(--text);
}

/* ─── ITEMS TABLE ───────────────────────────────── */
.items-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.items-tbl th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-faint);
    padding: 5px 8px 8px;
    border-bottom: 1px solid var(--border-md);
    text-align: left;
}

.items-tbl th:not(:first-child) { text-align: right; }

.items-tbl td {
    padding: 9px 8px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.items-tbl td:not(:first-child) {
    text-align: right;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--brand-light);
}

.items-tbl td:first-child {
    font-family: 'YuMincho', 'Yu Mincho', 'Hiragino Mincho ProN', 'Noto Serif TC', serif;
}

.items-tbl tr:last-child td { border-bottom: none; }

.modal-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 8px 4px;
    border-top: 1px solid var(--border-md);
    margin-top: 4px;
}

.modal-total-row span:first-child {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.modal-total-amount {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--brand-light);
}

/* ─── MODAL BUTTONS ─────────────────────────────── */
.m-btn {
    padding: 8px 16px;
    border-radius: var(--r-sm);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--t);
}

.m-btn-ghost {
    background: var(--surface-3);
    color: var(--text-muted);
}

.m-btn-ghost:hover { color: var(--text); background: var(--surface-2); }

.m-btn-brand {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 3px 12px var(--brand-glow);
}

.m-btn-brand:hover { background: var(--brand-light); }

/* ─── TOAST ─────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--surface-3);
    border: 1px solid var(--border-md);
    color: var(--text);
    padding: 11px 22px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    z-index: 1200;
    opacity: 0;
    transition: var(--t);
    pointer-events: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: system-ui, -apple-system, sans-serif;
}

.toast.on {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ─── RESPONSIVE ────────────────────────────────── */
@media (max-width: 620px) {
    .hero { height: 100svh; min-height: 520px; }
    .hero-title { font-size: 2.2rem; }
    .hero-logo { height: 60px; top: 24px; }

    .process-inner { grid-template-columns: 1fr; gap: 0; }
    .process-step:not(:last-child)::after { display: none; }
    .process-step { border-bottom: 1px solid var(--border); padding: 14px 0; }
    .process-step + .process-step { padding-left: 0; }

    .grid-2, .pickup-grid { grid-template-columns: 1fr; }
    .col-2 { grid-column: span 1; }

    .card { padding: 20px 16px; border-radius: var(--r-lg); }

    .row-headers { display: none; }

    .product-row {
        grid-template-columns: 1fr;
        gap: 8px;
        position: relative;
        padding-right: 48px;
    }

    .product-row .row-price { display: none; }

    .product-row .row-sub {
        position: static;
        text-align: left;
        font-size: 0.88rem;
    }

    .btn-del {
        position: absolute;
        right: 10px;
        top: 12px;
    }

    .sum-total-amount { font-size: 1.8rem; }
    .cb-grid { grid-template-columns: 1fr; gap: 16px; }
    .cb-item { grid-column: 1 / -1 !important; }
}

/* ─── PRINT ─────────────────────────────────────── */
@media print {
    body { background: #fff; color: #111; }
    .hero, .process-strip, .section-wrap form > :last-of-type,
    .modal-foot, .btn-modal-close, .submit-btn { display: none !important; }
    .modal-bg { position: static; background: none; opacity: 1; visibility: visible; }
    .modal-box { box-shadow: none; max-height: none; border: none; }
}
