﻿/**
 * PRODUCT DETAIL PAGE - DIVINE SHOP STYLE v3
 * Clean layout inspired by DivineShop.vn + DivineShop.net
 */

/* Main Container */
.product-detail-page {
    background: linear-gradient(180deg, #e8ecf4 0%, #dce3f0 30%, #eef1f6 100%);
    padding-bottom: 60px;
    min-height: 100vh;
}

/* Override container for product detail */
.product-detail-page .container {
    max-width: 1520px;
    padding: 0 32px;
    margin: 0 auto;
}

.breadcrumb-wrap {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 14px 0;
    margin-bottom: 28px;
    border-bottom: none;
}

.breadcrumb-wrap .container {
    max-width: 1520px;
    padding: 0 32px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.15s ease;
}

.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb span {
    color: #fff;
    font-weight: 600;
}

/* Breadcrumb separator arrows */
.breadcrumb .sep {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

/* Header Info */
.product-header-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.product-main-title {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 12px;
    line-height: 1.3;
    letter-spacing: -0.4px;
}

/* Category tags under title */
.product-category-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.product-category-tags .cat-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    transition: all 0.15s ease;
}

.product-category-tags .cat-tag:hover {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.product-meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

.status-badge.in-stock {
    background: #dcfce7;
    color: #15803d;
}

.sku-info b {
    color: #111827;
    font-weight: 600;
}

/* Two Column Grid */
.product-grid-main {
    display: grid;
    grid-template-columns: minmax(300px, 380px) 1fr;
    gap: 24px;
    margin-bottom: 32px;
    align-items: start;
}

.product-left-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 80px;
}

/* Column 1: Image */
.product-image-col {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    height: fit-content;
    border: 1px solid #e5e7eb;
}

.main-image-wrap {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    min-height: 280px;
}

.main-image-wrap img {
    max-width: 100%;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.main-image-wrap:hover img {
    transform: scale(1.03);
}

.image-actions {
    padding: 10px 16px;
    text-align: center;
    border-top: 1px solid #f3f4f6;
    background: #fafafa;
}

.image-actions a {
    color: #2563eb;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}

.image-actions a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Column 2: Variants & Buy */
.product-buying-col {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.selection-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.variant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.variant-item {
    cursor: pointer;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 10px;
    text-align: center;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
    background: #fff;
}

.variant-item:hover {
    border-color: #93c5fd;
    background: #f8fafc;
}

.variant-item.selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.variant-item.selected::after {
    content: '✓';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: #2563eb;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom-left-radius: 6px;
}

.v-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 6px;
}

.v-price {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: #dc2626;
}

.v-discount {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    line-height: 1;
}

/* Popular/PHỔ BIẾN Badge */
.v-popular {
    position: absolute;
    top: -1px;
    right: -1px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px 3px 10px;
    border-radius: 0 8px 0 8px;
    letter-spacing: 0.3px;
    z-index: 10;
}

.variant-item.popular {
    border-color: #fbbf24;
    background: #fffbeb;
}

.variant-item.popular:hover {
    border-color: #f59e0b;
    background: #fef3c7;
}

.variant-item.popular.selected {
    border-color: #f59e0b;
    background: #fef3c7;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.3);
}

.variant-item.popular.selected::after {
    background: #f59e0b;
}

/* Buy Buttons */
.buy-actions-row {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: nowrap;
    width: 100%;
    align-items: stretch;
}

.btn-buy-now {
    flex: 1;
    min-width: 0;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-buy-now::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s;
}

.btn-buy-now:hover::before {
    left: 100%;
}

.btn-buy-now:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.btn-buy-now:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-buy-now i {
    transition: transform 0.2s ease;
}

.btn-buy-now:hover i {
    transform: scale(1.1);
}

.btn-add-cart {
    flex: 1;
    min-width: 0;
    background: #fff;
    color: #2563eb;
    border: 1.5px solid #2563eb;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-add-cart:hover {
    background: #eff6ff;
    border-color: #1d4ed8;
    color: #1d4ed8;
    transform: translateY(-1px);
}

.btn-add-cart:active {
    transform: translateY(0);
}

.btn-add-cart i {
    transition: transform 0.2s ease;
    position: relative;
    z-index: 1;
}

.btn-add-cart:hover i {
    transform: scale(1.1);
}

.payment-notice {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 6px;
}

.payment-notice b {
    color: #111827;
}

/* Column 3: Referral */
.product-referral-col {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    height: fit-content;
    border: 1px solid #e5e7eb;
}

.referral-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.referral-desc {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 14px;
    line-height: 1.5;
}

.referral-input-group {
    display: flex;
    background: #f3f4f6;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.referral-input-group input {
    background: transparent;
    border: none;
    flex: 1;
    font-size: 12px;
    color: #374151;
    outline: none;
    padding: 0 8px;
}

.referral-btn-copy {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.referral-btn-copy:hover {
    background: #1d4ed8;
}

/* Tabs System */
.product-content-bottom {
    background: #fff;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    margin-bottom: 32px;
}

.tabs-header {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn:hover {
    color: #374151;
    background: #f9fafb;
}

.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 700;
}

.tab-pane {
    display: none;
    color: #374151;
    line-height: 1.8;
    font-size: 14px;
}

.tab-pane.active {
    display: block;
    animation: fadeInTab 0.2s ease;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Related Products */
.related-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* Comments section placeholder */
.comments-section {
    background: #fff;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.comment-input-wrap {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 14px;
}

.comment-input-wrap textarea {
    width: 100%;
    background: transparent;
    border: none;
    resize: none;
    outline: none;
    font-size: 14px;
    color: #374151;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.btn-box-comment {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-box-comment:hover {
    background: #1d4ed8;
}

/* ===== Order Form Section ===== */
.selection-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
    letter-spacing: -0.2px;
}

/* Form inputs */
.order-field {
    margin-bottom: 12px;
}

.order-field input,
.order-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    background: #fff;
    color: #111827;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.order-field textarea {
    resize: none;
}

.order-field input:focus,
.order-field textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.order-field input::placeholder,
.order-field textarea::placeholder {
    color: #9ca3af;
}

/* Payment method cards */
.payment-methods {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.payment-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.payment-card:hover {
    border-color: #93c5fd;
    background: #f8fbff;
}

.payment-card.active,
.payment-card:has(input:checked) {
    border-color: #3b82f6;
    background: #eff6ff;
}

.payment-card input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

.payment-card .badge-ok {
    background: #10b981;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

/* Compact Order Box */
.order-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

/* Promo Code Row */
.promo-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.promo-row input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    font-size: 13px;
    text-transform: uppercase;
    background: #fff;
    color: #111827;
    transition: border-color 0.15s ease;
}

.promo-row input:focus {
    border-color: #2563eb;
}

.promo-row button {
    padding: 10px 16px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.promo-row button:hover {
    background: #4f46e5;
}

/* Price Summary */
.price-summary {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    border: 1px solid #e5e7eb;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
}

.price-row .label {
    color: #6b7280;
}

.price-row .value {
    font-weight: 500;
    color: #111827;
}

.price-row .value.discount {
    color: #10b981;
}

.price-row .value.vat {
    color: #f59e0b;
}

.price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1.5px dashed #e5e7eb;
    padding-top: 12px;
    margin-top: 8px;
}

.price-total .label {
    font-weight: 700;
    color: #111827;
    font-size: 15px;
}

.price-total .value {
    font-size: 22px;
    font-weight: 800;
    color: #dc2626;
    letter-spacing: -0.5px;
}

/* Stock info badge */
.stock-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #ecfdf5;
    border-radius: 8px;
    font-size: 13px;
    color: #059669;
    font-weight: 500;
    margin-bottom: 16px;
}

.stock-badge strong {
    color: #047857;
}

/* ===== Dark Mode: Order Form ===== */
body.dark-mode .selection-title {
    color: #f1f5f9 !important;
    border-bottom-color: #334155 !important;
}

body.dark-mode .order-field input,
body.dark-mode .order-field textarea {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .order-field input:focus,
body.dark-mode .order-field textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

body.dark-mode .order-box {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border-color: #334155 !important;
}

body.dark-mode .payment-card {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .payment-card:hover {
    border-color: #2563eb !important;
    background: #172554 !important;
}

body.dark-mode .payment-card.active,
body.dark-mode .payment-card:has(input:checked) {
    border-color: #3b82f6 !important;
    background: #172554 !important;
}

body.dark-mode .promo-row input {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .price-summary {
    background: #0f172a !important;
    border-color: #334155 !important;
}

body.dark-mode .price-row .label {
    color: #94a3b8 !important;
}

body.dark-mode .price-row .value {
    color: #e2e8f0 !important;
}

body.dark-mode .price-total .label {
    color: #f1f5f9 !important;
}

body.dark-mode .price-total .value {
    color: #f87171 !important;
}

body.dark-mode .price-total {
    border-top-color: #334155 !important;
}

body.dark-mode .stock-badge {
    background: #064e3b !important;
    color: #6ee7b7 !important;
}

/* Floating Elements */
.floating-actions {
    position: fixed;
    right: 20px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.float-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.float-icon:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.float-zalo {
    background: #0084ff;
}

.float-hot {
    background: #ff4d4f;
}

/* Notification Toast */
.purchase-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    z-index: 2000;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(80px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast-img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
}

.toast-info {
    font-size: 12px;
    color: #6b7280;
}

.toast-info b {
    color: #111827;
    display: block;
}

/* ========================================
 * RESPONSIVE
 * ======================================== */
@media (max-width: 1200px) {
    .product-grid-main {
        grid-template-columns: 280px 1fr;
    }

    .product-left-col {
        position: static;
    }
}

@media (max-width: 900px) {
    .product-grid-main {
        grid-template-columns: 1fr;
    }

    .product-left-col {
        position: static;
    }

    .product-image-col {
        position: static;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .buy-actions-row {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        width: 100%;
    }

    .btn-buy-now,
    .btn-add-cart {
        flex: 1 !important;
        min-width: 0 !important;
        padding: 12px 12px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }

    .tabs-header {
        gap: 0;
    }

    .tab-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .product-content-bottom {
        padding: 20px;
    }

    .product-header-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================
 * DARK MODE STYLES - Enhanced Readability
 * ======================================== */
body.dark-mode .product-detail-page {
    background: #0f172a !important;
}

/* Breadcrumb - shift gradient to darker tones */
body.dark-mode .breadcrumb-wrap {
    background: linear-gradient(135deg, #3730a3 0%, #581c87 100%) !important;
}

body.dark-mode .breadcrumb {
    color: rgba(255, 255, 255, 0.6) !important;
}

body.dark-mode .breadcrumb a {
    color: rgba(255, 255, 255, 0.75) !important;
}

body.dark-mode .breadcrumb a:hover {
    color: #fff !important;
}

body.dark-mode .breadcrumb span {
    color: #fff !important;
    font-weight: 600;
}

/* Category tags */
body.dark-mode .product-category-tags .cat-tag {
    background: #1e293b !important;
    color: #94a3b8 !important;
    border-color: #334155 !important;
}

body.dark-mode .product-category-tags .cat-tag:hover {
    background: #1e3a5f !important;
    color: #60a5fa !important;
    border-color: #2563eb !important;
}

/* Header */
body.dark-mode .product-header-info {
    border-bottom-color: #334155 !important;
}

body.dark-mode .product-main-title {
    color: #f8fafc !important;
}

body.dark-mode .product-meta-row {
    color: #cbd5e1 !important;
}

body.dark-mode .status-badge.in-stock {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    font-weight: 700;
}

body.dark-mode .sku-info {
    color: #cbd5e1 !important;
}

body.dark-mode .sku-info b {
    color: #f1f5f9 !important;
}

/* Image Column */
body.dark-mode .product-image-col {
    background: #1e293b !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid #334155 !important;
}

body.dark-mode .main-image-wrap {
    background: #253349 !important;
}

body.dark-mode .image-actions {
    border-top-color: #334155 !important;
}

body.dark-mode .image-actions a {
    color: #60a5fa !important;
}

/* Buying Column */
body.dark-mode .product-buying-col {
    background: #1e293b !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid #334155 !important;
}

body.dark-mode .selection-title {
    color: #f8fafc !important;
    font-size: 15px;
}

/* Variant Items */
body.dark-mode .variant-item {
    background: #253349 !important;
    border-color: #475569 !important;
}

body.dark-mode .variant-item:hover {
    border-color: #60a5fa !important;
    background: #2d3f56 !important;
}

body.dark-mode .variant-item.selected {
    background: rgba(37, 99, 235, 0.25) !important;
    border-color: #3b82f6 !important;
}

body.dark-mode .variant-item.selected::after {
    background: #3b82f6 !important;
}

body.dark-mode .v-label {
    color: #cbd5e1 !important;
}

body.dark-mode .v-price {
    color: #f87171 !important;
}

body.dark-mode .v-discount {
    background: #ef4444 !important;
    color: #fff !important;
}

body.dark-mode .v-popular {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #fff !important;
}

body.dark-mode .variant-item.popular {
    border-color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.15) !important;
}

body.dark-mode .variant-item.popular.selected {
    background: rgba(245, 158, 11, 0.25) !important;
}

/* Buttons */
body.dark-mode .btn-add-cart {
    background: #253349 !important;
    color: #93c5fd !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 2px 8px 0 rgba(59, 130, 246, 0.2) !important;
}

body.dark-mode .btn-add-cart:hover {
    background: rgba(37, 99, 235, 0.25) !important;
    border-color: #60a5fa !important;
    color: #93c5fd !important;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.3) !important;
}

body.dark-mode .btn-add-cart::before {
    background: rgba(59, 130, 246, 0.2) !important;
}

/* Payment Notice */
body.dark-mode .payment-notice {
    background: #253349 !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
}

body.dark-mode .payment-notice b {
    color: #f8fafc !important;
}

body.dark-mode .payment-notice i {
    color: #34d399 !important;
}

/* Referral */
body.dark-mode .product-referral-col {
    background: #1e293b !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid #334155 !important;
}

body.dark-mode .referral-title {
    color: #f8fafc !important;
}

body.dark-mode .referral-desc {
    color: #cbd5e1 !important;
}

body.dark-mode .referral-input-group {
    background: #253349 !important;
    border: 1px solid #475569 !important;
}

body.dark-mode .referral-input-group input {
    color: #e2e8f0 !important;
}

body.dark-mode .referral-btn-copy {
    background: #3b82f6 !important;
    color: #fff !important;
}

body.dark-mode .referral-btn-copy:hover {
    background: #2563eb !important;
}

/* Tabs / Content Bottom */
body.dark-mode .product-content-bottom {
    background: #1e293b !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid #334155 !important;
}

body.dark-mode .tabs-header {
    border-bottom-color: #334155 !important;
}

body.dark-mode .tab-btn {
    color: #94a3b8 !important;
}

body.dark-mode .tab-btn:hover {
    color: #cbd5e1 !important;
}

body.dark-mode .tab-btn.active {
    color: #f8fafc !important;
    border-bottom-color: #3b82f6 !important;
}

body.dark-mode .tab-pane {
    color: #e2e8f0 !important;
}

body.dark-mode .section-title {
    color: #f8fafc !important;
}

/* Comments */
body.dark-mode .comments-section {
    background: #1e293b !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}

body.dark-mode .comment-input-wrap {
    background: #253349 !important;
    border-color: #475569 !important;
}

body.dark-mode .comment-input-wrap textarea {
    color: #f1f5f9 !important;
}

body.dark-mode .comment-input-wrap textarea::placeholder {
    color: #94a3b8 !important;
}

/* Toast */
body.dark-mode .purchase-toast {
    background: #1e293b !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid #334155 !important;
}

body.dark-mode .toast-info {
    color: #cbd5e1 !important;
}

body.dark-mode .toast-info b {
    color: #f8fafc !important;
}

/* Form inputs dark mode */
body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
    background: #253349 !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

body.dark-mode .form-group input::placeholder,
body.dark-mode .form-group textarea::placeholder {
    color: #94a3b8 !important;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group textarea:focus {
    border-color: #60a5fa !important;
    background: #2d3f56 !important;
}

body.dark-mode .form-label {
    color: #f8fafc !important;
}

/* Quantity control dark mode */
body.dark-mode .quantity-control {
    background: #253349 !important;
    border-color: #475569 !important;
}

body.dark-mode .quantity-control .qty-btn {
    background: #334155 !important;
    color: #f1f5f9 !important;
    border: none !important;
}

body.dark-mode .quantity-control .qty-btn:hover {
    background: #475569 !important;
}

body.dark-mode .quantity-control #quantity {
    background: transparent !important;
    color: #f1f5f9 !important;
    border-left-color: #475569 !important;
    border-right-color: #475569 !important;
}

/* Input fields with inline styles dark mode */
body.dark-mode #customerName,
body.dark-mode #customerEmail,
body.dark-mode #orderNotes {
    background: #253349 !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

body.dark-mode #customerName::placeholder,
body.dark-mode #customerEmail::placeholder,
body.dark-mode #orderNotes::placeholder {
    color: #94a3b8 !important;
}

body.dark-mode #customerName:focus,
body.dark-mode #customerEmail:focus,
body.dark-mode #orderNotes:focus {
    border-color: #60a5fa !important;
    background: #2d3f56 !important;
}

/* Quantity discount text dark mode */
body.dark-mode .quantity-control+span {
    color: #cbd5e1 !important;
}

/* Referral link dark mode */
body.dark-mode .product-referral-col a[href*="javascript"] {
    color: #60a5fa !important;
}

body.dark-mode .product-referral-col a[href*="javascript"]:hover {
    color: #93c5fd !important;
}

/* Related products dark mode */
body.dark-mode .related-section {
    color: #f1f5f9;
}

body.dark-mode .related-section .product-card {
    background: #1e293b !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid #334155 !important;
}

body.dark-mode .related-section .product-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4) !important;
    border-color: #475569 !important;
}

body.dark-mode .related-section .product-card>div[style*="background: linear-gradient"] {
    background: linear-gradient(135deg, #253349 0%, #1e293b 100%) !important;
}

body.dark-mode .related-section .product-card h4 {
    color: #f8fafc !important;
}

body.dark-mode .related-section .product-card p {
    color: #cbd5e1 !important;
}

body.dark-mode .related-section .product-card div[style*="font-weight: 700; color: #ef4444"] {
    color: #f87171 !important;
}

body.dark-mode a[href*="chi-tiet-san-pham"] {
    color: #60a5fa;
}

body.dark-mode a[href*="chi-tiet-san-pham"]:hover {
    color: #93c5fd;
}

/* Warning box dark mode */
body.dark-mode .tab-pane div[style*="background: #fff9f0"] {
    background: rgba(251, 191, 36, 0.12) !important;
    border-left-color: #fbbf24 !important;
}

body.dark-mode .tab-pane div[style*="background: #fff9f0"] ul {
    color: #e2e8f0 !important;
}

body.dark-mode .tab-pane div[style*="background: #fff9f0"] li {
    color: #e2e8f0 !important;
}

/* Tab content dark mode */
body.dark-mode .desc-content {
    color: #e2e8f0 !important;
}

body.dark-mode .desc-content p {
    color: #e2e8f0 !important;
}

body.dark-mode .desc-content a {
    color: #60a5fa !important;
}

body.dark-mode .desc-content h1,
body.dark-mode .desc-content h2,
body.dark-mode .desc-content h3,
body.dark-mode .desc-content h4 {
    color: #f8fafc !important;
}

/* Table in desc-content dark mode - fix zebra stripe issue */
body.dark-mode .desc-content table {
    border-color: #334155 !important;
}

body.dark-mode .desc-content table tr {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode .desc-content table tr:nth-child(odd) {
    background: #253349 !important;
}

body.dark-mode .desc-content table tr:nth-child(even) {
    background: #1e293b !important;
}

body.dark-mode .desc-content table td,
body.dark-mode .desc-content table th {
    color: #e2e8f0 !important;
    border-color: #334155 !important;
    background: inherit !important;
}

body.dark-mode .desc-content table th {
    color: #f8fafc !important;
    background: #334155 !important;
}

body.dark-mode .desc-content table td b,
body.dark-mode .desc-content table td strong {
    color: #f8fafc !important;
}

/* Override any inline background colors on table elements */
body.dark-mode .desc-content tr[style*="background"],
body.dark-mode .desc-content td[style*="background"] {
    background: inherit !important;
}

body.dark-mode .desc-content span,
body.dark-mode .desc-content li,
body.dark-mode .desc-content div {
    color: #e2e8f0 !important;
}

body.dark-mode .desc-content b,
body.dark-mode .desc-content strong {
    color: #f8fafc !important;
}

/* Fix feature cards with light inline backgrounds from DB content - dark mode contrast fix */
body.dark-mode .desc-content div[style*="background: #f0fdf4"],
body.dark-mode .desc-content div[style*="background:#f0fdf4"],
body.dark-mode .desc-content div[style*="background-color: #f0fdf4"],
body.dark-mode .desc-content div[style*="background: rgb(240, 253, 244)"] {
    background: rgba(16, 185, 129, 0.15) !important;
}

body.dark-mode .desc-content div[style*="background: #eff6ff"],
body.dark-mode .desc-content div[style*="background:#eff6ff"],
body.dark-mode .desc-content div[style*="background-color: #eff6ff"],
body.dark-mode .desc-content div[style*="background: rgb(239, 246, 255)"] {
    background: rgba(59, 130, 246, 0.15) !important;
}

body.dark-mode .desc-content div[style*="background: #fefce8"],
body.dark-mode .desc-content div[style*="background:#fefce8"],
body.dark-mode .desc-content div[style*="background-color: #fefce8"],
body.dark-mode .desc-content div[style*="background: rgb(254, 252, 232)"],
body.dark-mode .desc-content div[style*="background: #fef9c3"],
body.dark-mode .desc-content div[style*="background:#fef9c3"] {
    background: rgba(234, 179, 8, 0.15) !important;
}

body.dark-mode .desc-content div[style*="background: #fef2f2"],
body.dark-mode .desc-content div[style*="background:#fef2f2"],
body.dark-mode .desc-content div[style*="background-color: #fef2f2"],
body.dark-mode .desc-content div[style*="background: rgb(254, 242, 242)"],
body.dark-mode .desc-content div[style*="background: #fff1f2"],
body.dark-mode .desc-content div[style*="background:#fff1f2"] {
    background: rgba(239, 68, 68, 0.15) !important;
}

body.dark-mode .desc-content div[style*="background: #f5f3ff"],
body.dark-mode .desc-content div[style*="background:#f5f3ff"],
body.dark-mode .desc-content div[style*="background-color: #f5f3ff"],
body.dark-mode .desc-content div[style*="background: rgb(245, 243, 255)"] {
    background: rgba(139, 92, 246, 0.15) !important;
}

body.dark-mode .desc-content div[style*="background: #ecfdf5"],
body.dark-mode .desc-content div[style*="background:#ecfdf5"],
body.dark-mode .desc-content div[style*="background: rgb(236, 253, 245)"] {
    background: rgba(16, 185, 129, 0.15) !important;
}

body.dark-mode .desc-content div[style*="background: #f0f9ff"],
body.dark-mode .desc-content div[style*="background:#f0f9ff"],
body.dark-mode .desc-content div[style*="background: rgb(240, 249, 255)"] {
    background: rgba(14, 165, 233, 0.15) !important;
}

body.dark-mode .desc-content div[style*="background: #fff7ed"],
body.dark-mode .desc-content div[style*="background:#fff7ed"],
body.dark-mode .desc-content div[style*="background: rgb(255, 247, 237)"] {
    background: rgba(249, 115, 22, 0.15) !important;
}

/* Cyan/teal backgrounds - Cursor Pro feature cards */
body.dark-mode .desc-content div[style*="background: #ecfeff"],
body.dark-mode .desc-content div[style*="background:#ecfeff"],
body.dark-mode .desc-content div[style*="background: rgb(236, 254, 255)"] {
    background: rgba(6, 182, 212, 0.15) !important;
    border-color: rgba(6, 182, 212, 0.3) !important;
}

body.dark-mode .desc-content div[style*="background: #cffafe"],
body.dark-mode .desc-content div[style*="background:#cffafe"] {
    background: rgba(6, 182, 212, 0.15) !important;
    border-color: rgba(6, 182, 212, 0.3) !important;
}

/* Amber warning backgrounds */
body.dark-mode .desc-content div[style*="background: #fffbeb"],
body.dark-mode .desc-content div[style*="background:#fffbeb"] {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
}

/* Light gray/white/neutral backgrounds */
body.dark-mode .desc-content div[style*="background: #f8fafc"],
body.dark-mode .desc-content div[style*="background:#f8fafc"],
body.dark-mode .desc-content div[style*="background: #f1f5f9"],
body.dark-mode .desc-content div[style*="background:#f1f5f9"],
body.dark-mode .desc-content div[style*="background: #e2e8f0"],
body.dark-mode .desc-content div[style*="background:#e2e8f0"],
body.dark-mode .desc-content div[style*="background: #fff"],
body.dark-mode .desc-content div[style*="background:#fff"],
body.dark-mode .desc-content div[style*="background: white"],
body.dark-mode .desc-content div[style*="background-color: white"],
body.dark-mode .desc-content div[style*="background-color: #fff"] {
    background: #253349 !important;
    border-color: #475569 !important;
}

/* Fix inline text colors that become invisible in dark mode */
body.dark-mode .desc-content *[style*="color: #0e7490"],
body.dark-mode .desc-content *[style*="color:#0e7490"] {
    color: #22d3ee !important;
}

body.dark-mode .desc-content *[style*="color: #0891b2"],
body.dark-mode .desc-content *[style*="color:#0891b2"] {
    color: #67e8f9 !important;
}

body.dark-mode .desc-content *[style*="color: #166534"],
body.dark-mode .desc-content *[style*="color:#166534"] {
    color: #34d399 !important;
}

body.dark-mode .desc-content *[style*="color: #15803d"],
body.dark-mode .desc-content *[style*="color:#15803d"] {
    color: #4ade80 !important;
}

body.dark-mode .desc-content *[style*="color: #1e40af"],
body.dark-mode .desc-content *[style*="color:#1e40af"] {
    color: #60a5fa !important;
}

body.dark-mode .desc-content *[style*="color: #1d4ed8"],
body.dark-mode .desc-content *[style*="color:#1d4ed8"] {
    color: #93c5fd !important;
}

body.dark-mode .desc-content *[style*="color: #854d0e"],
body.dark-mode .desc-content *[style*="color:#854d0e"] {
    color: #fbbf24 !important;
}

body.dark-mode .desc-content *[style*="color: #a16207"],
body.dark-mode .desc-content *[style*="color:#a16207"] {
    color: #fcd34d !important;
}

body.dark-mode .desc-content *[style*="color: #92400e"],
body.dark-mode .desc-content *[style*="color:#92400e"] {
    color: #fbbf24 !important;
}

/* Fix border colors on feature cards in dark mode */
body.dark-mode .desc-content div[style*="border: 1px solid #a5f3fc"] {
    border-color: rgba(6, 182, 212, 0.3) !important;
}

body.dark-mode .desc-content div[style*="border: 1px solid #bbf7d0"] {
    border-color: rgba(16, 185, 129, 0.3) !important;
}

body.dark-mode .desc-content div[style*="border: 1px solid #bfdbfe"] {
    border-color: rgba(59, 130, 246, 0.3) !important;
}

body.dark-mode .desc-content div[style*="border: 1px solid #fde68a"] {
    border-color: rgba(234, 179, 8, 0.3) !important;
}

body.dark-mode .desc-content div[style*="border: 1px solid #e2e8f0"] {
    border-color: #475569 !important;
}

body.dark-mode .desc-content ol,
body.dark-mode .desc-content ul {
    color: #e2e8f0 !important;
}

/* Fix inline color attributes that specify dark text becoming invisible */
body.dark-mode .desc-content *[style*="color: #1e293b"],
body.dark-mode .desc-content *[style*="color:#1e293b"] {
    color: #f8fafc !important;
}

body.dark-mode .desc-content *[style*="color: #334155"],
body.dark-mode .desc-content *[style*="color:#334155"] {
    color: #e2e8f0 !important;
}

body.dark-mode .desc-content *[style*="color: #475569"],
body.dark-mode .desc-content *[style*="color:#475569"] {
    color: #cbd5e1 !important;
}

body.dark-mode .desc-content *[style*="color: #64748b"],
body.dark-mode .desc-content *[style*="color:#64748b"] {
    color: #94a3b8 !important;
}

body.dark-mode .desc-content *[style*="color: #059669"],
body.dark-mode .desc-content *[style*="color:#059669"] {
    color: #34d399 !important;
}

body.dark-mode .desc-content *[style*="color: #0369a1"],
body.dark-mode .desc-content *[style*="color:#0369a1"] {
    color: #38bdf8 !important;
}

body.dark-mode .desc-content *[style*="color: #b45309"],
body.dark-mode .desc-content *[style*="color:#b45309"] {
    color: #fbbf24 !important;
}

body.dark-mode .desc-content *[style*="color: #dc2626"],
body.dark-mode .desc-content *[style*="color:#dc2626"] {
    color: #f87171 !important;
}

body.dark-mode .desc-content *[style*="color: #7c3aed"],
body.dark-mode .desc-content *[style*="color:#7c3aed"] {
    color: #a78bfa !important;
}

body.dark-mode .warranty-content {
    color: #e2e8f0 !important;
}

body.dark-mode .warranty-content h4 {
    color: #f8fafc !important;
}

body.dark-mode .warranty-content p {
    color: #e2e8f0 !important;
}

body.dark-mode .warranty-content ul {
    color: #e2e8f0 !important;
}

body.dark-mode .warranty-content li {
    color: #e2e8f0 !important;
}

body.dark-mode .warranty-content b {
    color: #f8fafc !important;
}

/* ========================================
 * Order Summary Box - Dark Mode
 * ======================================== */
body.dark-mode .product-buying-col>div[style*="background: linear-gradient"] {
    background: linear-gradient(135deg, #253349 0%, #1e293b 100%) !important;
    border-color: #475569 !important;
}

/* Payment method labels */
body.dark-mode .product-buying-col label[onclick*="selectPaymentMethod"] {
    background: #253349 !important;
    border-color: #475569 !important;
}

body.dark-mode .product-buying-col label[onclick*="selectPaymentMethod"] span[style*="font-weight: 600"] {
    color: #e2e8f0 !important;
}

/* Promo code input */
body.dark-mode #promoCode {
    background: #253349 !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

body.dark-mode #promoCode::placeholder {
    color: #94a3b8 !important;
}

body.dark-mode #promoCode:focus {
    border-color: #60a5fa !important;
}

/* Promo apply button */
body.dark-mode .product-buying-col button[onclick*="applyPromoCode"] {
    background: #475569 !important;
    color: #f1f5f9 !important;
}

body.dark-mode .product-buying-col button[onclick*="applyPromoCode"]:hover {
    background: #64748b !important;
}

/* Price summary box */
body.dark-mode .product-buying-col div[style*="background: #fff; border-radius: 10px"] {
    background: #1e293b !important;
    border-color: #475569 !important;
}

body.dark-mode .product-buying-col div[style*="background: #fff; border-radius: 10px"] span[style*="color: #64748b"] {
    color: #cbd5e1 !important;
}

body.dark-mode .product-buying-col div[style*="background: #fff; border-radius: 10px"] span[style*="font-weight: 700; color: #1e293b"] {
    color: #f8fafc !important;
}

body.dark-mode #subtotalDisplay {
    color: #e2e8f0 !important;
}

body.dark-mode #totalDisplay {
    color: #60a5fa !important;
}

body.dark-mode #discountDisplay {
    color: #34d399 !important;
}

/* Dashed border in summary */
body.dark-mode .product-buying-col div[style*="border-top: 1px dashed"] {
    border-top-color: #475569 !important;
}

/* ========================================
 * Review Section - Dark Mode
 * ======================================== */
body.dark-mode .reviews-card {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
}

body.dark-mode .reviews-header {
    border-bottom-color: #334155 !important;
}

body.dark-mode .reviews-header h2 {
    color: #f8fafc !important;
}

body.dark-mode .reviews-summary {
    border-bottom-color: #334155 !important;
}

body.dark-mode .reviews-avg-number {
    color: #f8fafc !important;
}

body.dark-mode .reviews-avg-count {
    color: #cbd5e1 !important;
}

body.dark-mode .rb-label {
    color: #cbd5e1 !important;
}

body.dark-mode .rb-bar {
    background: #334155 !important;
}

body.dark-mode .rb-count {
    color: #cbd5e1 !important;
}

body.dark-mode .reviews-toolbar {
    border-bottom-color: #334155 !important;
}

body.dark-mode .reviews-toolbar span {
    color: #cbd5e1 !important;
}

body.dark-mode .review-sort-btn {
    background: #253349 !important;
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}

body.dark-mode .review-sort-btn:hover,
body.dark-mode .review-sort-btn.active {
    background: #0f766e !important;
    color: #fff !important;
    border-color: #0f766e !important;
}

body.dark-mode .review-item {
    border-bottom-color: #334155 !important;
}

body.dark-mode .review-item:hover {
    background: #253349 !important;
}

body.dark-mode .review-user-name {
    color: #f8fafc !important;
}

body.dark-mode .review-date {
    color: #94a3b8 !important;
}

body.dark-mode .review-comment {
    color: #e2e8f0 !important;
}

body.dark-mode .review-vote-btn {
    background: #253349 !important;
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}

body.dark-mode .review-vote-btn:hover {
    border-color: #0f766e !important;
    color: #14b8a6 !important;
}

body.dark-mode .review-vote-btn.voted {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: #10b981 !important;
    color: #34d399 !important;
}

body.dark-mode .review-admin-reply {
    background: #253349 !important;
    border-left-color: #14b8a6 !important;
}

body.dark-mode .review-admin-reply-label {
    color: #14b8a6 !important;
}

body.dark-mode .review-admin-reply-text {
    color: #e2e8f0 !important;
}

body.dark-mode .review-form-wrap {
    background: #0f172a !important;
    border-top-color: #334155 !important;
}

body.dark-mode .review-form-title {
    color: #f8fafc !important;
}

body.dark-mode .review-textarea {
    background: #253349 !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

body.dark-mode .review-textarea::placeholder {
    color: #94a3b8 !important;
}

body.dark-mode .review-textarea:focus {
    border-color: #14b8a6 !important;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15) !important;
}

body.dark-mode .reviews-empty-text {
    color: #cbd5e1 !important;
}

body.dark-mode .review-login-prompt {
    background: #0f172a !important;
    border-top-color: #334155 !important;
}

body.dark-mode .review-login-prompt p {
    color: #cbd5e1 !important;
}

body.dark-mode .review-verified {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
}

body.dark-mode .review-status-badge.pending {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
}

body.dark-mode #reviewCharCount {
    color: #94a3b8 !important;
}

/* ========================================
 * Purchase Type Modal - Dark Mode
 * ======================================== */
body.dark-mode #purchaseTypeModal>div {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
}

body.dark-mode #purchaseTypeModal h3 {
    color: #f8fafc !important;
}

body.dark-mode #purchaseTypeModal button[onclick*="close"] {
    color: #cbd5e1 !important;
}

body.dark-mode #purchaseTypeModal label {
    background: #253349 !important;
    border-color: #475569 !important;
}

/* All title text (spans AND divs with dark inline color) */
body.dark-mode #purchaseTypeModal span[style*="color: #1e293b"],
body.dark-mode #purchaseTypeModal div[style*="color: #1e293b"] {
    color: #f8fafc !important;
}

/* All description/secondary text */
body.dark-mode #purchaseTypeModal span[style*="color: #64748b"],
body.dark-mode #purchaseTypeModal div[style*="color: #64748b"] {
    color: #cbd5e1 !important;
}

/* Bold text inside descriptions */
body.dark-mode #purchaseTypeModal label b,
body.dark-mode #purchaseTypeModal label strong {
    color: #f8fafc !important;
}

/* Yellow warning/note box */
body.dark-mode #purchaseTypeModal div[style*="background: #fffbeb"] {
    background: rgba(251, 191, 36, 0.12) !important;
    border-left-color: #fbbf24 !important;
}

body.dark-mode #purchaseTypeModal div[style*="color: #92400e"] {
    color: #fcd34d !important;
}

/* Blue info box (standard options) */
body.dark-mode #purchaseTypeModal div[style*="background: #eff6ff"] {
    background: rgba(59, 130, 246, 0.12) !important;
    border-color: #3b82f6 !important;
}

body.dark-mode #purchaseTypeModal div[style*="color: #1e40af"] {
    color: #93c5fd !important;
}

/* Light blue tag badges */
body.dark-mode #purchaseTypeModal div[style*="color: #0369a1"] {
    color: #7dd3fc !important;
    background: rgba(14, 165, 233, 0.12) !important;
}

/* Bottom border separator */
body.dark-mode #purchaseTypeModal div[style*="border-top: 1px solid #e2e8f0"],
body.dark-mode #purchaseTypeModal div[style*="border-bottom: 1px solid #e2e8f0"] {
    border-top-color: #334155 !important;
    border-bottom-color: #334155 !important;
}

/* Cancel button */
body.dark-mode #purchaseTypeModal button[onclick*="closePurchaseTypeModal()"][style*="background: #f1f5f9"] {
    background: #334155 !important;
    color: #e2e8f0 !important;
}

/* Key price red text */
body.dark-mode #purchaseTypeModal span[style*="color: #dc2626"] {
    color: #f87171 !important;
}

/* Red badge background */
body.dark-mode #purchaseTypeModal span[style*="background: #fef2f2"] {
    background: rgba(239, 68, 68, 0.15) !important;
}

/* Green price text */
body.dark-mode #purchaseTypeModal span[style*="color: #10b981"] {
    color: #34d399 !important;
}

/* Purple price text */
body.dark-mode #purchaseTypeModal span[style*="color: #8b5cf6"],
body.dark-mode #purchaseTypeModal span[style*="color: #6d28d9"] {
    color: #a78bfa !important;
}

/* Purple tag background */
body.dark-mode #purchaseTypeModal span[style*="background: #f5f3ff"],
body.dark-mode #purchaseTypeModal div[style*="background: #f5f3ff"] {
    background: rgba(139, 92, 246, 0.15) !important;
}

/* Purple info tag text (chính chủ) */
body.dark-mode #purchaseTypeModal div[style*="color: #6d28d9"] {
    color: #c4b5fd !important;
}

/* Gemini Gmail input wrapper */
body.dark-mode #gmailActivationWrap div[style*="background: #f5f3ff"] {
    background: rgba(139, 92, 246, 0.1) !important;
    border-color: #6d28d9 !important;
}

body.dark-mode #gmailActivationWrap label {
    color: #a78bfa !important;
    background: transparent !important;
    border: none !important;
}

body.dark-mode #activationGmail {
    background: #253349 !important;
    border-color: #6d28d9 !important;
    color: #f1f5f9 !important;
}

body.dark-mode #gmailActivationWrap p {
    color: #a78bfa !important;
}

/* Customer Info Form (chính chủ / Family) */
body.dark-mode #customerInfoFormWrap > div {
    background: rgba(139, 92, 246, 0.08) !important;
    border-color: #6d28d9 !important;
}

body.dark-mode #customerInfoFormWrap label {
    color: #a78bfa !important;
    background: transparent !important;
    border: none !important;
}

body.dark-mode #customerInfoFormWrap span[style*="font-weight: 700"] {
    color: #c4b5fd !important;
}

body.dark-mode #customerInfoFormWrap input {
    background: #253349 !important;
    border-color: #6d28d9 !important;
    color: #f1f5f9 !important;
}

body.dark-mode #customerInfoFormWrap input::placeholder {
    color: #94a3b8 !important;
}

body.dark-mode #customerInfoFormWrap p {
    color: #a78bfa !important;
}

/* ========================================
 * Upgrade Success Modal - Dark Mode
 * ======================================== */
body.dark-mode #upgradeSuccessModal>div {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
}

body.dark-mode #upgradeSuccessModal h3 {
    color: #f8fafc !important;
}

body.dark-mode #upgradeSuccessModal p {
    color: #cbd5e1 !important;
}

body.dark-mode #upgradeSuccessModal div[style*="background: #f1f5f9"] {
    background: #253349 !important;
}

/* ========================================
 * Inline styles override - Dark Mode
 * ======================================== */
/* Discount text next to quantity */
body.dark-mode .product-buying-col span[style*="color: #64748b"] {
    color: #cbd5e1 !important;
}

/* Referral login hint */
body.dark-mode .product-referral-col div[style*="color: #f97316"] {
    color: #fb923c !important;
}

body.dark-mode .product-referral-col div[style*="color: #f97316"] a {
    color: #fb923c !important;
}

body.dark-mode .product-referral-col a[style*="color: #3b82f6"] {
    color: #60a5fa !important;
}

/* ========================================
 * Warranty Content - Dark Mode
 * ======================================== */

/* Main warranty container box - dark background */
body.dark-mode .warranty-content>div[style*="border: 2px solid #10b981"] {
    background: #1e293b !important;
    border-color: #10b981 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15) !important;
}

body.dark-mode .warranty-content>div[style*="border: 2px solid #10b981"] h4 {
    color: #f8fafc !important;
}

body.dark-mode .warranty-content>div[style*="border: 2px solid #10b981"] p {
    color: #cbd5e1 !important;
}

/* Green warranty duration highlight box */
body.dark-mode .warranty-content div[style*="background: #f0fdf4"] {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

body.dark-mode .warranty-content div[style*="background: #f0fdf4"] span {
    color: #34d399 !important;
}

body.dark-mode .warranty-content div[style*="background: #f0fdf4"] p {
    color: #e2e8f0 !important;
}

body.dark-mode .warranty-content div[style*="background: #f0fdf4"] b {
    color: #34d399 !important;
}

/* Yellow/amber platform policy notice box */
body.dark-mode .warranty-content div[style*="background: #fffbeb"] {
    background: rgba(251, 191, 36, 0.1) !important;
    border-color: rgba(251, 191, 36, 0.3) !important;
}

body.dark-mode .warranty-content div[style*="background: #fffbeb"] p {
    color: #e2e8f0 !important;
}

body.dark-mode .warranty-content div[style*="background: #fffbeb"] b {
    color: #fbbf24 !important;
}

/* Gemini Pro yellow box */
body.dark-mode .warranty-content>div[style*="border: 1px solid #fbbf24"] {
    background: #1e293b !important;
    border-color: #fbbf24 !important;
    box-shadow: 0 2px 6px rgba(251, 191, 36, 0.1) !important;
}

body.dark-mode .warranty-content>div[style*="border: 1px solid #fbbf24"] h4 {
    color: #fbbf24 !important;
}

body.dark-mode .warranty-content>div[style*="border: 1px solid #fbbf24"] p {
    color: #e2e8f0 !important;
}

body.dark-mode .warranty-content>div[style*="border: 1px solid #fbbf24"] b {
    color: #fbbf24 !important;
}

/* Warranty method grid cards */
body.dark-mode .warranty-content div[style*="background: #f8fafc"] {
    background: #253349 !important;
    border-color: #334155 !important;
}

body.dark-mode .warranty-content div[style*="background: #f8fafc"] div[style*="font-weight: 700"] {
    color: #f8fafc !important;
}

body.dark-mode .warranty-content div[style*="background: #f8fafc"] div[style*="color: #475569"] {
    color: #cbd5e1 !important;
}

body.dark-mode .warranty-content div[style*="background: #f8fafc"] b {
    color: #f8fafc !important;
}

/* Section headings */
body.dark-mode .warranty-content h4[style*="color: #1e293b"] {
    color: #f8fafc !important;
}

/* Device limit / red warning box */
body.dark-mode .warranty-content>div[style*="border: 1px solid #fca5a5"] {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

body.dark-mode .warranty-content>div[style*="border: 1px solid #fca5a5"] h4 {
    color: #f87171 !important;
}

body.dark-mode .warranty-content>div[style*="border: 1px solid #fca5a5"] ul {
    color: #e2e8f0 !important;
}

body.dark-mode .warranty-content>div[style*="border: 1px solid #fca5a5"] li {
    color: #e2e8f0 !important;
}

body.dark-mode .warranty-content>div[style*="border: 1px solid #fca5a5"] b {
    color: #f87171 !important;
}

/* No warranty list */
body.dark-mode .warranty-content ul[style*="color: #334155"] {
    color: #e2e8f0 !important;
}

body.dark-mode .warranty-content ul[style*="color: #334155"] li {
    color: #e2e8f0 !important;
}

/* File Tiếng Trung friendly message box (blue gradient) */
body.dark-mode .warranty-content>div[style*="background: linear-gradient(135deg, #f0f9ff"] {
    background: rgba(14, 165, 233, 0.1) !important;
    border-color: rgba(125, 211, 252, 0.3) !important;
}

body.dark-mode .warranty-content>div[style*="background: linear-gradient(135deg, #f0f9ff"] p {
    color: #e2e8f0 !important;
}

body.dark-mode .warranty-content>div[style*="background: linear-gradient(135deg, #f0f9ff"] b {
    color: #7dd3fc !important;
}

/* Contact info box */
body.dark-mode .warranty-content>div[style*="border: 1px solid #93c5fd"] {
    background: #1e293b !important;
    border-color: rgba(147, 197, 253, 0.3) !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.1) !important;
}

body.dark-mode .warranty-content>div[style*="border: 1px solid #93c5fd"] h4 {
    color: #93c5fd !important;
}

body.dark-mode .warranty-content div[style*="background: #f0f9ff"] {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

body.dark-mode .warranty-content div[style*="background: #f0f9ff"] div[style*="color: #64748b"] {
    color: #94a3b8 !important;
}

body.dark-mode .warranty-content div[style*="background: #f0f9ff"] a {
    color: #60a5fa !important;
}

/* Red gradient icon box in warnings */
body.dark-mode .warranty-content div[style*="background: linear-gradient(135deg, #ef4444"] {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

/* Green gradient icon box */
body.dark-mode .warranty-content div[style*="background: linear-gradient(135deg, #10b981"] {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

/* Blue gradient icon box */
body.dark-mode .warranty-content div[style*="background: linear-gradient(135deg, #3b82f6"] {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
}

/* ========================================
 * MOBILE RESPONSIVE - Product Detail Page
 * ======================================== */
@media (max-width: 768px) {

    /* Container */
    .product-detail-page .container {
        padding: 0 14px;
    }

    .breadcrumb-wrap .container {
        padding: 0 14px;
    }

    .breadcrumb-wrap {
        padding: 10px 0;
        margin-bottom: 16px;
    }

    .breadcrumb {
        font-size: 12px;
        gap: 4px;
    }

    /* Title & Meta */
    .product-main-title {
        font-size: 22px;
        margin-bottom: 8px;
        line-height: 1.25;
    }

    .product-header-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 14px;
        padding-bottom: 10px;
    }

    .product-meta-row {
        gap: 10px;
        font-size: 12px;
        flex-wrap: wrap;
    }

    .product-category-tags {
        gap: 6px;
    }

    .product-category-tags .cat-tag {
        padding: 4px 10px;
        font-size: 11px;
    }

    /* === 3-Column Grid → 1-Column Stack === */
    .product-grid-main {
        grid-template-columns: 1fr !important;
        gap: 16px;
        margin-bottom: 20px;
    }

    /* Image Column */
    .product-image-col {
        position: relative;
        top: auto;
        border-radius: 10px;
    }

    .main-image-wrap {
        padding: 12px;
        min-height: auto;
        max-height: 200px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .main-image-wrap img {
        max-height: 160px;
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }

    .main-image-wrap:hover img {
        transform: none;
    }

    .image-actions {
        padding: 8px 14px;
    }

    /* Buying Column */
    .product-buying-col {
        padding: 18px;
        border-radius: 10px;
    }

    /* Variant Grid */
    .variant-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 18px;
    }

    .variant-item {
        padding: 10px 8px;
    }

    .v-label {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .v-price {
        font-size: 15px;
    }

    .v-discount {
        font-size: 9px;
        padding: 2px 4px;
    }

    .v-popular {
        font-size: 8px;
        padding: 2px 6px 2px 8px;
    }

    /* Quantity */
    .selection-title {
        font-size: 14px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    /* Buy Buttons - stack vertically */
    .buy-actions-row {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        gap: 10px;
    }

    .btn-buy-now,
    .btn-add-cart {
        padding: 16px 20px;
        font-size: 16px;
        border-radius: 10px;
        width: 100%;
        justify-content: center;
    }

    .btn-buy-now:hover,
    .btn-add-cart:hover {
        transform: none;
    }

    /* Payment Notice */
    .payment-notice {
        font-size: 11px;
        padding: 8px 12px;
    }

    /* Order Form */
    .order-field input,
    .order-field textarea {
        font-size: 16px;
        /* Prevents iOS zoom */
        padding: 14px;
        border-radius: 10px;
    }

    .order-field {
        margin-bottom: 10px;
    }

    /* VAT Checkbox */
    .order-box {
        padding: 16px;
        border-radius: 10px;
        margin-bottom: 16px;
    }

    /* Payment Methods */
    .payment-methods {
        flex-direction: column;
        gap: 8px;
    }

    .payment-card {
        padding: 14px;
        border-radius: 10px;
        font-size: 14px;
    }

    /* Promo Row */
    .promo-row {
        gap: 8px;
    }

    .promo-row input {
        font-size: 14px;
        padding: 12px 14px;
    }

    .promo-row button {
        padding: 12px 16px;
        font-size: 14px;
    }

    /* Price Summary */
    .price-summary {
        padding: 14px;
        border-radius: 10px;
    }

    .price-row {
        font-size: 13px;
    }

    .price-total .label {
        font-size: 14px;
    }

    .price-total .value {
        font-size: 20px;
    }

    /* Stock Badge */
    .stock-badge {
        font-size: 12px;
        padding: 8px 12px;
        border-radius: 8px;
    }

    /* Referral Column */
    .product-referral-col {
        position: relative;
        top: auto;
        padding: 16px;
        border-radius: 10px;
    }

    .referral-title {
        font-size: 14px;
    }

    .referral-desc {
        font-size: 12px;
    }

    /* === Tabs Section === */
    .product-content-bottom {
        padding: 16px;
        border-radius: 10px;
        margin-bottom: 20px;
    }

    .tabs-header {
        margin: 0 -16px 18px -16px;
        padding: 0 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tabs-header::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .tab-pane {
        font-size: 13px;
        line-height: 1.7;
    }

    /* Consult pricing grid - stack on mobile */
    .consult-pricing-grid {
        grid-template-columns: 1fr !important;
    }

    /* Description content overflow fix */
    .desc-content {
        overflow-x: auto;
        word-break: break-word;
    }

    .desc-content img {
        max-width: 100% !important;
        height: auto !important;
    }

    .desc-content table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
    }

    .desc-content div[style*="display: grid"],
    .desc-content div[style*="display:grid"] {
        grid-template-columns: 1fr !important;
    }

    .desc-content div[style*="display: flex"],
    .desc-content div[style*="display:flex"] {
        flex-wrap: wrap !important;
    }

    /* Warranty content mobile */
    .warranty-content>div {
        padding: 14px !important;
    }

    .warranty-content div[style*="display: grid"],
    .warranty-content div[style*="display:grid"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .warranty-content div[style*="display: flex"],
    .warranty-content div[style*="display:flex"] {
        flex-wrap: wrap !important;
    }

    /* === Related Products === */
    .related-section {
        margin-bottom: 20px;
    }

    .section-title {
        font-size: 16px;
        margin-bottom: 14px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* === Comments Section === */
    .comments-section {
        padding: 16px;
        border-radius: 10px;
    }

    .comment-input-wrap {
        padding: 12px;
    }

    .comment-input-wrap textarea {
        font-size: 14px;
    }

    /* === Reviews === */
    .reviews-card {
        padding: 16px !important;
        border-radius: 10px !important;
    }

    .reviews-header {
        padding: 0 0 12px 0;
    }

    .reviews-header h2 {
        font-size: 18px !important;
    }

    .reviews-summary {
        flex-direction: column;
        gap: 16px;
        padding: 12px 0;
    }

    .reviews-toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .review-sort-btn {
        font-size: 12px;
        padding: 6px 12px;
    }

    .review-item {
        padding: 14px 0;
    }

    .review-textarea {
        font-size: 16px !important;
        /* prevent iOS zoom */
    }

    /* === Purchase Type Modal === */
    #purchaseTypeModal>div {
        width: 95% !important;
        max-width: none !important;
        margin: 10px auto !important;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 16px !important;
        padding: 20px !important;
    }

    #purchaseTypeModal label {
        padding: 14px !important;
    }

    /* === Floating Elements === */
    .floating-actions {
        right: 12px;
        bottom: 90px;
    }

    .float-icon {
        width: 40px;
        height: 40px;
    }

    .purchase-toast {
        left: 12px;
        right: 12px;
        bottom: 90px;
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* Extra small mobile (< 400px) */
@media (max-width: 400px) {
    .product-detail-page .container {
        padding: 0 10px;
    }

    .product-main-title {
        font-size: 20px;
    }

    .variant-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .variant-item {
        padding: 8px 6px;
    }

    .v-price {
        font-size: 14px;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .related-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}