/* ===========================================
   CUSTOM CSS CHO TEAPOZ UNICODE CHILD THEME
   =========================================== */

/* Font imports bổ sung cho Unicode support */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* UTM Avo - heading font (đang sử dụng định dạng TTF trong assets/fonts/) */
/*
  Đặt các file font tại:
  - wp-content/themes/teapoz-unicode-child/assets/fonts/UTM-Avo.woff2
  - wp-content/themes/teapoz-unicode-child/assets/fonts/UTM-AvoBold.woff2
  - wp-content/themes/teapoz-unicode-child/assets/fonts/UTM-AvoItalic.woff2
  - wp-content/themes/teapoz-unicode-child/assets/fonts/UTM-AvoBold_Italic.woff2
*/
@font-face {
    font-family: 'UTM Avo';
    src: url('../fonts/UTM-Avo.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'UTM Avo';
    src: url('../fonts/UTM-AvoBold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'UTM Avo';
    src: url('../fonts/UTM-AvoItalic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'UTM Avo';
    src: url('../fonts/UTM-AvoBold_Italic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* CSS Variables tùy chỉnh tương thích với theme cha */
:root {
    /* Sử dụng màu sắc từ theme gốc để ăn nhập */
    --child-primary: var(--primary, #8CBC4F);        /* Xanh lá chính của theme */
    --child-primary-hover: var(--primary_hover, #648935);
    --child-secondary: var(--secondary, #194A33);     /* Xanh đậm */
    --child-text: var(--text, #194A33);
    --child-text-light: var(--text_light, #86938D);
    --child-accent: var(--accent, #000000);
    --child-light: var(--light, #909090);
    --child-border: var(--border, #E0E0E0);
    --child-background: var(--background, #FFFFFF);
    --child-background-light: var(--background_light, #F6F6F6);
    
    /* Font stacks tương thích */
    --child-font-vietnamese: 'Be Vietnam Pro', 'Roboto', 'Noto Sans', sans-serif;
    --child-font-universal: 'Inter', 'Source Sans Pro', 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    --child-font-display: 'UTM Avo', 'Playfair Display', 'Be Vietnam Pro', Georgia, serif;
    --child-font-body: 'Noto Sans', 'Roboto', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Override parent fonts */
    --e-global-typography-text-font-family: var(--child-font-vietnamese) !important;
    --e-global-typography-primary-font-family: 'UTM Avo' !important;
    --e-global-typography-accent-font-family: var(--child-font-display) !important;
}

/* (Removed rules that forcibly hid parent theme/WooCommerce accordions & tabs to avoid UI breakage) */

/* ===========================================
   UNICODE FONT OPTIMIZATION
   =========================================== */

/* Đảm bảo hiển thị font chuẩn trên mọi thiết bị */
body {
    font-family: var(--child-font-vietnamese);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Tiếng Việt và ký tự đặc biệt */
.vietnamese-text,
.utf8-content {
    font-family: var(--child-font-vietnamese);
    font-feature-settings: "liga" 1, "kern" 1;
}

/* Headings với font display */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--child-font-display);
}

/* Elementor heading widget */
.elementor-heading-title {
    font-family: var(--child-font-display) !important;
}

/* WooCommerce product title */
.woocommerce div.product .product_title {
    font-family: var(--child-font-display);
}

/* Các tiêu đề phổ biến khác trong theme */
.entry-title,
.page-title,
.woocommerce-products-header__title,
.woocommerce-loop-product__title,
.site-title {
    font-family: var(--child-font-display) !important;
}

/* Body text optimization */
p, li, span, div {
    font-family: var(--child-font-body);
}

/* Form elements với Unicode support */
input, textarea, select {
    font-family: var(--child-font-universal);
}

/* Navigation với font chuẩn */
.main-navigation,
.mobile-navigation {
    font-family: var(--child-font-universal);
}



/* ===========================================
   PRODUCT SECTIONS STYLING (NO TABS)
   =========================================== */

/* Container for all product sections */
.product-sections-container {
    margin-top: 40px;
    margin-bottom: 40px;
}

/* Individual section styling */
.product-section {
    margin-bottom: 40px;
    padding: 30px;
    background: var(--child-background);
    border: 1px solid var(--child-border);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-section:last-child {
    margin-bottom: 0;
}

/* Section titles */
.product-section .section-title {
    font-family: var(--child-font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--child-text);
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--child-primary);
    position: relative;
}

.product-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--child-secondary);
}

/* Section content */
.product-section .section-content {
    font-family: var(--child-font-body);
    line-height: 1.6;
    color: var(--child-text);
}

/* Product description specific styling */
.product-description-section {
    /* Bỏ viền trái đậm */
    border-left: 0;
}

.product-description-section .section-title {
    color: var(--child-primary);
}

/* Product information specific styling */
.product-information-section {
    /* Bỏ viền trái đậm */
    border-left: 0;
}

.product-information-section .section-title {
    color: var(--child-secondary);
}

/* Reviews section specific styling - theo phong cách theme cha */
.product-reviews-section {
    /* Bỏ viền trái đậm và nền gradient để giao diện nhẹ nhàng hơn */
    border-left: 0;
    background: var(--child-background);
}

.product-reviews-section .section-title {
    color: var(--child-secondary);
}

/* Comment list styling theo theme Teapoz - CẢI THIỆN STYLING */
.product-reviews-section #comments {
    margin: 0;
    padding: 0;
}

.product-reviews-section #comments .comment-list-wrap {
    margin-bottom: 30px;
}

.product-reviews-section #comments .commentlist,
.product-reviews-section #comments .comment-list {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Cải tiến comment container */
.product-reviews-section #comments .commentlist .review,
.product-reviews-section #comments .comment-list .comment {
    margin-bottom: 25px;
    background: var(--child-background);
    border: 1px solid var(--child-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.product-reviews-section #comments .commentlist .review:hover,
.product-reviews-section #comments .comment-list .comment:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
    /* Giữ border màu trung tính để bình luận không quá nổi bật */
    border-color: var(--child-border);
}

.product-reviews-section #comments .commentlist .review:last-child,
.product-reviews-section #comments .comment-list .comment:last-child {
    margin-bottom: 0;
}

/* Comment container - sử dụng comment_container của theme */
.product-reviews-section #comments .comment_container {
    display: flex;
    padding: 20px;
    align-items: flex-start;
}

/* Avatar styling */
.product-reviews-section #comments .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid var(--child-border);
    flex-shrink: 0;
}

/* Comment text area */
.product-reviews-section #comments .comment-text {
    flex: 1;
    min-width: 0;
}

/* Star rating */
.product-reviews-section #comments .star-rating {
    margin-bottom: 8px;
    font-size: 14px;
}

.product-reviews-section #comments .star-rating::before {
    color: var(--child-border);
}

.product-reviews-section #comments .star-rating span::before {
    color: #FFD700;
}

/* Comment meta - thông tin tác giả */
.product-reviews-section #comments .meta {
    margin-bottom: 10px;
    padding: 8px 12px;
    /* Nền nhẹ nhàng, bỏ gradient và margin âm để giảm nhấn mạnh */
    background: var(--child-background-light);
    border: 1px solid var(--child-border);
    border-radius: 6px;
    margin: 0 0 10px 0;
}

.product-reviews-section #comments .meta .woocommerce-review__author {
    /* Tên người dùng không quá nổi bật */
    color: var(--child-text);
    font-weight: 500;
    font-size: 14px;
    text-shadow: none;
}

.product-reviews-section #comments .meta .woocommerce-review__dash {
    color: var(--child-text-light);
    margin: 0 5px;
}

.product-reviews-section #comments .meta .woocommerce-review__published-date {
    color: var(--child-light);
    font-size: 12px;
    font-weight: 400;
}

/* Comment description/content */
.product-reviews-section #comments .description {
    line-height: 1.6;
    color: var(--child-text);
    font-size: 14px;
}

.product-reviews-section #comments .description p {
    margin-bottom: 12px;
}

.product-reviews-section #comments .description p:last-child {
    margin-bottom: 0;
}

/* Responsive design cho mobile */
@media (max-width: 768px) {
    .product-reviews-section #comments .comment_container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px;
    }
    
    .product-reviews-section #comments .avatar {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .product-reviews-section #comments .comment-text {
        width: 100%;
    }
    
    .product-reviews-section #comments .meta {
        text-align: center;
        margin: 0 0 10px 0;
    }
}

/* Comment form trong reviews section */
.product-reviews-section #commentform {
    display: flex;
    flex-wrap: wrap;
    margin: 20px -15px 0;
    padding: 20px;
    background: var(--child-background-light);
    border-radius: 8px;
    border: 1px solid var(--child-border);
}

.product-reviews-section #commentform > p {
    padding: 0 15px;
    width: 100%;
}

.product-reviews-section #respond #reply-title {
    color: var(--child-text);
    font-size: 20px;
    line-height: 1.2;
    margin-bottom: 20px;
    /* Giảm độ đậm của tiêu đề form bình luận */
    font-weight: 500;
    font-family: var(--child-font-display);
}

/* Nhẹ nhàng hóa label và trường nhập trong form bình luận */
.product-reviews-section #commentform label {
    color: var(--child-text-light);
    font-weight: 500;
}
.product-reviews-section #commentform input[type="text"],
.product-reviews-section #commentform input[type="email"],
.product-reviews-section #commentform input[type="url"],
.product-reviews-section #commentform textarea {
    border: 1px solid var(--child-border);
    background: var(--child-background);
    color: var(--child-text);
}

/* No comments message */
.product-reviews-section .no-comments {
    text-align: center;
    padding: 40px 20px;
    color: var(--child-text-light);
    font-style: italic;
}

/* Table styling for product attributes */
.product-section .shop_attributes,
.product-section .additional-meta {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.product-section .shop_attributes th,
.product-section .shop_attributes td,
.product-section .additional-meta th,
.product-section .additional-meta td {
    padding: 12px 15px;
    border: 1px solid var(--child-border);
    text-align: left;
}

.product-section .shop_attributes th,
.product-section .additional-meta th {
    background-color: var(--child-background-light);
    font-weight: 600;
    width: 30%;
    color: var(--child-text);
}

.product-section .shop_attributes tr:nth-child(even),
.product-section .additional-meta tr:nth-child(even) {
    background-color: rgba(246, 246, 246, 0.5);
}



/* Responsive design */
@media (max-width: 768px) {
    .product-section {
        padding: 20px 15px;
        margin-bottom: 25px;
    }
    
    .product-section .section-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .product-section .shop_attributes th,
    .product-section .shop_attributes td,
    .product-section .additional-meta th,
    .product-section .additional-meta td {
        padding: 8px 10px;
        font-size: 14px;
    }
}

/* ===========================================
   BUY NOW BUTTON STYLES
   =========================================== */
.woocommerce div.product form.cart .single_buy_now_button.button,
.woocommerce div.product form.cart .single_buy_now_button {
    background-color: var(--child-primary);
    color: #fff;
    border-color: var(--child-primary);
    margin-left: 10px;
}

.woocommerce div.product form.cart .single_buy_now_button.button:hover,
.woocommerce div.product form.cart .single_buy_now_button:hover {
    background-color: var(--child-secondary);
    border-color: var(--child-secondary);
    color: #fff;
}

/* Mobile stacking */
@media (max-width: 480px) {
    .woocommerce div.product form.cart .single_add_to_cart_button,
    .woocommerce div.product form.cart .single_buy_now_button {
        width: 100%;
        margin-left: 0;
    }
    .woocommerce div.product form.cart .single_buy_now_button {
        margin-top: 10px;
    }
}

/* ===========================================
   THEME COMPATIBILITY & OVERRIDES
   =========================================== */

/* Đảm bảo tương thích với các biến CSS của theme cha */
.product-sections-container {
    /* Sử dụng biến từ theme cha nếu có */
    --section-border: var(--border, #E0E0E0);
    --section-text: var(--text, #194A33);
    --section-text-light: var(--text_light, #86938D);
    --section-accent: var(--accent, #000000);
}

/* Responsive improvements */
@media (max-width: 480px) {
    .product-section {
        padding: 15px 10px;
        margin-bottom: 20px;
    }
    
    .product-section .section-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .product-reviews-section #comments .comment-list .comment-head {
        margin: -15px -10px 8px -10px;
        padding: 8px 10px;
    }
}

/* Print styles */
@media print {
    .product-sections-container {
        page-break-inside: avoid;
    }
    
    .product-section {
        box-shadow: none;
        border: 1px solid var(--section-border);
        page-break-inside: avoid;
    }
    
    .product-reviews-section #comments .comment-list .comment {
        box-shadow: none;
        border: 1px solid var(--section-border);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-section {
        border-width: 2px;
    }
    
    .product-reviews-section #comments .comment-list .comment {
        border-width: 2px;
    }
    
    .product-section .section-title::after {
        height: 3px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .product-section,
    .product-reviews-section #comments .comment-list .comment,
    .scroll-reveal {
        transition: none;
        animation: none;
    }
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */

/* Scroll animation for sections */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Section highlight effect */
.product-section.highlight-section {
    animation: highlightSection 2s ease-out;
}

@keyframes highlightSection {
    0% {
        box-shadow: 0 0 0 0 rgba(140, 188, 79, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(140, 188, 79, 0);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(140, 188, 79, 0);
        transform: scale(1);
    }
}

/* Smooth hover transitions */
.product-reviews-section #comments .comment-list .comment-head {
    transition: background 0.3s ease;
}

/* Enhanced scroll reveal animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Interactive hover effects */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Copy notification */
.copy-notification {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--child-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    pointer-events: none;
}

/* Basic responsive utilities */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

.single-product div.product .single_add_to_cart_button {
    margin-top: 15px;
}