/* ==========================================================================
   校服预定系统 - 前台样式 (移动端优先)
   设计基调 v2：藏青主色 + 暖白底 + 发丝边框 + 极轻阴影，沉稳大气、去模板感
   说明：本文件仅负责视觉，页面 HTML 结构与 class 保持不变
   ========================================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* 主色：藏青，呼应校服本身的色调，沉稳专业 */
    --primary: #274a82;
    --primary-dark: #1d3a68;
    --primary-light: #eaf0f7;
    /* 功能色 */
    --accent: #07c160;          /* 微信绿 */
    --accent-dark: #06ad56;
    --danger: #e4393c;          /* 价格红（国内电商习惯） */
    --warning: #f0883e;
    --success: #34c759;
    /* 文字 */
    --text-1: #1a1d24;
    --text-2: #5b626b;
    --text-3: #9aa1ab;
    /* 背景：暖白底，比冷灰更有质感 */
    --bg-page: #f4f3f0;
    --bg-card: #ffffff;
    --border: #ecebe7;
    --border-strong: #dddcd6;
    /* 圆角 */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 18px;
    /* 阴影：极轻，靠留白与细线分层 */
    --shadow-sm: 0 1px 3px rgba(26, 29, 36, 0.04);
    --shadow: 0 2px 12px rgba(26, 29, 36, 0.05);
    --shadow-card: 0 1px 4px rgba(26, 29, 36, 0.05);
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--bg-page);
    color: var(--text-1);
    line-height: 1.6;
    max-width: 750px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ---------- Header ---------- */
.header {
    background: var(--primary);
    color: #fff;
    padding: 12px 14px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.header h1 {
    font-size: 1.18rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 2px;
}

a.header-home {
    display: block;
    font-size: 1.12rem;
    font-weight: 600;
    text-align: left;
    letter-spacing: 1px;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.header-home:active { opacity: 0.7; }

/* 右上角联系客服拨号按钮 */
a.header-call {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    padding: 6px 11px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 0.82rem;
    text-decoration: none;
    line-height: 1;
    transition: background 0.2s;
}

a.header-call:active { background: rgba(255, 255, 255, 0.3); }

.header-call-icon { font-size: 0.95rem; }

.header-back {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    padding: 4px 8px;
}

/* ---------- Banner Carousel ---------- */
.banner-wrap {
    position: relative;
    overflow: hidden;
    background: var(--primary);
}

.banner {
    position: relative;
    width: 100%;
    height: 184px;
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-slide.active { opacity: 1; }

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-slide .banner-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.05rem;
    gap: 10px;
    background: var(--primary);
}

.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    transition: all 0.3s;
}

.banner-dot.active {
    width: 16px;
    border-radius: 3px;
    background: #fff;
}

/* ---------- Quick Actions ---------- */
.quick-actions {
    display: flex;
    justify-content: space-around;
    padding: 20px 12px;
    background: #fff;
    margin: -22px 12px 0;
    border-radius: var(--radius-lg);
    position: relative;
    z-index: 10;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    flex: 1;
    transition: opacity 0.2s;
}

.quick-action:active { opacity: 0.6; }

.quick-action-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--primary-light);
}

.quick-action-icon.bg-blue { background: #eaf0f7; color: #274a82; }
.quick-action-icon.bg-green { background: #e8f7ee; color: #07c160; }
.quick-action-icon.bg-orange { background: #fdf1e3; color: #f0883e; }
.quick-action-icon.bg-purple { background: #f1ecfb; color: #7c5cff; }
.quick-action-icon.bg-red { background: #fbeceb; color: #e4393c; }

.quick-action span {
    font-size: 0.8rem;
    color: var(--text-2);
    letter-spacing: 0.5px;
}

/* 手机端：快捷入口保持单行，紧凑显示不换行 */
@media (max-width: 560px) {
    .quick-actions {
        padding: 14px 2px;
    }
    .quick-action {
        gap: 6px;
    }
    .quick-action-icon {
        width: 46px;
        height: 46px;
        font-size: 1.35rem;
        border-radius: 14px;
    }
    .quick-action span {
        font-size: 0.72rem;
        letter-spacing: 0;
    }
}

/* ---------- Section ---------- */
.section {
    padding: 24px 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 17px;
    background: var(--primary);
    border-radius: 3px;
}

.section-more {
    font-size: 0.82rem;
    color: var(--text-3);
}

/* ---------- Announcement ---------- */
.announcement-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    background: #fff;
    margin: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.announcement-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.announcement-scroll {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.announcement-text {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-2);
    animation: scrollText 18s linear infinite;
}

@keyframes scrollText {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ---------- Product Grid ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.product-card:active {
    transform: scale(0.98);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.product-img {
    width: 100%;
    aspect-ratio: 1;
    background: #f2f1ee;
    overflow: hidden;
    position: relative;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: #fff;
}

.product-badge.hot { background: var(--danger); }
.product-badge.new { background: var(--accent); }

.product-info {
    padding: 12px;
}

.product-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-1);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--danger);
}

.product-price .original {
    font-size: 0.75rem;
    color: var(--text-3);
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 4px;
}

/* ---------- Announcement List ---------- */
.announce-list {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}

.announce-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.announce-item:active { background: #f7f6f3; }
.announce-item:last-child { border-bottom: none; }

.announce-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.announce-tag {
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    color: #fff;
}

.announce-tag.top { background: var(--danger); }
.announce-tag.normal { background: var(--primary); }

.announce-item-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-1);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.announce-item-date {
    font-size: 0.75rem;
    color: var(--text-3);
}

.announce-item-content {
    font-size: 0.85rem;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ---------- Announcement Detail ---------- */
.announce-detail {
    background: #fff;
    margin: 12px;
    border-radius: var(--radius);
    padding: 22px 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}

.back-link {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
}

.back-link:active { opacity: 0.6; }

.announce-detail-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.announce-detail-meta {
    font-size: 0.8rem;
    color: var(--text-3);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.announce-detail-content {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--text-2);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ---------- Category Tabs (products.php) ---------- */
.category-tabs {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-2);
    background: var(--bg-page);
    flex-shrink: 0;
    transition: all 0.2s;
}

.category-tab.active {
    background: var(--primary);
    color: #fff;
}

/* ---------- Order Form ---------- */
.order-form-wrap {
    padding: 12px;
}

.order-step-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border-radius: var(--radius);
    margin-bottom: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}

.order-step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-3);
}

.order-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.order-step.active .order-step-num {
    background: var(--primary);
    color: #fff;
}

.order-step.active {
    color: var(--primary);
    font-weight: 600;
}

.order-step.done .order-step-num {
    background: var(--accent);
    color: #fff;
}

.order-step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 8px;
}

.order-step-line.done { background: var(--accent); }

.form-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 4px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}

.form-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-1);
    padding: 14px 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.form-card-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 3px;
}

.form-group {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.form-group:last-child { border-bottom: none; }

.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-2);
    margin-bottom: 8px;
}

.form-label .required { color: var(--danger); }

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--text-1);
    background: #fff;
    transition: border 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(39, 74, 130, 0.1);
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239aa1ab' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

/* 选择校服：类别 / 款式 / 尺码 桌面端三列紧凑并排 */
.product-select-row {
    align-items: flex-start;
}
.product-select-row .form-group {
    border-bottom: none;
    padding: 8px 0;
}
.product-select-row .form-group + .form-group {
    border-left: 1px solid var(--border);
    padding-left: 12px;
}

/* Radio / Checkbox groups */
.radio-group,
.check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.radio-item,
.check-item {
    padding: 9px 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    user-select: none;
}

.radio-item.active,
.check-item.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 500;
}

/* 手机端：订购表单更紧凑、适配小屏 */
@media (max-width: 560px) {
    .order-form-wrap { padding: 10px 10px; }
    .form-card { padding: 2px 12px; }
    .form-card-title { padding: 12px 0 8px; font-size: 0.9rem; }
    .form-group { padding: 10px 0; }
    .form-label { font-size: 0.82rem; margin-bottom: 6px; }
    .form-input,
    .form-select,
    .form-textarea { padding: 10px 11px; font-size: 0.92rem; }
    .radio-item,
    .check-item { padding: 8px 12px; font-size: 0.85rem; }
    .order-step-bar { padding: 12px 14px; }
    .order-step { font-size: 0.8rem; }
    .form-row { gap: 10px; }
    /* 手机端：选择校服保持两列并排（类别+款式、尺码+数量），与基本信息一致；仅收紧间距 */
    .product-select-row { flex-direction: row; gap: 10px; }
    .product-select-row .form-group { padding: 8px 0; border-bottom: none; }
    .product-select-row .form-group + .form-group {
        border-top: none;
        border-left: 1px solid var(--border);
        padding-left: 10px;
    }
}

/* Size selector with reference info */
.size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.size-item {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.size-item.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.size-item .size-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 4px;
}

.size-item.active .size-name { color: var(--primary); }

.size-item .size-ref {
    font-size: 0.7rem;
    color: var(--text-3);
    line-height: 1.4;
}

.size-item .size-ref span {
    display: block;
}

/* Product select card */
.product-select-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-select-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.product-select-item.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.product-select-img {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: #f2f1ee;
}

.product-select-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-select-info {
    flex: 1;
    min-width: 0;
}

.product-select-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-select-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--danger);
}

.product-select-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border-strong);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-select-item.active .product-select-check {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

/* Quantity selector */
.qty-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-2);
    background: #f7f6f3;
    cursor: pointer;
    user-select: none;
}

.qty-btn:active { background: #ecebe7; }

.qty-input {
    width: 50px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border-strong);
    border-right: 1px solid var(--border-strong);
    font-size: 1rem;
    font-weight: 500;
}

.qty-input:focus { outline: none; }

/* Order summary */
.order-summary {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.9rem;
}

.summary-row .label { color: var(--text-2); }
.summary-row .value { color: var(--text-1); font-weight: 500; }

.summary-total {
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 1.05rem;
}

.summary-total .value {
    font-size: 1.4rem;
    color: var(--danger);
    font-weight: 700;
}

/* Delivery box (order.php) */
.delivery-box {
    background: var(--primary-light);
    border: 1px solid #dde6f2;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-top: 4px;
}

.delivery-line {
    display: flex;
    line-height: 1.7;
    font-size: 0.88rem;
}

.delivery-line .dl {
    flex: 0 0 84px;
    color: var(--text-3);
}

.delivery-line .dv {
    flex: 1;
    color: var(--text-1);
    font-weight: 500;
}

.mail-tip {
    display: inline-block;
    margin-top: 8px;
    background: #fff7e6;
    border: 1px solid #ffd591;
    color: #d46b08;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 6px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
    text-align: center;
    gap: 6px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(39, 74, 130, 0.22);
}

.btn-primary:active { opacity: 0.88; transform: translateY(1px); }

.btn-wechat {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(7, 193, 96, 0.22);
}

.btn-wechat:active { opacity: 0.88; transform: translateY(1px); }

.btn-block {
    width: 100%;
    display: flex;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 1.05rem;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

.btn-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ---------- Bottom Bar ---------- */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 750px;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
    box-shadow: 0 -2px 12px rgba(26, 29, 36, 0.04);
}

.bottom-bar .price-info {
    flex: 1;
}

.bottom-bar .price-label {
    font-size: 0.8rem;
    color: var(--text-3);
}

.bottom-bar .price-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--danger);
}

/* ---------- Footer ---------- */
.footer {
    text-align: center;
    padding: 24px 16px 32px;
    font-size: 0.75rem;
    color: var(--text-3);
}

.footer p { margin: 2px 0; }

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(26, 29, 36, 0.9);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.toast.show { opacity: 1; }

/* ---------- Loading ---------- */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

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

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

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-3);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.empty-state .empty-text {
    font-size: 0.9rem;
}

/* ---------- Order Result ---------- */
.order-result {
    text-align: center;
    padding: 40px 20px;
}

.order-result-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.order-result-icon.success { background: #e8f7ee; color: var(--success); }
.order-result-icon.pending { background: #fdf1e3; color: var(--warning); }

.order-result-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.order-result-desc {
    font-size: 0.9rem;
    color: var(--text-2);
    margin-bottom: 24px;
}

/* ---------- Tab Bar ---------- */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 750px;
    background: #fff;
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 99;
    box-shadow: 0 -2px 12px rgba(26, 29, 36, 0.04);
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0 6px;
    color: var(--text-3);
    font-size: 0.7rem;
    gap: 2px;
}

.tab-item.active {
    color: var(--primary);
}

.tab-icon {
    font-size: 1.3rem;
    line-height: 1;
}

/* ---------- Responsive ---------- */
@media (min-width: 481px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 751px) {
    .product-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-muted { color: var(--text-3); }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.p-4 { padding: 16px; }
.hidden { display: none !important; }
