.btn-custom-search {
    padding: 15px 20px !important;
}
.first-menu .ht-dropdown li {
    color: #ffffff;
    padding: 0px 15px;
}

.first-menu .ht-dropdown li {
    color: #000000;
    background-color: #00000000;
}

.first-menu .ht-dropdown li.menu-heading:hover,
.first-menu .ht-dropdown li.menu-heading:hover a {
    color: #ffffff !important;
    background-color: #00000000;
    text-decoration: none;
}

.first-menu .ht-dropdown li a {
    padding: 3px 0;
    line-height: 24px;
    display: block;
    font-weight: normal;
    /* border-bottom: 1px solid #e5e5e5; */
    border-top: none;
    height: inherit;
    border-radius: 0;
    color: #ffffff;
    text-transform: capitalize;
    position: relative;
    z-index: 10;
    font-size: 14px;
}

/* พื้นหลังเมนู */
.first-menu .fa-bars {
    width: 43px;
    padding: 8px;
    /* ระยะห่างรอบ icon */
    border-radius: 50%;
    /* ทำให้เป็นวงกลม */
    transition: background 0.3s;
    margin-left: -6px;
}

.first-menu a:hover .fa-bars {
    background: #0000001f;
    /* สีเทาตอน hover */
    color: #000;
    width: 43px;
    /* เปลี่ยนสี icon ให้ตัดกับพื้นหลัง */
    margin-left: -6px;
}

.first-menu .ht-dropdown li:hover,
.first-menu .ht-dropdown li:hover a {
    color: black;
    text-decoration: underline;
    /* background-color: #ffffff; */
}

.first-menu .ht-dropdown li:hover i {
    color: white !important;
}

.first-menu .ht-dropdown li a:hover {
    color: var(--primary-color);
}

.header-top-links .first-menu ul li {
    width: 230px !important;
}

.ht-us-menu.first-menu>li>a::after,
.ht-cr-menu.first-menu>li>a::after {
    display: block;
    content: none;
    font-family: FontAwesome;
    font-size: 12px;
    padding-left: 10px;
    line-height: 40px;
    float: right;
}

.first-menu .ht-dropdown {
    position: absolute;
    top: 80%;
    width: 230px;
    background-color: var(--primary-color);
    /* padding: 0px 20px; */
    z-index: 101;
    -webkit-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.15);
    box-shadow: 0 3px 3px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
}


.menu-heading {
    background: transparent !important;
    cursor: default;
}

.menu-heading:hover {
    background: transparent !important;
}

.text-head-product:hover {
    color: var(--color-primary);
}

.current-click {
    background-color: var(--color-primary);
    padding: 9px 16px;
    border-radius: 50%;
    color: white;
}

.text-multiline {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* จำกัด 2 บรรทัด */
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    text-overflow: ellipsis;
}

.dropdown-toggle::after {
    display: none !important;
}

.mega-menu .item-link:hover,
.mega-menu ul a:hover {
    color: var(--primary-color);
}

.letter-link {
    color: var(--color-base-black);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    width: 14.2857142857%;
}

.my-video {
    width: 100%;
    /* กว้างเต็มพื้นที่ */
    /* height: 400px; */
    /* กำหนดความสูงที่ต้องการ หรือใช้ % */
    position: relative;
    /* สำหรับการจัด iframe ข้างใน */
    overflow: hidden;
}

.my-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* iframe กว้างเต็ม div */
    height: 100%;
    /* iframe สูงเต็ม div */
}

.text-name-product-recommand,
.text-name-product-hot,
.text-name-product-bestsell,
.text-name-product-new {
    max-height: 80px;
    /* ความสูงประมาณ 3 บรรทัด */
    overflow: hidden;
}

.text-ellipsis {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* ✅ จำกัดแค่ 3 บรรทัด */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.5;
}

.product-card {
    position: relative;
    width: 200px;
    border: 1px solid #ddd;
    padding: 3px;
}

.heart {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 20px;
    /* color: #999; */
    opacity: 0;
    /* transition: opacity 0.3s; */
    width: 30px;
}

.add-to-cart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 5px 15px;
    border-radius: 5px;
    opacity: 0;
    width: 90%;
    transition: opacity 0.3s;
}

/* แสดงเฉพาะตอน hover */
.product-card:hover .heart,
.product-card:hover .add-to-cart {
    opacity: 1;
}

/* .heart .icon {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        color: rgba(0, 0, 0, 1);
        fill: black;
        /* สีส้มโปร่ง */
/* opacity: 1; */
/* transition: opacity 0.3s; */
/* transition: color 0.3s; */
/* } */

.heart .icon:hover {
    color: orange;
    fill: var(--primary-color);
}

.header-top-links a:hover .link-text {
    color: rgb(0, 0, 0) !important;
}

.header-top-links a:hover {
    color: rgb(255, 255, 255) !important;
}

.header-top-links .first-menu a:hover {
    color: black !important;
}

.text-capfirst {
    text-transform: lowercase;
    /* ตัวอื่นเป็นเล็กหมด */
}

.text-capfirst::first-letter {
    text-transform: uppercase;
    /* ตัวแรกเป็นใหญ่ */
}

.form-control:focus {
    color: #212529;
    background-color: #ffffff00;
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0 !important;
}

.icon-search {
    transition: opacity 0.3s ease, color 0.3s ease;
}

button:hover .icon-search {
    opacity: 1;
    /* เพิ่มความเข้มเมื่อ hover */
    color: #000;
    /* หรือสีที่คุณต้องการ */
}

.form-control {
    height: 45px;
}

.slick-slide img {
    border-color: var(--primary--color);
}

.text-red {
    color: red;
}

.s-20 {
    font-size: 20px;
}

.s-22 {
    font-size: 22px;
}

.fw-bold-800 {
    font-weight: 800 !important;
}

.fw-bold-1000 {
    font-weight: 1000 !important;
}

.expanded .btn-link,
.btn-link {
    color: black;
    text-decoration: underline;
}

.expanded .btn-link:hover,
.btn-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Slick Thumbnail Arrow Styles */
.slick-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9;
    border: none;
    background-color: #f1f1f1;
    color: #999999;
    padding: 10px;
    width: 34px;
    height: 34px;
    border-radius: 0;
    text-align: center;
    cursor: pointer;
    font-size: 18px;
    line-height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slick-btn:hover {
    color: #7c4f94;
    background-color: #e5e5e5;
}

.slick-btn.slick-prev {
    left: -17px;
}

.slick-btn.slick-next {
    right: -17px;
}

.slick-btn i {
    font-size: 18px;
    line-height: 1;
}

/* Responsive adjustments for slick-btn */
@media only screen and (max-width: 767px) {
    .slick-btn {
        width: 30px;
        height: 30px;
        padding: 8px;
    }

    .slick-btn.slick-prev {
        left: -15px;
    }

    .slick-btn.slick-next {
        right: -15px;
    }

    .slick-btn i {
        font-size: 16px;
    }
}

/* Select Dropdown Styling */
select[name="quantity"] {
    padding: 8px 12px;
    border: 2px solid #ddd;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    min-width: 80px;
    cursor: pointer;
    transition: all 0.3s ease;
}

select[name="quantity"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(251, 100, 69, 0.3);
}

select[name="quantity"]:hover {
    border-color: var(--primary-color);
}

/* Select Option Styling */
select[name="quantity"] option {
    padding: 8px 12px;
    background-color: #fff;
    color: #333;
    transition: all 0.2s ease;
}

select[name="quantity"] option:checked {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: bold;
}

select[name="quantity"] option:hover {
    background-color: #f0f0f0;
    color: #333;
}

/* For better cross-browser support */
select[name="quantity"] option:checked:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Custom Dropdown Styling */
.custom-dropdown {
    position: relative;
    display: inline-block;
    min-width: 80px;
}

.dropdown-selected {
    padding: 8px 30px 8px 12px;
    border: 2px solid #ddd;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.dropdown-selected::after {
    content: '▼';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
}

.dropdown-selected:hover {
    border-color: var(--primary-color);
}

.custom-dropdown.open .dropdown-selected::after {
    transform: translateY(-50%) rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 2px solid var(--primary-color);
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.custom-dropdown.open .dropdown-options {
    display: block;
}

.dropdown-option {
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.dropdown-option:hover:not(.active) {
    background-color: #f0f0f0;
    color: #333;
}

.dropdown-option.active {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    font-weight: bold;
}

.svg-icon {
    width: 40px;
    height: 40px;
    display: inline-block;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.svg-icon.chevron-left {
    background-image: url(../../images/chevron-left.svg);
}

.svg-icon.chevron-right {
    background-image: url(../../images/chevron-right.svg);
}

/* เมนูด้านข้าง */
#sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    /* ซ่อนก่อน */
    width: 250px;
    height: 100%;
    background: #343a40;
    color: white;
    transition: 0.3s;
    padding-top: 60px;
}

#sidebar.active {
    left: 0;
}

#sidebar a {
    color: white;
    padding: 10px 20px;
    display: block;
    text-decoration: none;
}

#sidebar a:hover {
    background: #495057;
}

/* ปุ่ม hamburger */
#hamburger {
    font-size: 24px;
    cursor: pointer;
}