* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f5f5f5; color: #333; }

/* 顶部栏 */
.tob-header { background: linear-gradient(135deg, #e4393c 0%, #c9282b 100%); padding: 10px 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tob-user-phone { font-size: 13px; color: rgba(255,255,255,.9); flex: 1; }
.tob-hdr-btn { background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 4px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.tob-hdr-btn:hover { background: rgba(255,255,255,.3); }
.tob-hdr-btn--ghost { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.tob-hdr-btn-tiny { background: none; border: none; color: rgba(255,255,255,.65); font-size: 11px; cursor: pointer; padding: 0 0 0 4px; text-decoration: underline; }
.tob-hdr-lang { color: rgba(255,255,255,.8); text-decoration: none; font-size: 13px; margin-inline-start: auto; }
.tob-hdr-lang:hover { color: #fff; }
.tob-hdr-lang.active { color: #fff; font-weight: bold; }
.tob-cart-entry { display: flex; align-items: center; gap: 4px; text-decoration: none; background: #fff5f5; color: #e4393c; border: 1px solid #f9c0c0; border-radius: 16px; padding: 4px 10px; font-size: 13px; white-space: nowrap; }
.tob-wallet-entry { display: flex; align-items: center; gap: 4px; text-decoration: none; background: #fffbe6; color: #b8860b; border: 1px solid #ffe58f; border-radius: 16px; padding: 4px 10px; font-size: 13px; white-space: nowrap; cursor: pointer; }

/* 搜索区 */
.tob-search { background: #fff; padding: 14px 16px; display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.tob-search-input-wrap { flex: 1; position: relative; display: flex; align-items: center; }
.tob-search-input-wrap input { width: 100%; border: 1px solid #ddd; border-radius: 4px; padding: 8px 32px 8px 12px; font-size: 14px; outline: none; }
.tob-search-input-wrap input:focus { border-color: #e4393c; }
.tob-search-clear { position: absolute; right: 0; top: 0; bottom: 0; width: 32px; background: none; border: none; color: #bbb; font-size: 16px; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }
.tob-search-clear:hover { color: #999; }
.tob-search button { background: #e4393c; color: #fff; border: none; border-radius: 4px; padding: 8px 18px; font-size: 14px; cursor: pointer; white-space: nowrap; }
.tob-search button:hover { background: #c9282b; }

/* 详情区 */
.tob-detail { display: none; background: #fff; }

/* 主图轮播 */
.tob-gallery { background: #fff; }
.tob-main-img-wrap { position: relative; width: 100%; height: 360px; background: #f9f9f9; overflow: hidden; }
.tob-slides { display: flex; height: 100%; transition: transform .3s ease; will-change: transform; }
.tob-slides img { flex-shrink: 0; width: 100vw; max-width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.tob-gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.28); color: #fff; border: none; border-radius: 50%; width: 36px; height: 36px; font-size: 22px; line-height: 1; cursor: pointer; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 0; transition: background .15s; }
.tob-gallery-arrow:hover { background: rgba(0,0,0,.5); }
.tob-gallery-prev { left: 8px; }
.tob-gallery-next { right: 8px; }
.tob-gallery-dots { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.tob-gallery-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); transition: background .2s; }
.tob-gallery-dots span.active { background: #fff; }
.tob-thumbs { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; background: #fff; }
.tob-thumbs img { width: 60px; height: 60px; object-fit: cover; border: 2px solid transparent; border-radius: 4px; cursor: pointer; flex-shrink: 0; }
.tob-thumbs img.active { border-color: #e4393c; }

/* 标题价格 */
.tob-info { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; }
.tob-title { font-size: 15px; line-height: 1.5; color: #333; margin-bottom: 8px; }
.tob-price { font-size: 22px; color: #e4393c; font-weight: bold; display: flex; align-items: baseline; gap: 10px; }
.tob-price span { font-size: 14px; }
.tob-price-iqd { font-size: 14px; color: #888; font-weight: normal; }

/* 规格选择 */
.tob-specs { padding: 12px 16px; }
.tob-spec-group { margin-bottom: 14px; }
.tob-spec-label { font-size: 13px; color: #666; margin-bottom: 8px; }
.tob-spec-label strong { color: #333; }
.tob-spec-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.tob-spec-btn { border: 1px solid #ddd; border-radius: 4px; padding: 6px 14px; font-size: 13px; background: #fff; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all .15s; }
.tob-spec-btn:hover { border-color: #e4393c; color: #e4393c; }
.tob-spec-btn.selected { border-color: #e4393c; color: #e4393c; background: #fff5f5; }
.tob-spec-btn .color-swatch { width: 18px; height: 18px; border-radius: 3px; background-size: cover; background-position: center; border: 1px solid #eee; }

/* 库存 */
.tob-stock { padding: 4px 16px 12px; font-size: 13px; color: #666; }
.tob-stock .stock-num { color: #333; font-weight: bold; }

/* 发货时效 */
.tob-ship-days { padding: 0 16px 10px; font-size: 13px; color: #666; display: flex; align-items: center; gap: 6px; }
.tob-ship-days .ship-icon { font-size: 14px; }
.tob-ship-days .ship-val  { color: #333; font-weight: bold; }
.tob-ship-days .ship-updating { color: #f90; font-style: italic; }

/* 运费提示 */
.tob-freight-hint { padding: 0 16px 10px; font-size: 12px; color: #f90; }

/* 数量选择 */
.tob-quantity { padding: 4px 16px 12px; font-size: 13px; color: #666; display: flex; align-items: center; gap: 10px; }
.tob-qty-ctrl { display: flex; align-items: center; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.tob-qty-btn { background: #f5f5f5; border: none; width: 32px; height: 32px; font-size: 18px; cursor: pointer; color: #333; display: flex; align-items: center; justify-content: center; user-select: none; }
.tob-qty-btn:hover { background: #e8e8e8; }
#tob-qty-input { width: 52px; height: 32px; border: none; border-left: 1px solid #ddd; border-right: 1px solid #ddd; text-align: center; font-size: 14px; outline: none; -moz-appearance: textfield; }
#tob-qty-input::-webkit-outer-spin-button, #tob-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* 操作按钮 */
.tob-actions { padding: 14px 16px; display: flex; gap: 10px; border-top: 1px solid #f0f0f0; }
.btn-submit { flex: 1; background: #e4393c; color: #fff; border: none; border-radius: 6px; padding: 12px; font-size: 16px; cursor: pointer; }
.btn-submit:disabled { background: #ccc; cursor: not-allowed; }
.btn-orders { background: #fff; color: #e4393c; border: 1px solid #e4393c; border-radius: 6px; padding: 12px 18px; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none; display: flex; align-items: center; }
.btn-orders:hover { background: #fff5f5; }

/* 平台介绍区 */
#tob-intro { background: #fff; }

.tob-intro-hero {
    background: linear-gradient(135deg, #e4393c 0%, #c9282b 100%);
    color: #fff;
    padding: 32px 20px 28px;
    text-align: center;
}
.tob-intro-tagline {
    font-size: 22px;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 10px;
}
.tob-intro-sub {
    font-size: 13px;
    line-height: 1.7;
    opacity: .88;
    max-width: 340px;
    margin: 0 auto;
}

.tob-intro-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    padding: 24px 12px 8px;
    background: #fff;
}
.tob-intro-step {
    flex: 1;
    text-align: center;
    padding: 0 6px;
    max-width: 110px;
}
.tob-intro-step-icon {
    font-size: 28px;
    margin-bottom: 8px;
    line-height: 1;
}
.tob-intro-step-title {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
}
.tob-intro-step-desc {
    font-size: 11px;
    color: #888;
    line-height: 1.5;
}
.tob-intro-step-arrow {
    font-size: 22px;
    color: #ddd;
    margin-top: 14px;
    flex-shrink: 0;
    align-self: flex-start;
}

.tob-intro-freight {
    text-align: center;
    font-size: 12px;
    color: #f57c00;
    background: #fff8f0;
    border: 1px solid #ffe0b2;
    border-radius: 6px;
    margin: 8px 16px;
    padding: 9px 12px;
}
.tob-intro-cta {
    text-align: center;
    font-size: 13px;
    color: #bbb;
    padding: 10px 16px 20px;
    letter-spacing: .3px;
}

/* RTL overrides for intro */
[dir="rtl"] .tob-intro-steps { direction: rtl; }
[dir="rtl"] .tob-intro-step-arrow { transform: none; }

/* 购买建议区块 */
.tob-tips { padding: 0 0 24px; }
.tob-tips-section { margin: 12px 16px 0; border-radius: 12px; overflow: hidden; border: 1px solid #f0f0f0; }
.tob-tips-section-header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: #f8f9ff; cursor: pointer; user-select: none; }
.tob-tips-section-icon { font-size: 18px; flex-shrink: 0; }
.tob-tips-section-title { font-size: 14px; font-weight: 700; color: #1e3a8a; flex: 1; }
.tob-tips-section-arrow { font-size: 13px; color: #9ca3af; transition: transform .2s; }
.tob-tips-section-arrow.open { transform: rotate(90deg); }
.tob-tips-section-body { display: none; background: #fff; padding: 10px 14px 14px; }
.tob-tips-section-body.open { display: block; }
.tob-tip-item { display: flex; gap: 8px; margin-top: 10px; font-size: 13px; line-height: 1.6; color: #374151; }
.tob-tip-item::before { content: '▸'; color: #2563eb; flex-shrink: 0; margin-top: 1px; }
.tob-tip-item b { color: #dc2626; }
.tob-tip-item em { font-style: normal; color: #059669; font-weight: 600; }
[dir="rtl"] .tob-tip-item { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .tob-tips-section-header { flex-direction: row-reverse; }

/* 推荐搜索类目 */
.tob-rec-cats { padding: 0 16px 32px; }
.tob-rec-cats-title { font-size: 15px; font-weight: 700; color: #111; margin-bottom: 14px; padding-top: 4px; }
.tob-rec-cat { margin-bottom: 16px; }
.tob-rec-cat-name { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 8px; }
.tob-rec-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tob-rec-tag { background: #f3f4f6; color: #1f2937; border: none; border-radius: 20px; padding: 6px 14px; font-size: 13px; cursor: pointer; line-height: 1.4; }
.tob-rec-tag:active { background: #e0e7ff; color: #2563eb; }
[dir="rtl"] .tob-rec-cat-name { flex-direction: row-reverse; }

/* Loading */
.tob-loading { text-align: center; padding: 40px; color: #999; display: none; }

/* 遮罩 */
.tob-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; }

/* 未登录提示 */
.tob-login-required { text-align: center; padding: 60px 20px; color: #999; }
.tob-login-required .btn-submit { margin-top: 16px; padding: 12px 32px; font-size: 15px; border: none; border-radius: 6px; background: #e4393c; color: #fff; cursor: pointer; }

/* 登录弹窗 */
.tob-login-modal { display: none; position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); background: #fff; border-radius: 10px; padding: 24px 20px; width: 300px; z-index: 101; box-shadow: 0 8px 32px rgba(0,0,0,.18); }
.tob-modal-title { font-size: 16px; font-weight: bold; color: #333; margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; }
.tob-modal-close { background: none; border: none; color: #bbb; font-size: 14px; cursor: pointer; line-height: 1; padding: 0; width: 20px !important; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.tob-modal-close:hover { color: #999; }
.tob-modal-hint { font-size: 13px; color: #999; margin-bottom: 16px; line-height: 1.5; }
.tob-login-modal input { width: 100%; border: 1px solid #ddd; border-radius: 6px; padding: 10px 12px; font-size: 15px; outline: none; margin-bottom: 10px; display: block; }
.tob-login-modal input:focus { border-color: #e4393c; }
.tob-phone-wrap { display: flex; align-items: center; border: 1px solid #ddd; border-radius: 6px; margin-bottom: 10px; overflow: hidden; }
.tob-phone-wrap:focus-within { border-color: #e4393c; }
.tob-phone-prefix { padding: 10px 10px 10px 12px; font-size: 15px; color: #333; background: #f5f5f5; border-right: 1px solid #ddd; white-space: nowrap; user-select: none; }
.tob-phone-wrap input { margin-bottom: 0; border: none; width: auto; }
.tob-login-modal button { width: 100%; background: #e4393c; color: #fff; border: none; border-radius: 6px; padding: 11px; font-size: 15px; cursor: pointer; margin-top: 4px; }
.tob-login-modal button:hover { background: #c9282b; }

/* 购物车列表 */
.tob-inline-orders { background: #fff; margin-top: 8px; }
.tob-inline-orders-hd { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f0f0f0; }
.tob-inline-orders-hd span { font-size: 15px; font-weight: bold; color: #333; }
.tob-inline-orders-hd a { font-size: 13px; color: #e4393c; text-decoration: none; }

/* 购物车汇总 */
.tob-cart-summary { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #f0f0f0; background: #fff8f8; }
.tob-cart-summary strong { font-size: 16px; color: #e4393c; }
.tob-freight-note { font-size: 12px; color: #999; }

/* 订单条目 */
.tob-order-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #f0f0f0; transition: opacity .3s; }
.tob-order-item > a { flex-shrink: 0; display: block; }
.tob-order-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.tob-order-info { flex: 1; min-width: 0; }
.tob-order-info .o-title { font-size: 13px; color: #333; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tob-order-info .o-spec  { font-size: 12px; color: #999; margin-top: 3px; }
.tob-order-info .o-qty   { font-size: 15px; color: #333; font-weight: bold; margin-top: 2px; }
.tob-order-info .o-price { font-size: 15px; color: #e4393c; font-weight: bold; margin-top: 4px; }
.tob-order-info .o-real-pics { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; width: 100%; overflow: hidden; }
.tob-order-info .o-real-pics img { width: 56px; height: 56px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.tob-order-info .o-item-weight  { font-size: 11px; color: #999; margin-top: 3px; }
.tob-order-info .o-item-freight { font-size: 11px; color: #e4393c; margin-top: 1px; }
.tob-order-del { background: none; border: 1px solid #ddd; border-radius: 4px; color: #999; font-size: 12px; padding: 5px 10px; cursor: pointer; flex-shrink: 0; }
.tob-order-del:hover { border-color: #e4393c; color: #e4393c; }
.tob-order-empty { text-align: center; padding: 40px 20px; color: #bbb; font-size: 14px; }

/* Toast 提示 */
.tob-toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.72);
    color: #fff;
    font-size: 14px;
    padding: 9px 20px;
    border-radius: 20px;
    z-index: 300;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
    white-space: nowrap;
}
.tob-toast.show { opacity: 1; }
.tob-toast.toast-success {
    background: #22c55e;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 13px 28px;
    border-radius: 28px;
    box-shadow: 0 4px 18px rgba(34,197,94,.35);
}

/* 翻译状态浮层 */
.tob-translate-tip {
    position: fixed;
    top: 16px;
    right: 16px;
    background: rgba(0,0,0,.75);
    color: #fff;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 6px;
    z-index: 200;
    display: none;
    max-width: 220px;
    line-height: 1.5;
    cursor: default;
    transition: opacity .2s;
}
.tob-translate-tip.clickable { cursor: pointer; background: #e4393c; }
[dir="rtl"] .tob-translate-tip { right: auto; left: 16px; }

/* RTL overrides for Arabic */
[dir="rtl"] .tob-gallery-prev { left: auto; right: 8px; }
[dir="rtl"] .tob-gallery-next { right: auto; left: 8px; }
[dir="rtl"] .tob-header { direction: rtl; }
[dir="rtl"] .tob-login-modal input { text-align: right; direction: ltr; }
[dir="rtl"] #tob-qty-input { direction: ltr; }
[dir="rtl"] .tob-search-clear { right: auto; left: 0; }
[dir="rtl"] .tob-search-input-wrap input { padding: 8px 12px 8px 32px; }

/* 预估重量+运费 */
.tob-est-weight { padding: 0 16px 10px; font-size: 13px; color: #2563eb; line-height: 1.5; }
.tob-est-note   { font-size: 11px; color: #9ca3af; margin-top: 2px; }
