/*
Theme Name: Flatsome Child
Description: Child theme của Flatsome - Tùy chỉnh an toàn cho website
Author: Your Name
Version: 1.0.0
Template: flatsome
*/

/* 
 * Child theme của Flatsome
 * Tất cả CSS tùy chỉnh sẽ được thêm vào đây
 * Theme cha: Flatsome
 */

/* Import styles từ theme cha */
@import url("../flatsome/style.css");

/* ========================================
   CSS TÙY CHỈNH CỦA BẠN
   ======================================== */

/* Thêm các style tùy chỉnh của bạn ở đây */

/* ========================================
   STYLE CHO QUANTITY VÀ NÚT ĐẶT LỊCH
   ======================================== */

/* Container chứa quantity và button */
.single-product .product-summary .cart,
.single-product .product-summary form.cart {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Style cho quantity wrapper */
.single-product .ux-quantity,
.single-product .quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Style cho nút + và - */
.single-product .ux-quantity__button,
.single-product .quantity .plus,
.single-product .quantity .minus {
    background: #f5f5f5;
    border: none;
    width: 40px;
    height: 48px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.single-product .ux-quantity__button:hover,
.single-product .quantity .plus:hover,
.single-product .quantity .minus:hover {
    background: #e0e0e0;
    color: #000;
}

.single-product .ux-quantity__button:active,
.single-product .quantity .plus:active,
.single-product .quantity .minus:active {
    background: #d0d0d0;
}

/* Style cho input số lượng */
.single-product .ux-quantity input[type="number"],
.single-product .quantity input[type="number"] {
    width: 60px;
    height: 48px;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    padding: 0;
    background: #fff;
    -moz-appearance: textfield;
}

.single-product .ux-quantity input[type="number"]::-webkit-outer-spin-button,
.single-product .ux-quantity input[type="number"]::-webkit-inner-spin-button,
.single-product .quantity input[type="number"]::-webkit-outer-spin-button,
.single-product .quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.single-product .ux-quantity input[type="number"]:focus,
.single-product .quantity input[type="number"]:focus {
    outline: none;
    background: #fafafa;
}

/* Style cho text "giờ" */
.single-product .quantity-unit-text {
    font-size: 15px;
    color: #666;
    font-weight: 500;
    margin-left: 10px;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

/* Style cho nút Đặt lịch */
.single-product .single_add_to_cart_button,
.single-product button.single_add_to_cart_button,
.single-product .button.single_add_to_cart_button {
    background: #ff6b35 !important;
    background-color: #ff6b35 !important;
    color: #fff !important;
    border: none !important;
    padding: 5px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.single-product .single_add_to_cart_button:hover,
.single-product button.single_add_to_cart_button:hover,
.single-product .button.single_add_to_cart_button:hover {
    background: #ff5722 !important;
    background-color: #ff5722 !important;
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
    transform: translateY(-2px);
}

.single-product .single_add_to_cart_button:active,
.single-product button.single_add_to_cart_button:active,
.single-product .button.single_add_to_cart_button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .single-product .product-summary .cart,
    .single-product .product-summary form.cart {
        flex-direction: column;
        align-items: stretch;
    }
    
    .single-product .ux-quantity,
    .single-product .quantity {
        width: 100%;
        justify-content: center;
    }
    
    .single-product .single_add_to_cart_button,
    .single-product button.single_add_to_cart_button,
    .single-product .button.single_add_to_cart_button {
        width: 100%;
        margin-top: 10px;
    }
    
    .single-product .quantity-unit-text {
        margin-left: 8px;
    }
}

/* Dark mode support (nếu theme có dark mode) */
.dark .single-product .ux-quantity,
.dark .single-product .quantity {
    border-color: #444;
    background: #2a2a2a;
}

.dark .single-product .ux-quantity input[type="number"],
.dark .single-product .quantity input[type="number"] {
    background: #2a2a2a;
    color: #fff;
    border-color: #444;
}

.dark .single-product .ux-quantity__button,
.dark .single-product .quantity .plus,
.dark .single-product .quantity .minus {
    background: #333;
    color: #fff;
}

.dark .single-product .quantity-unit-text {
    color: #aaa;
}
/* ========================================
   FIX TAGS TỰ ĐỘNG XUỐNG HÀNG
   ======================================== */

/* Container chứa tags - cho phép xuống hàng */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 10px;
}

/* Style cho từng tag */
.card-tags .tag {
    display: inline-block;
    white-space: nowrap;
    word-break: keep-all;
    flex-shrink: 0;
    /* Giữ nguyên style hiện tại của tag nếu có */
}

/* Đảm bảo tags không bị vỡ layout */
.card-header-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ========================================
   STYLE CHO PRODUCT CARD (SHOP/ARCHIVE)
   ======================================== */

/* Base styles cho product card */
.custom-product-card-stacked {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.custom-product-card-stacked:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* Profile header */
.card-profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #333;
    line-height: 1.3;
}

.card-school {
    font-size: 14px;
    color: #666;
}

/* Card title */
.card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 15px 0 10px 0;
    line-height: 1.4;
}

.card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.card-title a:hover {
    color: #0066cc;
}

/* Card description */
.card-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Card meta */
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-meta i {
    font-size: 14px;
}

/* Card footer */
.card-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.card-price {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.card-footer-row .button {
    background: #ff6b35;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    white-space: nowrap;
}

.card-footer-row .button:hover {
    background: #ff5722;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .card-tags {
        gap: 6px;
    }
    
    .card-tags .tag {
        font-size: 0.85em;
        padding: 4px 8px;
    }
    
    /* Product card mobile */
    .custom-product-card-stacked {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    /* Profile header mobile - giảm kích thước */
    .card-profile-header {
        gap: 12px;
        margin-bottom: 12px;
    }
    
    .card-avatar {
        width: 50px;
        height: 50px;
    }
    
    .card-name {
        font-size: 16px;
        margin-bottom: 3px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .card-school {
        font-size: 13px;
    }
    
    /* Ẩn card-school nếu rỗng để tiết kiệm không gian */
    .card-school:empty {
        display: none;
    }
    
    /* Card title mobile */
    .card-title {
        font-size: 15px;
        margin: 12px 0 8px 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .card-title a {
        display: block;
        word-break: break-word;
    }
    
    /* Card description mobile - ẩn để tiết kiệm không gian */
    .card-description {
        display: none;
    }
    
    /* Card meta mobile - chỉ hiển thị 2 items đầu, ẩn phần còn lại */
    .card-meta {
        gap: 8px;
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    .card-meta span {
        gap: 4px;
        flex: 0 0 auto;
    }
    
    .card-meta i {
        font-size: 12px;
    }
    
    /* Ẩn các meta items từ thứ 3 trở đi trên mobile để tiết kiệm không gian */
    .card-meta span:nth-child(n+3) {
        display: none;
    }
    
    /* Đảm bảo meta không bị tràn */
    .card-meta span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    /* Card footer mobile - stack vertical */
    .card-footer-row {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        padding-top: 12px;
    }
    
    .card-price {
        font-size: 18px;
        text-align: center;
    }
    
    .card-footer-row .button {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 14px;
        white-space: normal;
        word-wrap: break-word;
    }
    
    /* Đảm bảo card không bị vỡ */
    .custom-product-card-stacked {
        min-width: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Đảm bảo images responsive */
    .card-avatar-img {
        max-width: 100%;
        height: auto;
        display: block;
    }
}

/* Responsive cho tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .custom-product-card-stacked {
        padding: 18px;
    }
    
    .card-profile-header {
        gap: 12px;
    }
    
    .card-avatar {
        width: 55px;
        height: 55px;
    }
    
    .card-name {
        font-size: 17px;
    }
    
    .card-title {
        font-size: 15px;
    }
    
    .card-description {
        font-size: 13px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .card-meta {
        font-size: 12px;
        gap: 10px;
    }
    
    .card-footer-row {
        flex-wrap: wrap;
    }
    
    .card-footer-row .button {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    /* Đảm bảo không bị vỡ trên tablet */
    .custom-product-card-stacked {
        min-width: 0;
    }
    
    .card-title a,
    .card-name {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}
/* ========================================
   STYLE CHO SẢN PHẨM GỢI Ý (RELATED PRODUCTS)
   ======================================== */

/* Đảm bảo related products dùng cùng style với danh sách sản phẩm */
.single-product .related-products-wrapper .custom-product-card-stacked,
.single-product .upsells-wrapper .custom-product-card-stacked {
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}


/* Đảm bảo tags hiển thị đúng */
.single-product .related-products-wrapper .card-tags,
.single-product .upsells-wrapper .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.single-product .related-products-wrapper .card-tags .tag,
.single-product .upsells-wrapper .card-tags .tag {
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    color: #0066cc;
    white-space: nowrap;
}

.single-product .related-products-wrapper .card-tags .tag.tag-tuyen,
.single-product .upsells-wrapper .card-tags .tag.tag-tuyen {
    border-color: #ff6b35;
    background: #fff5f0;
    color: #ff6b35;
}

/* Style cho profile header */
.single-product .related-products-wrapper .card-profile-header,
.single-product .upsells-wrapper .card-profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.single-product .related-products-wrapper .card-avatar,
.single-product .upsells-wrapper .card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.single-product .related-products-wrapper .card-avatar img,
.single-product .upsells-wrapper .card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Style cho tên và thông tin */
.single-product .related-products-wrapper .card-name,
.single-product .upsells-wrapper .card-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #333;
}

.single-product .related-products-wrapper .card-school,
.single-product .upsells-wrapper .card-school {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Style cho title */
.single-product .related-products-wrapper .card-title,
.single-product .upsells-wrapper .card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 15px 0;
    color: #333;
}

.single-product .related-products-wrapper .card-title a,
.single-product .upsells-wrapper .card-title a {
    color: #333;
    text-decoration: none;
}

.single-product .related-products-wrapper .card-title a:hover,
.single-product .upsells-wrapper .card-title a:hover {
    color: #0066cc;
}

/* Style cho description */
.single-product .related-products-wrapper .card-description,
.single-product .upsells-wrapper .card-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Style cho meta (icon info) */
.single-product .related-products-wrapper .card-meta,
.single-product .upsells-wrapper .card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.single-product .related-products-wrapper .card-meta span,
.single-product .upsells-wrapper .card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Style cho footer (giá và nút) */
.single-product .related-products-wrapper .card-footer-row,
.single-product .upsells-wrapper .card-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
 
}

.single-product .related-products-wrapper .card-price,
.single-product .upsells-wrapper .card-price {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.single-product .related-products-wrapper .card-footer-row .button,
.single-product .upsells-wrapper .card-footer-row .button {
    background: #ff6b35;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
}

.single-product .related-products-wrapper .card-footer-row .button:hover,
.single-product .upsells-wrapper .card-footer-row .button:hover {
    background: #ff5722;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .single-product .related-products-wrapper .custom-product-card-stacked,
    .single-product .upsells-wrapper .custom-product-card-stacked {
        padding: 15px;
    }
    
    .single-product .related-products-wrapper .card-footer-row,
    .single-product .upsells-wrapper .card-footer-row {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .single-product .related-products-wrapper .card-footer-row .button,
    .single-product .upsells-wrapper .card-footer-row .button {
        width: 100%;
        text-align: center;
    }
}