/**
 * ec_product_detail.css
 * Giao diện chuyên biệt cho trang Chi tiết sản phẩm (/ec/product/{slug})
 * Tông màu chủ đạo: Cyberpunk / Titan Dark & Cam Neon
 */

/* 1. BREADCRUMB & CONTAINER */
.product-breadcrumb {
    background: #ffffff;
    border: 1px solid var(--cyber-titan-border, #e2e8f0);
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 10px;
}

.product-detail-box {
    background: #ffffff;
    border: 1px solid var(--cyber-titan-border, #e2e8f0);
    border-radius: 16px;
}

/* 2. BADGE DANH MỤC & HÃNG SẢN XUẤT */
.product-cat-pill {
    display: inline-flex;
    align-items: center;
    background: #0f172a;
    color: #ff7a1a;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.product-brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.product-brand-pill:hover {
    border-color: #ff7a1a;
    background: #ffffff;
    color: #ff7a1a;
}

.product-brand-pill img.brand-logo-img {
    height: 16px;
    max-width: 28px;
    object-fit: contain;
    border-radius: 2px;
}

/* 3. TIÊU ĐỀ & THÔNG TIN METADATA */
.product-title-heading {
    font-family: var(--cyber-font-heading, inherit);
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    letter-spacing: -0.3px;
}

.product-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.84rem;
    color: #64748b;
}

.meta-divider {
    color: #cbd5e1;
    font-size: 10px;
}

/* 4. KHỐI GIÁ BÁN */
.product-price-card {
    background: linear-gradient(135deg, rgba(255, 122, 26, 0.06) 0%, rgba(248, 250, 252, 0.95) 100%);
    border: 1px solid rgba(255, 122, 26, 0.25);
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.product-sale-price {
    font-size: 2.15rem;
    font-weight: 900;
    color: #ff7a1a;
    letter-spacing: -0.5px;
    line-height: 1;
}

.product-orig-price {
    font-size: 1.15rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
}

.product-discount-chip {
    background: linear-gradient(135deg, #ef4444 0%, #ea580c 100%);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

/* 5. MÔ TẢ NGẮN */
.product-short-desc {
    background: #f8fafc;
    border-left: 3.5px solid var(--cyber-orange, #ff7a1a);
    padding: 12px 18px;
    border-radius: 8px;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

/* 6. NÚT CHỌN BIẾN THỂ (PHÂN LOẠI / MÀU SẮC) */
.product-variants-section {
    margin-bottom: 24px;
}

#variantSelector,
.variant-selector-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Khoảng cách hàng và cột chuẩn 10px - Chống dính viền trên dưới */
    margin-top: 8px;
    margin-bottom: 0;
}

.variant-btn {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    padding: 8px 14px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    margin: 0 !important;
    line-height: 1.3;
}

.variant-btn:hover {
    border-color: #ff7a1a;
    background: rgba(255, 122, 26, 0.03);
    color: #ff7a1a;
}

.variant-btn.active {
    border-color: #ff7a1a !important;
    background: rgba(255, 122, 26, 0.08) !important;
    color: #ff7a1a !important;
    box-shadow: 0 3px 12px rgba(255, 122, 26, 0.25);
    font-weight: 700;
}

.variant-btn .variant-check-icon {
    display: none;
    color: #ff7a1a;
    font-size: 13px;
    margin-left: 2px;
}

.variant-btn.active .variant-check-icon {
    display: inline-block;
}

.variant-btn img.variant-btn-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
}

.variant-btn .variant-name-text {
    font-weight: 600;
    letter-spacing: 0.2px;
}

.variant-btn-price {
    font-weight: 700;
    color: #ff7a1a;
    font-size: 0.76rem;
    background: rgba(255, 122, 26, 0.12);
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.variant-btn.active .variant-btn-price {
    background: #ff7a1a;
    color: #ffffff;
}

/* 7. HỘP SỐ LƯỢNG */
.product-qty-section {
    margin-bottom: 24px;
}

.product-qty-wrap {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

.product-qty-wrap .btn-qty {
    border: none;
    background: #f8fafc;
    color: #334155;
    width: 36px;
    height: 38px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.product-qty-wrap .btn-qty:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.product-qty-wrap input {
    width: 50px;
    height: 38px;
    border: none;
    background: transparent;
    font-weight: 800;
    color: #0f172a;
    font-size: 15px;
    box-shadow: none !important;
}

/* 8. NÚT HÀNH ĐỘNG (MUA NGAY & THÊM VÀO GIỎ) */
.product-action-btns {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 26px;
}

.btn-cyber-buy-now {
    background: linear-gradient(135deg, #ff7a1a 0%, #ff5500 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(255, 122, 26, 0.35);
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 15px;
    padding: 13px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex: 1 1 58%;
}

.btn-cyber-buy-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 122, 26, 0.5);
    background: linear-gradient(135deg, #ff8c33 0%, #ff661a 100%);
}

.btn-cyber-add-cart {
    background: #0f172a;
    color: #ffffff !important;
    border: 1px solid #1e293b;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    padding: 13px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex: 1 1 42%;
}

.btn-cyber-add-cart:hover {
    background: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.35);
}

@media (max-width: 575.98px) {
    .product-variants-section {
        margin-bottom: 20px;
    }

    #variantSelector,
    .variant-selector-wrap {
        gap: 8px; /* Giữ khoảng cách 8px trên mobile */
    }

    .variant-btn {
        padding: 7px 11px;
        font-size: 12px;
        border-radius: 8px;
        gap: 6px;
    }

    .variant-btn img.variant-btn-img {
        width: 20px;
        height: 20px;
    }

    .variant-btn-price {
        font-size: 11px;
        padding: 2px 5px;
    }

    .product-qty-section {
        margin-bottom: 20px;
    }

    .product-action-btns {
        gap: 10px;
        margin-bottom: 20px;
    }

    .btn-cyber-buy-now {
        padding: 12px 10px;
        font-size: 13.5px;
        letter-spacing: 0.2px;
        border-radius: 10px;
    }

    .btn-cyber-add-cart {
        padding: 12px 10px;
        font-size: 13px;
        border-radius: 10px;
    }
}

@media (max-width: 375px) {
    .product-action-btns {
        flex-direction: column;
        gap: 8px;
    }

    .btn-cyber-buy-now,
    .btn-cyber-add-cart {
        width: 100% !important;
        flex: none;
    }
}

/* 9. CAM KẾT DỊCH VỤ AN TÂM (TRUST BADGES) */
.product-trust-badges {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
    padding: 10px 14px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #eef2f6;
    height: 100%;
    transition: all 0.2s ease;
}

.trust-item:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.trust-item i {
    font-size: 1.35rem;
    width: 26px;
    text-align: center;
}

.trust-item-sub {
    font-size: 0.74rem;
    color: #64748b;
}

/* 10. KHỐI CHI TIẾT & BẢNG THÔNG SỐ KỸ THUẬT */
.product-section-indicator {
    width: 4px;
    height: 18px;
    background-color: var(--cyber-orange, #ff7a1a);
    display: inline-block;
    border-radius: 2px;
}

.product-desc-box {
    background: #ffffff;
    border: 1px solid var(--cyber-titan-border, #e2e8f0);
    line-height: 1.8;
    padding: 24px;
    border-radius: 12px;
}

.product-spec-sticky-card {
    background: #ffffff;
    border: 1px solid var(--cyber-titan-border, #e2e8f0);
    top: 90px;
    z-index: 10;
    border-radius: 12px;
}

.spec-table-key {
    width: 42%;
    background-color: rgba(0, 0, 0, 0.02);
}

/* 11. SWIPER SLIDER SẢN PHẨM LIÊN QUAN */
.related-products-slider-wrapper {
    position: relative;
    padding: 0 4px;
}

.related-products-slider {
    overflow: hidden;
    padding: 6px 4px 28px 4px;
}

.related-products-slider .swiper-slide {
    height: auto;
    display: flex;
}

.related-products-slider .cyber-product-card {
    width: 100%;
}

.swiper-btn-nav {
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid rgba(255, 122, 26, 0.4);
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transition: all 0.25s ease;
    cursor: pointer;
}

.swiper-btn-nav:hover {
    background: #ff7a1a;
    color: #ffffff;
    border-color: #ff7a1a;
    box-shadow: 0 6px 18px rgba(255, 122, 26, 0.4);
    transform: translateY(-50%) scale(1.08);
}

.swiper-btn-nav.swiper-button-disabled {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
}

.swiper-btn-prev {
    left: -18px;
}

.swiper-btn-next {
    right: -18px;
}

@media (max-width: 991px) {
    .swiper-btn-prev {
        left: -8px;
    }
    .swiper-btn-next {
        right: -8px;
    }
}

.related-swiper-pagination {
    position: relative !important;
    bottom: 0 !important;
    margin-top: 8px;
}

.related-swiper-pagination .swiper-pagination-bullet {
    background: #cbd5e1;
    opacity: 0.8;
    width: 8px;
    height: 8px;
    transition: all 0.2s ease;
}

.related-swiper-pagination .swiper-pagination-bullet-active {
    background: #ff7a1a;
    opacity: 1;
    width: 24px;
    border-radius: 4px;
}

/* 12. PHẦN VIDEO SẢN PHẨM (YOUTUBE / DRIVE / DIRECT MP4) */
.product-video-quick-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #1e293b;
    font-weight: 700;
    font-size: 12.5px;
    padding: 6px 14px;
    border-radius: 30px;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.product-video-quick-badge:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

.product-video-quick-badge:hover i {
    color: #ffffff !important;
}

.product-thumb-video {
    position: relative;
    cursor: pointer;
}

.thumb-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.thumb-video-overlay i {
    color: #ffffff;
    font-size: 15px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.product-thumb-video:hover .thumb-video-overlay {
    background: rgba(239, 68, 68, 0.65);
}

.product-video-card {
    border: 1px solid var(--cyber-titan-border, #e2e8f0);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-video-card:hover {
    border-color: #fca5a5;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.08) !important;
}

