/**
 * DongHoVietVN - 手表商城
 * 奢华优雅风格 - Luxury Elegant Style
 */

:root {
    --primary-color: #1a1a2e;
    --primary-hover: #16213e;
    --accent-color: #c9a227;
    --accent-light: #f4e4ba;
    --success-color: #38a169;
    --danger-color: #c53030;
    --text-color: #1a1a2e;
    --text-muted: #6b7280;
    --border-color: #e5e5e5;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --bg-dark: #1a1a2e;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 4px;
    --gold-gradient: linear-gradient(135deg, #c9a227 0%, #f4d03f 50%, #c9a227 100%);
}

/* ==================== 基础布局 ==================== */
body {
    background: var(--bg-light);
    color: var(--text-color);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* ==================== 产品网格 - 标准4列 ==================== */
#productlist {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 -10px !important;
}

#productlist > .col-xl-3,
#productlist > .col-sm-6,
#productlist > [class*="col-"] {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    width: 25% !important;
    padding: 10px !important;
    box-sizing: border-box !important;
}

@media (max-width: 1200px) {
    #productlist > .col-xl-3,
    #productlist > .col-sm-6,
    #productlist > [class*="col-"] {
        flex: 0 0 33.333% !important;
        max-width: 33.333% !important;
        width: 33.333% !important;
    }
}

@media (max-width: 768px) {
    #productlist > .col-xl-3,
    #productlist > .col-sm-6,
    #productlist > [class*="col-"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
}

@media (max-width: 480px) {
    #productlist > .col-xl-3,
    #productlist > .col-sm-6,
    #productlist > [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* ==================== 产品卡片 - 奢华风格 ==================== */
.single-products {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    position: relative;
}

.single-products::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.single-products:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.single-products:hover::before {
    opacity: 1;
}

/* 产品图片 */
.product-img {
    position: relative;
    width: 100%;
    background: linear-gradient(180deg, #f5f5f5 0%, #ececec 100%);
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.single-products:hover .product-img img {
    transform: scale(1.08);
}

/* 产品操作按钮 */
.product-actions {
    position: absolute !important;
    bottom: 15px !important;
    right: 15px !important;
    left: auto !important;
    top: auto !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0 !important;
    background: none !important;
    width: auto !important;
}

.single-products:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.add-to-cart-btn,
.buy-now-btn {
    width: 42px !important;
    height: 42px !important;
    border-radius: var(--radius) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color) !important;
    font-size: 16px;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: var(--shadow);
}

.add-to-cart-btn {
    background: var(--bg-white) !important;
    color: var(--primary-color) !important;
}

.add-to-cart-btn:hover {
    background: var(--primary-color) !important;
    color: var(--bg-white) !important;
    border-color: var(--primary-color) !important;
}

.buy-now-btn {
    background: var(--accent-color) !important;
    color: var(--bg-white) !important;
    border-color: var(--accent-color) !important;
}

.buy-now-btn:hover {
    background: #b8922a !important;
    border-color: #b8922a !important;
}

.add-to-cart-btn span,
.buy-now-btn span {
    display: none !important;
}

/* 产品信息 */
.product-content {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.product-content .title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
    letter-spacing: 0.3px;
}

.product-content .title:hover {
    color: var(--accent-color);
}

.products-price {
    margin: 0;
    padding: 0;
    list-style: none;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.products-price li {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 0.5px;
}

.products-price del {
    color: var(--text-muted);
    font-size: 13px;
    margin-left: 10px;
    font-weight: 400;
}

/* ==================== 按钮 ==================== */
.default-btn {
    background: var(--primary-color);
    color: var(--bg-white);
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 13px;
    transition: all 0.3s;
}

.default-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

/* ==================== 表单 ==================== */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px 16px;
    transition: all 0.2s;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

/* ==================== 购物车侧边栏 ==================== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 100%;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: -5px 0 30px rgba(0,0,0,0.15);
    z-index: 10001;
    transition: right 0.4s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-sidebar-header {
    padding: 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-dark);
    color: var(--bg-white);
}

.cart-sidebar-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.close-cart {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 18px;
    color: var(--bg-white);
    cursor: pointer;
    transition: all 0.2s;
}

.close-cart:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    padding: 15px;
    background: var(--bg-light);
    border-radius: var(--radius);
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-right: 15px;
    border: 1px solid var(--border-color);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-price {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 15px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.cart-item-qty button:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.cart-item-remove {
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
}

.cart-item-remove:hover {
    color: var(--danger-color);
}

.cart-sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.cart-total span:last-child {
    color: var(--accent-color);
}

.checkout-btn {
    width: 100%;
    padding: 14px;
}

.clear-cart-btn {
    display: block;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 12px;
    cursor: pointer;
}

.clear-cart-btn:hover {
    color: var(--danger-color);
}

.cart-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.cart-empty i {
    font-size: 60px;
    margin-bottom: 15px;
    color: var(--border-color);
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.cart-overlay.open {
    display: block;
    opacity: 1;
}

/* ==================== 页脚 - 深色优雅 ==================== */
.footer-area {
    background: var(--bg-dark) !important;
    color: var(--bg-white);
}

.single-footer-widget h4 {
    color: var(--accent-color) !important;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.single-footer-widget a,
.single-footer-widget li {
    color: rgba(255,255,255,0.7) !important;
    font-size: 13px;
    transition: color 0.2s;
}

.single-footer-widget a:hover {
    color: var(--accent-color) !important;
}

/* ==================== 结账页面 ==================== */
.checkout-products-list {
    max-height: 320px;
    overflow-y: auto;
}

.checkout-product-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--bg-light);
    border-radius: var(--radius);
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.checkout-product-item .product-thumb {
    position: relative;
    margin-right: 15px;
}

.checkout-product-item .product-thumb img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.checkout-product-item .qty-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: var(--bg-white);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.checkout-product-item .product-name {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 4px;
}

.checkout-product-item .product-price {
    font-size: 13px;
    color: var(--text-muted);
}

.checkout-product-item .product-total {
    font-weight: 600;
    color: var(--accent-color);
}

/* ==================== 订单成功 ==================== */
.order-success-page {
    text-align: center;
    padding: 50px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.order-success-page .success-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.order-success-page .success-icon i {
    font-size: 42px;
    color: var(--success-color);
}

.order-success-page h2 {
    color: var(--success-color);
    margin-bottom: 12px;
    font-weight: 600;
}

.order-details-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: left;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.order-details-card .card-section {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.order-details-card .card-section:last-child {
    border-bottom: none;
}

/* ==================== 账户页面 ==================== */
.user-info-card {
    display: flex;
    align-items: center;
    padding: 25px;
    background: var(--bg-dark);
    border-radius: var(--radius);
    color: var(--bg-white);
    margin-bottom: 25px;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.user-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
}

.user-avatar {
    width: 65px;
    height: 65px;
    background: rgba(201, 162, 39, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-color);
}

.user-avatar i {
    font-size: 28px;
    color: var(--accent-color);
}

.user-details h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 500;
}

.user-details p {
    margin: 0;
    opacity: 0.8;
    font-size: 13px;
}

.logout-btn {
    margin-left: auto;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--bg-white);
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

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

.account-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 14px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 18px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.order-status {
    padding: 5px 14px;
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-status.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.order-status.status-delivered {
    background: #d1fae5;
    color: #065f46;
}

/* ==================== 商品详情页 ==================== */
.product-details-area {
    padding: 40px 0;
    background: var(--bg-white);
}

.products-details-image {
    position: sticky;
    top: 20px;
}

.product-main-image {
    background: linear-gradient(180deg, #f8f8f8 0%, #f0f0f0 100%);
    border-radius: var(--radius);
    padding: 40px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.product-main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

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

.discount-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--accent-color);
    color: var(--bg-white);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
}

.product-thumbs {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.thumb-item {
    width: 80px;
    height: 80px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.thumb-item.active,
.thumb-item:hover {
    border-color: var(--accent-color);
}

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

.product-details-content {
    padding-left: 30px;
}

.product-title {
    font-size: 26px;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--text-color);
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.product-price-box {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.current-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-color);
}

.original-price {
    font-size: 20px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.save-badge {
    background: var(--accent-light);
    color: #8b6914;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.product-meta {
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius);
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.product-meta p {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-meta p:last-child {
    margin-bottom: 0;
}

.product-meta i {
    color: var(--accent-color);
    font-size: 18px;
}

.in-stock {
    color: var(--success-color);
    font-weight: 600;
}

.out-stock {
    color: var(--danger-color);
    font-weight: 600;
}

.product-description {
    margin-bottom: 25px;
}

.product-description h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-color);
}

.product-description p {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.product-quantity {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.product-quantity label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.qty-btn {
    width: 44px;
    height: 44px;
    background: var(--bg-light);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-color);
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: var(--bg-white);
}

#qtyInput {
    width: 60px;
    height: 44px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    background: var(--bg-white);
}

.stock-hint {
    font-size: 13px;
    color: var(--text-muted);
}

.product-actions-main {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-add-cart,
.btn-buy-now {
    flex: 1;
    padding: 16px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-add-cart {
    background: var(--bg-white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-add-cart:hover {
    background: var(--primary-color);
    color: var(--bg-white);
}

.btn-add-cart.added {
    background: var(--success-color);
    border-color: var(--success-color);
    color: var(--bg-white);
}

.btn-buy-now {
    background: var(--accent-color);
    border: 2px solid var(--accent-color);
    color: var(--bg-white);
}

.btn-buy-now:hover {
    background: #b8922a;
    border-color: #b8922a;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(201, 162, 39, 0.3);
}

.btn-add-cart:disabled,
.btn-buy-now:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.product-services {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.service-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.service-item i {
    font-size: 22px;
    color: var(--accent-color);
}

.service-item span {
    font-size: 14px;
    color: var(--text-color);
}

/* 相关商品 */
.section-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-color);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

@media (max-width: 992px) {
    .product-details-content {
        padding-left: 0;
        margin-top: 30px;
    }

    .products-details-image {
        position: static;
    }
}

@media (max-width: 576px) {
    .product-title {
        font-size: 20px;
    }

    .current-price {
        font-size: 26px;
    }

    .product-actions-main {
        flex-direction: column;
    }

    .btn-add-cart,
    .btn-buy-now {
        width: 100%;
    }
}

/* ==================== Toast ==================== */
.toast-notification {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: var(--bg-white);
    padding: 14px 28px;
    border-radius: var(--radius);
    z-index: 10002;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
}

.toast-notification i {
    color: var(--accent-color);
    font-size: 18px;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .user-info-card {
        flex-wrap: wrap;
    }

    .logout-btn {
        margin-left: 0;
        margin-top: 12px;
        width: 100%;
        text-align: center;
    }
}
