/* ===== IMPORT FONT ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=IBM+Plex+Sans+Thai:wght@300;400;500&display=swap');

/* ===== THEME ===== */
:root {
    --bg-main: #ffffff;
    --bg-soft: #fff8f2;
    --text-main: #111827;
    --text-soft: #6b7280;
    --accent: #ff6a00;
    --accent-soft: rgba(255, 106, 0, 0.08);
    --border: #e5e7eb;
    --radius: 16px;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ===== GLOBAL ===== */
html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'IBM Plex Sans Thai', sans-serif;
    background: linear-gradient(135deg, #ffffff, #fff8f2);
    color: var(--text-main);
}

/* ===== LAYOUT ===== */
.container,
.order-wrapper,
.confirm-wrapper {
    width: 100%;
    max-width: 420px;
    /* ปรับให้พอดีมือถือ */
    margin: 12px auto;
    padding: 12px;
}

/* ===== TITLE ===== */
.title {
    font-family: 'Playfair Display', serif;
    text-align: center;
    font-size: 22px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.title::after {
    content: "";
    width: 24px;
    height: 2px;
    background: var(--accent);
    display: block;
    margin: 6px auto 0;
}

.subtitle {
    text-align: center;
    color: var(--text-soft);
    font-size: 12px;
    margin-bottom: 16px;
}

/* ===== CARD ===== */
.card,
.product-card,
.form,
.order-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
    transition: 0.25s;
}

.order-card:hover {
    transform: translateY(-2px);
}

/* ===== TEXT ===== */
h3 {
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 600;
}

p {
    font-size: 13px;
    margin: 4px 0;
    line-height: 1.6;
    color: var(--text-soft);
}

/* ===== INPUT ===== */
input,
select,
textarea {
    width: 100%;
    height: 44px;
    padding: 0 10px;
    margin: 6px 0 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 13px;
    display: block;
}

textarea {
    height: 90px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
    outline: none;
}

/* ===== FILE ===== */
.file-upload {
    border: 1px dashed var(--border);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    font-size: 11px;
}

/* ===== BUTTON ===== */
.btn,
.btn-confirm,
.success-btn {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff6a00, #ff8c3a);
    color: white;
    font-weight: 600;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: 0.25s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(255, 106, 0, 0.2);
}

/* ===== BUTTON SECONDARY ===== */
.btn-secondary {
    width: 100%;
    padding: 12px;
    text-align: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: #444;
    font-size: 13px;
}

/* ===== STATUS ===== */
.order-status {
    text-align: center;
    margin-bottom: 16px;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    color: white;
}

.status-pending {
    background: #f59e0b;
}

.status-paid {
    background: #3b82f6;
}

.status-confirmed {
    background: #10b981;
}

.status-reject {
    background: #ef4444;
}

/* ===== TOTAL ===== */
.order-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    text-align: right;
    margin-top: 8px;
}

/* ===== LIST ===== */
ul {
    margin: 6px 0;
    padding-left: 16px;
}

li {
    margin: 3px 0;
    font-size: 13px;
}

/* ===== DIVIDER ===== */
hr {
    margin: 14px 0;
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
}

/* ===== IMAGE ===== */
.product-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* ===== SEARCH ===== */
.search-box {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.search-box input {
    flex: 1;
    min-width: 0;
}

.search-box button {
    flex-shrink: 0;
    height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: white;
    font-weight: 600;
    font-size: 13px;
}

/* ===== TOTAL BOX ===== */
.total-box {
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 12px;
    text-align: center;
    font-size: 14px;
}

/* ===== CARD HEADER ===== */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== INFO ===== */
.info p {
    font-size: 12px;
}

/* ===== NOT FOUND ===== */
.notfound {
    text-align: center;
    color: red;
}

/* ===== ANIMATION ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container>* {
    animation: fadeUp 0.25s ease;
}

/* ===== MOBILE ===== */
@media (max-width: 500px) {
    .title {
        font-size: 20px;
    }
}

/* ===== SMALL DEVICES ===== */
@media (max-width: 360px) {
    .title {
        font-size: 18px;
    }

    input,
    textarea {
        height: 42px;
        font-size: 12px;
    }

    .btn {
        font-size: 12px;
        padding: 10px;
    }
}

/* ===== TABLET (iPad) ===== */
@media (min-width: 600px) {

    .container,
    .order-wrapper,
    .confirm-wrapper {
        max-width: 520px;
        padding: 14px;
    }

    input,
    select,
    textarea {
        height: 48px;
        font-size: 14px;
    }

    .btn {
        font-size: 14px;
        padding: 13px;
    }
}

/* ===== iPad แนวนอน / จอใหญ่ ===== */
@media (min-width: 768px) {

    .container,
    .order-wrapper,
    .confirm-wrapper {
        max-width: 600px;
    }
}

/* ===== DESKTOP ===== */
@media (min-width: 1024px) {

    .container,
    .order-wrapper,
    .confirm-wrapper {
        max-width: 680px;
    }
}