/* ================================================
   Product Detail — Hero 2 Column + Gallery + Body
   ================================================ */

/* Container override for product detail */

.product-detail-breadcrumb-wrapper .container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Override Flatsome page title (ẩn title banner cũ) */
.shop-page-title { display: none !important; }

/* ================================================
   HERO: 2 CỘT
   ================================================ */
.product-detail-hero {
    display: grid;
    grid-template-columns: minmax(300px, 55%) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
    padding: 30px 15px 0;
    max-width: 1320px;
    margin: 0 auto;
}

/* ================================================
   GALLERY — ẢNH CHÍNH + THUMBNAIL STRIP
   ================================================ */
.product-detail-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Ảnh chính */
.product-gallery-main {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    border: 1px solid #ececec;
}

.product-gallery-main a,
.product-gallery-main img {
    display: block;
    width: 100%;
    height: auto;
}

.gallery-main-link {
    cursor: zoom-in;
}

/* Placeholder */
.product-gallery-placeholder {
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-gallery-placeholder img {
    max-height: 400px;
    opacity: 0.4;
}

/* Nav buttons (prev/next) */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 2;
    opacity: 0;
}

.gallery-nav-btn:hover {
    background: rgba(41, 179, 75, 0.9);
    opacity: 1;
}

.product-gallery-main:hover .gallery-nav-btn {
    opacity: 1;
}

.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.gallery-nav-btn:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed;
}

/* Thumbnail strip */
.product-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.product-gallery-thumbs::-webkit-scrollbar {
    height: 5px;
}

.product-gallery-thumbs::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.product-gallery-thumbs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.thumb-btn {
    flex-shrink: 0;
    width: 76px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: border-color 0.2s ease, opacity 0.2s ease;
    opacity: 0.65;
}

.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-btn:hover {
    opacity: 0.85;
    border-color: #aaa;
}

.thumb-btn.active {
    opacity: 1;
    border-color: #00af50;
}

/* ================================================
   META PANEL — CỘT PHẢI
   ================================================ */
.product-detail-meta-panel {
    padding: 8px 0 0;
}

.product-detail-name {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    color: #133f74;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: -0.3px;
}

.product-detail-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 14px;
}

.product-detail-brand .brand-label {
    color: #888;
    font-weight: 500;
}

.product-detail-brand .brand-name {
    color: #00af50;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-detail-excerpt {
    font-size: 15px;
    line-height: 1.75;
    color: #555;
    margin-bottom: 24px;
}

.product-detail-price-block {
    margin-bottom: 20px;
}

.product-price-sale {
    font-size: 32px;
    font-weight: 700;
    color: #00af50;
    line-height: 1.2;
}

.product-price-contact {
    font-size: 20px;
    font-weight: 600;
    color: #d11f2f;
}

.product-detail-contact {
    margin-bottom: 20px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #00af50;
    color: #fff !important;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.25s ease;
    border: none;
}

.contact-btn:hover {
    background: #1e8a3a;
    color: #fff !important;
}

.product-detail-share {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.product-detail-share .share-label {
    font-size: 13px;
    color: #888;
    margin: 0 0 10px;
    font-weight: 500;
}

.product-detail-share .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #ddd;
    color: #555;
    margin: 0 4px 0 0;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 15px;
}

.product-detail-share .social-icons a:hover {
    background: #00af50;
    border-color: #00af50;
    color: #fff;
}

/* ================================================
   BODY: NỘI DUNG CHI TIẾT FULL-WIDTH
   ================================================ */
.product-detail-body-wrapper {
    padding: 40px 0 0;
}

.product-detail-body-wrapper .container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
}

.product-detail-body {
    color: #333;
    font-size: 15px;
    line-height: 1.75;
}

.product-body-content > h2:first-child,
.product-body-content > h3:first-child {
    margin-top: 0 !important;
}

.product-body-content h2 {
    font-size: 22px;
    line-height: 1.35;
    font-weight: 700;
    color: #00af50;
    text-transform: none;
    margin: 32px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #00af50;
}

.product-body-content h3 {
    font-size: 18px;
    line-height: 1.4;
    font-weight: 600;
    color: #133f74;
    margin: 26px 0 12px;
}

.product-body-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 22px 0 10px;
}

.product-body-content p {
    margin: 0 0 14px;
    color: #444;
}

.product-body-content ul,
.product-body-content ol {
    margin: 0 0 16px;
    padding-left: 22px;
}

.product-body-content li {
    margin-bottom: 6px;
}

.product-body-content a {
    color: #00af50;
    text-decoration: none;
}

.product-body-content a:hover {
    text-decoration: underline;
}

/* Bảng metadata — phong cách dự án nội thất */
.product-body-content table,
.product-body-content table.product-meta-table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0 24px;
    font-size: 14px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 6px;
    overflow: hidden;
}

.product-body-content table thead th {
    background: #fafafa;
    color: #888;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid #ececec;
    border-top: none;
}

.product-body-content table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    border-top: none;
    vertical-align: top;
    color: #333;
    line-height: 1.6;
}

.product-body-content table tbody tr:last-child td {
    border-bottom: none;
}

.product-body-content table tbody td:first-child {
    color: #333;
    font-weight: 500;
    width: 32%;
    background: #fdfdfd;
}

/* Ảnh trong body */
.product-body-content figure {
    margin: 18px 0;
}

.product-body-content figure img {
    display: block;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #eee;
}

.product-body-content figcaption {
    margin-top: 8px;
    font-size: 13px;
    color: #888;
    text-align: center;
    font-style: italic;
}

.product-body-content img.aligncenter,
.product-body-content img[class*="align"] {
    display: block;
    margin: 18px auto;
}

.product-body-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #eee;
}

.product-body-content blockquote {
    margin: 18px 0;
    padding: 14px 18px;
    background: #f9fbf9;
    border-left: 3px solid #00af50;
    color: #444;
    font-style: italic;
    border-radius: 0 6px 6px 0;
}

/* ================================================
   SẢN PHẨM LIÊN QUAN
   ================================================ */
.product-detail-related-wrapper {
    padding: 50px 0 20px;
}

.product-detail-related-wrapper .container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
}

.portfolio-related-title {
    font-size: 22px;
    font-weight: 700;
    color: #133f74;
    margin: 0 0 20px;
    text-transform: uppercase;
    letter-spacing: -0.3px;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 991px) {
    .product-detail-hero {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 20px;
    }

    .product-detail-gallery {
        order: 1;
    }

    .product-detail-meta-panel {
        order: 2;
        padding-top: 0;
    }

    .gallery-slide img {
        max-height: 360px;
    }

    .product-detail-name {
        font-size: 22px;
    }

    .product-price-sale {
        font-size: 26px;
    }
}

@media (max-width: 600px) {
    .product-detail-hero {
        gap: 18px;
        padding-top: 14px;
    }

    .product-detail-breadcrumb-wrapper {
        padding-top: 12px;
    }

    .gallery-slide img {
        max-height: 260px;
    }

    .thumb-btn {
        width: 60px;
        height: 44px;
    }

    .product-detail-name {
        font-size: 20px;
    }

    .product-price-sale {
        font-size: 24px;
    }

    .contact-btn {
        padding: 10px 22px;
        font-size: 14px;
    }

    .product-body-content table,
    .product-body-content table.product-meta-table {
        font-size: 13px;
    }

    .product-body-content table thead th,
    .product-body-content table tbody td {
        padding: 10px 12px;
    }

    .product-body-content table tbody td:first-child {
        width: 38%;
    }

    .product-detail-related-wrapper {
        padding-top: 36px;
    }

    .portfolio-related-title {
        font-size: 18px;
    }
}
