/* ================== BASE ================== */

h3{
    margin-top: 15px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ================== BREADCRUMB ================== */
.breadcrumb {
    font-size: 16px;
    /*color: #888;*/
    padding: 16px 0;
}

.breadcrumb a {
    /*color: #666;*/
}

/* ================== PRODUCT MAIN ================== */
.product-detail {
    padding: 24px 0 40px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
}

/* -------- Gallery -------- */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-main-image {
    width: 100%;
    height: 420px;
    object-fit: contain; /* Giúp ảnh tự căn chỉnh tỉ lệ, không bị méo */
    
    display: block;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee; /* Thêm viền nhẹ để ảnh nổi bật hơn */
}

.product-thumbs {
    display: flex;
    gap: 12px;
}

.product-thumbs img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
}

.product-thumbs img.active {
    border-color: #5a4636;
}

/* -------- Info -------- */
.product-info h1 {
    font-size: 35px;
    margin-bottom: 4px;
}

.product-tag {
    font-size: 16px;
    color: #b08968;
}

.product-desc {
    margin: 16px 0 24px;
    /*color: #555;*/
    line-height: 1.6;
    border-bottom: 2px solid #BEA48E;
    padding-bottom: 12px;
}

/* ================== QUICK SPEC ================== */
.product-quick-spec {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.spec-group label {
    font-size: 16px;
    font-weight:bold;
    color: #777;
    margin-bottom: 6px;
    display: block;
}

.spec-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.spec-options span {
    font-size: 16px;
    padding: 6px 10px;
    background: #f1e7dc;
    border-radius: 6px;
}

.spec-btn {
    pointer-events: none;
    border: none;
    background: #f1e7dc;
    padding: 6px 12px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all .2s ease;
}

.spec-btn.active {
    background: #5a4636;
    color: #fff;
}
.gallery-wrapper {
    position: relative;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 25px;
}

.gallery-btn.prev {
    left: 10px;
}

.gallery-btn.next {
    right: 10px;
}


/* ================== BUTTON ================== */
.btn-primary {
    width: 100%;
    display: inline-block;
    margin-top: 24px;
    padding: 12px 28px;
    text-align: center;
    background: linear-gradient(272deg, #513C2E 0%, #746456 100%);
    color: #fff;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: #6a503c;
}
/* ================== TABS ================== */
.product-tabs {
    margin-top: 40px;
}

.tabs-header {
    border-bottom: 1px solid #BEA48E;
    display: flex;
    gap: 24px;
}

.tabs-header button {
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 18px;
    color: #777;
    cursor: pointer;
}

.tabs-header button.active {
    color: var(--primary-dark);
    font-weight: bold;
    border-bottom: 2px solid #5a4636;
}

/* ================== TAB CONTENT ================== */

.product-spec-table tr:nth-child(odd) {
    background: #ffffff;
}

.product-spec-table tr:nth-child(even) {
    background: linear-gradient(95deg, #F7F2EE 0%, #FFFFFF 100%);
}



.product-detail-content {
    padding-top: 32px;
}
.tab-content p, li{
    font-size: 18px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ================== BOTTOM ================== */
.product-detail-bottom {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* -------- Spec table -------- */
.product-spec-table table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #BEA48E; /* viền ngoài bảng */
    overflow: hidden;
}

.product-spec-table td {
    padding: 12px 16px;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.product-spec-table td:first-child {
    width: 30%;
    color: #666;
}

.product-spec-table ul {
    padding: 0;
    margin: 0;
}

/* -------- Applications -------- */
.app-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.app-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #fff;
    border-radius: 999px;
    border: 1px solid #e0d3c5;
    font-size: 16px;
}

.app-tag img {
    width: 18px;
    height: 18px;
    display: block;
}

/* ================== RELATED ================== */
.related-products {
    margin-top: 60px;
    padding-bottom: 40px;
}

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

.product-card {
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    transition: transform .2s ease, box-shadow .2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

.product-card img {
    width: 100%;
    border-radius: 6px;
}

.product-card h4 {
    font-size: 14px;
    margin-top: 8px;
}

/* ================== RESPONSIVE ================== */
@media (max-width: 992px) {
    .product-detail-grid,
    .product-detail-bottom {
        grid-template-columns: 1fr;
    }

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

/* ô */
.product-spec-table td {
    padding: 14px 18px;
    vertical-align: top;
    border-bottom: 1px solid #e6d2c2;
}

/* bỏ border dòng cuối */
.product-spec-table tr:last-child td {
    border-bottom: none;
}

/* cột trái */
.product-spec-table td:first-child {
    width: 30%;
    font-weight: bold;
    color: #5a3e2b;
}

.product-spec-table li {
    list-style: none;
    margin-bottom: 6px;
}

/* ================== RESPONSIVE OVERRIDE ================== */

/* Tablet */
@media (max-width: 992px) {

    .product-detail-grid,
    .product-detail-bottom {
        grid-template-columns: 1fr;
        gap: 32px;
    }

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

/* Mobile */
@media (max-width: 768px) {

    /* spacing tổng */
    .product-detail {
        padding: 16px 0 24px;
    }

    .product-detail-grid {
        gap: 24px;
    }

    /* gallery */
    .product-main-image {
        height: 260px;
        border-radius: 6px;
    }

    .product-thumbs {
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .product-thumbs img {
        width: 56px;
        height: 56px;
        flex-shrink: 0;
    }

    .gallery-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    /* info */
    .product-info h1 {
        font-size: 22px;
        line-height: 1.3;
    }

    .product-desc {
        font-size: 14px;
        margin: 12px 0 16px;
    }

    /* quick spec */
    .spec-options {
        gap: 6px;
    }

    .spec-btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    /* CTA */
    .btn-primary {
        padding: 14px 16px;
        font-size: 15px;
        border-radius: 10px;
    }

    /* tabs */
    .tabs-header {
        gap: 16px;
    }

    .tabs-header button {
        font-size: 13px;
        padding: 10px 0;
    }

    /* bottom section */
    .product-detail-bottom {
        gap: 24px;
    }

    /* spec table */
    .product-spec-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .product-spec-table td:first-child {
        width: 40%;
    }

    /* applications */
    .app-tags {
        gap: 8px;
    }

    .app-tag {
        font-size: 12px;
        padding: 6px 10px;
    }

    /* related */
    .related-products {
        margin-top: 40px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    h3{
        margin-top: 5px;
    }
}