/* ==========================================
   EVEON Product Detail Page - CSS
   Responsive: Desktop + Mobile
   ========================================== */

/* --- CSS Variables (inherit from main styles.css) --- */
:root {
    --pd-primary: #1a3a6b;
    --pd-primary-dark: #0d1e3d;
    --pd-accent-gold: #c8982e;
    --pd-text: #333;
    --pd-text-light: #666;
    --pd-text-muted: #999;
    --pd-border: #e8ecf1;
    --pd-bg: #f8f9fb;
    --pd-white: #fff;
    --pd-red: #dc2f02;
    --pd-green: #16a34a;
    --pd-radius: 8px;
    --pd-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* ==========================================
   BREADCRUMB
   ========================================== */
.pd-breadcrumb {
    padding: 0.75rem 0;
    font-size: 0.82rem;
    color: var(--pd-text-muted);
    background: var(--pd-white);
    border-bottom: 1px solid var(--pd-border);
}

.pd-breadcrumb a {
    color: var(--pd-text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.pd-breadcrumb a:hover {
    color: var(--pd-primary);
}

.pd-breadcrumb .separator {
    margin: 0 0.4rem;
    color: #ccc;
}

.pd-breadcrumb .current {
    color: var(--pd-primary);
    font-weight: 600;
}

/* ==========================================
   PRODUCT TOP SECTION (Gallery + Info)
   ========================================== */
.pd-product-section {
    padding: 1.5rem 0 2rem;
    background: var(--pd-white);
}

.pd-product-grid {
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 2.5rem;
    align-items: start;
}

/* --- Gallery --- */
.pd-gallery {
    position: sticky;
    top: 80px;
}

.pd-gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}


.pd-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #ffffff;
    display: none;
    transition: opacity 0.3s ease;
}


.pd-gallery-main img.active {
    display: block;
}

.pd-gallery-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #dc2f02;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(220,47,2,0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pd-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    font-size: 0.85rem;
    color: #0b2559;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pd-gallery-arrow:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-50%) scale(1.08);
}

.pd-gallery-arrow.prev { left: 12px; }
.pd-gallery-arrow.next { right: 12px; }

.pd-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-behavior: smooth;
}

.pd-gallery-thumbs::-webkit-scrollbar {
    height: 4px;
}

.pd-gallery-thumbs::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.pd-thumb {
    width: 68px;
    height: 68px;
    min-width: 68px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.7;
    background: #ffffff;
}

.pd-thumb.active {
    border-color: #0b2559;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(11,37,89,0.2);
}

.pd-thumb:hover {
    opacity: 1;
    border-color: #0b2559;
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.pd-thumb-video {
    position: relative;
}

.pd-thumb-video::after {
    content: '';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
}

.pd-thumb-video i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.2rem;
    z-index: 2;
}

/* --- Product Info --- */
.pd-info {
    padding-right: 1rem;
}

.pd-category-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--pd-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.4rem;
}

.pd-product-name {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--pd-primary-dark);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.pd-rating-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--pd-text-light);
    flex-wrap: wrap;
}

.pd-stars {
    color: #f59e0b;
    font-size: 0.9rem;
}

.pd-rating-score {
    font-weight: 700;
    color: var(--pd-primary-dark);
}

.pd-sold-count {
    color: var(--pd-text-muted);
}

.pd-divider-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ccc;
}

/* --- Price --- */
.pd-price-block {
    background: #fdf6ec;
    border-radius: var(--pd-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid #fce8d0;
}

.pd-price-sale {
    font-size: 1.9rem;
    font-weight: 900;
    color: #cc0000;
    margin-right: 0.75rem;
}

.pd-price-retail {
    font-size: 1rem;
    color: var(--pd-text-muted);
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.pd-price-discount {
    font-size: 0.82rem;
    font-weight: 700;
    color: #cc0000;
    background: #fee2e2;
    padding: 2px 8px;
    border-radius: 4px;
}

/* --- Variant Selectors --- */
.pd-variant-group {
    margin-bottom: 1rem;
}

.pd-variant-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--pd-text);
    margin-bottom: 0.5rem;
    display: block;
}

.pd-variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pd-variant-btn {
    padding: 0.5rem 1.1rem;
    border: 1.5px solid var(--pd-border);
    border-radius: 6px;
    background: var(--pd-white);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pd-text);
    transition: all 0.2s;
}

.pd-variant-btn:hover {
    border-color: #0b2559;
    color: #0b2559;
}

.pd-variant-btn.active {
    border-color: #0b2559;
    background: #0b2559;
    color: #fff;
}

/* --- Quantity --- */
.pd-qty-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.pd-qty-controls {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--pd-border);
    border-radius: 6px;
    overflow: hidden;
}

.pd-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f7fa;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--pd-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.pd-qty-btn:hover {
    background: #e8ecf1;
}

.pd-qty-num {
    width: 48px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pd-primary-dark);
    border-left: 1px solid var(--pd-border);
    border-right: 1px solid var(--pd-border);
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-stock-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pd-green);
}

.pd-stock-status i {
    font-size: 0.9rem;
}

/* --- Trust Badges (Matching Image 1: Light blue card) --- */
.pd-trust-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    padding: 1rem 1.2rem;
    background: #f4f8fd;
    border-radius: 8px;
    border: 1px solid #e0ecfb;
}

.pd-trust-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    color: var(--pd-text);
}

.pd-trust-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e0ecff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.pd-trust-text strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
}

.pd-trust-text span {
    font-size: 0.72rem;
    color: #64748b;
}

/* --- Action Buttons (Matching Image 1: Navy Buy Now + Golden Orange Add to Cart) --- */
.pd-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pd-btn-buy {
    flex: 1.2;
    padding: 0.85rem 1.5rem;
    background: #0b2559;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(11,37,89,0.25);
}

.pd-btn-buy:hover {
    background: #051636;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(11,37,89,0.35);
}

.pd-btn-buy .sub {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.85;
}

.pd-btn-cart {
    flex: 1.1;
    padding: 0.85rem 1.5rem;
    background: #f5b027;
    color: #0b2559;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(245,176,39,0.3);
}

.pd-btn-cart:hover {
    background: #e09b12;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(245,176,39,0.4);
}


/* --- Hotline + Share --- */
.pd-hotline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--pd-text-light);
    padding-top: 0.75rem;
    border-top: 1px solid var(--pd-border);
}

.pd-hotline-row a {
    color: var(--pd-primary);
    font-weight: 700;
    text-decoration: none;
}

.pd-share-icons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pd-share-icons a {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
    color: var(--pd-text-light);
    font-size: 0.8rem;
    transition: all 0.2s;
}

.pd-share-icons a:hover {
    background: var(--pd-primary);
    color: #fff;
}

/* ==========================================
   USP BAR (Ưu điểm nổi bật)
   ========================================== */
.pd-usp-bar {
    background: var(--pd-white);
    border-top: 1px solid var(--pd-border);
    border-bottom: 1px solid var(--pd-border);
    padding: 1rem 0;
}

.pd-usp-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

.pd-usp-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem;
    border-right: 1px solid var(--pd-border);
}

.pd-usp-item:last-child {
    border-right: none;
}

.pd-usp-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0ecff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pd-primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.pd-usp-text {
    font-size: 0.72rem;
    line-height: 1.3;
}

.pd-usp-text strong {
    display: block;
    font-weight: 700;
    color: var(--pd-primary-dark);
    font-size: 0.75rem;
}

.pd-usp-text span {
    color: var(--pd-text-muted);
}

/* ==========================================
   TABS SECTION
   ========================================== */
.pd-tabs-section {
    background: var(--pd-bg);
    padding: 0;
}

.pd-tabs-nav {
    display: flex;
    background: var(--pd-white);
    border-bottom: 2px solid var(--pd-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pd-tabs-nav::-webkit-scrollbar {
    display: none;
}

.pd-tab-btn {
    padding: 1rem 1.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--pd-text-light);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pd-tab-btn:hover {
    color: var(--pd-primary);
}

.pd-tab-btn.active {
    color: var(--pd-primary);
    border-bottom-color: var(--pd-primary);
}

.pd-tab-content {
    display: none;
    padding: 2rem 0;
}

.pd-tab-content.active {
    display: block;
}

/* Tab: Mô tả sản phẩm */
.pd-desc-content {
    background: var(--pd-white);
    border-radius: var(--pd-radius);
    padding: 2rem;
    box-shadow: var(--pd-shadow);
}

.pd-desc-content h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--pd-primary-dark);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.pd-desc-content p {
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--pd-text);
    margin-bottom: 1rem;
}

/* Container Card for Tabs (Matching Image 2) */
.pd-tabs-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border: 1px solid #eef2f6;
    margin-bottom: 2rem;
}

/* 3-Column Layout in Tab Description (Matching Image 2) */
.pd-desc-layout-3col {
    display: grid;
    grid-template-columns: 32% 38% 30%;
    gap: 1.5rem;
    align-items: start;
}

.pd-desc-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: #0b2559;
    margin-bottom: 0.75rem;
}

.pd-desc-text {
    font-size: 0.82rem;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 1rem;
}

.pd-desc-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.pd-desc-checklist li {
    font-size: 0.82rem;
    color: #1e293b;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pd-desc-checklist li i {
    color: #1d4ed8;
    font-size: 0.9rem;
}

.pd-desc-col-diagram {
    background: #ffffff;
    border-radius: 12px;
    padding: 0.5rem;
}

.pd-diagram-flex {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pd-diagram-main-img {
    width: 60%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.pd-diagram-pointer-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 40%;
}

.pd-pointer-item {
    font-size: 0.78rem;
    line-height: 1.3;
}

.pd-pointer-title {
    display: block;
    color: #0b2559;
    font-weight: 800;
}

.pd-pointer-sub {
    color: #64748b;
    font-size: 0.72rem;
}

.pd-desc-col-video {
    background: #ffffff;
    border-radius: 12px;
    padding: 0;
}

.pd-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.pd-video-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.pd-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    color: #0b2559;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.pd-video-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: #ffffff;
}

.pd-video-time {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.pd-video-thumbs-row {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.pd-video-thumbs-row img {
    width: 23%;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.65;
    border: 1.5px solid transparent;
}

.pd-video-thumbs-row img.active,
.pd-video-thumbs-row img:hover {
    opacity: 1;
    border-color: #0b2559;
}

/* Dedicated Reviews Section (Matching Image 2) */
.pd-reviews-section {
    margin-top: 1rem;
    margin-bottom: 2.5rem;
}

.pd-reviews-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border: 1px solid #eef2f6;
}

.pd-reviews-section-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: #0b2559;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
}

.pd-reviews-main-grid {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 2rem;
    align-items: start;
}

.pd-reviews-score-col {
    background: #ffffff;
    padding: 0.5rem 0;
}

.pd-score-num {
    font-size: 2.6rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
}

.pd-score-num .max {
    font-size: 1rem;
    color: #94a3b8;
    font-weight: 600;
}

.pd-stars-yellow {
    color: #f59e0b;
    font-size: 0.85rem;
    margin: 0.4rem 0;
}

.pd-reviews-bars-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0.75rem 0;
}

.pd-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
}

.pd-bar-track {
    flex: 1;
    height: 5px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.pd-bar-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: 3px;
}

.pd-total-count-text {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.4rem;
}

/* Safety overflow container */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

.pd-reviews-cards-col {
    position: relative;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.pd-reviews-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    min-width: 0;
}


.pd-review-card-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 0.85rem;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pd-review-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.pd-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0b2559;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.pd-user-meta {
    line-height: 1.2;
}

.pd-user-name {
    font-size: 0.78rem;
    color: #0f172a;
    display: block;
}

.pd-review-date {
    font-size: 0.68rem;
    color: #94a3b8;
}

.pd-review-stars {
    color: #f59e0b;
    font-size: 0.7rem;
    margin-bottom: 0.4rem;
}

.pd-review-comment {
    font-size: 0.75rem;
    line-height: 1.4;
    color: #334155;
    margin-bottom: 0.75rem;
    flex: 1;
}

.pd-review-photos {
    display: flex;
    gap: 4px;
}

.pd-review-photos img {
    width: 31%;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.pd-photo-more {
    position: relative;
    width: 31%;
    height: 40px;
}

.pd-photo-more img {
    width: 100%;
    height: 100%;
}

.pd-more-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,0.65);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.pd-reviews-next-arrow {
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    color: #0b2559;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    z-index: 2;
}



.pd-desc-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.pd-desc-content ul li {
    padding: 0.35rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
    color: var(--pd-text);
}

.pd-desc-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--pd-primary);
    font-weight: 700;
}

.pd-desc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
    align-items: center;
}

.pd-desc-img {
    width: 100%;
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
}

.pd-desc-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.pd-desc-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--pd-text);
    background: #f0f7ff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.pd-desc-feature i {
    color: var(--pd-primary);
    font-size: 0.9rem;
}

/* Tab: Thông số kỹ thuật */
.pd-specs-table {
    width: 100%;
    background: var(--pd-white);
    border-radius: var(--pd-radius);
    overflow: hidden;
    box-shadow: var(--pd-shadow);
}

.pd-specs-table tr {
    border-bottom: 1px solid var(--pd-border);
}

.pd-specs-table tr:last-child {
    border-bottom: none;
}

.pd-specs-table td {
    padding: 0.85rem 1.25rem;
    font-size: 0.88rem;
    color: var(--pd-text);
}

.pd-specs-table td:first-child {
    font-weight: 700;
    color: var(--pd-primary-dark);
    width: 35%;
    background: #f8fafc;
}

/* Tab: Chính sách */
.pd-policy-content {
    background: var(--pd-white);
    border-radius: var(--pd-radius);
    padding: 2rem;
    box-shadow: var(--pd-shadow);
}

.pd-policy-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--pd-border);
}

.pd-policy-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.pd-policy-item h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pd-primary-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pd-policy-item h4 i {
    color: var(--pd-primary);
}

.pd-policy-item p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--pd-text);
}

/* ==========================================
   REVIEWS SECTION
   ========================================== */
.pd-reviews-section {
    padding: 2rem 0;
    background: var(--pd-bg);
}

.pd-reviews-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    background: var(--pd-white);
    padding: 1.5rem;
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
}

.pd-reviews-score {
    text-align: center;
    min-width: 120px;
}

.pd-reviews-score .score {
    font-size: 3rem;
    font-weight: 900;
    color: var(--pd-primary-dark);
    line-height: 1;
}

.pd-reviews-score .score sub {
    font-size: 1.2rem;
    color: var(--pd-text-muted);
    font-weight: 400;
}

.pd-reviews-score .total {
    font-size: 0.8rem;
    color: var(--pd-text-muted);
}

.pd-reviews-bars {
    flex: 1;
}

.pd-bar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
}

.pd-bar-label {
    width: 14px;
    text-align: right;
    font-weight: 600;
    color: var(--pd-text);
}

.pd-bar-track {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.pd-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #eab308);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.pd-bar-count {
    width: 28px;
    font-size: 0.75rem;
    color: var(--pd-text-muted);
}

/* Review cards */
.pd-reviews-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.pd-review-card {
    background: var(--pd-white);
    border-radius: var(--pd-radius);
    padding: 1.25rem;
    box-shadow: var(--pd-shadow);
}

.pd-review-top {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.pd-review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0ecff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pd-primary);
    font-weight: 700;
    font-size: 0.85rem;
}

.pd-review-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--pd-primary-dark);
}

.pd-review-date {
    font-size: 0.72rem;
    color: var(--pd-text-muted);
}

.pd-review-stars {
    color: #f59e0b;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.pd-review-text {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--pd-text);
}

.pd-review-images {
    display: flex;
    gap: 6px;
    margin-top: 0.75rem;
}

.pd-review-images img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--pd-border);
}

/* ==========================================
   FAQ SECTION
   ========================================== */
.pd-faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.pd-faq-item {
    background: var(--pd-white);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    overflow: hidden;
}

.pd-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--pd-primary-dark);
    transition: background 0.2s;
}

.pd-faq-question:hover {
    background: #f8fafc;
}

.pd-faq-question i {
    font-size: 0.75rem;
    color: var(--pd-text-muted);
    transition: transform 0.3s;
}

.pd-faq-item.open .pd-faq-question i {
    transform: rotate(180deg);
}

.pd-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.pd-faq-item.open .pd-faq-answer {
    max-height: 200px;
}

.pd-faq-answer-inner {
    padding: 0 1.25rem 1rem;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--pd-text-light);
}

/* ==========================================
   RELATED PRODUCTS
   ========================================== */
.pd-related-section {
    padding: 2rem 0;
    background: var(--pd-bg);
}

.pd-section-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--pd-primary-dark);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pd-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.pd-related-card {
    background: var(--pd-white);
    border-radius: var(--pd-radius);
    overflow: hidden;
    box-shadow: var(--pd-shadow);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.pd-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.pd-related-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.pd-related-info {
    padding: 1rem;
}

.pd-related-cat {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--pd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pd-related-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--pd-primary-dark);
    margin: 0.3rem 0;
    line-height: 1.3;
}

.pd-related-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--pd-red);
}

.pd-related-price .old {
    font-size: 0.75rem;
    color: var(--pd-text-muted);
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 0.3rem;
}

.pd-related-btn {
    display: block;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--pd-primary);
    border-top: 1px solid var(--pd-border);
    transition: all 0.2s;
}

.pd-related-card:hover .pd-related-btn {
    background: var(--pd-primary);
    color: #fff;
}

/* ==========================================
   MOBILE STICKY BOTTOM BAR
   ========================================== */
.pd-mobile-bar {
    display: none;
    position: fixed;
    bottom: 60px !important;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    background: var(--pd-white);
    border-top: 1px solid var(--pd-border);
    padding: 0.4rem 0.5rem;
    z-index: 99998 !important;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.pd-mobile-bar-inner {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.35rem;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    box-sizing: border-box;
}

.pd-mobile-action {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 0.3rem 0.45rem;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--pd-primary);
    background: none;
    border: 1px solid var(--pd-border);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.pd-mobile-action i {
    font-size: 0.85rem;
}

.pd-mobile-action:hover {
    background: #f0f7ff;
}

.pd-mobile-buy {
    flex: 1 1 0%;
    min-width: 0;
    padding: 0.5rem 0.4rem;
    background: linear-gradient(135deg, #e85d04 0%, #dc2f02 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 14px rgba(220,47,2,0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.pd-mobile-buy .sub {
    font-size: 0.6rem;
    font-weight: 400;
    opacity: 0.95;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ==========================================
   RESPONSIVE - TABLET (≤1024px)
   ========================================== */
@media (max-width: 1024px) {
    .pd-product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .pd-gallery {
        position: static;
    }

    .pd-gallery-main {
        aspect-ratio: 1 / 1;
        max-height: 450px;
    }

    .pd-info {
        padding-right: 0;
    }

    .pd-usp-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pd-usp-item {
        border-right: none;
    }

    .pd-desc-layout-3col {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .pd-diagram-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .pd-diagram-main-img {
        width: 100%;
        max-width: 320px;
    }

    .pd-diagram-pointer-list {
        width: 100%;
    }

    .pd-reviews-main-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .pd-reviews-cards-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 0.75rem !important;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
    }
    .pd-review-card-item {
        flex: 0 0 280px !important;
        min-width: 270px !important;
        scroll-snap-align: start;
    }


    .pd-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Show header actions on tablet */
    body .header-actions-new {
        display: flex !important;
    }
    body .header-actions-new .header-phone-box {
        display: none;
    }
    body .header-actions-new .btn-buy-now {
        display: none;
    }
}

/* ==========================================
   RESPONSIVE - MOBILE (≤768px)
   ========================================== */
@media (max-width: 768px) {
    .pd-page-content {
        padding-bottom: 130px;
    }

    .pd-product-section {
        padding: 0.75rem 0;
    }

    /* Breadcrumb */
    .pd-breadcrumb {
        padding: 0.5rem 0;
        font-size: 0.75rem;
    }

    .pd-breadcrumb .container {
        padding: 0 0.75rem;
    }

    /* Gallery */
    .pd-gallery-main {
        aspect-ratio: 4 / 3;
        width: 100%;
        height: auto;
        max-height: 320px;
        background: #ffffff;
        border-radius: 12px;
        overflow: hidden;
    }

    .pd-gallery-main img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: #ffffff;
    }

    .pd-gallery-arrow {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .pd-gallery-arrow.prev { left: 6px; }
    .pd-gallery-arrow.next { right: 6px; }

    .pd-gallery-badge {
        top: 8px;
        left: 8px;
        font-size: 0.68rem;
        padding: 3px 8px;
    }

    .pd-gallery-thumbs {
        padding: 0 0.5rem;
        margin-top: 10px;
        gap: 8px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .pd-thumb {
        width: 56px;
        height: 56px;
        min-width: 56px;
        border-radius: 8px;
        overflow: hidden;
        flex-shrink: 0;
    }

    .pd-thumb img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: #ffffff;
    }

    /* Product Info */
    .pd-info {
        padding: 0 0.75rem;
    }

    .pd-category-label {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    .pd-product-name {
        font-size: 1.25rem;
        line-height: 1.35;
        margin-bottom: 0.4rem;
    }

    .pd-rating-row {
        font-size: 0.78rem;
        gap: 0.4rem;
        margin-bottom: 0.75rem;
    }

    .pd-stars {
        font-size: 0.8rem;
    }

    /* Price */
    .pd-price-block {
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
    }

    .pd-price-sale {
        font-size: 1.45rem;
    }

    .pd-price-retail {
        font-size: 0.85rem;
    }

    .pd-price-discount {
        font-size: 0.75rem;
        padding: 2px 6px;
    }

    /* Variants */
    .pd-variant-group {
        margin-bottom: 0.75rem;
    }

    .pd-variant-label {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }

    .pd-variant-options {
        gap: 0.4rem;
    }

    .pd-variant-btn {
        padding: 0.45rem 0.9rem;
        font-size: 0.78rem;
    }

    /* Quantity */
    .pd-qty-row {
        gap: 0.75rem;
        margin-bottom: 1rem;
        flex-wrap: wrap;
    }

    .pd-qty-btn {
        width: 32px;
        height: 32px;
    }

    .pd-qty-num {
        min-width: 36px;
        font-size: 0.95rem;
    }

    /* Trust badges */
    .pd-trust-badges {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .pd-trust-item {
        padding: 0.5rem;
    }

    .pd-trust-icon {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .pd-trust-text strong {
        font-size: 0.72rem;
    }

    .pd-trust-text span {
        font-size: 0.65rem;
    }

    /* Action Buttons - hide on mobile, use sticky bar */
    .pd-actions {
        display: none;
    }

    /* Hotline row */
    .pd-hotline-row {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.78rem;
        padding: 0.75rem 0;
    }

    /* USP Bar - Hidden on Mobile, Desktop intact */
    .pd-usp-bar {
        display: none !important;
    }

    .pd-tabs-section {
        margin-top: 0.5rem !important;
        padding-top: 0 !important;
    }



    /* Tab navigation - horizontal scroll */
    .pd-tabs-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .pd-tabs-nav {
        padding: 0 0.25rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        white-space: nowrap;
        flex-wrap: nowrap;
        gap: 0;
        margin-bottom: 1rem;
    }

    .pd-tabs-nav::-webkit-scrollbar {
        display: none;
    }

    .pd-tab-btn {
        padding: 0.6rem 0.75rem;
        font-size: 0.75rem;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .pd-tab-content {
        padding: 0.5rem 0;
    }

    /* Description Tab Mobile */
    .pd-desc-layout-3col {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .pd-desc-col-diagram {
        padding: 0;
    }

    .pd-diagram-flex {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .pd-diagram-main-img {
        width: 100%;
        max-width: 280px;
    }

    .pd-diagram-pointer-list {
        width: 100%;
        gap: 0.5rem;
    }

    .pd-desc-col-video {
        padding: 0;
    }

    .pd-video-thumbs-row img {
        height: 40px;
    }

    /* Reviews Section Mobile - CÙNG 1 HÀNG (Vuốt ngang) */
    .pd-reviews-card {
        padding: 1rem;
        border-radius: 12px;
        overflow: hidden;
    }

    .pd-reviews-main-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .pd-reviews-cards-col {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .pd-reviews-cards-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 0.75rem !important;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .pd-reviews-cards-grid::-webkit-scrollbar {
        display: none;
    }

    .pd-review-card-item {
        flex: 0 0 280px !important;
        min-width: 270px !important;
        scroll-snap-align: start;
    }

    .pd-reviews-next-arrow {
        display: none;
    }



    /* Mobile Sticky Bottom Bar */
    .pd-mobile-bar {
        display: block;
    }

    .pd-mobile-bar-inner {
        display: flex;
        gap: 0.4rem;
        align-items: center;
    }

    .pd-mobile-action {
        flex: 0 0 auto;
    }

    .pd-mobile-buy {
        flex: 1;
        min-width: 0;
    }
}


/* ==========================================
   RESPONSIVE - SMALL MOBILE (≤480px)
   ========================================== */
@media (max-width: 480px) {
    .pd-gallery-main {
        aspect-ratio: 4 / 3;
        max-height: 260px;
    }


    .pd-thumb {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }

    .pd-product-name {
        font-size: 1.1rem;
    }

    .pd-price-sale {
        font-size: 1.25rem;
    }

    .pd-price-retail {
        font-size: 0.78rem;
    }

    .pd-variant-btn {
        padding: 0.35rem 0.65rem;
        font-size: 0.73rem;
    }

    .pd-trust-badges {
        grid-template-columns: 1fr;
    }

    .pd-usp-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pd-usp-item {
        padding: 0.3rem 0.15rem;
    }

    .pd-usp-text strong {
        font-size: 0.68rem;
    }

    .pd-usp-text span {
        font-size: 0.58rem;
    }

    .pd-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }

    .pd-related-img {
        height: 110px;
    }

    .pd-related-cat {
        font-size: 0.55rem;
    }

    .pd-related-name {
        font-size: 0.72rem;
    }

    .pd-related-price {
        font-size: 0.72rem;
    }

    .pd-mobile-bar-inner {
        gap: 0.35rem;
    }

    .pd-mobile-action {
        padding: 0.3rem 0.5rem;
        font-size: 0.6rem;
    }

    .pd-mobile-action i {
        font-size: 0.85rem;
    }

    .pd-mobile-buy {
        font-size: 0.82rem;
        padding: 0.6rem;
    }

    .pd-mobile-buy .sub {
        font-size: 0.62rem;
    }

    /* Tab buttons even smaller */
    .pd-tab-btn {
        padding: 0.6rem 0.6rem;
        font-size: 0.68rem;
    }

    /* Reviews score */
    .pd-reviews-score .score {
        font-size: 2rem;
    }
}

/* ==========================================
   RESPONSIVE - VERY SMALL MOBILE (≤360px)
   ========================================== */
@media (max-width: 360px) {
    .pd-product-name {
        font-size: 1rem;
    }

    .pd-price-sale {
        font-size: 1.15rem;
    }

    .pd-category-label {
        font-size: 0.65rem;
    }

    .pd-variant-btn {
        padding: 0.3rem 0.55rem;
        font-size: 0.7rem;
    }

    .pd-trust-text strong {
        font-size: 0.68rem;
    }

    .pd-trust-text span {
        font-size: 0.6rem;
    }

    .pd-mobile-action {
        padding: 0.25rem 0.4rem;
        font-size: 0.55rem;
    }
}
