body {
    font-family: "Helvetica Neue", Arial, sans-serif, "Microsoft JhengHei" !important;
}

.bg_hdf_brown {
    background-color: #42210B !important;
}

.bg_hdf_light_brown {
    background-color: #EBDDD4;
}

.font_brown {
    color: #42210B !important;
}

.font_brown_18 {
    font-size: 18px;
    color: #42210B !important;
}

.font_brown_s16 {
    font-size: 16px;
    color: #42210B !important;
}

.loadmore_brown {
    font-size: 18px;
    color: #42210B !important;
    text-underline-offset: 8px;
}

.loadmore_brown_16 {
    font-size: 16px;
    color: #42210B !important;
    text-underline-offset: 5px;
    padding: 10px 0;
}

.font_hdf_white {
    color: white;
}

.footer_menu {
    display: flex;
    padding-left: 0;
    list-style: none;
    margin-bottom: 0;
    justify-content: center;
    flex-wrap: nowrap;
}

.footer_menu li {
    padding: 0 10px;
}

.social-line {
    border: 0 !important;
}

@media (hover: hover) {
    .social-lineapp:hover {
        background: rgb(0, 195, 77);
        color: #fff;
    }
}

.social-spacing {
    padding: 15px 0;
}

.copyright-spacing {
    padding: 10px 0;
}

.masonry-layout-v7 {
    display: grid;
    grid-template-areas:
        "item1 item1 item2 item3"
        "item1 item1 item4 item5";
    gap: 15px;

    .item-1 {
        grid-area: item1;
    }

    .item-2 {
        grid-area: item2;
    }

    .item-3 {
        grid-area: item3;
    }

    .item-4 {
        grid-area: item4;
    }

    .item-5 {
        grid-area: item5;
    }

    @media (max-width: 767px) {
        display: flex;
        flex-direction: column;
    }
}

.tf-grid-layout_gap_0 {
    gap: 0;
}

.grid-layout_gap_sm {
    gap: 6px;
    row-gap: 0px !important;
}

.img_no_radius {
    border-radius: 0 !important;
}

/* 修改表單輸入框的背景顏色 */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
textarea,
select {
    color: #42210B !important;
    background-color: #ffffff;
    /* 您可以根據需要更改顏色 */
    border: 1px solid #42210B !important;
    /* 可選：添加邊框 */
    border-color: #42210B;
    /* 可選：設置border顏色 */
    border-radius: 0 !important;
}

::placeholder {
    color: #42210B !important;
}

button {
    border-radius: 0 !important;
}

/* 响应式产品图片样式 */
.responsive-product-img {
    width: 337px;
    height: 337px;
    object-fit: cover;
}

/* 手机版响应式设计 */
@media (max-width: 767px) {
    .responsive-product-img {
        width: 100%;
        height: auto;
        max-width: 337px;
        max-height: 337px;
    }
}

/* 平板版响应式设计 */
@media (min-width: 768px) and (max-width: 1023px) {
    .responsive-product-img {
        width: 100%;
        height: auto;
        max-width: 337px;
        max-height: 337px;
    }
}


/* 確保所有連結在 iOS 上都能正確觸發點擊事件 */
a {
    cursor: pointer;
}

/* 頁首、下拉選單、頁尾背景改為品牌米棕色 */
#header,
header.header-bg {
    background-color: #EBDDD4 !important;
}


#footer {
    background-color: #EBDDD4;
}

/* 社群 icon 改為深棕色，hover 恢復各品牌色 */
#footer .tf-social-icon .box-icon {
    color: #42210B;
}
#footer .tf-social-icon .social-facebook:hover {
    color: rgb(59, 89, 152);
}
#footer .tf-social-icon .social-instagram:hover {
    color: rgb(224, 53, 102);
}
@media (hover: hover) {
    #footer .tf-social-icon .social-lineapp:hover {
        background: rgb(0, 195, 77);
        color: #fff;
    }
}

/* 列表項目滑鼠懸停時顯示指標 */
li:hover {
    cursor: pointer;
}

.tf-field {
    position: relative;
    text-align: right;
}

.order-purchaser-label {
    font-weight: 600;
    padding-right: 25px;
    font-size: 16px;
    width: 125px;
}

.order-purchaser-input {
    padding: 6.5px 19px !important;
}

.order-purchaser-input::placeholder {
    color: #c4bbb8;
    opacity: 0.3;
}

.order-purchaser-input.invalid-field,
.tf-select.invalid-field {
    border: 2px solid red !important;
}

.info-block-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.info-block-login {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px !important;
}

.info-block-captcha {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 15px !important;
    align-items: center;
}

.info-block-register {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 40px !important;
}

.info-block-forgetPwd {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 40px !important;
}

@media (max-width: 767px) {
    .nav-wishlist {
        display: inline-block !important;
    }

    .info-block-btn {
        justify-content: space-around;
    }

    .info-block-captcha {
        display: flex;
        gap: 10px;
        margin-top: 15px !important;
        flex-direction: column;
        align-items: flex-start;
    }

    .info-block-login {
        display: flex;
        gap: 10px;
        margin-top: 15px !important;
        flex-direction: column;
    }

    .info-block-register {
        margin-top: 15px !important;
    }

    .info-block-forgetPwd {
        margin-top: 15px !important;
    }
}

@media (max-width: 600px) {

    .tf-field.style-1,
    .tf-field.style-1>div,
    .tf-field.style-1 select,
    .tf-field.style-1 input {
        width: 100% !important;
        box-sizing: border-box;
    }

    .tf-field.style-1 {
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100%;
        box-sizing: border-box;
    }

    .tf-field.style-1>label,
    .tf-field.style-1>.custom-checkbox,
    .tf-field.style-1>.custom-checkbox-label {
        margin-bottom: 8px;
        margin-right: 0;
        width: 100%;
        text-align: left;
    }

    .tf-field.style-1>.custom-checkbox-label {
        white-space: normal;
        margin: -7px 1px;
    }
}

@media (max-width: 320px) {
    .canvas-mb .mb-canvas-content {
        min-width: 290px;
    }
}

/* 電腦版樣式 (預設) */
.desktop-only {
    display: block !important;
}

.mobile-only {
    display: none !important;
}

/* 手機版樣式 (螢幕寬度 <= 767px) */
@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }
}

/* --- 首頁輪播圖手機版響應式調整 --- */
@media (max-width: 767px) {
    .tf-slideshow .swiper-slide .wrap-slider {
        height: auto;
        /* 移除固定高度，讓高度由內容決定 */
    }

    .tf-slideshow .swiper-slide img {
        width: 100%;
        height: auto;
        /* 讓圖片高度自動調整以維持長寬比 */
        object-fit: initial;
        /* 重設 object-fit，因為已不再需要 */
    }

    .sw-dots:not(.swiper-pagination-lock) {
        margin-top: 0px !important;
    }
}

/* --- 全站通知訊息樣式 --- */
.toast-notification {
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 500px;
    word-wrap: break-word;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-notification.success {
    background: #1a8734;
}

.toast-notification.error {
    background: #912d37;
}

.toast-notification.warning {
    background: #dba604;
    color: #333;
}

.toast-notification.info {
    background: #178c9e;
}

@media (max-width: 767px) {
    .toast-notification {
        max-width: 280px;
    }
}

/* 彈窗背景遮罩 */
.warning-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 15px;
}

/* 彈窗主要內容區塊 */
.warning-modal-content {
    position: relative;
    background-color: #fff;
    padding: 7px;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: modal-fade-in 0.3s ease-in-out;
}

/* 關閉按鈕 */
.warning-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #fff;
    /* 將 'X' 改為白色 */
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
    /* 為 'X' 增加一點陰影，更清晰 */
    cursor: pointer;
    z-index: 10;
    background: rgba(0, 0, 0, 0.35);
    /* 改為半透明黑色背景 */
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    transition: background-color 0.2s, transform 0.2s;
}

.warning-modal-close:hover,
.warning-modal-close:focus {
    background-color: rgba(0, 0, 0, 0.6);
    /* 滑鼠移上去時加深背景 */
    transform: scale(1.1);
    color: #fff;
}

/* 輪播容器 */
.slideshow-container {
    position: relative;
    margin: auto;
    overflow: hidden;
    border-radius: 8px;
    /* 讓圖片也有圓角 */
}

/* 輪播項目 (預設隱藏) */
.mySlides {
    display: none;
    line-height: 0;
    /* 避免圖片下方有空隙 */
}

.mySlides img {
    width: 100%;
    vertical-align: middle;
}

/* 上一頁/下一頁 按鈕 */
a.prev,
a.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
}

/* 下一頁按鈕位置 */
a.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* 滑鼠移上去時變深色 */
a.prev:hover,
a.next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 投影片淡入動畫 */
.slide-fade-effect {
    animation-name: slide-fade-animation;
    animation-duration: 0.5s;
}

@keyframes slide-fade-animation {
    from {
        opacity: .4
    }

    to {
        opacity: 1
    }
}

/* 手機版響應式設計 */
@media (max-width: 767px) {
    .warning-modal-content {
        max-width: 100%;
        padding: 7px;
    }

    .prev,
    .next {
        font-size: 16px;
        padding: 8px;
    }

    .warning-modal-close {
        width: 25px;
        height: 25px;
    }
}

/* 彈窗淡入動畫 */
@keyframes modal-fade-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.text_black-custom {
    color: #9D9894 !important;
}

.text_black-custom:hover {
    color: #ff0000 !important;
}


/* --- 首頁輪播圖連結圖片等比例修正 --- */
.tf-slideshow .swiper-slide .wrap-slider a {
    display: block;
    width: 100%;
    height: 100%;
}

.tf-slideshow .swiper-slide .wrap-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}