/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */
 /* CSS Variables cho color scheme */
:root {
    --color-1: #1075b9;
    --color-2: #00845c;
    --color-3: #f86c3b;
}

p, ul, li {text-align: justify;}
.entry-summary-items table.variations td {flex-wrap: Nowrap;}
th, td {padding: 8px;}
.shop_table table {margin-bottom: 1em;}
table.variations tbody {display: flex;align-items: center;}
.entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5 {margin-top: 0px; margin-bottom: 5px;
}
form.variations_form table.variations tr:not(:last-child) {margin-bottom: 0.5em;}
table.variations .reset_variations {
    background: none;
    font-weight: 600;
    padding-top: 15px;
	cursor: pointer;
}
.woocommerce div.product form.cart .variations tbody tr td, .woocommerce div.product form.cart .variations tbody tr th {
    max-width: unset;
}

/* ================================================= */
/* CSS woocommerce-checkout */
/* ================================================= */
.woocommerce-shipping-totals.shipping {display: none;}
.woocommerce-checkout-review-order-table .product-name {font-weight: 700;}
.ct-woocommerce-checkout h3 {text-align:center;text-transform: uppercase;}
form.ct-woocommerce-checkout {padding-top: 30px;padding-bottom: 30px;}

 /* --- 1. Container Chính, Nền và Định vị --- */
.digimarket-hero-wrapper {
    /* Thiết lập vị trí tương đối để neo SVG vào đáy */
    position: relative;
    overflow: hidden;
    /* Nền Gradient xanh lá đặc trưng lấy từ trang mẫu */
    background: linear-gradient(359deg, #1075b9 0%, rgb(205 222 218) 100%);
}
.hero-wrapper_title {
    font-size: 45px;
    font-weight: 700;
    margin-bottom: 20px;
	text-transform: uppercase;
	text-shadow: -2px -2px 0 #1075b9, 2px -2px 0 #1075b9, -2px 2px 0 #1075b9, 2px 2px 0 #1075b9;
}
.hero-wrapper_title:hover {opacity: 0.6;}

/* --- 4. Định vị Sóng SVG (Wave Divider) --- */
.custom-hero-wave {
    /* Định vị tuyệt đối vào đáy của container */
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15vh; /* Chiều cao của sóng */
    margin-bottom: -5px; /* Điều chỉnh nhỏ để tránh khoảng trống 1px giữa sóng và nội dung tiếp theo */
}

/* ================================================= */
/* CSS cho hiệu ứng sóng chuyển động (Wave Animation) */
/* ================================================= */
/* Định nghĩa chuyển động Keyframe có tên là 'move-forever' */
@keyframes move-forever {
  0% {
   /* Vị trí bắt đầu (dịch sang trái) */
   transform: translate3d(-90px,0,0);
  }
  100% {
    /* Vị trí kết thúc (dịch sang phải) */
    transform: translate3d(85px,0,0);
  }
}

.digimarket-hero-wrapper .parallax > use {
  animation: move-forever 25s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
}
.digimarket-hero-wrapper .parallax > use:nth-child(1) {
  animation-delay: -2s;
  animation-duration: 7s;
}
.digimarket-hero-wrapper .parallax > use:nth-child(2) {
  animation-delay: -3s;
  animation-duration: 10s;
}
.digimarket-hero-wrapper .parallax > use:nth-child(3) {
  animation-delay: -4s;
  animation-duration: 13s;
}
.digimarket-hero-wrapper .parallax > use:nth-child(4) {
  animation-delay: -5s;
  animation-duration: 20s;
}

/* ====================================== */
/* CSS cho Hero search  */
/* ====================================== */
.ct-container {max-width: var(--theme-normal-container-max-width);}
.hero-search-container {
    font-family: Arial, sans-serif;
    padding: 20px;
    position: relative;
    margin-top: 15px;
}
.hero-search-trigger {
    background: #ffffffb7 !important;
    padding: 10px !important;
    border-radius: 7px !important;
    /* display: flex; 
    align-items: center;*/
    border: 1px solid #00845c !important;
    cursor: pointer;
    color: #578177;
    font-size: 16px;
    max-width: 500px;
    margin: auto;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}
.hero-search-trigger svg {
    margin-right: 10px;
    width: 30px;
    height: 30px;
    background: #579dc5;
    padding: 5px;
    border-radius: 5px;
}
.hero-search-trigger:hover {
    opacity: 0.6;
}

/* ========================================= */
/* CSS cho Hiệu ứng Typewriter (Text input search)*/
/* ========================================= */

/* 1. Đảm bảo container chính sử dụng flexbox và xử lý tràn nội dung */
.typewriter-trigger {
    display: flex;
    align-items: center;
    /* Quan trọng: Ngăn không cho chữ xuống dòng khi gõ, đặc biệt trên mobile */
    white-space: nowrap;
    overflow: hidden;
}

/* 2. Định dạng phần văn bản động (Quan trọng cho Responsive) */
#typewriter-text {
    /* Cho phép văn bản co giãn chiếm không gian còn lại */
    flex-grow: 1;
    /* Xử lý tràn văn bản: Ẩn đi và hiển thị dấu ba chấm (...) nếu quá dài */
    overflow: hidden;
    text-overflow: ellipsis;
    /* Rất quan trọng trong Flexbox: cho phép phần tử co lại khi cần dù có overflow:hidden */
    min-width: 0;
    text-align: left;
    font-weight: 600;
}

/* 5. Định nghĩa Keyframes cho hiệu ứng nhấp nháy */
@keyframes blink {
  from, to {
    opacity: 1; /* Hiển thị */
  }
  50% {
    opacity: 0; /* Ẩn đi ở giữa chu kỳ */
  }
}

/* --- 5. Responsive (Tối ưu cho Mobile) --- */
@media (max-width: 768px) {
    .hero-wrapper_title {font-size: 32px; /* Giảm kích thước tiêu đề */    }
    .custom-hero-wave {height: 40px; /* Giảm chiều cao sóng */    }
    .digimarket-hero-wrapper {padding-top: 30px;padding-bottom: 50px;}
    .digi-feature-product_ptitle h3 {font-size: 16px !important;}
    #typewriter-text {font-size: 15px;}
}

/* ====================================== */
/* CSS cho Feature Section  */
/* ====================================== */
.digimarket-feature-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-top: 40px;
}

.digimarket-feature-item {
    background: linear-gradient(162deg, rgba(255, 255, 255, 1) 73%, rgb(195, 216, 211) 100%);
    border-radius: 7px;
    padding: 20px;
    flex: 1 1 30%;
    text-align: center;
    border: 1px solid var(--color-1);
    transition: background 0.3s ease, transform 0.3s ease;
}

.digimarket-feature-item:hover {
    background: linear-gradient(162deg, rgba(255, 255, 255, 1) 50%, rgb(195, 216, 211) 100%);
    transform: scale(0.97);
}

.digimarket-feature-item i {
    display: inline-block;
    transition: transform 0.6s ease;
}

.digimarket-feature-item:hover i {
    animation: spin 0.6s ease-in-out forwards;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.digimarket-icon {
    font-size: 45px;
    color: #1075b9;
    margin-bottom: 15px;
}

.digimarket-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #f86c3b;
}

.digimarket-desc {
    font-size: 16px;
    color: #555;
    line-height: 1.5;
}

/* ====================================== */
/* CSS cho Product section  */
/* ====================================== */
/* --- 2. Section Title Styling --- */
.digi-feature-product-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-1);
    margin-bottom: 30px;
    margin-top: 20px;
}
/* Đảm bảo khoảng cách giữa các nút đều nhau và tự động xuống dòng (trên mobile) */
.custom-category-pills.wp-block-buttons {
    flex-wrap: wrap;
    gap: 15px;
}

/* Nhắm mục tiêu các nút bên trong wrapper custom-category-pills */
.custom-category-pills .wp-block-button__link {
    /* Nền trắng hoặc xám nhạt, viền xám nhạt */
    background-color: #f1f1f1;
    color: var(--color-1);
    border-radius: 8px; /* Bo góc nhẹ */
    padding: 10px 20px;
    font-weight: 500;
    border: 1px solid var(--color-1);
    transition: all 0.3s ease;
}

/* Hiệu ứng khi hover vào Category Pills */
.custom-category-pills .wp-block-button__link:hover {
    background-color: var(--color-1);
    border-color: var(--color-2);
    color: #fff;
}

/* --- Widget Chat Support - Optimized CSS --- */

/* 1. Cấu hình cơ bản và Font chữ */
body .digimarket-chatbox a {text-decoration: none;}

/* 2. Cấu hình hiệu ứng ẩn/hiện khi cuộn (Kết hợp với JS) */
#chat-mojs {transition: transform 0.3s ease;}
.chathi {
    /* Trượt ra khỏi màn hình khi cuộn xuống */
	transform: translateX(-350%);
}

/* 3. Kiểu dáng và Vị trí cho Skin 5 (Kết hợp từ file gốc và inline style) */
.digimarket-chatbox{
	position: fixed;
    z-index: 10150;    /* Đảm bảo nằm trên các thành phần khác */
    left: 10px;        /* Vị trí góc dưới bên trái */
    bottom: 10px;
	width:65px;
	text-align: center;
	background: #fffffff5; /* Nền trắng hơi trong suốt */
    border-radius: 7px;    /* Bo góc */
    padding: 10px 5px 17px 5px;
    box-sizing: content-box;
    box-shadow: 0px 0px 5px #0003; /* Đổ bóng nhẹ */
    opacity: 1;
}
.digimarket-chatbox a{
	display:block;
	position: relative;
	color:#333;
}
.digimarket-chatbox a span {
    font-size: 11px;
    display: block;
    text-align: center;
    /* Giữ nguyên margin-top âm theo style gốc để có hiệu ứng chữ đè nhẹ lên icon */
	margin-top:-7px; 
}
.digimarket-chatbox svg {
	width:55px !important;
	margin:auto;
	background:none;
}

/* 4. Hiệu ứng rung khi di chuột (Hover) */
.digimarket-chatbox svg:hover{
	animation: logo3 1000ms infinite;
}
@keyframes logo3 {
	0% {transform:rotate(0deg) scale(1) skew(1deg);}
	10% {transform:rotate(-25deg) scale(1) skew(1deg);}
	20% {transform:rotate(25deg) scale(1) skew(1deg);}
	30% {transform:rotate(-25deg) scale(1) skew(1deg);}
	40% {transform:rotate(25deg) scale(1) skew(1deg);}
	50% {transform:rotate(0deg) scale(1) skew(1deg);}
	100% {transform:rotate(0deg) scale(1) skew(1deg);}
}

/* 5. Màu sắc Icon */
.digimarket-chatbox .digi-cpho svg path,  
.digimarket-chatbox .digi-cmes svg path, 
.digimarket-chatbox .digi-ctel svg path, 
.digimarket-chatbox .digi-czal svg path {
    fill:#600000 !important;
}
/* 6. Responsive: Ẩn trên Mobile (Chỉ hiển thị trên Desktop) */
@media (max-width: 700px){
	.chaton-mobile{
        display:none !important;
    }
}