﻿/* ============================================================
   回香卤 · 卤味外带样式表
   ============================================================ */

/* --- 公共变量（peise.html 配色） --- */
:root {
    --dr-red:        #B2452D;   /* 深酱红（主色） */
    --dr-red-dark:   #8B341F;   /* 深酱红 hover */
    --dr-bg:         #F5F0EB;   /* 暖米灰（背景） */
    --dr-card:       #FFFFFF;
    --dr-text:       #3D2F2A;   /* 深咖啡（正文） */
    --dr-text-muted: #8B6F60;   /* 次要文字 */
    --dr-gold:       #E6A23C;   /* 暖金黄（强调/价格） */
    --dr-gold-light: #FFF8EE;   /* 金黄色浅底 */
    --dr-border:     #E8DFD5;
    --dr-green:      #7D8560;   /* 橄榄绿（现货/健康标签） */
    --dr-green-bg:   #F5F0E3;   /* 橄榄绿浅底 */
    --dr-green-light:#E2DFD0;   /* 橄榄绿边框 */
    --dr-radius:     12px;
    --dr-shadow:     0 2px 8px rgba(178, 69, 45, 0.10);
}

/* --- 全局重置 --- */
* { margin:0; padding:0; box-sizing:border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--dr-bg);
    color: var(--dr-text);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
}

/* PC端：限制最大宽度，居中显示 */
.dr-container {
    max-width: 640px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--dr-bg);
    position: relative;
    box-shadow: 0 0 40px rgba(0,0,0,0.08);
}
@media (max-width: 480px) {
    .dr-container { box-shadow: none; }
}

a { color: var(--dr-red); text-decoration: none; }
a:hover { color: var(--dr-red-dark); }

/* --- 顶部导航 --- */
.dr-header {
    background: linear-gradient(135deg, var(--dr-red), var(--dr-red-dark));
    color: white;
    padding: 0 16px;
    height: 44px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* 三栏布局 */
.dr-header-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.dr-header-center {
    flex: 0;
    text-align: center;
}

.dr-header-brand-text {
    color: white;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.dr-header-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.dr-store-wrapper {
    position: relative;
}

/* 购物车链接（带文字） */
.dr-header-cart {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    opacity: 0.9;
    transition: opacity 0.2s;
}
.dr-header-cart:hover { opacity: 1; }

.dr-cart-text { font-size: 13px; }

.dr-header-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
}

.dr-header-logo {
    height: 24px;
    width: auto;
    object-fit: contain;
}

.dr-header-title {
    font-size: 17px;
    font-weight: 600;
    color: white;
}

.dr-header-tag {
    background: rgba(255,255,255,0.18);
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.25);
}

/* 购物车数量徽标 */
#dr-cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--dr-gold);
    color: white;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    font-family: sans-serif;
}

/* --- 轮播/横幅区 --- */
.dr-hero {
    background: linear-gradient(180deg, #F5E6DC 0%, var(--dr-bg) 100%);
    padding: 0 5px 5px;
    position: relative;
    overflow: hidden;
}

.dr-hero-banner-img {
    text-align: center;
    margin: 0 -5px 20px -5px;
}

.dr-hero-banner-img img {
    width: 100%;
    height: auto;
    border-radius: 0;
}

.dr-hero-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.dr-badge {
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 500;
}

.dr-badge-pink  { background: #FFF0E8; color: var(--dr-red); border-color: #F5D8C8; }
.dr-badge-green { background: var(--dr-gold-light); color: #8B6914; border-color: #F5DFA8; }
.dr-badge-yellow { background: #FFF8EE; color: #B27820; border-color: #F5DFA8; }

.dr-hero-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--dr-text);
    line-height: 1.4;
}

.dr-hero-title span { color: var(--dr-red); font-size: 19px; }

.dr-hero-btn {
    display: inline-block;
    margin-top: 14px;
    background: var(--dr-red);
    color: white;
    padding: 8px 22px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.dr-hero-btn:hover { background: var(--dr-red-dark); }

/* --- 分类标签 --- */
.dr-categories {
    padding: 12px 5px;
    overflow-x: auto;
}

.dr-category-tabs {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

.dr-cat-btn {
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    border: 1px solid var(--dr-border);
    background: white;
    color: var(--dr-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.dr-cat-btn:hover { border-color: var(--dr-red); color: var(--dr-red); }

.dr-cat-btn.active {
    background: var(--dr-red);
    color: white;
    border-color: var(--dr-red);
}

/* --- 商品瀑布流 --- */
.dr-product-grid {
    columns: 2;
    column-gap: 5px;
    padding: 10px 5px 10px;
}

.dr-product-card {
    background: white;
    border-radius: var(--dr-radius);
    overflow: hidden;
    border: 1px solid var(--dr-border);
        break-inside: avoid;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.dr-product-img-wrap {
    width: 100%;
    aspect-ratio: 1;
    background: #F5E6DC;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    position: relative;
    overflow: hidden;
}

.dr-product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dr-product-tag {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 9px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.dr-product-tag-new   { background: #2E7D32; }
.dr-product-tag-hot   { background: var(--dr-red); }
.dr-product-tag-elite { background: var(--dr-gold); }

.dr-product-info {
    padding: 6px 5px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dr-product-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--dr-text);
    line-height: 1.5;
}

.dr-product-unit {
    font-size: 11px;
    font-weight: 400;
    color: var(--dr-text-muted);
    margin-left: 2px;
}

.dr-product-type-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.dr-type-tag {
    display: inline-block;
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 4px;
    font-weight: 500;
    line-height: 1.6;
}

.dr-type-tag-delivery { background: #E6F1FB; color: #185FA5; }
.dr-type-tag-pickup   { background: #EAF3DE; color: #3B6D11; }
.dr-type-tag-dine     { background: #FAEEDA; color: #854F0B; }
.dr-type-tag-unit     { background: transparent; color: #999; }

.dr-product-spec {
    font-size: 11px;
    color: var(--dr-text-muted);
    margin-top: 2px;
}

.dr-product-bottom {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
}

.dr-product-price {
    color: var(--dr-red);
    font-size: 14px;
    font-weight: 600;
}

.dr-product-add {
    background: var(--dr-red);
    color: white;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
}

.dr-product-add:hover { background: var(--dr-red-dark); }

/* --- 商品详情页 --- */
.dr-detail-img {
    width: 100%;
    height: 300px;
    background: #F5E6DC;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

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

.dr-detail-section {
    padding: 16px 5px 12px;
    background: white;
    border-bottom: 1px solid #F0E8E0;
}

.dr-detail-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.dr-detail-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--dr-red);
}

.dr-detail-unit { font-size: 12px; color: var(--dr-text-muted); }

.dr-detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.dr-detail-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.dr-detail-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--dr-text);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #F0E8E0;
}

.dr-detail-desc {
    font-size: 13px;
    color: #777;
    line-height: 1.8;
}

.dr-stock-info {
    font-size: 12px;
    color: var(--dr-red);
    margin-top: 8px;
    display: flex;
    gap: 6px;
}

/* 详情页配送标签（价格行右侧） */
.dr-detail-price-row .dr-detail-type-tags {
    margin-left: auto;
    display: flex;
    gap: 4px;
    align-items: center;
}

.dr-detail-price-row .dr-type-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 8px;
}

/* --- 配送信息 --- */
.dr-delivery-bar {
    margin: 10px 5px;
    background: var(--dr-gold-light);
    border: 1px solid #F5DFA8;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dr-delivery-bar-icon { font-size: 20px; }

.dr-delivery-bar-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--dr-text);
}

.dr-delivery-bar-desc {
    font-size: 11px;
    color: var(--dr-text-muted);
    margin-top: 1px;
}

/* --- 底部操作栏（固定，详情页用，覆盖 Tab 栏） --- */
.dr-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-top: 1px solid #eee;
    padding: 10px 5px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 300;
    box-sizing: border-box;
}

.dr-btn-cart {
    background: var(--dr-red);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 22px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.dr-btn-buy {
    flex: 1;
    background: var(--dr-red);
    color: white;
    border: none;
    padding: 11px;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.dr-btn-buy:hover { background: var(--dr-red-dark); }
.dr-btn-buy:disabled { background: #ccc; cursor: not-allowed; }

/* --- 订单页 --- */
.dr-form-section {
    padding: 14px 5px;
    background: white;
    margin-bottom: 8px;
}

.dr-form-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--dr-text);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #F0E8E0;
}

.dr-form-row { margin-bottom: 12px; }

.dr-form-label {
    font-size: 12px;
    color: var(--dr-text-muted);
    margin-bottom: 4px;
    display: block;
}

.dr-form-input,
.dr-form-select,
.dr-form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--dr-border);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: var(--dr-text);
    outline: none;
}

.dr-form-input:focus,
.dr-form-select:focus,
.dr-form-textarea:focus {
    border-color: var(--dr-red);
    background: white;
}

.dr-form-textarea { resize: none; height: 80px; }

.dr-order-summary {
    background: var(--dr-gold-light);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dr-order-summary-img {
    width: 48px;
    height: 48px;
    background: #F5E6DC;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.dr-order-summary-text { flex: 1; }
.dr-order-summary-name { font-size: 13px; font-weight: 500; }
.dr-order-summary-spec { font-size: 11px; color: var(--dr-text-muted); }

/* --- 订单确认页 --- */
.dr-success-box {
    text-align: center;
    padding: 40px 20px;
}

.dr-success-icon { font-size: 56px; margin-bottom: 16px; }

.dr-success-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.dr-success-msg {
    font-size: 13px;
    color: var(--dr-text-muted);
    margin-bottom: 24px;
}

/* --- 列表页搜索 --- */
.dr-search-bar {
    padding: 10px 5px;
    background: white;
    border-bottom: 1px solid #F0E8E0;
}

.dr-search-input {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid var(--dr-border);
    border-radius: 20px;
    font-size: 13px;
    background: var(--dr-bg);
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238B6F60' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
    padding-left: 34px;
}

.dr-search-input:focus {
    border-color: var(--dr-red);
    background-color: white;
}

/* --- 底部 --- */
.dr-footer {
    background: var(--dr-gold-light);
    border-top: 1px solid #F5DFA8;
    padding: 16px;
    text-align: center;
    margin-top: 20px;
}

.dr-footer-copy {
    font-size: 11px;
    color: #B8A898;
}

/* --- 空状态 --- */
.dr-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--dr-text-muted);
}

.dr-empty-icon { font-size: 40px; margin-bottom: 12px; }
.dr-empty-text { font-size: 13px; }

/* --- 消息提示 --- */
.dr-toast {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(61, 47, 42, 0.92);
    color: white;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 999;
    pointer-events: none;
}

/* --- 响应式 --- */
/* 平板（640px - 1024px） */
@media (min-width: 640px) {
    body { background: #E8DFD5; }
    .dr-container {
        max-width: 640px;
        margin: 0 auto;
        background: white;
        min-height: 100vh;
        box-shadow: 0 0 30px rgba(0,0,0,0.08);
    }
    .dr-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .dr-bottom-bar,
    .dr-tabbar {
        left: 0;
        right: 0;
        max-width: 640px;
        margin: 0 auto;
    }
    .dr-header,
    .dr-footer {
        width: 100%;
    }
}

/* PC大屏（>1024px） */
@media (min-width: 1024px) {
    .dr-container {
        max-width: 800px;
    }
    .dr-bottom-bar,
    .dr-tabbar {
        max-width: 800px;
    }
    .dr-product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 库存为0 */
.dr-product-stockout .dr-product-img-wrap { opacity: 0.6; }
.dr-product-stockout .dr-product-add {
    background: #ccc;
    cursor: not-allowed;
}

/* ============================================================
   购物车页面
   ============================================================ */
.dr-cart-item {
    background: white;
    border-radius: var(--dr-radius);
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--dr-border);
}

.dr-cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #F5E6DC;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dr-cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dr-cart-item-info { flex: 1; min-width: 0; }

.dr-cart-item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--dr-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dr-cart-item-spec {
    font-size: 11px;
    color: var(--dr-text-muted);
    margin-top: 2px;
}

.dr-cart-item-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--dr-red);
    margin-top: 4px;
}

.dr-cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.dr-cart-qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--dr-border);
    border-radius: 8px;
    overflow: hidden;
}

.dr-cart-qty-btn {
    width: 28px;
    height: 28px;
    background: var(--dr-bg);
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: var(--dr-red);
    font-weight: 600;
}

.dr-cart-qty-btn:hover { background: var(--dr-gold-light); }

.dr-cart-qty-input {
    width: 36px;
    height: 28px;
    border: none;
    border-left: 1px solid var(--dr-border);
    border-right: 1px solid var(--dr-border);
    text-align: center;
    font-size: 13px;
    background: white;
    color: var(--dr-text);
    outline: none;
}

.dr-cart-remove {
    font-size: 11px;
    color: #999;
    cursor: pointer;
    padding: 2px 4px;
}

.dr-cart-remove:hover { color: var(--dr-red); }

.dr-cart-summary {
    background: white;
    border-radius: var(--dr-radius);
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid var(--dr-border);
}

.dr-cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--dr-text-muted);
    margin-bottom: 6px;
}

.dr-cart-summary-row.total {
    font-size: 15px;
    font-weight: 600;
    color: var(--dr-text);
    padding-top: 8px;
    border-top: 1px solid #F0E8E0;
    margin-top: 8px;
}

.dr-cart-summary-row .dr-coral { color: var(--dr-red); }

/* 商品卡片快捷加入购物车按钮 */
.dr-quick-add {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--dr-red);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
}
.dr-quick-add:hover { background: var(--dr-red-dark); }

/* 价格后的计量单位 */
.dr-product-unit-inline {
    font-size: 11px;
    color: #999;
    margin-left: 2px;
}

/* ============================================================
   商品图集
   ============================================================ */
.dr-gallery-wrap {
    width: 100%;
    background: white;
}

.dr-gallery-main {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #F5F5F5;
    cursor: grab;
    touch-action: pan-y;
}

.dr-gallery-main img {
    width: 100%;
    height: auto;
    display: block;
    background: #F8F8F8;
}

.dr-gallery-counter {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 12px;
    background: rgba(0,0,0,0.45);
    padding: 2px 10px;
    border-radius: 10px;
    z-index: 3;
    pointer-events: none;
}

/* 图片区右下角标签（精/热/新） */
.dr-gallery-badges {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 4px;
    z-index: 2;
}
.dr-gallery-badge {
    font-size: 11px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.dr-gallery-thumbs {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.dr-gallery-thumbs::-webkit-scrollbar { display: none; }

.dr-gallery-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.dr-gallery-thumb.active {
    border-color: var(--dr-red);
}

.dr-gallery-thumb:hover {
    border-color: #D4A898;
}

/* --- 门店切换按钮（纯文字） --- */
.dr-header-store { display:flex; align-items:center; gap:4px; background:transparent; color:white; font-size:13px; font-weight:600; padding:4px 0; border:none; cursor:pointer; white-space:nowrap; }

/* --- 门店下拉面板 --- */
.dr-store-dd { display:none; position:absolute; top:100%; left:0; margin-top:6px; background:white; border-radius:10px; box-shadow:0 4px 20px rgba(0,0,0,0.15); min-width:160px; z-index:1000; overflow:hidden; }
.dr-store-dd.active { display:block; }
.dr-store-dd-title { padding:10px 14px 6px; font-size:11px; color:#999; }
.dr-store-dd-item { padding:10px 14px; font-size:14px; color:#333; cursor:pointer; display:flex; align-items:center; justify-content:space-between; transition:background .15s; }
.dr-store-dd-item:hover { background:#f5f0eb; }
.dr-store-dd-item.active { color:var(--dr-red); font-weight:600; }
.dr-store-dd-check { color:var(--dr-red); font-size:14px; }

/* --- 底部 Tab 栏（固定） --- */
.dr-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background: white;
    border-top: 1px solid var(--dr-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: border-box;
}

.dr-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #999;
    text-decoration: none;
    flex: 1;
    height: 100%;
    -webkit-tap-highlight-color: transparent;
}

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

.dr-tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 22px;
}

.dr-tab-logo {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
}

.dr-tab-label { font-size: 10px; line-height: 1; }

/* 首页 tab：只显示大 logo，无文字 */
.dr-tab-home {
    gap: 0;
}
.dr-tab-home .dr-tab-logo {
    width: 38px;
    height: 38px;
    border-radius: 8px;
}

/* ============================================================
   文章列表页 · articles.php
   ============================================================ */

/* 网格：<320单列，≥320两列 */
.dr-articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
}
@media (min-width: 320px) {
    .dr-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 文章卡片 */
.dr-article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--dr-border);
    transition: transform 0.15s;
}
.dr-article-card:active {
    transform: scale(0.97);
}

/* 封面图 3:2（兼容手机端） */
.dr-article-cover {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #F5E6DC;
}
.dr-article-cover:before {
    content: "";
    display: block;
    padding-top: 75%; /* 4:3 */
}
.dr-article-cover img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.dr-article-cover-placeholder {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: linear-gradient(135deg, #F5E6DC, #EEDCC8);
}

/* 日期角标 */
.dr-article-date-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
}

/* 文字区 */
.dr-article-body {
    padding: 5px;
}
.dr-article-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--dr-text);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dr-article-summary {
    font-size: 11px;
    color: var(--dr-text-muted);
    line-height: 1.5;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dr-article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #F0E8E0;
}
.dr-article-views {
    font-size: 11px;
    color: #bbb;
}
.dr-article-more {
    font-size: 12px;
    color: var(--dr-red);
    font-weight: 500;
}

/* 首页文章区留底 */
.dr-section-articles {
    padding: 5px;
}

/* 文章卡片链接重置 */
.dr-article-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ============================================================
   文章详情页 · article.php
   ============================================================ */

/* 封面图 */
.dr-article-detail-cover {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #F5E6DC;
}
.dr-article-detail-cover {
    width: 100%;
    background: #F5E6DC; /* 图片加载前占位色 */
}

.dr-article-detail-cover img {
    width: 100%;
    height: auto;   /* 高度由图片自身比例决定 */
    display: block;
}
.dr-article-cover-placeholder {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    background: linear-gradient(135deg, #F5E6DC, #EEDCC8);
}

/* 文章主体 */
.dr-article-detail {
    background: white;
    border-radius: 16px 16px 0 0;
    margin-top: -16px;
    position: relative;
    padding: 20px 16px 16px;
    min-height: 60vh;
}
.dr-article-detail-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dr-text);
    line-height: 1.4;
}
.dr-article-detail-meta {
    display: flex;
    gap: 14px;
    font-size: 11px;
    color: var(--dr-text-muted);
    margin-top: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid #F0E8E0;
}

/* 正文内容 */
.dr-article-detail-content {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.9;
    color: #333;
}
.dr-article-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}
.dr-article-detail-content h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dr-text);
    margin: 20px 0 8px;
}
.dr-article-detail-content h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--dr-green);
    margin: 16px 0 6px;
}
.dr-article-detail-content p {
    margin-bottom: 10px;
}
.dr-article-detail-content strong {
    color: var(--dr-red);
}

/* 分享提示 */
.dr-share-tip {
    margin-top: 24px;
    background: var(--dr-bg);
    border: 1px solid var(--dr-border);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.dr-share-tip-icon { font-size: 22px; }

/* 底部购买引导 */
.dr-article-buy-guide {
    margin-top: 20px;
    background: linear-gradient(135deg, var(--dr-gold-light), #FFF8EE);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.dr-article-buy-guide-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--dr-text);
    margin-bottom: 10px;
}
.dr-article-buy-guide-btn {
    display: inline-block;
    background: var(--dr-red);
    color: white;
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}
.dr-article-buy-guide-btn:hover { background: var(--dr-red-dark); color: white; }



/* ============================================================
   首页新增样式 · index.php
   ============================================================ */

/* 广告横幅 */
.dr-hero-fade {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.6s ease;
}
.dr-hero-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0,0,0,0.15);
    margin: 0 4px;
    cursor: pointer;
    transition: all 0.3s;
}
.dr-hero-dot.active {
    background: var(--dr-red);
    width: 18px;
    border-radius: 3px;
}

/* 广告横幅 */
.dr-ad-banner {
    margin: 12px 16px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.dr-ad-banner img {
    width: 100%;
    display: block;
    aspect-ratio: 2 / 1;
    object-fit: cover;
}

/* 区块标题栏 */
.dr-section {
    margin: 16px 0 0;
}
.dr-section-header {
    display: flex;
    align-items: center;
    padding: 12px 5px 8px;
    gap: 6px;
}
.dr-section-icon {
    font-size: 18px;
}
.dr-section-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--dr-text);
}
.dr-section-more {
    font-size: 12px;
    color: var(--dr-text-muted);
    text-decoration: none;
}

/* 推荐商品：<320单列，≥320两列网格 */
.dr-recommend-scroll {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 5px;
}
@media (min-width: 320px) {
    .dr-recommend-scroll {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 推荐商品卡片 */
.dr-recommend-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}
.dr-recommend-card:active {
    transform: scale(0.97);
}
.dr-recommend-img {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: var(--dr-bg);
    cursor: pointer;
}
.dr-recommend-img::before {
    content: "";
    display: block;
    padding-top: 100%; /* 1:1 比例 */
}
.dr-recommend-img img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.dr-recommend-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--dr-text);
    padding: 5px 5px 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.dr-recommend-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 5px 5px;
}
.dr-recommend-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--dr-red);
}
.dr-recommend-cart {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--dr-red);
    color: white;
    border: none;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dr-recommend-cart:hover { background: var(--dr-red-dark); }

/* 响应式：PC端两列保持不变 */
@media (min-width: 640px) {
    .dr-recommend-scroll {
        /* 不需要限制宽度，让它填满父容器 */
    }
}

/* 配送 Banner */
.dr-delivery-banner {
    margin: 8px 16px 24px;
    background: var(--dr-green-bg);
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid var(--dr-green-light);
    display: flex;
    align-items: center;
    gap: 10px;
}
.dr-delivery-banner-icon { font-size: 20px; }
.dr-delivery-banner-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--dr-text);
}
.dr-delivery-banner-desc {
    font-size: 11px;
    color: var(--dr-text-muted);
    margin-top: 2px;
}
