/* ========== 面包屑导航 ========== */
.breadcrumb-nav {
    background: linear-gradient(135deg, #f8fafc 0%, #eef1f6 100%);
    border-bottom: 1px solid #e8ecf1;
    padding: 0;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.breadcrumb-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), #ff7979, var(--primary));
    opacity: 0.6;
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.breadcrumb-link {
    color: #636e72;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.breadcrumb-link:hover {
    color: var(--primary);
    background: rgba(255,71,87,0.06);
}
.breadcrumb-home {
    color: var(--primary) !important;
    font-weight: 600;
}
.breadcrumb-home i {
    font-size: 13px;
    margin-top: -1px;
}
.breadcrumb-home:hover {
    background: rgba(255,71,87,0.1) !important;
}

.breadcrumb-separator {
    color: #b2bec3;
    font-size: 10px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.breadcrumb-current {
    color: #1a1a2e;
    font-weight: 600;
    padding: 6px 12px;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(255,71,87,0.04);
    border-radius: 6px;
}

@media (max-width: 768px) {
    .breadcrumb-container {
        padding: 12px 15px;
        font-size: 13px;
        gap: 2px;
    }
    .breadcrumb-link {
        padding: 5px 8px;
    }
    .breadcrumb-current {
        max-width: 180px;
        padding: 5px 8px;
    }
}


.gooddiv { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* ========== 主布局 ========== */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: #fff;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

/* 图片区 */
.gallery { position: relative; }
.main-image {
    width: 100%; aspect-ratio: 1/1; background: #f0f0f0;
    border-radius: 8px; overflow: hidden; margin-bottom: 15px;
}
.main-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.main-image img:hover { transform: scale(1.05); }
.thumbnails { display: flex; gap: 10px; }
.thumb {
    width: 70px; height: 70px; border: 2px solid transparent;
    border-radius: 8px; cursor: pointer; object-fit: cover; transition: var(--transition);
}
.thumb:hover, .thumb.active { border-color: var(--primary); transform: scale(1.05); }

/* 信息区 */
.product-info { display: flex; flex-direction: column; gap: 16px; }
.title { font-size: 26px; font-weight: 700; line-height: 1.3; }
.rating { color: #ffa502; font-size: 14px; font-weight: 500; }

.price-section {
    display: flex; align-items: baseline; gap: 10px;
    padding: 12px 0; border-bottom: 1px solid var(--border);
}
.current-price { font-size: 28px; color: var(--primary); font-weight: 700; }
.original-price { font-size: 16px; color: #999; text-decoration: line-through; }
.discount { background: #ffeaa7; color: #d35400; padding: 2px 6px; border-radius: 4px; font-size: 12px; font-weight: 600; }

/* 🏪 商家信息卡片 */
.merchant-card {
    background: #f8f9fa; border: 1px solid var(--border); border-radius: 10px; padding: 16px;
}
.merchant-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.merchant-avatar {
    width: 50px; height: 50px; border-radius: 50%; object-fit: cover;
    border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.merchant-name { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.merchant-stats { font-size: 13px; color: var(--text-light); }
.merchant-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tag { background: #e8f4fd; color: #2980b9; padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.btn-store {
    width: 400px; padding: 10px; border: 1px solid var(--primary); background: #fff;
    color: var(--primary); border-radius: 6px; cursor: pointer; font-weight: 500; transition: var(--transition);
    display: inline-block; text-align: center; text-decoration: none;
}
.btn-store:hover { background: var(--primary); color: #fff; }

/* ========== 数量选择器 ========== */
.quantity-selector { 
    display: flex; 
    align-items: center; 
    gap: 16px;
    padding: 6px 0;
}
.quantity-selector > p {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    white-space: nowrap;
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 12px;
}
.quantity-selector > p::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 14px;
    background: var(--primary);
    border-radius: 2px;
}
.qty-control {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
}
.qty-control:hover {
    border-color: #caced5;
}
.qty-control:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255,71,87,0.08);
}
.qty-control a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; 
    height: 42px;
    border: none;
    background: #f5f6fa;
    cursor: pointer;
    font-size: 20px;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    user-select: none;
    line-height: 1;
    position: relative;
}
.qty-control a:hover {
    background: var(--primary);
    color: #fff;
}
.qty-control a:active {
    transform: scale(0.9);
    background: var(--primary-hover);
}
.qty-control input {
    width: 60px;
    height: 42px;
    text-align: center;
    border: none;
    border-left: 2px solid var(--border);
    border-right: 2px solid var(--border);
    outline: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    background: #fff;
    transition: background 0.2s ease;
}
.qty-control input:focus {
    background: #fffbfb;
}
/* 禁用加减按钮样式 */
.qty-control a.no-mins {
    color: #ccc;
    pointer-events: none;
    cursor: not-allowed;
}
.qty-control a.no-mins:hover {
    background: #f5f6fa;
    color: #ccc;
}

.action-buttons { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; margin-top: 10px; }
.btn {
    padding: 14px 0; border: none; border-radius: 8px; font-size: 16px;
    font-weight: 600; cursor: pointer; transition: var(--transition);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 10px rgba(255,71,87,0.3); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: var(--secondary-hover); transform: translateY(-2px); }

.features { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--text-light); margin-top: 6px; }

/* ========== 详情展示区 ========== */
.details-section {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; margin-top: 30px;
}
.section-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.details-content { line-height: 1.8; color: var(--text); }
.details-content p { margin-bottom: 15px; }
.details-content img { width: 100%; border-radius: 8px; margin: 20px 0; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .product-layout { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
    .title { font-size: 22px; }
    .current-price { font-size: 24px; }
    .action-buttons { grid-template-columns: 1fr; }
}

/* ========== 购物车成功 Toast ========== */
.cart-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    z-index: 99999;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    pointer-events: none;
}
.cart-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.cart-toast-inner {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: #fff;
    padding: 14px 24px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(15, 52, 96, 0.5), 0 0 0 1px rgba(255,255,255,0.06);
    white-space: nowrap;
}
.cart-toast-icon {
    font-size: 20px;
    color: #4ade80;
    flex-shrink: 0;
}
.cart-toast-text {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.cart-toast-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    cursor: pointer;
}
.cart-toast-btn:hover {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.35);
    transform: translateX(2px);
}
.cart-toast-btn i {
    font-size: 11px;
    transition: transform 0.2s ease;
}
.cart-toast-btn:hover i {
    transform: translateX(3px);
}
.cart-toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
    margin-left: -4px;
}
.cart-toast-close:hover {
    color: rgba(255,255,255,0.8);
}

@media (max-width: 480px) {
    .cart-toast-inner {
        padding: 12px 18px;
        gap: 10px;
    }
    .cart-toast-text {
        font-size: 13px;
    }
    .cart-toast-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}