/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* =========================================
   CSS CHO KHU VỰC GIÁ (SẢN PHẨM & BIẾN THỂ)
========================================= */

/* 1. Khung chứa giá (Sử dụng Flexbox để đảo vị trí) */
.css-gia-ct .price,
.woocommerce-variation-price .price {
    display: flex;
    align-items: baseline; /* Căn chân chữ để 2 giá thẳng hàng dưới cùng */
    flex-wrap: wrap;
    gap: 12px; /* Khoảng cách giữa giá cam và giá xám */
    margin: 0;
    line-height: 1.2;
}

/* Ẩn các đoạn text thừa dành cho trình đọc màn hình */
.css-gia-ct .price .screen-reader-text,
.woocommerce-variation-price .price .screen-reader-text {
    display: none !important;
}

/* 2. GIÁ KHUYẾN MÃI HOẶC GIÁ BÁN THƯỜNG (Màu cam, to, nằm trước) */
/* (ins = Giá khuyến mãi, .amount = Giá thường không sale, span = Dấu gạch ngang của giá khoảng) */
.css-gia-ct .price ins,
.css-gia-ct .price > .amount,
.css-gia-ct .price > span,
.woocommerce-variation-price .price ins,
.woocommerce-variation-price .price > .amount {
    order: 1; /* Bắt buộc đẩy lên đứng đầu tiên */
    text-decoration: none !important;
    font-size: 32px !important; /* Kích thước chữ to */
    font-weight: 600 !important; /* In đậm nét vừa */
    color: #ff6a00 !important; /* Màu cam giống hình */
}

/* Đảm bảo thẻ con bên trong giá khuyến mãi cũng ăn CSS */
.css-gia-ct .price ins .amount,
.woocommerce-variation-price .price ins .amount {
    font-size: 32px !important;
    font-weight: 600 !important;
    color: #ff6a00 !important;
}

/* 3. GIÁ GỐC (Màu xám, nhỏ, gạch ngang, nằm sau) */
.css-gia-ct .price del,
.woocommerce-variation-price .price del {
    order: 2; /* Bắt buộc đẩy ra đứng thứ 2 (bên phải) */
    font-size: 18px !important; /* Chữ nhỏ hơn */
    font-weight: 500 !important;
    color: #8c8c8c !important; /* Màu xám nhạt */
    text-decoration: line-through !important; /* Gạch ngang chữ */
}

/* Đảm bảo thẻ con bên trong giá gốc cũng ăn CSS */
.css-gia-ct .price del .amount,
.woocommerce-variation-price .price del .amount {
    font-size: 18px !important;
    font-weight: 500 !important;
    color: #8c8c8c !important;
}

/* =========================================
   Tối ưu riêng cho màn hình Điện Thoại
========================================= */
@media (max-width: 768px) {
    .css-gia-ct .price ins,
    .css-gia-ct .price > .amount,
    .css-gia-ct .price > span,
    .css-gia-ct .price ins .amount,
    .woocommerce-variation-price .price ins,
    .woocommerce-variation-price .price > .amount,
    .woocommerce-variation-price .price ins .amount {
        font-size: 26px !important; /* Thu nhỏ bớt trên đt */
    }
    
    .css-gia-ct .price del,
    .css-gia-ct .price del .amount,
    .woocommerce-variation-price .price del,
    .woocommerce-variation-price .price del .amount {
        font-size: 15px !important;
    }
}
/* 1. Container bao bọc */
.css-thuoc-tinh {
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* 2. Khu vực chứa các nút (Thiết lập cuộn nhưng ẩn thanh cuộn) */
.css-thuoc-tinh .archive-variable-items {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important; /* Cuộn ngang */
    overflow-y: hidden !important; /* Chặn cuộn dọc */
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x !important;
    gap: 5px !important;
    /* Hỗ trợ tương tác */
    pointer-events: auto !important;
    cursor: grab !important;
    user-select: none;
    
    /* ẨN THANH CUỘN CHO MỌI TRÌNH DUYỆT */
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
}
.css-thuoc-tinh ul.variations > li{
	margin:0px;
}
/* Ẩn thanh cuộn cho Chrome, Safari, Opera */
.css-thuoc-tinh .archive-variable-items::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* 3. Hiệu ứng kéo */
.css-thuoc-tinh .archive-variable-items:active {
    cursor: grabbing !important;
}

/* 4. Đảm bảo các nút không bị co lại */
.css-thuoc-tinh .archive-variable-items li.variable-item {
    flex: 0 0 auto !important;
    margin: 0 !important;
    white-space: nowrap !important;
}