/* ===================================================================
 * CSS TÙY CHỈNH CHO TRANG SẢN PHẨM LANDING PAGE
 * Lấy cảm hứng từ thiết kế index.html (Tailwind)
 * =================================================================== */

/* --- 1. BIẾN TOÀN CỤC VÀ KIỂU CHỮ --- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --brand-primary: #A97C50;
    --brand-secondary: #F4E9E0;
    --text-color: #1f2937; 
    --text-color-light: #374151; 
    --text-color-muted: #6b7280; 
    --border-color: #e5e7eb; 
    --container-max-width: 1152px;
    --border-radius-lg: 1rem; 
    --border-radius-md: 0.75rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}


.product-content-sections-wrapper,
.product-sticky-nav-wrapper {
    max-width: var(--container-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .product-content-sections-wrapper,
    .product-sticky-nav-wrapper {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

div.product {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 2rem 3rem;
    max-width: 1400px; 
    margin: 2rem auto;
    padding: 0 1rem;
}

@media (min-width: 1024px) {
    div.product > .summary.entry-summary {
        position: sticky;
        top: 100px; 
        height: fit-content; 
    }
}

.custom-product-left-column {
    grid-column: 1 / -1;
}

@media (min-width: 1024px) {
    .custom-product-left-column {
        grid-column: 1 / 2; 
    }
}

div.product > .summary.entry-summary {
    grid-column: 1 / -1;
}

@media (min-width: 1024px) {
    div.product > .summary.entry-summary {
        grid-column: 2 / 3; 
        padding-left: 2rem;
    }
}

.product-content-sections-wrapper {
    grid-column: 1 / -1; 
    margin-top: 2rem;
}


.product-sticky-nav-wrapper {
    border-radius: 8px;
    position: sticky;
    top: 60px; 
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-top: 1.5rem;
}

ul.product-sticky-nav {
    display: flex;
    justify-content: flex-start; 
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto; 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}
ul.product-sticky-nav::-webkit-scrollbar {
    display: none;
}

ul.product-sticky-nav li {
    margin: 0;
}

ul.product-sticky-nav li a {
    display: block;
    font-weight: 600;
    color: var(--text-color-light);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

ul.product-sticky-nav li a:hover,
ul.product-sticky-nav li a.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
}


.product-flickity-slider-wrapper {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    padding-bottom: 40px;
}
.product-flickity-slider .carousel-cell {
    width: 100%;
    margin-right: 10px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.product-flickity-slider .carousel-cell img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}
.flickity-prev-next-button {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
}
.flickity-prev-next-button:hover {
    background: #fff;
}
.flickity-page-dots .dot {
    background: rgba(0, 0, 0, 0.25);
}
.flickity-page-dots .dot.is-selected {
    background: var(--brand-primary);
}

.product-content-section {
    margin-bottom: 2rem;
}

h2.section-title {
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--brand-primary);
    padding-bottom: 0.5rem;
    display: inline-block;
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    h2.section-title {
        margin-bottom: 1.5rem;
        font-size: 1.875rem;
    }
}

.product-custom-fields-container {
    background-color: var(--brand-secondary);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

@media (min-width: 768px) {
    .product-custom-fields-container {
        padding: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .product-custom-fields-container {
        padding: 2rem;
    }
}

.fields-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(1, 1fr); 
    gap: 1rem;
}

@media (min-width: 640px) {
    .fields-grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 768px) {
    .fields-grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .fields-grid-wrapper {
        grid-template-columns: repeat(3, 1fr); 
    }
}

.field-item {
    display: flex;
    flex-direction: column;
}
.field-item svg{
    color: rgb(169 124 80 / 0.8);
    margin: 0 !important;
}
.field-item label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-color-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    display: flex;
    gap: 6px;
    align-items: center;
}

@media (min-width: 768px) {
    .field-item label {
        font-size: 0.875rem;
        gap: 10px;
    }
}

.field-item span,
.field-item span a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    word-break: break-word;
}

@media (min-width: 768px) {
    .field-item span,
    .field-item span a {
        font-size: 1rem;
    }
}
.field-item span a:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

.section-content.prose {
    color: var(--text-color-light);
    line-height: 1.6;
    font-size: 0.9375rem;
}

@media (min-width: 768px) {
    .section-content.prose {
        line-height: 1.7;
        font-size: 1rem;
    }
}

.section-content.prose p {
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .section-content.prose p {
        margin-bottom: 1.5rem;
    }
}
.section-content.prose strong {
    color: var(--text-color);
    font-weight: 600;
}
.section-content.prose h3,
.section-content.prose h4 {
    color: var(--text-color);
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.acf-image-gallery {
    column-gap: 0.75rem;
    columns: 2;
}

@media (min-width: 640px) {
    .acf-image-gallery {
        column-gap: 1rem;
        columns: 2;
    }
}

@media (min-width: 768px) {
    .acf-image-gallery {
        column-gap: 1.5rem;
        columns: 3;
    }
}

@media (min-width: 1024px) {
    .acf-image-gallery {
        columns: 3;
    }
}

.acf-image-gallery a {
    display: block;
    margin-bottom: 0.75rem; 
    break-inside: avoid; 
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px -1px rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 768px) {
    .acf-image-gallery a {
        margin-bottom: 1.5rem;
        border-radius: var(--border-radius-md);
        box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    }
}

.acf-image-gallery a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px -2px rgba(0,0,0,0.1), 0 3px 5px -1px rgba(0,0,0,0.05);
}

@media (min-width: 768px) {
    .acf-image-gallery a:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    }
}

.acf-image-gallery img {
    width: 100%;
    height: auto;
    display: block;
}

@media only screen and (max-width: 48em) {
    .acf-image-gallery {
        columns: 2;
    }
    
    ul.product-sticky-nav li a {
        padding: 10px 10px;
        font-size: 12px;
    }
    
    h2.section-title {
        font-size: 25px; 
    }
    
    .hero-section .ct-breadcrumbs {
        font-size: 7px;
    }
    
    .product-flickity-slider .carousel-cell {
        width: 100%;
        height: 300px;
        opacity: 1;
        transform: scale(1);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }
    
    .product-flickity-slider .carousel-cell img {
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    .flickity-page-dots {
        bottom: -18px; 
    }
    
    .flickity-page-dots .dot {
        width: 8px;
        height: 8px;
        background: rgba(0, 0, 0, 0.25);
        opacity: 1;
    }
    
    .flickity-page-dots .dot.is-selected {
        background: var(--brand-primary);
    }
    
    div.product {
        padding: 0 0.5rem;
        margin: 1rem auto;
    }
}
@media only screen and (min-width: 767px) {
    .acf-image-gallery {
        columns: 3;
    }
    
    ul.product-sticky-nav li a {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }
    
    h2.section-title {
        font-size: 1.875rem; 
    }
    
    .product-flickity-slider .carousel-cell {
        width: 50%; 
        height: 450px;
        opacity: 0.4; 
        transform: scale(0.9);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }
    
    .product-flickity-slider .carousel-cell.is-selected {
        opacity: 1;
        transform: scale(1);
    }
    
    .flickity-page-dots {
        bottom: -40px; 
    }
    
    .flickity-page-dots .dot {
        width: 10px;
        height: 10px;
        background: rgba(0, 0, 0, 0.25);
        opacity: 1;
    }
    
    .flickity-page-dots .dot.is-selected {
        background: var(--brand-primary);
    }
}
.ct-container-full article .hero-section {
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .ct-container-full article .hero-section {
        margin-top: 2rem;
    }
}

@media (min-width: 1024px) {
    .ct-container-full article .hero-section {
        margin-top: 2.5rem;
    }
}