﻿/* gekiyasukopi 自定义样式 - 日本风格手表电商网站 */

:root {
    --primary-color: #c62828; /* 红色 - 日本传统色彩 */
    --secondary-color: #c62828; /* 红色 - 日本传统色彩 */
    --accent-color: #f5f5f5; /* 浅灰色背景 */
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
}

/* 全局样式 */
body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
}

/* 460px 及以下 - 产品卡片两列紧凑布局 */
@media (max-width: 460px) {
    :root {
        --bs-gutter-y: 1rem;
    }
    /* 单数列 - 减少右边距 */
    .row .col-6:nth-child(odd) {
        padding-left: 10px;
        padding-right: 6px;
    }
    
    /* 双数列 - 减少左边距 */
    .row .col-6:nth-child(even) {
        padding-left: 6px;
        padding-right: 10px;
    }

    .row .card-body .product-title {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.4;
        max-height: calc(1.4em * 3);  /* 1.4行高 × 3行 */
        word-break: break-word;
    }

    .list-unstyled {
        display: flex;
        flex-wrap: wrap;
    }
    .list-unstyled li {
        width: 50%;
        padding: 3px;
    }

}

#navMobile .offcanvas-body .quick-links {
    display: flex;
    flex-wrap: wrap;
}
#navMobile .offcanvas-body .quick-links a {
    width: 50%;
    padding: 8px;
    box-sizing: border-box;
}

/* 导航栏样式 */

.navbar-dark.bg-primary {
    background-color: var(--primary-color) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 语言切换器 */
.language-switcher .btn {
    margin-left: 0.25rem;
    border-width: 2px;
}

.language-switcher .btn.active {
    background-color: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

/* ========================
   桌面端导航栏样式
   ======================== */
.navbar-brand {
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}
.navbar-brand small {
  letter-spacing: 1px;
}

/* 导航链接 */
.nav-link-modern {
  color: rgba(255,255,255,0.9) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-weight: 500;
}
.nav-link-modern:hover {
  background: rgba(255,255,255,0.15) !important;
  color: #fff !important;
}

/* 搜索框 */
.search-box-nav {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 2px;
}
.search-box-nav input {
  background: transparent !important;
  border: none !important;
  color: #fff !important;
}
.search-box-nav input::placeholder {
  color: rgba(255,255,255,0.6) !important;
}
.search-box-nav input:focus {
  box-shadow: none !important;
}
.search-box-nav button {
  background: #ffc107 !important;
  border: none !important;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #333;
}

/* 用户按钮 */
.btn-user-nav {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  border-radius: 20px;
  padding: 6px 16px;
  transition: all 0.3s ease;
}
.btn-user-nav:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* 购物车按钮 */
.btn-cart-nav {
  background: linear-gradient(135deg, #ff9800, #ffc107);
  border: none;
  color: #333;
  border-radius: 20px;
  padding: 6px 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(255,152,0,0.4);
}
.btn-cart-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255,152,0,0.5);
}

/* ========================
   移动端侧边菜单样式
   ======================== */
.category-nav {
  border-bottom: 1px solid #eee;
}
.category-header {
  padding: 12px 15px;
  font-weight: bold;
  color: #c62828;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
}
.category-item {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
}
.category-link {
  flex: 1;
  padding: 14px 15px;
  color: #333;
  text-decoration: none;
  font-size: 15px;
}
.category-link:hover {
  background: #f8f9fa;
  color: #c62828;
}
.sub-toggle {
  padding: 14px 15px;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
}
.sub-toggle:hover {
  color: #c62828;
}
.sub-list {
  background: #fafafa;
  border-bottom: 1px solid #eee;
}
.sub-link {
  display: block;
  padding: 10px 15px 10px 35px;
  color: #666;
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid #f5f5f5;
}
.sub-link:hover {
  background: #f0f0f0;
  color: #c62828;
}
.quick-links {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
.quick-link {
  display: block;
  padding: 12px 15px;
  color: #333;
  text-decoration: none;
  font-size: 15px;
}
.quick-link:hover {
  background: #f8f9fa;
  color: #c62828;
}
.mobile-actions {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.action-btn {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
}
.action-member {
  background: #e3f2fd;
  color: #1565c0;
}
.action-cart {
  background: #fff3e0;
  color: #e65100;
  position: relative;
}
.action-cart .badge {
  margin-left: auto;
}

/* 首页横幅 */
.jumbotron {
    background: linear-gradient(135deg, #c62828 0%, #d32f2f 100%);
    color: white;
    text-align: center;
    border-radius: 10px;
}

.jumbotron h1 {
    font-weight: 300;
    margin-bottom: 1rem;
}

.jumbotron .lead {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 产品卡片样式 - 全新日本风格设计 */
.product-card {
    border: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    position: relative;
}

/* 桌面端产品网格间距 */
@media (min-width: 992px) {
    .products-grid.row {
        --bs-gutter-y: 2rem;
    }
    .products-grid .product-card {
        margin-bottom: 0;
    }
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(198, 40, 40, 0.15);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-card:hover .product-title {
    color: #c62828 !important;
}

/* 产品图片容器 */
.product-card .product-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
}

.product-image {
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* 产品图片链接 */
.product-image-link {
    display: block;
    position: relative;
    overflow: hidden;
}

.product-image-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(198, 40, 40, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-image-link::after {
    opacity: 1;
}

/* 评分样式 */
.product-rating {
    margin-bottom: 0.5rem;
}

.product-rating .text-warning {
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.product-rating .fa-star {
    color: #ffc107;
}

.product-rating .fa-star-o {
    color: #ddd;
}

/* 价格区域样式 */
.product-price-area {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-card .card-body {
    padding: 1rem;
}

.product-title {
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    max-height: calc(1.5em * 2);
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.product-title:hover {
    color: #c62828;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #c62828;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.stock-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* 空状态动画 */
.empty-state {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #b71c1c;
    border-color: #b71c1c;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 新闻卡片样式 */
.news-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-2px);
}

.news-image {
    height: 180px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* 购物车样式 */
.cart-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.quantity-input {
    width: 80px;
    text-align: center;
}

.cart-summary {
    background-color: var(--accent-color);
    border-radius: 8px;
    padding: 1.5rem;
}

/* 表单样式 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(26, 35, 126, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* 页脚样式 */
footer {
    margin-top: auto;
}

footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #ffffff !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .jumbotron {
        padding: 2rem 1rem;
    }
    
    .jumbotron h1 {
        font-size: 2rem;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .language-switcher {
        justify-content: center;
        margin: 0.5rem 0;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .news-image {
        height: 150px;
    }
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具提示样式 */
.tooltip-inner {
    background-color: var(--primary-color);
    border-radius: 4px;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: var(--primary-color);
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b71c1c;
}

/* 产品详情页样式 - Swiper 轮播 */
.product-gallery .swiper {
    width: 100%;
}

.product-gallery .mySwiper2 {
    max-height: 500px;
}

.product-gallery .mySwiper2 .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.product-gallery .mySwiper2 img {
    max-height: 500px;
    object-fit: contain;
}

.product-gallery .ThumbsSwiper {
    height: auto;
    padding: 10px 0;
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.product-gallery .ThumbsSwiper::-webkit-scrollbar {
    display: none;
}

.product-gallery .ThumbsSwiper .swiper-wrapper {
    display: flex;
    gap: 12.5px;
}

.product-gallery .ThumbsSwiper .swiper-slide {
    width: 80px !important;
    height: 80px;
    opacity: 0.6;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
}

.product-gallery .ThumbsSwiper .swiper-slide:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.product-gallery .ThumbsSwiper .swiper-slide-thumb-active {
    opacity: 1;
    border-color: #c62828;
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.2);
}

.product-gallery .ThumbsSwiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    background-color: #f5f5f5;
}

.product-gallery .swiper-button-next,
.product-gallery .swiper-button-prev {
    color: #c62828;
    background: rgba(255, 255, 255, 0.95);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.product-gallery .swiper-button-next:after,
.product-gallery .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.product-gallery .swiper-button-next:hover,
.product-gallery .swiper-button-prev:hover {
    background: white;
    box-shadow: 0 4px 16px rgba(198, 40, 40, 0.2);
    transform: scale(1.1);
}

/* 移动端优化 */
@media (max-width: 991px) {
    .product-gallery-wrapper {
        position: static;
    }
    
    .main-image-container img {
        max-height: 400px;
    }
    
    .product-gallery .mySwiper2 {
        max-height: 400px;
    }
    
    .product-gallery .mySwiper2 img {
        max-height: 400px;
    }
    

}

.product-info {
    padding-left: 2rem;
}

.product-price-large {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
}
.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.variant-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    min-width: 130px;
}
.variant-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(198, 40, 40, 0.15);
    border-color: #c62828;
}
.variant-btn.selected {
    border-color: #c62828;
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    box-shadow: 0 6px 20px rgba(198, 40, 40, 0.25);
    animation: borderPulse 0.5s ease-in-out;
}

@keyframes borderPulse {
    0% {
        border-width: 2px;
        box-shadow: 0 6px 20px rgba(198, 40, 40, 0.25);
    }
    50% {
        border-width: 4px;
        box-shadow: 0 8px 25px rgba(198, 40, 40, 0.4);
    }
    100% {
        border-width: 2px;
        box-shadow: 0 6px 20px rgba(198, 40, 40, 0.25);
    }
}
.variant-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}
.variant-btn.selected .variant-name {
    color: #c62828;
}
.variant-price {
    font-weight: 700;
    color: #c62828;
    font-size: 0.95rem;
    margin-left: 10px;
}
.variant-btn.selected .variant-price {
    color: #c62828;
}

/* 颜色按钮显示产品图片缩略图 */
.color-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 4px;
}

#display-price {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: #c62828;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1.5rem 0;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background-color: var(--accent-color);
}

.quantity-input-large {
    width: 80px;
    height: 40px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* 评分样式 */
.rating-stars {
    color: #ffc107;
    font-size: 1.2rem;
}

.rating-average {
    font-size: 1.5rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

/* 评论样式 */
.review-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.review-author {
    font-weight: 600;
}

.review-date {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* 响应式表格图片 - 强制不超出窗口 */
.table img {
    max-width: 100% !important;
    width: 100px !important;
    height: 100px !important;
    object-fit: cover !important;
}
.table {
    table-layout: fixed;
    word-wrap: break-word;
    text-align: left;
}
.table td, .table th {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    width: 100%;
}

.product-description img {
  max-width: 100%;
}

.product-description table {
  max-width: 100%;
}

/* 分类侧边栏全新日本风格设计 */
.category-sidebar .filter-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(198, 40, 40, 0.08);
    overflow: hidden;
    background: white;
}
.category-sidebar .filter-card-header {
    background: linear-gradient(135deg, #c62828 0%, #d32f2f 100%);
    padding: 18px 24px;
    border: none;
    position: relative;
}
.category-sidebar .filter-card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}
.category-sidebar .filter-card-header h5 {
    margin: 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 1.05rem;
}
.category-sidebar .filter-card-header h5 i {
    color: #fff;
    font-size: 1.1rem;
}
.category-sidebar .filter-card-body {
    padding: 0;
}
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-list-item {
    border-bottom: 1px solid #f0f0f0;
}
.category-list-item:last-child {
    border-bottom: none;
}
.category-list-item a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}
.category-list-item a:hover {
    background: #fff5f5;
    color: #c62828;
}
.category-list-item.active > a {
    background: linear-gradient(90deg, #ffebee 0%, transparent 100%);
    color: #c62828;
    font-weight: 600;
}
.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #c62828;
    transition: all 0.3s ease;
    font-size: 1rem;
}
.category-list-item a:hover .category-icon,
.category-list-item.active .category-icon {
    background: linear-gradient(135deg, #c62828, #d32f2f);
    color: #fff;
    transform: rotate(5deg);
}
.category-name {
    flex: 1;
}
.category-toggle-btn {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.2s ease;
    cursor: pointer;
}
.category-toggle-btn:hover {
    background: #e0e0e0;
    color: #333;
}
.category-toggle-btn.expanded {
    transform: rotate(180deg);
}
/* 子分类样式 */
.subcategory-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.subcategory-list.show {
    max-height: 1000px;
}
.subcategory-list-item a {
    padding: 10px 20px 10px 68px !important;
    color: #666;
}
.subcategory-list-item a:hover {
    color: #c62828;
}
.subcategory-list-item.active a {
    color: #c62828;
    font-weight: 500;
}
/* 价格筛选样式 */
.price-filter-card {
    margin-top: 20px;
}
.price-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.price-input-group input {
    width: 0;
    min-width: 0;
}
.price-input-group input {
    flex: 1;
    border-radius: 10px;
    border: 2px solid #dee2e6;
    padding: 12px 14px;
    text-align: center;
    font-size: 15px;
    background: #fff;
    color: #333;
    transition: all 0.2s ease;
}
.price-input-group input:focus {
    border-color: #c62828;
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.15);
    outline: none;
}
.price-input-group input::placeholder {
    color: #999;
}
.price-input-group .text-muted {
    color: #666 !important;
    font-weight: 500;
}
.price-btn {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 500;
}
.btn-apply {
    background: linear-gradient(135deg, #c62828 0%, #d32f2f 100%);
    color: #fff;
    border: none;
}
.btn-apply:hover {
    background: linear-gradient(135deg, #b71c1c 0%, #c62828 100%);
    color: #fff;
}

/* 购物车页面样式 - 移动优先 Div 布局 */
.cart-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    gap: 1rem;
    transition: box-shadow 0.2s;
}

.cart-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 商品主信息区域 */
.cart-item-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
    min-width: 280px;
}

.cart-item-img {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    display: block;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.cart-item-img:hover img {
    transform: scale(1.05);
}

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

.cart-item-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    word-break: break-word;
}

.cart-item-name:hover {
    color: var(--primary-color);
}

/* 购物车选项标签美化 */
.cart-item-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.cart-option-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    white-space: nowrap;
}
.cart-option-quality {
    background: linear-gradient(135deg, #e7f5ff 0%, #d0ebff 100%);
    color: #1864ab;
    border: 1px solid #a5d8ff;
}
.cart-option-quality i {
    color: #1864ab;
}
.cart-option-color {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #7c3aed;
    border: 1px solid #d8b4fe;
}
.cart-option-color i {
    color: #7c3aed;
}
.cart-option-price {
    opacity: 0.8;
}

/* 操作区域 */
.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cart-item-price {
    font-size: 1rem;
    color: var(--text-dark);
    min-width: 80px;
    text-align: center;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.cart-item-qty .form-control {
    width: 50px;
    padding: 0.375rem 0.25rem;
}

.cart-item-subtotal {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--secondary-color);
    min-width: 90px;
    text-align: center;
}

/* 桌面端优化 */
@media (min-width: 768px) {
    .cart-item {
        padding: 1.25rem;
    }
    
    .cart-item-main {
        min-width: 300px;
    }
    
    .cart-item-actions {
        flex-wrap: nowrap;
    }
}

/* 移动端优化 */
@media (max-width: 767.98px) {
    .cart-item {
        padding: 0.75rem;
    }
    
    .cart-item-main {
        min-width: 0;
        flex: 1 1 100%;
    }
    
    .cart-item-img {
        width: 70px;
        height: 70px;
    }
    
    .cart-item-name {
        -webkit-line-clamp: 2;
    }
    
    .cart-item-actions {
        flex: 1 1 100%;
        justify-content: space-between;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-color);
        margin-top: 0.5rem;
    }
    
    .cart-item-subtotal {
        font-size: 1rem;
    }
    
    .cart-summary {
        margin-top: 1rem;
    }
}

/* 小屏幕手机 */
@media (max-width: 400px) {
    .cart-item-qty {
        gap: 0;
    }
    
    .cart-item-qty .form-control {
        width: 45px;
    }
}

/* ========== 分页样式 ========== */
.pagination-lg .page-link {
    font-size: 1.1rem;
    padding: 0.6rem 1.1rem;
    min-width: 48px;
    text-align: center;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.2s ease;
}
.pagination-lg .page-link:hover {
    border-color: #c62828;
    background-color: #ffebee;
}
.pagination-lg .page-item.active .page-link {
    font-weight: bold;
    background-color: #c62828;
    border-color: #c62828;
}
.pagination-lg .page-item.disabled .page-link {
    border-color: #e0e0e0;
    color: #999;
}

.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 50%, #ffebee 100%);
    min-height: 580px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(198, 40, 40, 0.04);
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(198, 40, 40, 0.03);
}
.watch-showcase {
    font-size: 200px;
    opacity: 0.12;
    line-height: 1;
}
.category-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}
.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
    border-color: #c62828;
}
.banner-strip {
    background: linear-gradient(90deg, #c62828, #d32f2f);
}
.feature-box {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
}
.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* ========================
   桌面端导航栏样式
   ======================== */
.main-navbar {
  background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
  box-shadow: 0 2px 15px rgba(198, 40, 40, 0.15);
  transition: transform 0.3s ease-in-out;
  position: relative;
  z-index: 1030;
}
.my-5{ margin-top: 1rem !important;}

/* 移动端头部菜单隐藏效果 */
@media (max-width: 991.98px) {
  .main-navbar.navbar-visible {
    transform: translateY(0);
    box-shadow: 0 2px 15px rgba(198, 40, 40, 0.15);
  }
  
  .main-navbar.navbar-hidden {
    transform: translateY(-100%);
    box-shadow: none;
  }
  
  .main-navbar {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: transform 0.3s ease-in-out;
  }
}

/* ========== 颜色选择样式 ========== */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.color-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    font-size: 0.9rem;
    user-select: none;
    min-width: 90px;
    text-align: center;
}
.color-btn:hover {
    border-color: #c62828;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.15);
}
.color-btn.selected {
    border-color: #c62828;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    box-shadow: 0 4px 15px rgba(198, 40, 40, 0.25);
    animation: colorBorderPulse 0.5s ease-in-out;
}

@keyframes colorBorderPulse {
    0% {
        border-width: 2px;
        box-shadow: 0 4px 15px rgba(198, 40, 40, 0.25);
    }
    50% {
        border-width: 4px;
        box-shadow: 0 6px 20px rgba(198, 40, 40, 0.4);
    }
    100% {
        border-width: 2px;
        box-shadow: 0 4px 15px rgba(198, 40, 40, 0.25);
    }
}
.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
    display: block;
}
.color-name {
    font-weight: 500;
    color: #333;
    font-size: 0.88rem;
}
.color-btn.selected .color-name {
    color: #c62828;
    font-weight: 600;
}

/* ========================
   Index.php 首页样式
   ======================== */

/* 白色 + 红色配色方案 */
:root {
    --primary-red: #c62828;
    --primary-white: #ffffff;
    --dark-red: #8b0000;
    --light-red: #ef9a9a;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
}

/* 顶部公告条 */
.banner-strip {
    background: linear-gradient(90deg, var(--primary-red), var(--dark-red));
    font-size: 0.875rem;
}

/* Hero区域 - 白色背景红色元素 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-white) 0%, #f8f9fa 100%);
    min-height: 600px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(45deg, var(--light-red) 0%, var(--primary-white) 100%);
    opacity: 0.1;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.hero-badge {
    background: var(--primary-red);
    color: var(--primary-white);
    font-weight: 600;
    font-size: 0.875rem;
}

.hero-section h1 {
    color: var(--gray-800);
}

.hero-section .text-warning {
    color: var(--primary-red) !important;
}

/* 特点介绍 */
.feature-box {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--primary-white);
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(198, 40, 40, 0.1);
    border-color: var(--primary-red);
}

/* 分类卡片 */
.category-card {
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(198, 40, 40, 0.15);
    border-color: var(--primary-red);
}

/* 产品卡片 - 首页版本 */
.product-card-home {
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.product-card-home:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(198, 40, 40, 0.15);
}

.product-image {
    transition: transform 0.3s ease;
}

.product-card-home:hover .product-image {
    transform: scale(1.05);
}

.product-title {
    color: var(--gray-800);
    font-weight: 600;
    line-height: 1.4;
    min-height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    color: var(--primary-red);
    font-weight: 700;
    font-size: 1.1rem;
}

.original-price {
    color: var(--gray-600);
    text-decoration: line-through;
    font-size: 0.9rem;
}

/* 新闻卡片 */
.news-card {
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(198, 40, 40, 0.1);
}

/* 按钮样式 */
.btn-danger {
    background: linear-gradient(135deg, #c62828, #d32f2f);
    border-color: #c62828;
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b71c1c, #c62828);
    border-color: #b71c1c;
    box-shadow: 0 6px 16px rgba(198, 40, 40, 0.4);
}

.btn-outline-primary {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.btn-outline-primary:hover {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: var(--primary-white);
}

/* 徽章样式 */
.badge.bg-danger {
    background: var(--primary-red) !important;
}

.badge.bg-warning {
    background: #ffc107 !important;
    color: var(--gray-800);
}

/* 全新布局样式 */
.min-vh-80 {
    min-height: 80vh;
}

/* 品牌卡片样式 */
.brand-card {
    transition: all 0.3s ease;
}

.brand-card:hover {
    transform: translateY(-5px);
}

.brand-card-inner {
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.brand-card:hover .brand-card-inner {
    box-shadow: 0 10px 30px rgba(198, 40, 40, 0.15);
    border-color: var(--primary-red);
}

.brand-logo {
    transition: transform 0.3s ease;
}

.brand-card:hover .brand-logo {
    transform: scale(1.1);
}

.subcat-list {
    max-height: 60px;
    overflow: hidden;
}

/* 新导航样式 */
.main-navbar {
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    transition: all 0.3s ease;
}

.brand-icon {
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(198, 40, 40, 0.3);
    background: linear-gradient(135deg, #c62828, #d32f2f) !important;
}

.brand-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(198, 40, 40, 0.4);
}

.brand-text .fw-bold {
    color: #c62828;
    letter-spacing: 1px;
}

.nav-link-enhanced {
    color: var(--gray-700) !important;
    font-weight: 500;
    padding: 0.75rem 1.25rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link-enhanced:hover {
    color: var(--primary-red) !important;
    background-color: rgba(198, 40, 40, 0.05);
    transform: translateY(-2px);
}

.nav-link-enhanced::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link-enhanced:hover::after {
    width: 80%;
}

.search-form-enhanced .form-control {
    border-radius: 25px 0 0 25px;
    border: 2px solid var(--gray-200);
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-form-enhanced .form-control:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(198, 40, 40, 0.25);
}

.search-form-enhanced .btn {
    border-radius: 0 25px 25px 0;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

.user-action-btn, .cart-action-btn {
    color: var(--gray-700) !important;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.user-action-btn:hover, .cart-action-btn:hover {
    color: var(--primary-red) !important;
    background-color: rgba(198, 40, 40, 0.05);
    border-color: rgba(198, 40, 40, 0.2);
    transform: translateY(-2px);
}

.cart-action-btn {
    background-color: rgba(198, 40, 40, 0.05);
    border-color: rgba(198, 40, 40, 0.2);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0.25rem 0.5rem;
}

.dropdown-item:hover {
    background-color: rgba(198, 40, 40, 0.1);
    color: var(--primary-red);
    transform: translateX(5px);
}

/* 移动端优化 */
@media (max-width: 991.98px) {
    .brand-text .fw-bold {
        font-size: 1.25rem;
    }
    
    .search-form-enhanced {
        margin: 1rem 0;
        width: 100%;
    }
    
    .search-form-enhanced .form-control {
        min-width: auto;
        width: 100%;
    }
}

/* 特色产品卡片 */
.featured-product-card {
    transition: all 0.3s ease;
}

.featured-product-card:hover {
    transform: translateY(-5px);
}

.product-card-inner {
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.featured-product-card:hover .product-card-inner {
    box-shadow: 0 10px 30px rgba(198, 40, 40, 0.15);
    border-color: var(--primary-red);
}

/* 排名标识 */
.product-rank {
    z-index: 2;
}

.rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-600);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

.top-rank {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
}

.rank-number {
    font-size: 0.9rem;
}

/* 特点介绍卡片 */
.feature-card {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--primary-white);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(198, 40, 40, 0.1);
    border-color: var(--primary-red);
}

.feature-icon {
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* Hero区域视觉元素 */
.hero-visual {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, var(--light-red) 0%, transparent 50%);
    opacity: 0.1;
}

.watch-showcase-container {
    position: relative;
    z-index: 2;
}

.watch-spotlight {
    position: relative;
}

.watch-spotlight::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--primary-red) 0%, transparent 70%);
    opacity: 0.1;
    border-radius: 50%;
}

/* 统计信息 */
.stat-item {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: var(--primary-white);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--primary-red);
    box-shadow: 0 4px 15px rgba(198, 40, 40, 0.1);
}

/* 限时优惠横幅 */
.flash-sale-banner {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    border: 2px solid var(--primary-red);
    position: relative;
    overflow: hidden;
}

.sale-bg-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.sale-content {
    position: relative;
    z-index: 2;
}

.countdown-timer {
    margin: 1.5rem 0;
}

.time-unit {
    min-width: 60px;
    transition: all 0.3s ease;
}

.time-unit:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.sale-visual {
    position: relative;
    z-index: 2;
}

/* 新品推荐区域 */
.new-arrivals-section {
    position: relative;
}

.section-header {
    position: relative;
}

.new-arrival-card {
    transition: all 0.3s ease;
}

.new-arrival-card:hover {
    transform: translateY(-5px);
}

.new-arrival-card .card {
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.new-arrival-card:hover .card {
    box-shadow: 0 10px 30px rgba(198, 40, 40, 0.15);
    border-color: var(--primary-red);
}

.z-index-2 {
    z-index: 2;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .flash-sale-banner {
        text-align: center;
        padding: 2rem 1rem;
    }
    
    .countdown-timer .col-3 {
        margin-bottom: 0.5rem;
    }
    
    .time-unit {
        min-width: 50px;
    }
    
    .display-3 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.5rem;
    }
    
    .brand-card-inner {
        margin-bottom: 1rem;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section .row > div {
        padding: 1rem;
    }
    
    .stat-item {
        margin-bottom: 0.5rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* SEO优化样式 */
.seo-content {
    line-height: 1.8;
}

.seo-content h3 {
    border-left: 4px solid var(--primary-red);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.seo-content ul {
    padding-left: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
}