/* ============================================================
   ae-deals.css v5 — DHL identity: yellow + red CTA only
   ============================================================ */

/* ── 变量 ──────────────────────────────────────────────────── */
:root {
    --ae-yellow:     #FFCC00;
    --ae-yellow-dk:  #E6B800;
    --ae-red:        #D40511;   /* CTA BUTTON ONLY */
    --ae-red-dk:     #B00010;
    --ae-green:      #16a34a;
    --ae-bg:         #FFCC00;
    --ae-white:      #ffffff;
    --ae-border:     rgba(0,0,0,0.12);
    --ae-text:       #1a1a1a;
    --ae-muted:      #555555;
    --ae-radius:     8px;
}

/* ── 全局 body 背景 ─────────────────────────────────────────── */
body.ae-page {
    background: #FFCC00 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── 强制清零 Astra 内容区干扰，消除菜单下方白缝 ──────────────── */
body.ae-page .site-content,
body.ae-page #content,
body.ae-page #primary,
body.ae-page .content-area,
body.ae-page #main,
body.ae-page .ast-container,
body.ae-page .entry-content,
body.ae-page .ast-article-single,
body.ae-page .site-main,
body.ae-page .ast-article-post,
body.ae-page .post-content {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    background: transparent !important;
}

/* ── 包裹层 ─────────────────────────────────────────────────── */
.ae-channel-wrapper {
    display: block;
    width: 100%;
    background: #FFCC00;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 14px;
    color: var(--ae-text);
    line-height: 1.5;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
.ae-channel-wrapper *, .ae-channel-wrapper *::before, .ae-channel-wrapper *::after { box-sizing: border-box; }
.ae-channel-wrapper a { text-decoration: none; }
.ae-channel-wrapper ul, .ae-channel-wrapper ol { list-style: none; margin: 0; padding: 0; }
.ae-channel-wrapper h1, .ae-channel-wrapper h2, .ae-channel-wrapper h3 { margin: 0; font-weight: 700; line-height: 1.25; }
.ae-channel-wrapper img { max-width: 100%; height: auto; display: block; }
.ae-channel-wrapper button { font-family: inherit; cursor: pointer; }

/* ── HERO — 黄色背景，黑色文字 ─────────────────────────────── */
.ae-hero {
    background: #FFCC00;
    padding: 36px 24px 32px;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid #E6B800;
    margin: 0;
}
.ae-hero-inner  { max-width: 960px; margin: 0 auto; position: relative; z-index: 1; }
.ae-hero-badges { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.ae-badge       { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 4px; line-height: 1.5; }
.ae-badge--red    { background: #1a1a1a; color: #FFCC00; }
.ae-badge--yellow { background: #1a1a1a; color: #FFCC00; }
.ae-badge--store  { background: #1a1a1a; color: #FFCC00; font-size: 13px; }
.ae-badge--green  { background: #16a34a; color: #fff; }
.ae-badge--gray   { background: rgba(0,0,0,0.1); color: #1a1a1a; }
.ae-hero-title  { font-size: clamp(22px, 3.5vw, 32px); font-weight: 900; color: #1a1a1a; margin: 0 0 10px; letter-spacing: -0.3px; }
.ae-hero-sub    { font-size: 15px; color: #444; margin: 0; font-weight: 400; }
.ae-hero-stats  { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 14px; }

/* ── STATS ─────────────────────────────────────────────────── */
.ae-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #f9fafb;
    border-bottom: 1px solid #f0e8a0;
    border-top: 1px solid #e5e7eb;
    margin: 0;
}
.ae-stat            { padding: 16px 10px; text-align: center; border-right: 1px solid #e5e7eb; }
.ae-stat:last-child { border-right: none; }
.ae-stat-num { display: block; font-size: 22px; font-weight: 900; color: #1a1a1a; line-height: 1.1; }
.ae-stat-lbl { display: block; font-size: 11px; color: #555; margin-top: 3px; text-transform: uppercase; letter-spacing: 0.4px; }

/* ── CATEGORY NAV ──────────────────────────────────────────── */
.ae-cat-nav-wrap {
    background: #FFCC00;
    border-bottom: 2px solid #E6B800;
    padding: 0 20px;
    margin: 0;
}
.ae-cat-nav {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: none;
}
.ae-cat-nav::-webkit-scrollbar { display: none; }
.ae-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    background: rgba(0,0,0,0.08);
    border: 1.5px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all .15s;
}
.ae-cat-pill:hover { background: rgba(0,0,0,0.15); color: #1a1a1a; }
.ae-cat-pill--active { background: #1a1a1a; color: #FFCC00 !important; border-color: #1a1a1a; font-weight: 700; }
.ae-cat-icon             { font-size: 15px; }
.ae-cat-count            { font-size: 11px; padding: 1px 6px; border-radius: 10px; background: rgba(0,0,0,0.10); }
.ae-cat-pill--active .ae-cat-count { background: rgba(255,255,255,0.25); color: #fff; }

/* ── PAGE WRAP ─────────────────────────────────────────────── */
.ae-page-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 16px 60px;
    background: transparent;
    min-height: 100vh;
}

/* ── SORT ROW ──────────────────────────────────────────────── */
.ae-sort-bar,
.ae-sort-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    background: transparent;
}
.ae-sort-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    background: rgba(0,0,0,0.08);
    border: none;
    border-radius: 8px;
    padding: 4px;
}
.ae-sort-tab {
    padding: 7px 15px;
    border-radius: 4px;
    font-size: 13px;
    color: #1a1a1a;
    white-space: nowrap;
    transition: all .15s;
    font-weight: 500;
}
.ae-sort-tab:hover { background: rgba(0,0,0,0.12); color: #1a1a1a; }
.ae-tab-on         { background: #1a1a1a !important; color: #FFCC00 !important; font-weight: 700; }
.ae-result-count   { font-size: 13px; color: #444; font-weight: 500; }
.ae-result-count strong { color: #1a1a1a; font-weight: 700; }

/* ══════════════════════════════════════════════════════════════
   DEAL GRID — lista de 1 columna, cards de 3 columnas
══════════════════════════════════════════════════════════════ */
.ae-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    width: 100% !important;
    border: 1.5px solid #E6B800;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

/* ── CARD ──────────────────────────────────────────────────── */
.ae-card {
    background: #fff;
    border: none;
    border-bottom: 1px solid #f0e8a0;
    border-radius: 0;
    overflow: hidden;
    display: grid !important;
    grid-template-columns: 160px 1fr auto !important;
    grid-template-rows: auto !important;
    align-items: stretch !important;
    box-shadow: none;
    transition: background .15s;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    width: auto !important;
    min-height: 160px;
    position: relative;
}
.ae-card:last-child { border-bottom: none; }
.ae-card:hover { background: #fafafa; }
.ae-card--has-coupon { border-left: 3px solid #e5a0a0; }
.ae-card--no-code    { border-left: 3px solid #ddd; }

/* ── COLUMNA 1: Imagen ─────────────────────────────────────── */
.ae-card-col--img {
    position: relative;
    width: 160px !important;
    min-width: 160px !important;
    overflow: hidden;
    background: #fffbea;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
}
.ae-card-col--img img {
    width: 136px !important;
    height: 136px !important;
    object-fit: contain !important;
    display: block !important;
    transition: transform .25s;
}
.ae-card:hover .ae-card-col--img img { transform: scale(1.04); }

/* ── COLUMNA 2: Descripción ────────────────────────────────── */
.ae-card-col--desc {
    padding: 18px 20px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    justify-content: center;
    align-self: center;
}

/* ── COLUMNA 3: Acción ─────────────────────────────────────── */
.ae-card-col--action {
    padding: 18px 24px 18px 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    align-self: center;
}

/* HOT 销量标签内的文字标记 */
.ae-fire {
    display: inline-block;
    background: var(--ae-red);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    vertical-align: middle;
    letter-spacing: 0.3px;
}


.ae-badge-discount,
.ae-badge-coupon,
.ae-badge-hot {
    position: absolute;
    z-index: 2;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 5px;
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    pointer-events: none;
}

/* 内容区 (legacy compat) */
.ae-card-body {
    padding: 16px 18px 14px;
    flex: 1 1 auto;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px;
    min-height: 0;
    justify-content: center;
}


/* 品牌标签 */
.ae-card-brand {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #6b7280;
    line-height: 1;
}

/* 标题 — 3列布局：2行截断 */
.ae-card-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}
.ae-card-title a { color: inherit !important; text-decoration: none !important; }
.ae-card-title a:hover { color: #1a1a1a !important; text-decoration: underline; }

/* 销量 */
.ae-sales-pill {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; color: #6b7280; background: #f3f4f6;
    padding: 3px 10px; border-radius: 4px; width: fit-content;
    font-weight: 500;
}

/* 价格 */
.ae-price-row  { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; margin: 0; }
.ae-price-now  { font-size: 20px !important; font-weight: 800; color: #111827; line-height: 1; }
.ae-price-was  { font-size: 13px; color: #9ca3af; text-decoration: line-through; }
.ae-price-save { font-size: 11px; background: #fee2e2; color: #D40511; padding: 2px 7px; border-radius: 4px; font-weight: 600; border: none; }

/* 卡片价格行 */
.ae-card-price-row {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap; margin: 2px 0;
}
.ae-card-price-label {
    font-size: 10px; font-weight: 700; letter-spacing: .3px;
    color: #1a1a1a; background: rgba(0,0,0,0.1);
    border: none;
    padding: 2px 6px; border-radius: 3px;
    line-height: 1.4; flex-shrink: 0;
}
.ae-card-price {
    font-size: 20px; font-weight: 800;
    color: #111827; line-height: 1;
}
.ae-card-orig {
    font-size: 13px; color: #9ca3af;
    text-decoration: line-through;
    line-height: 1;
}
.ae-card-discount-pct {
    font-size: 11px; font-weight: 700;
    color: #1a1a1a; background: rgba(0,0,0,0.1);
    border: none;
    padding: 2px 7px; border-radius: 4px;
    line-height: 1.4; flex-shrink: 0;
}

/* meta: vendidos */
.ae-card-meta {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

/* 优惠码框 */
.ae-code-box {
    border: 1.5px dashed #d1d5db;
    border-radius: 6px; background: #f9fafb;
    padding: 8px 12px;
    display: flex; flex-direction: column; gap: 2px;
}
.ae-code-lbl    { font-size: 9px; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; }
.ae-code-val    { font-size: 13px; font-weight: 700; color: #111827; font-family: monospace; letter-spacing: 1px; word-break: break-all; }
.ae-code-detail { font-size: 10px; color: #6b7280; }

/* 无码说明 */
.ae-no-code-info {
    display: flex; align-items: flex-start; gap: 7px;
    background: #f9fafb; border: 1px solid #e5e7eb;
    border-radius: 6px; padding: 8px 10px;
}
.ae-no-code-icon { font-size: 14px; flex-shrink: 0; }
.ae-no-code-text { font-size: 11px; color: #6b7280; line-height: 1.4; }

/* 底部 */
.ae-card-footer {
    padding: 8px 14px 14px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}
.ae-rating     { font-size: 11px; color: #6b7280; }
.ae-stars      { color: #f59e0b; letter-spacing: -1px; }
.ae-qty        { font-size: 10px; color: #6b7280; }
.ae-exp-normal { font-size: 10px; color: #6b7280; }
.ae-exp-soon   { font-size: 10px; color: #d97706; font-weight: 600; }
.ae-exp-urgent { font-size: 10px; color: #D40511; font-weight: 700; }
.ae-exp-gone   { font-size: 10px; color: #bbb; }

/* 按钮 — 柔和红色，克制不抢眼 */
.ae-get-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    white-space: nowrap;
    border: none !important;
    text-decoration: none !important;
    text-align: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s, box-shadow .15s;
    line-height: 1.3 !important;
    font-family: inherit !important;
    letter-spacing: 0 !important;
    min-width: 148px;
    background: #D40511 !important;
    color: #fff !important;
    box-shadow: none !important;
}
.ae-get-btn:hover {
    background: #B00010 !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
}
.ae-get-btn:active { opacity: 0.92; }

.ae-get-btn--code  { background: #D40511 !important; color: #fff !important; }
.ae-get-btn--code:hover { background: #B00010 !important; }
.ae-get-btn--deal  { background: #D40511 !important; color: #fff !important; }
.ae-get-btn--deal:hover { background: #B00010 !important; }

/* ── PAGINATION ─────────────────────────────────────────────── */
.ae-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; flex-wrap: wrap; margin-top: 40px;
}
.ae-page-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 12px;
    background: var(--ae-white); border: 1px solid var(--ae-border);
    border-radius: 8px; font-size: 13px; color: var(--ae-text);
    text-decoration: none !important;
    transition: all .15s;
}
.ae-page-btn:hover    { background: var(--ae-purple-lt); border-color: #c4b5fd; color: var(--ae-purple); }
.ae-page-current      { background: var(--ae-purple) !important; color: #fff !important; border-color: var(--ae-purple); font-weight: 700; pointer-events: none; }
.ae-page-ellipsis     { font-size: 14px; color: var(--ae-muted); padding: 0 4px; }
.ae-empty             { text-align: center; padding: 80px 20px; color: var(--ae-muted); }
.ae-empty-icon        { display: block; font-size: 48px; margin-bottom: 16px; }

/* ── MODAL ──────────────────────────────────────────────────── */
.ae-modal-overlay {
    position: fixed; inset: 0; z-index: 999999;
    background: rgba(10,5,30,0.65);
    display: flex; align-items: center; justify-content: center; padding: 16px;
    opacity: 0; pointer-events: none;
    transition: opacity .2s;
}
.ae-modal-overlay.ae-open { opacity: 1; pointer-events: auto; }
.ae-modal {
    background: var(--ae-white); border-radius: 18px;
    padding: 36px 32px 28px;
    max-width: 420px; width: 100%;
    position: relative; text-align: center;
    box-shadow: 0 28px 80px rgba(0,0,0,0.28);
    transform: translateY(16px) scale(0.98);
    transition: transform .22s;
}
.ae-modal-overlay.ae-open .ae-modal { transform: translateY(0) scale(1); }
.ae-modal-close {
    position: absolute; top: 14px; right: 16px;
    background: none; border: none; font-size: 18px;
    color: var(--ae-muted); cursor: pointer;
    padding: 4px 6px; border-radius: 4px;
}
.ae-modal-close:hover { background: var(--ae-bg); color: var(--ae-text); }
.ae-modal-logo    { display: inline-block; background: var(--ae-red); color: #fff; font-size: 13px; font-weight: 700; padding: 4px 14px; border-radius: 6px; margin-bottom: 16px; }
.ae-modal-heading { font-size: 20px; font-weight: 800; color: var(--ae-text); margin: 0 0 6px; }
.ae-modal-product { font-size: 12px; color: var(--ae-muted); margin: 0 0 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ae-modal-code-wrap {
    display: flex;
    border: 2px dashed #D40511; border-radius: 8px; overflow: hidden; margin-bottom: 12px;
}
.ae-modal-code    { flex: 1; padding: 14px 16px; font-size: 20px; font-weight: 800; color: #D40511; font-family: monospace; letter-spacing: 2px; background: #FFF8CC; text-align: left; word-break: break-all; }
.ae-modal-copy    { background: #D40511; color: #ffffff; border: none; padding: 0 20px; font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; transition: background .15s; }
.ae-modal-copy:hover      { background: #B00010; }
.ae-modal-copy.ae-copied  { background: var(--ae-green); color: #fff; }
.ae-modal-hint      { font-size: 12px; color: var(--ae-green); font-weight: 600; margin: 0 0 4px; min-height: 18px; visibility: hidden; }
.ae-modal-redirect  { font-size: 12px; color: #5a3300; margin: 0 0 18px; }
.ae-dots::after     { content: ''; animation: ae-dot 1.5s infinite; }
@keyframes ae-dot   { 0%{content:'.'} 33%{content:'..'} 66%{content:'...'} 100%{content:''} }
.ae-modal-cta     { display: block; background: #D40511; color: #ffffff !important; border-radius: 6px; padding: 14px; font-size: 15px; font-weight: 800; margin-bottom: 14px; transition: background .15s; text-decoration: none !important; }
.ae-modal-cta:hover  { background: #B00010; }
.ae-modal-disclosure { font-size: 10px; color: #c0c0c0; margin: 0; line-height: 1.5; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .ae-stats-bar { grid-template-columns: repeat(2, 1fr); }
    .ae-sort-row  { flex-direction: column; align-items: flex-start; }
    .ae-sort-tabs { width: 100%; overflow-x: auto; }
    .ae-page-wrap { padding: 16px 0 40px; }
    .ae-cat-nav-wrap { padding: 0 12px; }
    .ae-hero      { padding: 24px 16px; }
    .ae-hero-title{ font-size: 20px; }
}

/* ── 分类页专用：面包屑 ─────────────────────────────────────── */
.ae-breadcrumb {
    max-width: 960px;
    margin: 0 auto;
    padding: 10px 20px 0;
    font-size: 12px;
    color: #5a3300;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ae-breadcrumb a            { color: #D40511; text-decoration: none; font-weight: 600; }
.ae-breadcrumb a:hover      { text-decoration: underline; }
.ae-breadcrumb-sep          { color: #B00010; }
.ae-breadcrumb-current      { color: #1a1a1a; font-weight: 600; }

/* ── 分类页：hero 样式微调 ────────────────────────────────── */
.ae-hero--category {
    background: #f9fafb;
    border-bottom: 6px solid #D40511;
}

/* ── 分类页空状态 ───────────────────────────────────────────── */
.ae-empty-cat {
    text-align: center;
    padding: 80px 20px;
    color: var(--ae-muted);
}
.ae-empty-cat .ae-empty-icon { font-size: 48px; display: block; margin-bottom: 16px; }
.ae-empty-cat h2 { font-size: 20px; color: var(--ae-text); margin-bottom: 8px; }
.ae-empty-cat p  { font-size: 14px; margin-bottom: 20px; }
.ae-empty-cat a  {
    display: inline-block;
    background: var(--ae-purple); color: #fff;
    padding: 10px 24px; border-radius: 8px;
    font-weight: 700; font-size: 14px;
    text-decoration: none;
}
.ae-empty-cat a:hover { background: var(--ae-purple-dk); }

/* ── 分类卡片网格（与主页复用同一 .ae-grid）────────────────── */
/* 分类概览卡片（/aliexpress/ 底部展示各分类入口时用）*/
.ae-cat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-top: 32px;
}
.ae-cat-card {
    background: var(--ae-white);
    border: 1px solid var(--ae-border);
    border-radius: var(--ae-radius);
    padding: 20px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--ae-text);
    transition: box-shadow .15s, transform .15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.ae-cat-card:hover {
    box-shadow: 0 6px 20px rgba(212,5,17,0.12);
    transform: translateY(-2px);
    border-color: #D40511;
    color: #D40511;
}
.ae-cat-card-icon  { font-size: 36px; line-height: 1; }
.ae-cat-card-name  { font-size: 13px; font-weight: 600; }
.ae-cat-card-count { font-size: 11px; color: var(--ae-muted); }

/* ── 主页底部分类入口区 ─────────────────────────────────────── */
.ae-cat-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--ae-border);
}
.ae-section-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--ae-text) !important;
    margin: 0 0 20px !important;
}

/* ── 分类页：无商品时空状态 ─────────────────────────────────── */
@media (max-width: 640px) {
    .ae-cat-cards { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .ae-cat-card-icon { font-size: 28px; }
    .ae-breadcrumb { padding: 8px 12px 0; }
}
@media (max-width: 400px) {
    .ae-cat-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Brand Page — ae-brand-header  (added for brand page support)
   ============================================================ */
.ae-brand-header {
    background: #f9fafb;
    padding: 48px 20px 40px;
    text-align: center;
    color: #D40511;
    border-bottom: 5px solid #D40511;
}
.ae-brand-header-inner {
    max-width: 800px;
    margin: 0 auto;
}
.ae-brand-badges {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.ae-badge--purple {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .4px;
}
/* Brand admin page — Brands submenu link style (inherits WP admin) */

/* ============================================================
   BRAND DIRECTORY  —  紧凑展示 + 抽屉式展开
   用 #ae-brand-directory 提升权重，防止 Astra 全局样式覆盖
   ============================================================ */
#ae-brand-directory {
    margin: 40px 0 8px !important;
    border: 2px solid #E6B800 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
#ae-brand-directory *, #ae-brand-directory *::before, #ae-brand-directory *::after {
    box-sizing: border-box !important;
}

/* ── 标题行 ── */
#ae-brand-directory .ae-brand-dir-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 14px 18px 12px !important;
    border-bottom: 2px solid #B00010 !important;
    background: #D40511 !important;
    margin: 0 !important;
}
#ae-brand-directory .ae-brand-dir-title {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
#ae-brand-directory .ae-brand-dir-icon { font-size: 18px; line-height: 1; }
#ae-brand-directory .ae-brand-dir-title h2 {
    font-size: 15px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    background: none !important;
    border: none !important;
    font-family: Arial Black, Arial, sans-serif !important;
}
#ae-brand-directory .ae-brand-dir-count {
    display: inline-block !important;
    font-size: 11px !important;
    color: #D40511 !important;
    background: #f9fafb !important;
    border-radius: 4px !important;
    padding: 2px 8px !important;
    font-weight: 800 !important;
    line-height: 1.5 !important;
    border: none !important;
}

/* ── 展开按钮（重置 Astra button 样式）── */
#ae-brand-directory .ae-brand-dir-expand-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #f9fafb !important;
    color: #D40511 !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.4 !important;
    height: auto !important;
    width: auto !important;
    margin: 0 !important;
    transition: background .15s !important;
    font-family: Arial Black, Arial, sans-serif !important;
}
#ae-brand-directory .ae-brand-dir-expand-btn:hover { background: #fff !important; color: #D40511 !important; }
#ae-brand-directory .ae-brand-dir-expand-btn svg {
    transition: transform .25s;
    flex-shrink: 0;
}
#ae-brand-directory .ae-brand-dir-expand-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
#ae-brand-directory .ae-brand-dir-expand-btn[aria-expanded="true"] { background: #fff !important; }

/* ── 预览行 ── */
#ae-brand-directory .ae-brand-preview {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    padding: 14px 18px !important;
    margin: 0 !important;
    list-style: none !important;
    background: #f9fafb !important;
}

/* ── 通用 pill（a 标签 & button 共用）── */
#ae-brand-directory .ae-bpill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: #fff !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 4px !important;
    padding: 5px 12px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #D40511 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    height: auto !important;
    width: auto !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    transition: background .13s, border-color .13s !important;
}
#ae-brand-directory .ae-bpill:hover {
    background: #FFF8CC !important;
    border-color: #D40511 !important;
    color: #B00010 !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(212,5,17,0.12) !important;
}
#ae-brand-directory .ae-bpill-cnt {
    display: inline-block !important;
    background: #D40511 !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    padding: 1px 6px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1.5 !important;
    border: none !important;
    white-space: nowrap !important;
}
#ae-brand-directory .ae-bpill-disc {
    display: inline-block !important;
    background: #f9fafb !important;
    color: #D40511 !important;
    border-radius: 4px !important;
    padding: 1px 5px !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1.5 !important;
    border: 1px solid #e5e7eb !important;
    white-space: nowrap !important;
}
#ae-brand-directory .ae-bpill--more {
    background: transparent !important;
    border-style: dashed !important;
    border-color: #e5e7eb !important;
    color: #D40511 !important;
    font-weight: 800 !important;
}
#ae-brand-directory .ae-bpill--more:hover {
    background: #D40511 !important;
    color: #ffffff !important;
    border-color: #D40511 !important;
    border-style: solid !important;
}

/* ── 抽屉 ── */
#ae-brand-directory .ae-brand-drawer {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height .4s cubic-bezier(0.4,0,0.2,1) !important;
    border-top: 0px solid #E6B800 !important;
}
#ae-brand-directory .ae-brand-drawer.ae-drawer-open {
    max-height: 9999px !important;
    border-top-width: 2px !important;
}
#ae-brand-directory .ae-brand-drawer-inner {
    padding: 16px 18px 20px !important;
    background: #f9fafb !important;
}

/* ── 搜索框 ── */
#ae-brand-directory .ae-brand-search-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #fff !important;
    border: 2px solid #E6B800 !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    margin-bottom: 12px !important;
    transition: border-color .15s !important;
}
#ae-brand-directory .ae-brand-search-wrap:focus-within {
    border-color: #D40511 !important;
    background: #fff !important;
}
#ae-brand-directory .ae-brand-search-icon { font-size: 14px; flex-shrink: 0; }
#ae-brand-directory .ae-brand-search {
    flex: 1 !important;
    border: none !important;
    background: transparent !important;
    font-size: 13px !important;
    color: #1a1a1a !important;
    outline: none !important;
    min-width: 0 !important;
    font-family: inherit !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    height: auto !important;
}
#ae-brand-directory .ae-brand-search::placeholder { color: #bbb; }
#ae-brand-directory .ae-brand-search-count {
    font-size: 11px !important;
    color: #5a3300 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* ── 字母索引栏 ── */
#ae-brand-directory .ae-brand-alpha-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    margin-bottom: 14px !important;
    padding: 0 !important;
    list-style: none !important;
    background: none !important;
}
#ae-brand-directory .ae-alpha-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 30px !important;
    height: 28px !important;
    padding: 0 6px !important;
    border-radius: 4px !important;
    border: 1.5px solid #e5e7eb !important;
    background: #ffffff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    cursor: pointer !important;
    font-family: inherit !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1 !important;
    width: auto !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    transition: all .13s !important;
}
#ae-brand-directory .ae-alpha-btn:hover {
    background: #FFF8CC !important;
    border-color: #D40511 !important;
    color: #D40511 !important;
}
#ae-brand-directory .ae-alpha-btn.ae-alpha-btn--active {
    background: #D40511 !important;
    color: #ffffff !important;
    border-color: #D40511 !important;
}
#ae-brand-directory .ae-alpha-btn.ae-alpha-btn--disabled {
    opacity: 0.3 !important;
    pointer-events: none !important;
}

/* ── 完整品牌列表 ── */
#ae-brand-directory .ae-brand-all-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    min-height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    background: none !important;
}
#ae-brand-directory .ae-bpill--hidden {
    display: none !important;
}

#ae-brand-directory .ae-brand-no-result {
    font-size: 13px !important;
    color: #5a3300 !important;
    text-align: center !important;
    padding: 20px 0 8px !important;
    margin: 0 !important;
}

/* ── 响应式 ── */
@media (max-width: 640px) {
    #ae-brand-directory .ae-brand-dir-header { padding: 11px 14px 10px !important; gap: 8px !important; }
    #ae-brand-directory .ae-brand-dir-title h2 { font-size: 13px !important; }
    #ae-brand-directory .ae-brand-dir-expand-btn { padding: 5px 10px !important; font-size: 11px !important; }
    #ae-brand-directory .ae-brand-expand-label { display: none !important; }
    #ae-brand-directory .ae-brand-preview { padding: 10px 14px !important; gap: 6px !important; }
    #ae-brand-directory .ae-brand-drawer-inner { padding: 12px 14px 16px !important; }
    #ae-brand-directory .ae-bpill { font-size: 11px !important; padding: 4px 10px !important; }
    #ae-brand-directory .ae-alpha-btn { min-width: 26px !important; height: 26px !important; font-size: 11px !important; }
}


/* ============================================================
   DHL REBRAND PATCH — 明黄底色 + 红字
   ============================================================ */

.ae-hero{
    background: #f9fafb !important;
    border-bottom: 6px solid #D40511 !important;
}

.ae-hero-title,
.ae-section-title,
.ae-card-title{
    font-family: Arial Black, Arial, sans-serif !important;
    font-weight: 900 !important;
    letter-spacing: -0.3px;
}

.ae-hero-title {
    color: #D40511 !important;
}

.ae-hero-sub {
    color: #5a3300 !important;
}

.ae-hero-stats span {
    color: #D40511 !important;
    font-weight: 800 !important;
}

/* Page background */
body.ae-page {
    background: #f3f4f6;
}

.ae-page-wrap {
    background: #f3f4f6;
}
.ae-card-img--placeholder {
    width: 100% !important;
    height: 100% !important;
    min-width: unset !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 36px !important;
    background: #f7f8fa !important;
}

.ae-card-price,
.ae-price-now {
    color: #111827 !important;
    font-weight: 800 !important;
}

.ae-card-badge--hot,
.ae-card-badge--sale {
    background: #1a1a1a !important;
    color: #FFCC00 !important;
    border: none !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
}

.ae-card-badge--urgent {
    background: #555 !important;
    color: #fff !important;
    border-radius: 4px !important;
    border: none !important;
}

.ae-card-discount-pct {
    background: #1a1a1a !important;
    color: #FFCC00 !important;
    border: none !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
}

.ae-card-coupon,
.ae-code-box {
    background: #fffbea !important;
    border: 1.5px dashed #E6B800 !important;
    border-radius: 6px !important;
}

.ae-coupon-code-val {
    color: #1a1a1a !important;
    font-weight: 700 !important;
    font-family: monospace !important;
    letter-spacing: 1px !important;
}

.ae-coupon-save,
.ae-coupon-nocode-txt strong {
    color: #1a1a1a !important;
    font-weight: 700 !important;
}

.ae-coupon-auto-lbl {
    background: #E6B800 !important;
    color: #1a1a1a !important;
    border-radius: 4px !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    padding: 2px 5px !important;
}

.ae-card-meta {
    color: #555;
    font-weight: 400;
}

/* Sort bar */
.ae-sort-bar,
.ae-sort-row {
    background: transparent !important;
    border: none !important;
}

.ae-sort-tabs {
    background: #fff !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 8px !important;
}

.ae-sort-tab--active,
.ae-page-current,
.ae-page-btn--active,
.ae-tab-on {
    background: #D40511 !important;
    color: #fff !important;
    font-weight: 700 !important;
}

.ae-results-count {
    color: #6b7280;
    font-weight: 500;
}

/* Pagination */
.ae-page-btn {
    background: #fff !important;
    border: 2px solid #E6B800 !important;
    color: #D40511 !important;
    font-weight: 700 !important;
    border-radius: 4px !important;
}
.ae-page-btn:hover {
    border-color: #D40511 !important;
    background: #FFF8CC !important;
}

/* No results */
.ae-no-results {
    background: #fff !important;
    border: 2px solid #E6B800 !important;
    border-radius: 8px !important;
    padding: 32px !important;
    text-align: center !important;
    color: #5a3300 !important;
}

/* Sub nav */
.ae-sub-nav { border-bottom-color: #E6B800 !important; }
.ae-sub-pill {
    background: #fff !important;
    border-color: #e5e7eb !important;
    color: #5a3300 !important;
    border-radius: 4px !important;
}
.ae-sub-pill:hover { background: #FFF8CC !important; border-color: #D40511 !important; color: #D40511 !important; }
.ae-sub-pill--active { background: #1a1a1a !important; border-color: #1a1a1a !important; color: #FFCC00 !important; }

/* Brand header */
.ae-brand-header {
    background: #f9fafb !important;
    border-bottom: 4px solid #D40511 !important;
}

.ae-btn-pop{
    animation:aePop .18s ease;
}

@keyframes aePop{
    0%{transform:scale(.96);}
    100%{transform:scale(1);}
}


/* ===== readability corrections ===== */

.ae-sort-tab {
    color: #374151;
    font-weight: 500;
}

.ae-sort-tab:hover {
    background: #fdf2f1;
    color: #D40511;
}

.ae-sort-tab--active,
.ae-tab-on {
    background: #1a1a1a !important;
    color: #FFCC00 !important;
    font-weight: 700 !important;
}

.ae-cat-nav-wrap {
    background: #FFCC00;
    border-bottom: 2px solid #E6B800;
}

.ae-grid {
    margin-top: 12px !important;
}

.ae-card {
    background: #ffffff;
}

.ae-results-count,
.ae-result-count {
    color: #444;
    font-weight: 500;
}



/* ======================================================
   MOBILE: 3-column → stacked layout
   ====================================================== */

@media (max-width: 768px) {

    .ae-page-wrap {
        padding: 10px 0 40px !important;
    }

    .ae-grid {
        gap: 0 !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        margin-top: 12px !important;
    }

    /* Tarjeta: colapsa a grid 2x2: img | desc arriba, botón abajo a todo ancho */
    .ae-card {
        grid-template-columns: 100px 1fr !important;
        grid-template-rows: auto auto !important;
        grid-template-areas:
            "img desc"
            "btn btn" !important;
        min-height: auto !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        margin-bottom: 0 !important;
    }
    .ae-card--has-coupon { border-left: none !important; border-top: 3px solid #D40511 !important; }

    .ae-card-col--img {
        grid-area: img !important;
        width: 100px !important;
        min-width: 100px !important;
        height: 100px !important;
        background: #f7f8fa !important;
    }
    .ae-card-col--img img {
        width: 84px !important;
        height: 84px !important;
    }

    .ae-card-col--desc {
        grid-area: desc !important;
        padding: 12px 12px 8px 10px !important;
        gap: 5px !important;
    }

    .ae-card-col--action {
        grid-area: btn !important;
        padding: 0 12px 14px 12px !important;
        justify-content: stretch !important;
    }

    .ae-card-title {
        font-size: 13px !important;
        line-height: 1.4 !important;
        font-weight: 600 !important;
        -webkit-line-clamp: 2 !important;
    }

    .ae-card-price {
        font-size: 17px !important;
    }

    .ae-get-btn,
    .ae-card-btn,
    .ae-btn {
        width: 100% !important;
        min-height: 42px !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        border-radius: 6px !important;
        min-width: unset !important;
    }

    .ae-sort-wrap,
    .ae-sort-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .ae-sort-tabs {
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        flex-wrap: nowrap !important;
    }

    .ae-sort-tab { flex: 0 0 auto; }

    .ae-cat-row,
    .ae-cat-nav {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }

    .ae-cat-pill { flex: 0 0 auto !important; }

    .ae-hero-title {
        font-size: 26px !important;
        line-height: 1.15 !important;
    }

    .ae-hero-sub {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
}

@media (max-width: 480px) {
    .ae-stat-num { font-size: 18px; }
    .ae-card-price { font-size: 16px !important; }
    .ae-get-btn  { font-size: 13px !important; }
}

