/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', sans-serif;
    background-color: #fcf8f9;
    color: #1b0d11;
    line-height: 1.6;
}

/* Header */
.page-wrapper {
    min-height: 100vh;
}

header {
    background: white;
    border-bottom: 1px solid #f3e7ea;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #1b0d11;
}

.logo .material-symbols-outlined {
    font-size: 2rem;
    color: #ee2b5b;
}

.logo h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #1b0d11;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

.nav-link.active {
    color: #ee2b5b;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #f3e7ea;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    margin-top: 0.5rem;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
}

.dropdown-content {
    padding: 0.5rem;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #1b0d11;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f3e7ea;
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f3e7ea;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    gap: 0.5rem;
}

.search-box .material-symbols-outlined {
    color: #9a4c5f;
}

.search-input {
    border: none;
    background: transparent;
    outline: none;
    width: 200px;
    color: #1b0d11;
}

.search-input::placeholder {
    color: #9a4c5f;
}

.icon-buttons {
    display: flex;
    gap: 0.5rem;
}

.icon-button {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: #f3e7ea;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.icon-button:hover {
    background: #ead4da;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ee2b5b;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Main Content */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #9a4c5f;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #ee2b5b;
}

.breadcrumb .current {
    color: #1b0d11;
    font-weight: 600;
}

/* Product Detail Container */
.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;

    /* Card Styles */
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Product Images */
.product-images {
    display: flex;
    flex-direction: row-reverse;
    /* Main image on right, but HTML order is Main then Thumbnails. Wait. */
    /* Accessing HTML structure from previous file view: 
       I moved thumbails BEFORE main image in the blade file. 
       So flex-direction: row will put thumbnails Left, Main Right. Correct.
    */
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
}

.thumbnail-images {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 90px;
    flex-shrink: 0;
}

.thumbnail {
    width: 100%;
    aspect-ratio: 1;
    /* Keep square */
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    border: 2px solid transparent;
    /* Match reference clean look */
    cursor: pointer;
    transition: all 0.2s;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #ee2b5b;
}

.main-image {
    flex: 1;
    /* aspect-ratio: 3/4;  Or keep it flexible/square based on content */
    height: 500px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 8px;
    border: 1px solid #f3e7ea;
}

/* Responsive adjustment for images */
@media (max-width: 768px) {
    .product-images {
        flex-direction: column-reverse;
        /* Stack: Main on top, Thumbs bottom */
    }

    .thumbnail-images {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
    }

    .thumbnail {
        width: 70px;
        height: 70px;
    }

    .main-image {
        width: 100%;
        height: 350px;
    }
}

/* Product Info Detail */
.product-info-detail {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-title {
    font-size: 2rem;
    color: #1b0d11;
}

.product-title h1,
.product-title h2,
.product-title h3,
.product-title h4,
.product-title h5,
.product-title h6 {
    font-size: 1.6rem !important;
    font-weight: 800;
    margin: 0;
    line-height: 1.3;
}

.product-title p {
    font-size: 1rem !important;
    font-weight: 500;
    color: #64748b;
    margin: 5px 0 0 0;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stars {
    display: flex;
    gap: 0.25rem;
}

.star-filled {
    color: #ee2b5b;
    font-size: 1.25rem;
}

.rating-count {
    color: #9a4c5f;
    font-size: 0.9rem;
}


/* Price Group (New Design) */
.price-and-options-container {
    margin-bottom: 1.5rem;
}

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

.main-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 5px;
}

.current-price {
    font-size: 2rem;
    font-weight: 800;
    color: #ff5722;
    /* Orange-ish red */
}

.vat-note {
    font-size: 0.9rem;
    color: #555;
}

.market-price-row {
    font-size: 0.95rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}

.original-price {
    text-decoration: line-through;
    color: #777;
}

.savings {
    color: #ff5722;
}

/* Product Options */
.product-options {
    margin-top: 20px;
    border-top: 1px dashed #ddd;
    padding-top: 20px;
}

.option-group {
    margin-bottom: 20px;
}

.option-group label {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: #333;
}

.option-group label strong {
    color: #1b0d11;
}

.option-items {
    display: flex;
    gap: 12px;
}

.variant-item {
    width: 50px;
    height: 50px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
    transition: all 0.2s;
}

.variant-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

.variant-item.active {
    border: 2px solid #ff5722;
}

.size-item {
    padding: 8px 20px;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    transition: all 0.2s;
    background: white;
}

.size-item:hover {
    border-color: #ff5722;
}

.size-item.active {
    border: 1px solid #ff5722;
    color: #ff5722;
    background: #fff5f5;
}

.product-description {
    color: #9a4c5f;
    line-height: 1.8;
}

.product-features h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.product-features ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1b0d11;
}

.product-features .material-symbols-outlined {
    color: #15803d;
    font-size: 1.25rem;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-selector label {
    font-weight: 600;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #f3e7ea;
    border-radius: 0.5rem;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f3e7ea;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 700;
}

.qty-btn:hover {
    background: #ead4da;
}

.quantity-controls input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-weight: 600;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.product-actions a {
    text-decoration: none;
}

.btn-add-cart,
.btn-buy-now {
    flex: 1;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-add-cart {
    background: #ee2b5b;
    color: white;
}

.btn-add-cart:hover {
    background: #d91d4a;
}

.btn-buy-now {
    background: #1b0d11;
    color: white;
}

.btn-buy-now:hover {
    background: #2d1a1f;
}

.btn-wishlist {
    width: 56px;
    height: 56px;
    border: 2px solid #f3e7ea;
    background: white;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-wishlist:hover {
    border-color: #ee2b5b;
    color: #ee2b5b;
}

/* Product Meta */
.product-meta {
    padding-top: 1.5rem;
    border-top: 1px solid #f3e7ea;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-meta p {
    color: #9a4c5f;
    font-size: 0.9rem;
}

.product-meta strong {
    color: #1b0d11;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Product Tabs / Content Sections */
.product-tabs-nav {
    margin-bottom: 2rem;
    position: sticky;
    top: 70px;
    /* Adjust based on header height */
    z-index: 90;
    background: #fcf8f9;
    /* Match body bg to cover content when scrolling */
    padding: 1rem 0;
}

.tab-headers.sticky-nav {
    display: flex;
    gap: 2rem;
    border-bottom: 2px solid #f3e7ea;
    background: white;
    padding: 1rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.tab-link {
    padding: 0.5rem 0;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: #9a4c5f;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    transition: color 0.3s;
}

.tab-link:hover,
.tab-link.active {
    color: #ee2b5b;
}

/* Content Sections (Cards) */
.product-content-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 4rem;
}

.content-section {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    scroll-margin-top: 150px;
    /* Offset for sticky header */
}

.content-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3e7ea;
}

.content-section p {
    color: #1b0d11;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.ingredients-list,
.usage-steps {
    margin-left: 1.5rem;
    color: #1b0d11;
}

.ingredients-list li,
.usage-steps li {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.ingredients-list strong {
    color: #ee2b5b;
}

/* Reviews */
.reviews-summary {
    background: #f3e7ea;
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.average-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.rating-number {
    font-size: 3rem;
    font-weight: 800;
    color: #ee2b5b;
}

.review-item {
    padding: 2rem;
    border: 1px solid #f3e7ea;
    border-radius: 1rem;
    margin-bottom: 1rem;
}

.reviewer-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

.reviewer-name {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.review-text {
    color: #1b0d11;
    line-height: 1.8;
    margin: 1rem 0;
}

.review-date {
    color: #9a4c5f;
    font-size: 0.85rem;
}

.view-all-reviews {
    display: inline-block;
    margin-top: 1rem;
    color: #ee2b5b;
    text-decoration: none;
    font-weight: 600;
}

.view-all-reviews:hover {
    text-decoration: underline;
}

/* Related Products */
.related-products {
    margin-top: 4rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: #1b0d11;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #f3e7ea;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-image-container {
    position: relative;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
}

.add-to-cart-btn {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .add-to-cart-btn {
    opacity: 1;
}

.add-to-cart-btn:hover {
    background: #ee2b5b;
    color: white;
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #1b0d11;
}

.product-brand {
    color: #9a4c5f;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-weight: 800;
    font-size: 1.1rem;
    color: #ee2b5b;
}

/* Responsive */
@media (max-width: 1024px) {
    .product-detail-container {
        grid-template-columns: 1fr;
    }

    .main-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 1rem;
    }

    .search-box {
        display: none;
    }

    main {
        padding: 1rem;
    }

    .product-title {
        font-size: 1.5rem;
    }

    .product-price-large {
        font-size: 1.5rem;
    }

    .tab-headers {
        gap: 1rem;
        overflow-x: auto;
    }

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

/* Thông số kỹ thuật */

/* CSS cho bảng thông số */
.specs-table-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 15px;
}

.table-specs {
    width: 100%;
    border-collapse: collapse;
    /* Quan trọng: Gộp đường viền lại */
}

.table-specs td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    /* Đường gạch ngang mờ */
    font-size: 14px;
    color: #333;
}

/* Cột bên trái (Tiêu đề) */
.spec-label {
    width: 35%;
    /* Chiều rộng cột trái */
    background-color: #f5f5f5;
    /* Màu nền xám nhẹ */
    font-weight: bold;
    color: #555;
}

/* Cột bên phải (Giá trị) */
.spec-value {
    width: 65%;
    background-color: #fff;
}

/* Xóa đường kẻ ở dòng cuối cùng */
.table-specs tr:last-child td {
    border-bottom: none;
}