/* =========================================================================
   明亮专业风主题 theme-light.css  (2026-10-15)
   -------------------------------------------------------------------------
   方向：面向海外用户的「明亮专业风」（Udemy / Skillshare / Stripe 风格）：
   白底 + 浅灰分区、靛蓝紫单品牌色、Inter 字体、大圆角卡片、克制阴影、
   悬停轻微上浮。相比默认模板，去掉"促销橙红"感，提升信任与高级感。
   在不改动 HTML 结构的前提下，把 AIZ (Active eCommerce) 前台整体换肤。
   加载顺序：本文件必须在 aiz-core.css / custom-style.css 之后，
   且在布局内联主题色 <style> 之后加载（否则 :root 变量会被后台设置覆盖）。
   回退 / 切换：改 app.blade.php 中本文件一行 <link> 即可。
   （dark-tech.css 仍保留在 assets/css 下，需要深色版时换回那行即可。）
   ========================================================================= */

/* ============ 1. 主题变量（覆盖后台注入的主色/浅色/深色） ============ */
:root {
    --primary: #4f46e5;              /* 靛蓝紫（品牌主色） */
    --hov-primary: #4338ca;
    --soft-primary: rgba(79, 70, 229, 0.1);
    --secondary: #64748b;
    --soft-secondary: rgba(100, 116, 139, 0.12);
    --success: #059669;
    --soft-success: rgba(5, 150, 105, 0.1);
    --info: #0ea5e9;
    --soft-info: rgba(14, 165, 233, 0.1);
    --warning: #d97706;
    --soft-warning: rgba(217, 119, 6, 0.12);
    --danger: #dc2626;
    --soft-danger: rgba(220, 38, 38, 0.1);
    --light: #f6f7fb;                /* 浅灰分区 */
    --dark: #0f172a;                 /* 深石板蓝（正文/页脚） */
    --soft-dark: rgba(15, 23, 42, 0.06);
}

/* ============ 2. 全局基底 ============ */
body {
    background-color: #f6f7fb !important;
    color: #1f2937 !important;
    font-family: 'Inter', 'Open Sans', -apple-system, BlinkMacSystemFont,
        'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    letter-spacing: -0.01em;
}

::selection { background: rgba(79, 70, 229, 0.18); color: #111827; }

/* 滚动条：中性浅灰 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #eef0f6; }
::-webkit-scrollbar-thumb { background: #c6ccd9; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #a8b0c2; }
html { scrollbar-color: #c6ccd9 #eef0f6; }

a { color: #4f46e5; }
a:hover { color: #4338ca; }
hr { border-color: #e5e9f0 !important; }

/* ============ 3. 工具类覆盖（必须 !important 压过 Bootstrap/AIZ） ============ */
.bg-white { background-color: #ffffff !important; }
.bg-light { background-color: #f6f7fb !important; }
.hov-bg-white:hover { background-color: #ffffff !important; }
.text-dark { color: #111827 !important; }
.text-body { color: #1f2937 !important; }
.text-muted, .text-secondary { color: #6b7280 !important; }
.border, .border-top, .border-bottom, .border-left, .border-right {
    border-color: #e5e9f0 !important;
}
.border-light { border-color: #e7eaf3 !important; }
.border-gray-200 { border-color: #e5e9f0 !important; }
.border-soft-secondary { border-color: rgba(100, 116, 139, 0.15) !important; }

/* ============ 4. 顶部导航 ============ */
.top-navbar { border-bottom-color: #e5e9f0 !important; }

header.bg-white {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e9f0 !important;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06) !important;
}
header .border-top, header .border-bottom { border-color: #e5e9f0 !important; }

/* 搜索区：浅灰圆角输入 + 靛蓝按钮 */
#search, .front-header-search .form-control {
    background-color: #f8fafc !important;
    color: #111827 !important;
    border-radius: 10px 0 0 10px !important;
}
#search::placeholder, .front-header-search .form-control::placeholder { color: #9aa3b2 !important; }
.front-header-search .input-group-append .btn { border-radius: 0 10px 10px 0 !important; }
[dir="rtl"] #search, [dir="rtl"] .front-header-search .form-control { border-radius: 0 10px 10px 0 !important; }
[dir="rtl"] .front-header-search .input-group-append .btn { border-radius: 10px 0 0 10px !important; }

.typed-search-box {
    background-color: #ffffff !important;
    border: 1px solid #e5e9f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.14) !important;
}
.typed-search-box .search-nothing { color: #6b7280 !important; }
.search-product { border-bottom: 1px solid #eef0f6 !important; }
.search-product:hover { background-color: #f8fafc !important; }

/* 下拉菜单 */
.dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid #e5e9f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.12) !important;
}
.dropdown-item { color: #374151 !important; border-radius: 8px !important; }
.dropdown-item:hover, .dropdown-item:focus { background-color: #f3f4f6 !important; color: #111827 !important; }
.dropdown-item.active { background-color: rgba(79, 70, 229, 0.1) !important; color: #4f46e5 !important; }
.dropdown-divider { border-color: #eef0f6 !important; }

/* ============ 5. 分类菜单（首页左栏 / 下拉悬浮） ============ */
.all-category {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(79, 70, 229, 0.03)) !important;
}
.aiz-category-menu .sub-cat-menu { background-color: #ffffff !important; }
.aiz-category-menu .category-nav-element:hover > a {
    background: #f3f4f6 !important;
    box-shadow: none !important;
}
.aiz-category-menu .category-nav-element > a:hover { color: #4f46e5 !important; }

/* ============ 6. 按钮（实色为主，克制阴影） ============ */
.btn-primary {
    background-color: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12) !important;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #4338ca !important;
    border-color: #4338ca !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28) !important;
}
.btn-primary:active, .btn-primary:not(:disabled):not(.disabled).active {
    background-color: #3730a3 !important;
    border-color: #3730a3 !important;
    color: #ffffff !important;
}
.btn-soft-primary {
    background-color: rgba(79, 70, 229, 0.08) !important;
    border-color: rgba(79, 70, 229, 0.16) !important;
    color: #4f46e5 !important;
}
.btn-soft-primary:hover {
    background-color: rgba(79, 70, 229, 0.14) !important;
    color: #4338ca !important;
}
.btn-secondary { background-color: #e5e7eb !important; border-color: #e5e7eb !important; color: #374151 !important; }
.btn-soft-secondary { background-color: rgba(100, 116, 139, 0.1) !important; color: #475569 !important; }
.btn-dark { background-color: #0f172a !important; border-color: #0f172a !important; color: #ffffff !important; }
.btn-light { background-color: #f3f4f6 !important; border-color: #e5e7eb !important; color: #374151 !important; }
.btn-white { background-color: #ffffff !important; border-color: #e5e7eb !important; color: #374151 !important; }
.btn-outline-primary { color: #4f46e5 !important; border-color: rgba(79, 70, 229, 0.45) !important; }
.btn-outline-primary:hover { background-color: #4f46e5 !important; border-color: #4f46e5 !important; color: #ffffff !important; }
.btn-success { background-color: #059669 !important; border-color: #059669 !important; }
.btn-warning { background-color: #d97706 !important; border-color: #d97706 !important; color: #ffffff !important; }
.btn-info { background-color: #0ea5e9 !important; border-color: #0ea5e9 !important; }

/* ============ 7. 卡片 ============ */
.card {
    background-color: #ffffff !important;
    border: 1px solid #e5e9f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06) !important;
}
.card-header { background-color: #f8fafc !important; border-bottom: 1px solid #e5e9f0 !important; color: #111827 !important; }
.card-footer { background-color: #f8fafc !important; border-top: 1px solid #e5e9f0 !important; }

/* 商品卡片：白卡 + 悬停上浮 + 描边提亮（无发光） */
.aiz-card-box {
    background-color: #ffffff !important;
    border-color: #e7eaf3 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06) !important;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}
.aiz-card-box:hover {
    border-color: rgba(79, 70, 229, 0.35) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.1) !important;
}

/* ============ 8. 表单 ============ */
.form-control, .custom-select {
    background-color: #ffffff !important;
    border-color: #d1d5db !important;
    border-radius: 10px !important;
    color: #111827 !important;
}
.form-control:focus, .custom-select:focus {
    background-color: #ffffff !important;
    border-color: rgba(79, 70, 229, 0.6) !important;
    box-shadow: 0 0 0 0.18rem rgba(79, 70, 229, 0.14) !important;
    color: #111827 !important;
}
.form-control::placeholder, .custom-select::placeholder { color: #9aa3b2 !important; }
.input-group-text {
    background-color: #f8fafc !important;
    border-color: #d1d5db !important;
    color: #64748b !important;
}
/* bootstrap-select（aiz-selectpicker 渲染） */
.bootstrap-select .dropdown-toggle {
    background-color: #ffffff !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
}
.bootstrap-select .dropdown-toggle:focus {
    border-color: rgba(79, 70, 229, 0.6) !important;
    box-shadow: 0 0 0 0.18rem rgba(79, 70, 229, 0.14) !important;
}
/* 数量加减控件 */
.aiz-plus-minus .btn {
    background-color: #f8fafc !important;
    border-color: #e5e7eb !important;
    color: #374151 !important;
}
/* 选项大盒（规格/颜色选择） */
.aiz-megabox-elem {
    background-color: #ffffff !important;
    border-color: #d1d5db !important;
    color: #1f2937 !important;
}
.aiz-megabox input:checked + .aiz-megabox-elem {
    border-color: #4f46e5 !important;
    background-color: rgba(79, 70, 229, 0.08) !important;
    color: #4f46e5 !important;
}

/* ============ 9. 表格 ============ */
.table { color: #1f2937 !important; }
.table td, .table th {
    background-color: #ffffff !important;
    border-color: #e5e9f0 !important;
    color: #1f2937 !important;
}
.table thead th { background-color: #f8fafc !important; color: #475569 !important; }
.table-hover tbody tr:hover td, .table-hover tbody tr:hover th { background-color: #f8fafc !important; }
.table-striped tbody tr:nth-of-type(odd) td { background-color: #fafbfd !important; }

/* ============ 10. 弹窗 ============ */
.modal-content {
    background-color: #ffffff !important;
    border: 1px solid #e5e9f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 60px rgba(16, 24, 40, 0.18) !important;
}
.modal-header { border-bottom: 1px solid #e5e9f0 !important; }
.modal-footer { border-top: 1px solid #e5e9f0 !important; }
.modal-title, .modal-content h1, .modal-content h2, .modal-content h3,
.modal-content h4, .modal-content h5, .modal-content h6 { color: #111827 !important; }
.close { color: #6b7280 !important; text-shadow: none !important; }

/* ============ 11. 分页 ============ */
.pagination .page-link, .aiz-pagination .page-link {
    background-color: #ffffff !important;
    border-color: #e5e9f0 !important;
    color: #475569 !important;
    border-radius: 8px !important;
}
.pagination .page-item.active .page-link, .aiz-pagination .page-item.active .page-link {
    background-color: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #ffffff !important;
}
.pagination .page-link:hover { background-color: #f3f4f6 !important; color: #4f46e5 !important; }

/* ============ 12. 徽章与列表 ============ */
.badge-primary { background-color: #4f46e5 !important; color: #ffffff !important; }
.badge-soft-primary { background-color: rgba(79, 70, 229, 0.1) !important; color: #4f46e5 !important; }
.badge-secondary { background-color: #64748b !important; color: #ffffff !important; }
.badge-success { background-color: #059669 !important; color: #ffffff !important; }
.badge-soft-success { background-color: rgba(5, 150, 105, 0.1) !important; color: #047857 !important; }
.badge-warning { background-color: #d97706 !important; color: #ffffff !important; }
.badge-soft-warning { background-color: rgba(217, 119, 6, 0.12) !important; color: #b45309 !important; }
.badge-danger { background-color: #dc2626 !important; color: #ffffff !important; }
.badge-soft-danger { background-color: rgba(220, 38, 38, 0.1) !important; color: #b91c1c !important; }
.badge-info { background-color: #0ea5e9 !important; color: #ffffff !important; }
.badge-soft-info { background-color: rgba(14, 165, 233, 0.1) !important; color: #0284c7 !important; }

.list-group-item {
    background-color: #ffffff !important;
    border-color: #eef0f6 !important;
    color: #1f2937 !important;
}
.list-group-item.active {
    background-color: rgba(79, 70, 229, 0.08) !important;
    border-color: rgba(79, 70, 229, 0.2) !important;
    color: #4f46e5 !important;
}

/* ============ 13. 提示条（含 AIZ toast 通知） ============ */
.alert { background-color: #ffffff !important; border: 1px solid #e5e9f0 !important; color: #1f2937 !important; }
.alert-primary { background-color: rgba(79, 70, 229, 0.06) !important; border-color: rgba(79, 70, 229, 0.2) !important; color: #4338ca !important; }
.alert-success { background-color: rgba(5, 150, 105, 0.06) !important; border-color: rgba(5, 150, 105, 0.2) !important; color: #047857 !important; }
.alert-warning { background-color: rgba(217, 119, 6, 0.08) !important; border-color: rgba(217, 119, 6, 0.22) !important; color: #b45309 !important; }
.alert-danger { background-color: rgba(220, 38, 38, 0.06) !important; border-color: rgba(220, 38, 38, 0.2) !important; color: #b91c1c !important; }
.alert-info { background-color: rgba(14, 165, 233, 0.06) !important; border-color: rgba(14, 165, 233, 0.2) !important; color: #0284c7 !important; }
.aiz-notify .progress { background-color: #eef0f6 !important; }
.aiz-notify .progress-bar { background-color: #4f46e5 !important; }

/* ============ 14. 页脚（亮底深色页脚，海外站点惯例） / 移动端 ============ */
.footer-widget {
    background-color: #0f172a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}
footer.bg-black {
    background-color: #0b1120 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}
.footer-widget, .footer-widget a, footer, footer a { color: #cbd5e1 !important; }
.footer-widget h4 { color: #f8fafc !important; }
.aiz-mobile-bottom-nav {
    background-color: #ffffff !important;
    border-color: #e5e9f0 !important;
    box-shadow: 0 -4px 16px rgba(16, 24, 40, 0.08) !important;
}
.aiz-mobile-side-nav .collapse-sidebar { background-color: #ffffff !important; }

/* ============ 15. 轮播箭头 / 圆点 ============ */
.aiz-carousel .slick-arrow {
    background-color: #ffffff !important;
    color: #4b5563 !important;
    border: 1px solid #e5e9f0 !important;
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.1) !important;
}
.aiz-carousel .slick-arrow:hover { background-color: #f3f4f6 !important; color: #4f46e5 !important; }
.aiz-carousel .slick-dots button { background-color: rgba(15, 23, 42, 0.2) !important; }
.aiz-carousel .slick-dots .slick-active button { background-color: #4f46e5 !important; }

/* ============ 16. 富文本内容（自定义页/编辑区） ============ */
.aiz-editor-data, .aiz-editor-data p, .aiz-editor-data li { color: #1f2937 !important; }
.aiz-editor-data h1, .aiz-editor-data h2, .aiz-editor-data h3,
.aiz-editor-data h4, .aiz-editor-data h5 { color: #111827 !important; }

/* 富文本布局兜底：防止 WP 抓取 HTML 的 inline-block SPAN 包裹 block 内容导致宽度溢出/卡片水平错位 */
.aiz-editor-data { overflow: hidden; }
.aiz-editor-data div, .aiz-editor-data ul, .aiz-editor-data ol, .aiz-editor-data li,
.aiz-editor-data section, .aiz-editor-data article, .aiz-editor-data header,
.aiz-editor-data footer, .aiz-editor-data nav, .aiz-editor-data table, .aiz-editor-data blockquote {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
/* 强制 span 为 inline，防止 inline-block 包裹 block 内容导致 shrink-to-fit 溢出 */
.aiz-editor-data span {
  display: inline !important;
  width: auto !important;
}
.aiz-editor-data img { max-width: 100% !important; height: auto !important; }

/* ============ 17. 模板内联样式微调（属性选择器） ============ */
/* 模板自带的浅粉/浅蓝块 → 统一为中性浅灰 + 品牌浅靛 */
[style*="background:#fff2ef"] { background: #f3f4f6 !important; }
[style*="background: #fff2ef"] { background: #f3f4f6 !important; }
[style*="background:#f4f5f7"] { background: #f3f4f6 !important; }
[style*="background:#fafbfc"] { background: #f8fafc !important; }
[style*="background:#eef6fb"] { background: #f3f4f6 !important; }
[style*="background:#f2f9ff"] { background: #eef1f7 !important; }
[style*="background:linear-gradient(135deg, #eaf6ff"] { background: linear-gradient(135deg, #eef1f7, #f8fafc) !important; }
[style*="background:linear-gradient(135deg, #f6f9fb"] { background: linear-gradient(135deg, #eef1f7, #f8fafc) !important; }
[style*="background:linear-gradient(135deg,#fff5f2"] { background: linear-gradient(135deg, #f3f4f6, #f8fafc) !important; }
/* 模板里的红橙色文字/图标 → 品牌靛蓝 */
[style*="color:#e62e04"] { color: #4f46e5 !important; }
/* 深蓝渐变横幅（统计条/会员面板）→ 品牌靛蓝渐变，白字依旧可读 */
[style*="#0d3b57"] { background: linear-gradient(135deg, #4338ca, #6366f1) !important; }

/* ============ 18. 其它细节 ============ */
.aiz-cookie-alert .bg-dark { background-color: #0f172a !important; }
.whatsapp-float { box-shadow: 0 6px 18px rgba(16, 24, 40, 0.18) !important; }
