/* === 迷你购物车浮层 === */
.gdl-cart-fab {
    position: fixed;
    right: 14px;
    bottom: 74px; /* 避开底部Tab栏 */
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-primary, #A93939);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 14px rgba(169, 57, 57, .4);
    z-index: 9000;
    border: none;
    cursor: pointer;
    transition: transform .2s ease;
}
.gdl-cart-fab:active { transform: scale(.92); }
.gdl-cart-fab .gdl-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--color-gold, #A89456);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 700;
    display: none;
}
.gdl-cart-fab .gdl-cart-badge.show { display: block; }

/* 遮罩 */
.gdl-minicart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9100;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}
.gdl-minicart-overlay.open { opacity: 1; visibility: visible; }

/* 抽屉 */
.gdl-minicart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 86%;
    max-width: 380px;
    height: 100%;
    background: var(--color-bg, #F5EDE0);
    z-index: 9200;
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0,0,0,.15);
}
.gdl-minicart-drawer.open { transform: translateX(0); }

.gdl-minicart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--color-primary, #A93939);
    color: #fff;
    flex-shrink: 0;
}
.gdl-minicart-header h3 { margin: 0; font-size: 17px; font-weight: 600; }
.gdl-minicart-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}

.gdl-minicart-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    -webkit-overflow-scrolling: touch;
}

.gdl-minicart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #8A7A6A;
}
.gdl-minicart-empty .empty-icon { font-size: 48px; }
.gdl-minicart-empty .empty-text { margin: 12px 0 20px; }

.gdl-minicart-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 10px;
    align-items: center;
}
.gdl-minicart-item img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #eee;
}
.gdl-minicart-item .mc-info { flex: 1; min-width: 0; }
.gdl-minicart-item .mc-name {
    font-size: 14px;
    color: var(--color-text, #2C1810);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gdl-minicart-item .mc-price { font-size: 13px; color: var(--color-primary, #A93939); margin-top: 4px; }
.gdl-minicart-item .mc-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}
.gdl-minicart-item .mc-qty button {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    color: #555;
}
.gdl-minicart-item .mc-qty span { font-size: 14px; min-width: 18px; text-align: center; }
.gdl-minicart-item .mc-remove {
    background: none;
    border: none;
    color: #bbb;
    font-size: 18px;
    cursor: pointer;
    align-self: flex-start;
    padding: 2px 4px;
}

.gdl-minicart-footer {
    flex-shrink: 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #eee;
}
.gdl-minicart-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    font-size: 14px;
    color: #555;
}
.gdl-minicart-total .amount { font-size: 20px; font-weight: 700; color: var(--color-primary, #A93939); }
.gdl-minicart-actions { display: flex; gap: 10px; }
.gdl-minicart-actions a {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}
.gdl-minicart-actions .mc-cart { background: #f0e9dd; color: var(--color-text, #2C1810); }
.gdl-minicart-actions .mc-checkout { background: var(--color-primary, #A93939); color: #fff; }

.gdl-minicart-loading { text-align: center; padding: 40px; color: #8A7A6A; }
