/* Product Premium CSS */
:root {
    --premium-primary: #d97706;
    --premium-primary-hover: #b45309;
    --premium-primary-soft: rgba(254, 243, 199, 0.75);
    --premium-shadow: 0 10px 40px -10px rgba(217, 119, 6, 0.08);
    --premium-transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.shadow-sm-premium {
    box-shadow: var(--premium-shadow) !important;
}

.bg-primary-soft { 
    background-color: rgba(254, 243, 199, 0.85) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}
.summary-icon i {
    color: #b45309 !important;
}

/* Bundle Item Cards */
.bundle-item-card {
    width: 160px;
    transition: var(--premium-transition);
    position: relative;
}

.item-image-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 20px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--premium-transition);
}

.item-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--premium-transition);
}

.item-badge {
    position: absolute;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 2;
}

.item-badge.main {
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.item-badge.discount {
    top: 8px;
    right: 8px;
    background: #ff4757;
    color: #fff;
}

/* Selection Overlay */
.item-selection-label {
    cursor: pointer;
    display: block;
    width: 100%;
}

.custom-check-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(217, 119, 6, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    opacity: 0;
    transition: var(--premium-transition);
    z-index: 1;
}

.cs-premium-checkbox:checked ~ .custom-check-overlay {
    opacity: 1;
}

/* Interactions */
.bundle-item-card.cross-item:hover .item-image-wrapper {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.bundle-item-card.cross-item:hover img {
    transform: scale(1.1);
}

.cs-premium-checkbox:not(:checked) ~ .custom-check-overlay + .item-badge,
.cs-premium-checkbox:not(:checked) ~ img {
    filter: grayscale(0.8) opacity(0.5);
}

/* Layout Connectors */
.bundle-connector {
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

/* Premium Button */
.btn-primary-premium {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff !important;
    border: none;
    box-shadow: 0 8px 25px -8px rgba(217, 119, 6, 0.6);
    transition: var(--premium-transition);
    min-width: 240px;
}

.btn-primary-premium:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -8px rgba(217, 119, 6, 0.7);
}

.btn-primary-premium:active {
    transform: scale(0.98);
}

/* Gallery Styles */
.product-gallery-container { position: relative; }
.swiper-main { width: 100%; height: auto; border: 1px solid #eee; border-radius: 8px; overflow: hidden; }
.swiper-main img { width: 100%; height: auto; object-fit: contain; aspect-ratio: 1/1; cursor: zoom-in; }

.swiper-thumbs { margin-top: 15px; box-sizing: border-box; }
.swiper-thumbs .swiper-slide { 
    width: 25%; 
    height: auto; 
    opacity: 0.6; cursor: pointer; border-radius: 8px; overflow: hidden; 
    border: 2px solid transparent; transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    box-sizing: border-box;
}
.swiper-thumbs .swiper-slide-thumb-active { 
    opacity: 1; border-color: var(--primary-color); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.swiper-thumbs img { 
    width: 100%; 
    height: 100%; 
    aspect-ratio: 1/1; 
    object-fit: cover; 
    display: block; 
}

/* Fix Swiper Nav Icons (CSP safe) */
.swiper-button-next:after, .swiper-button-prev:after { display: none; }
.swiper-button-next, .swiper-button-prev { 
    background: rgba(255, 255, 255, 0.8); 
    width: 40px; height: 40px; border-radius: 50%; 
    color: #333; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}
.swiper-button-next:hover, .swiper-button-prev:hover { background: #fff; color: var(--primary-color); }
.swiper-button-next i, .swiper-button-prev i { font-size: 18px; }

/* Product Info Tabs */
.product-info-tabs .btn-outline-primary.active,
.product-info-tabs .btn-outline-secondary.active {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border-color: #d97706 !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.28) !important;
}
.description-content-wrapper {
    transition: max-height 0.5s ease-in-out;
}
.description-content-wrapper.expanded {
    max-height: 5000px !important;
}
.description-content-wrapper.expanded .read-more-gradient {
    display: none;
}
.description-text, .specifications-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
}
.description-text table, .specifications-content table {
    width: 100% !important;
    border-collapse: collapse;
}

#pane-specs {
    display: none;
}
.product-info-tabs .btn-outline-primary:not(.active),
.product-info-tabs .btn-outline-secondary:not(.active) {
    background: rgba(254, 243, 199, 0.5) !important;
    color: #b45309 !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    transition: all 0.25s ease;
}
.product-info-tabs .btn-outline-primary:not(.active):hover,
.product-info-tabs .btn-outline-secondary:not(.active):hover {
    background: rgba(254, 243, 199, 0.95) !important;
    color: #92400e !important;
    border-color: #d97706 !important;
}

#btn-read-more {
    background: rgba(254, 243, 199, 0.75) !important;
    color: #b45309 !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.12);
    transition: all 0.25s ease;
}
#btn-read-more:hover {
    background: #d97706 !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
    box-shadow: 0 3px 10px rgba(217, 119, 6, 0.25);
}

/* Sidebar Reviews & Q&A Widget (Đồng bộ chuẩn phong cách PNS-Watch) */
#sidebar-reviews-qa-widget {
    background: #fff;
    border: 1px solid rgba(180, 83, 9, 0.15);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.06);
}

#sidebar-reviews-qa-widget #sidebarReviewQaTabs {
    background: rgba(254, 243, 199, 0.4);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.25);
    gap: 6px;
}

#sidebar-reviews-qa-widget #sidebarReviewQaTabs .nav-item {
    flex: 1 1 0;
}

#sidebar-reviews-qa-widget #sidebarReviewQaTabs .nav-link {
    width: 100%;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 7px 10px;
    background: rgba(254, 243, 199, 0.6) !important;
    color: #b45309 !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    transition: all 0.25s ease;
    box-shadow: none;
}

#sidebar-reviews-qa-widget #sidebarReviewQaTabs .nav-link:hover:not(.active) {
    background: rgba(254, 243, 199, 0.95) !important;
    color: #92400e !important;
    border-color: #d97706 !important;
}

#sidebar-reviews-qa-widget #sidebarReviewQaTabs .nav-link.active {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border-color: #d97706 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.28) !important;
}

/* Nút Xem thêm trong Sidebar Review & QA */
.btn-sidebar-view-more {
    background: rgba(254, 243, 199, 0.75) !important;
    color: #b45309 !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    font-weight: 600;
    font-size: 0.825rem;
    padding: 6px 24px;
    border-radius: 50rem;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.12);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-sidebar-view-more:hover {
    background: #d97706 !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
    box-shadow: 0 3px 10px rgba(217, 119, 6, 0.25);
    transform: translateY(-1px);
}

/* Tab Đánh giá & Hỏi đáp chính ở chân trang */
#productReviewTabs .nav-link {
    color: #78350f;
    font-weight: 700;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 22px;
    transition: all 0.2s ease;
}

#productReviewTabs .nav-link:hover {
    color: #b45309;
    border-bottom-color: rgba(245, 158, 11, 0.4);
}

#productReviewTabs .nav-link.active {
    color: #b45309 !important;
    border-bottom: 3px solid #d97706 !important;
    background: transparent !important;
}

#reviews-section .btn-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border-color: #d97706 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(217, 119, 6, 0.2);
}

#reviews-section .btn-primary:hover {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    border-color: #b45309 !important;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}

/* Mobile Adaptations */
@media (max-width: 767px) {
    .bundle-items-wrapper {
        flex-direction: row !important;
        overflow-x: auto;
        justify-content: flex-start !important;
        padding-bottom: 20px;
        scroll-snap-type: x mandatory;
    }
    .bundle-item-card {
        flex-shrink: 0;
        scroll-snap-align: center;
        width: 140px;
    }
    .item-image-wrapper {
        width: 140px;
        height: 140px;
    }
    .bundle-connector { display: none; }
}

/* Technical Specifications Premium Styling */
.specifications-content .technical-details__wrapper {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 16px !important;
}

.specifications-content .technical-details__wrapper .details__item {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-left: 4px solid #d97706 !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.specifications-content .technical-details__wrapper .details__item:hover {
    background: #fffbeb !important;
    border-color: #f59e0b !important;
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.12) !important;
    transform: translateY(-2px) !important;
}

.specifications-content .technical-details__wrapper .details__item h4 {
    font-size: 0.825rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin: 0 0 4px 0 !important;
    display: flex !important;
    align-items: center !important;
}

.specifications-content .technical-details__wrapper .details__item h4::before {
    content: "•";
    color: #d97706;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 6px;
    line-height: 1;
}

.specifications-content .technical-details__wrapper .details__item p {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

/* Fallback for Table Specifications */
.specifications-content table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.specifications-content table tr:nth-child(even) {
    background-color: #f8fafc !important;
}

.specifications-content table tr:nth-child(odd) {
    background-color: #ffffff !important;
}

.specifications-content table tr:hover {
    background-color: #f1f5f9 !important;
}

.specifications-content table td, 
.specifications-content table th {
    padding: 12px 18px !important;
    font-size: 0.9rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.specifications-content table th,
.specifications-content table td:first-child {
    font-weight: 700 !important;
    color: #475569 !important;
    width: 35% !important;
    background-color: rgba(248, 250, 252, 0.6) !important;
}

.specifications-content table td:last-child {
    color: #0f172a !important;
    font-weight: 600 !important;
}

/* Product Action Buttons: Báo Giá & Đặt Hàng (Concept C: Architectural Minimalist) */
.product-actions-group {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 1rem;
}
.product-qty-input {
    width: 65px;
    text-align: center;
    border-radius: 6px !important;
    border: 1.5px solid #000000 !important;
    font-weight: bold;
    font-size: 1.05rem;
    padding: 0.5rem 0.25rem;
}
.product-qty-input:focus {
    border-color: #000000 !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12) !important;
}
.btn-product-action-quote {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1.5px solid #000000 !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    padding: 12px 20px !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    flex: 1 1 0;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}
.btn-product-action-quote:hover {
    background: #f4f4f5 !important;
    color: #000000 !important;
    border-color: #000000 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px);
}
.btn-product-action-quote:hover i {
    color: #000000 !important;
}
.btn-product-action-quote i {
    color: #000000;
    font-size: 1.05rem;
    transition: color 0.2s ease;
}

.btn-product-action-buy {
    background: #000000 !important;
    color: #ffffff !important;
    border: 1.5px solid #000000 !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    padding: 12px 20px !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18) !important;
    transition: all 0.2s ease;
    flex: 1 1 0;
    text-decoration: none;
    cursor: pointer;
}
.btn-product-action-buy:hover {
    background: #1f1f1f !important;
    border-color: #1f1f1f !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25) !important;
    transform: translateY(-1px);
}
.btn-product-action-buy i {
    font-size: 1.05rem;
    color: #ffffff !important;
}

/* ==========================================================================
   Concept C: Architectural Minimalist Tabs & Read More Button
   ========================================================================== */
.product-info-tabs .d-flex {
    border-bottom: 2px solid #e7e5e0 !important;
    gap: 0 !important;
    margin-bottom: 1.5rem !important;
}
.product-info-tabs #tab-desc-btn,
.product-info-tabs #tab-specs-btn {
    background: transparent !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    border-radius: 0 !important;
    color: #6b7280 !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    padding: 12px 32px !important;
    position: relative;
    box-shadow: none !important;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}
.product-info-tabs #tab-desc-btn:hover,
.product-info-tabs #tab-specs-btn:hover {
    color: #000000 !important;
    border-bottom-color: rgba(193, 157, 96, 0.4) !important;
}
.product-info-tabs #tab-desc-btn.active,
.product-info-tabs #tab-specs-btn.active {
    color: #000000 !important;
    font-weight: 800 !important;
    border-bottom: 3px solid #C19D60 !important;
    background: transparent !important;
}

/* Concept C: Minimalist Read More Button */
#btn-read-more {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1.5px solid #000000 !important;
    border-radius: 6px !important;
    padding: 9px 36px !important;
    font-weight: 700 !important;
    font-size: 0.92rem !important;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease;
}
#btn-read-more:hover {
    background: #121212 !important;
    border-color: #121212 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18) !important;
    transform: translateY(-1px);
}
#btn-read-more i {
    transition: transform 0.2s ease;
}


/* ==========================================================================
   Quotation Module Styling (Storefront Quotation & Quick Order) - Concept C
   ========================================================================== */
.quotation-hero-banner {
    background: #121212 !important;
    border-bottom: 3px solid #C19D60 !important;
}
.btn-quotation-header-btn {
    background: #000000 !important;
    border: 1.5px solid #C19D60 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18) !important;
    border-radius: 6px !important;
    transition: all 0.2s ease;
}
.btn-quotation-header-btn:hover {
    background: #1f1f1f !important;
    border-color: #C19D60 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25) !important;
}
.btn-quotation-filter {
    background: #000000 !important;
    border: 1.5px solid #000000 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border-radius: 6px !important;
    transition: all 0.2s ease;
}
.btn-quotation-filter:hover {
    background: #1f1f1f !important;
    border-color: #1f1f1f !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}
.quotation-section-icon {
    color: #C19D60 !important;
}
.quotation-count-badge {
    background: #faf8f5 !important;
    color: #121212 !important;
    border: 1px solid #e7e5e0 !important;
    font-weight: 700;
}
.btn-quotation-add {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1.5px solid #000000 !important;
    font-weight: 700;
    border-radius: 6px;
    padding: 6px 16px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.btn-quotation-add:hover {
    background: #121212 !important;
    color: #ffffff !important;
    border-color: #121212 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px);
}
.btn-quotation-floating {
    background: #000000 !important;
    border: 1.5px solid #C19D60 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
    border-radius: 6px !important;
    transition: all 0.2s ease;
}
.btn-quotation-floating:hover {
    background: #1f1f1f !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}
.btn-quotation-submit {
    background: #000000 !important;
    border: 1.5px solid #000000 !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.2s ease;
}
.btn-quotation-submit:hover {
    background: #1f1f1f !important;
    border-color: #1f1f1f !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25) !important;
}
.pagination .page-item.active .page-link {
    background-color: #000000 !important;
    border-color: #000000 !important;
    color: #ffffff !important;
}
.pagination .page-link {
    color: #121212;
}

/* ==========================================================================
   Khống chế kích thước Icon Emoji SVG (WordPress Emoji)
   ========================================================================== */
img.emoji,
.description-text img.emoji,
.description-content-wrapper img.emoji,
.product-short-description img.emoji {
    display: inline-block !important;
    width: 1.2em !important;
    height: 1.2em !important;
    max-width: 1.2em !important;
    max-height: 1.2em !important;
    vertical-align: -0.15em !important;
    margin: 0 0.25em !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    object-fit: contain !important;
}
