﻿
/* ===================
Custom CSS for TemplateMo 561 Purple Buzz + RWD Enhancement
=================== */

/* 兩層 sticky header：跑馬燈在最上、navbar 在其下 */
:root {
    --announce-h: 0px; /* JS 會動態寫入實際高度 */
}

/* Reset */
body {
    margin: 0;
}

/* Common Styles */
a {
    outline: none;
    color: black;
}

    a:hover {
        color: black;
    }

/* Utility Classes */
.left-aligned p {
    text-align: left !important;
}

.needprice {
    margin: 0 !important;
}

.font123 {
    font-size: smaller !important;
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /*border-radius: 1.25rem;*/
}

/* Dropdown */
.dropdown-menu-right .dropdown-menu {
    top: 100%;
    right: 0;
    left: auto;
}

.dropdownMenu {
    display: flex;
    justify-content: flex-end;
}

    .dropdownMenu ul {
        display: flex;
        line-height: 40px;
    }

.dropdown-menu ul a {
    color: #f14444;
    background-color: #fff;
    padding: 10px 20px;
    border: 1px solid #045642;
    cursor: pointer;
}

    .dropdown-menu ul a:hover {
        background: #045642;
        transition: all 0.3s;
    }

.dropdown-menu .dropdownList {
    display: none;
}

    .dropdown-menu .dropdownList li {
        display: flex;
        justify-content: center;
        align-items: center;
    }

.dropdownMenu.active {
    display: block;
}

.dropdown-item:hover {
    background-color: #f9d8de;
}

/* Qty Input */
.qty,
input.qtyplus,
input.qtyminus {
    height: 35px;
    border: 1px solid #aaa;
    background: #f8f8f8;
}

.qty {
    width: 40px;
    text-align: center;
    max-width:70px;
}

input.qtyplus,
input.qtyminus {
    width: 25px;
}


/* Responsive Utility */
@media (min-width: 576px) {
    .m-sm-50 {
        width: 50%;
    }
}

/* Cards */
/*#region 首頁卡片*/
.index-card {
    width: 19rem;
    flex: 1 1 250px;
}
/*#end 首頁卡片*/

.product-card {
    min-height:360px;
    /*max-height:370px*/
    border:none;
    border-radius:0px;
}

.card-commodity {
    transition: all 0.3s ease;
    padding: 1.5rem;
}

.card-product-picture {
    display: flex;
    justify-content: center;
    align-items: center;
}

    .card-product-picture a img {
        width: 100%;
        /*height: 160px;*/
        object-fit: cover;
        /*border-radius: 1.25rem;*/
        min-height: 160px;
    }


@media (max-width: 1300px) {
    .card-product-picture a img {
        width: 100%;
        height: 100%;
    }

    .card-commodity {
        padding: 0.5rem;
    }

        .card-commodity .product-count-wrap button,
        .card-commodity .product-count-wrap input {
            padding: 0.25rem;
            font-size: 0.8rem;
        }

        .card-commodity .mt-auto span {
            font-size: 0.5rem;
        }

        .card-commodity .mt-auto {
            font-size: 0.1rem;
            padding-top: 5px;
        }
}



@media (max-width: 767px) {
    .card-product-picture a img {
        width: 100%;
        height: 100%;
        min-height: none;
    }
    .product-card {
        min-height: none;
        max-height: none;
        height:auto;
    }
}


.card:hover {
    box-shadow: 5px 5px 5px #D0D0D0;
    transition: box-shadow 0.3s ease-in-out;
}

.card-img-top {
    border-top-left-radius: 0;
    border-top-right-radius:0;
}
/* Shopping cart badge */
.cart-badge {
    display: inline-block;
    position: absolute;
    top: -3px;
    right: 6px;
    background-color: red;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    max-height: 18px;
    text-align: center;
}

@media (max-width:1454px) and (min-width:991px) {
    .cart-badge {
        top: -12px;
        right: -9px;
    }
}

/* Carousel */
.carousel-container {
    position: relative;
    width: 100%;
}

.owl-carousel .item,
.owl-carousel .history-item {
    height: auto;
    /*max-height: 600px;*/
    display: flex;
    align-items: center;
    justify-content: center;
  /*  background-color: cyan;*/
    font-size: 24px;
    font-weight: bold;
}

/* Carousel nav */
.custom-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #6C6C6C;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    padding: 10px 20px;
    z-index: 100;
    border-radius: 50%;
}

    .custom-nav:hover {
        box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
    }

    .custom-nav.prev {
        left: 10px;
    }

    .custom-nav.next {
        right: 10px;
    }
@media (max-width: 1200px) {
    .custom-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        font-size: 10px;
        color: #6C6C6C;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        cursor: pointer;
        padding: 5px 10px;
        z-index: 100;
        border-radius: 50%;
    }
}

@media (max-width: 768px) {
    .custom-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        font-size: 10px;
        color: #6C6C6C;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        cursor: pointer;
        padding: 5px 10px;
        z-index: 100;
        border-radius: 50%;
    }
}

@media (max-width: 576px) {
    .custom-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        font-size: 10px;
        color: #6C6C6C;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        cursor: pointer;
        padding: 5px 10px;
        z-index: 100;
        border-radius: 50%;
    }
}


    /* Footer */
.phone-link {
    color: #045642 !important;
    text-decoration: none;
}
    .footer-subitem {
        color: #BEBEBE;
        font-size: 0.8rem;
    }

        .footer-subitem:hover {
            text-decoration: underline;
            color: white;
        }
.footer-about
 {
    align-items:start;
}
.footer-contact {
    align-items: end;
}
@media (max-width: 991.98px) {
    .footer-column {
        align-items: center !important; /* 區塊本身置中 */
        text-align: center !important; /* 內容文字也置中 */
    }

        .footer-column * {
            text-align: center !important;
        }
    .footer-about,
    .footer-contact {
        align-items: center;
    }
    /* 瞭解沙拉農場專屬 padding 左邊歸零 */
    #about-sarahfarm-col {
        padding-left: 12px !important;
    }
    .footer-member-service {
        padding-left: 12px !important;
    }
}

    /* Layout */
    .container-center {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-content: center;
        padding: 48px 16% 24px 16%;
    }

    @media (max-width: 768px) {
        .container-center {
            padding: 24px 5% 16px 5%;
        }
    }

    /* Layout news ellipsis 單一一行拿掉*/
/*.news-title-ellipsis {
    display: inline-block; 
    width: 100%;
    white-space: nowrap;*/ /* 不換行 */
    /*overflow: hidden;*/ /* 溢出隱藏 */
    /*text-overflow: ellipsis;*/ /* 出現 ... */
    /*vertical-align: middle;*/ /* 垂直對齊（可選） */
/*}*/


/* Magnifier */
.magnifier {
    position: absolute;
    display: none;
    width: 600px;
    height: 600px;
    border: 2px solid #000;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 300%;
    pointer-events: none;
    z-index: 999;
    image-rendering: auto;
}

    /* Navbar */
    .navbar {
        transition: all 0.3s ease-in-out;
    }

        .navbar.scrolled {
            background: #f9d8de !important;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            padding: 10px 0;
        }

            .navbar.scrolled .navbar-brand img {
                height: 60px;
            }

    .nav-link,
    .dropdown-item {
        color: #045642 !important;
    }

@media (max-width: 1453px) {
    .nav-link-md {
        padding: 0;
    }
    .nav-link-icon-md {
        padding: 0px;
        margin-right:12px;
    }
}

.nav-link-container{
    gap:5%;
    padding-left:27%;
}

/*#region  header 跑馬燈設定 */
#headerAccordionFlushExample {
    position: sticky;
    top: 0;
    z-index: 1050; /* 跑馬燈在最上層 */
}

/* 非首頁：讓 navbar 永遠貼在跑馬燈下方 */
.sticky-below-ann {
    position: sticky !important;
    top: var(--announce-h) !important;
    z-index: 1040; /* 低於跑馬燈，避免蓋到 */
    background-color: #f9d8de; /* 你的非首頁背景色 */
}

/* 首頁維持你原本的 fixed 效果，但同樣下移到跑馬燈下面 */
.fixed-below-ann {
    position: fixed !important;
    top: var(--announce-h) !important;
    left: 0;
    right: 0;
    z-index: 1040;
}


/*#endregion  header 跑馬燈設定 */
@media (max-width: 1180px) {
    .nav-link-container {
        gap: 2%;
        padding-left: 20%;
    }
}
@media (max-width: 991.98px) {
    .left-filter-desktop {
        display: none !important;
    }
    .nav-link {
    padding:4px;
    }
}
    

    /* Blog、About News images 設定 */

    #post-content img {
        /*display: block;*/
        margin: 20px auto;
        max-width: 100%;
/*        width: 100%;*/
        height: auto;
        object-fit: contain;
    }

    /* Section title */
    .section-title {
        text-align: center;
        font-weight: bold;
        font-size: 2rem;
        margin-bottom: 2rem;
        color: #045642;
    }

    /* News card */
    .news-card:hover {
        transform: translateY(-5px);
        transition: 0.3s ease;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        cursor: pointer;
    }

    /* Blog post */
    .post-title {
        margin: 0 0 20px;
        padding: 15px 0;
        text-align: center;
        text-transform: unset;
        position: relative;
        word-break: break-word;
    }

        .post-title::after {
            content: "";
            position: absolute;
            left: 50%;
            bottom: 0;
            width: 40px;
            border-bottom: 3px solid #c74060;
            transform: translateX(-50%);
        }

    .post-date {
        color: #888;
        font-size: 14px;
        text-align: center;
        margin-bottom: 10px;
    }

    /* Order History */
    .order-history-table {
        width: 100%;
        border-collapse: collapse;
        text-align: left;
        font-size: 16px;
    }

        .order-history-table thead {
            background-color: #f8d7da;
            color: #721c24;
            font-weight: bold;
        }

        .order-history-table th,
        .order-history-table td {
            padding: 12px;
            border-bottom: 1px solid #ddd;
        }

            .order-history-table td:nth-child(3) {
                text-align: right;
                font-weight: bold;
                color: red;
            }

    .status {
        padding: 5px 10px;
        border-radius: 5px;
        font-size: 14px;
        font-weight: bold;
        display: inline-block;
    }

        .status.shipped {
            background-color: #d4edda;
            color: #155724;
        }

        .status.pending {
            background-color: #fff3cd;
            color: #856404;
        }

        .status.cancelled {
            background-color: #f8d7da;
            color: #721c24;
        }

    .btn-view-detail {
        background-color: #dc3545;
        color: white;
        border: none;
        padding: 8px 20px;
        border-radius: 20px;
        cursor: pointer;
        font-size: 14px;
        transition: 0.3s;
    }

        .btn-view-detail:hover {
            background-color: #bd2130;
        }

    

    .active {
        color: #f9d8de;
    }

    /* #region  header設定  */
    .offcanvas-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100%;
        background-color: white;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
        z-index: 99999;
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
    }

        .offcanvas-menu.active {
            right: 0;
        }

    .offcanvas-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.3);
        z-index: 1049;
        display: none;
    }

        .offcanvas-backdrop.active {
            display: block;
        }

    @media (max-width: 991.98px) {
        #navbar-toggler-success {
            display: none !important;
        }
    }

#nav-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto; /* 自動推到右側 */
}

.accordion {
    font-size:14px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #db2868;
    color: white;
    min-height: 40px;
    padding-left: 20px;
    padding-right: 20px;
    }
.navbar .container-fluid {
    height:120px;
}
/*  手機/平板版，icon 放到漢堡旁邊（同排） */
@media (max-width: 991.98px) {
    .accordion {
        min-height: 64px;
       
    }
    .navbar .container, .navbar .container-fluid {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        
    }
    .navbar .container-fluid {
        padding-left: 10px !important;
        height:70px;
    }
    /*.navbar-brand {
        margin-right: auto;*/ /* 靠左 */
    /*}*/

    #nav-icons {
        margin-left: 0;
        gap: 0.5rem;
    }
    .nav-icon {
        color: #045642;
        font-size: 18px;
    }
    @media (max-width: 991.98px) {
        .navbar-brand {
        margin-bottom:0px;
        margin-right:0px;
        }
        .navbar-brand img {
            width: 110px !important; /* 手機版寬度 */
            height: auto;
        }
        .nav-icon {
            font-size: 14px;
        }
        #RWDCarBtn i,
        #RWDdropdownMenuLink i {
            font-size: 14px !important;
        }

        #RWDcart-badge {
            top:2px;
            right:-2px;
            font-size: 8px;
            min-width: 12px;
            max-height: 12px;
        }
        
    }
}

@media (max-width: 576px) {
    .container-fluid {
    justify-content:space-between !important;
    padding-right:16% !important;
    }
}
    /* #end  header設定  */


    /*#region 商品篩選側邊欄 */
    .product-offcanvas {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100%;
        background-color: #fff;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
        z-index: 9999;
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
        padding: 1.5rem;
    }

        /* 顯示側邊欄 */
        .product-offcanvas.active {
            right: 0;
        }

    /* 背景遮罩 */
    #filterBackdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.3);
        z-index: 1040;
        display: none;
    }

        /* 顯示背景遮罩 */
        #filterBackdrop.active {
            display: block;
        }

    /* 僅在手機平板顯示這些樣式 */
    @media (min-width: 992px) {
        .product-offcanvas,
        #filterBackdrop {
            display: none !important;
        }
    }

    #mobile-category-wrap-inner .btn {
        white-space: nowrap;
    }

    /*#end 商品篩選側邊欄*/

    /*#region  Faq.cshtml 的rwd 設定*/
    .faq-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .faq-item {
        flex: 0 0 calc(33.333% - 1rem); /* 預設 4 欄 */
        aspect-ratio: 1 / 1; /* 正方形關鍵 */
        background-color: gray;
        text-align: center;
        color: white;
        /*border-radius: 0.5rem;*/
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 平板：2個一排 */
    @media (max-width: 992px) {
        .faq-item {
            flex: 0 0 calc(50% - 1rem);
        }
    }

    /* 手機：1個一排 */
    @media (max-width: 576px) {
        .faq-item {
            flex: 0 0 100%;
        }
    }
    /*#endgion  Faq.cshtml 的rwd 設定*/

    /*#region  News.cshtml 的rwd 設定 */
    .news-card.card {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .news-card .card-title {
        font-size: 1rem;
        line-height: 1.4;
        height: 2.8em;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .news-card .card-text {
        font-size: 0.9rem;
        color: #555;
        line-height: 1.4;
        height: 4.2em;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    /* News cards layout */
    .custom-card {
        flex: 0 0 calc(20% - 1rem);
        /*min-width: 240px;*/
        background-color: #f9f9f9;
        border-radius: 16px;
    }

    @media (max-width: 1200px) {
        .custom-card {
            flex: 0 0 calc(33.333% - 1rem);
        }
    }

    @media (max-width: 768px) {
        .custom-card {
            flex: 0 0 calc(50% - 1rem);
        }
    }

    @media (max-width: 576px) {
        .custom-card {
            flex: 0 0 100%;
        }
    }

    .text-limited {
        color: #9D9D9D;
        max-width: 100%;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 5;
        overflow: hidden;
        white-space: pre-line;
    }

    /*#endgion  News.cshtml 的rwd 設定 */


    @media (max-width: 992px) {
        .onething {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            position: relative;
            padding: 1rem;
            margin-bottom: 1.5rem;
        }

            .onething img {
                object-fit: cover;
                border-radius: 0.5rem;
                margin: 0 auto;
            }

            .onething .col-md-2,
            .onething .col-md-4 {
                width: 100% !important;
                max-width: 100%;
                text-align: center;
            }

            .onething .fw-bold {
                font-size: 1rem;
                margin-bottom: 0.25rem;
            }

            .onething .text-muted {
                font-size: 0.85rem;
            }

            .onething textarea.item-remark {
                width: 100%;
                font-size: 0.875rem;
            }

            .onething .price {
                font-size: 0.95rem;
                text-align: center;
            }

            .onething .item-total {
                font-size: 1.05rem;
                font-weight: bold;
                color: #000;
                text-align: center;
            }

            .onething .d-flex.justify-content-center {
                justify-content: center !important;
                gap: 0.25rem;
            }

            .onething .qty {
                width: 45px;
                text-align: center;
                max-width: none;
            }

            .onething .qtyplus,
            .onething .qtyminus {
                padding: 0.25rem 0.6rem;
                background-color: #f9d8de;
                border: none;
                font-size: 1rem;
            }

            .onething .btn-link#item-del {
                position: absolute;
                top: 12px;
                right: 16px;
                color: #d9534f;
                font-size: 1.2rem;
            }

                .onething .btn-link#item-del:hover {
                    color: #bd2130;
                }
    }


    /*#region  layout 右下 icon 設定*/
    .scroll-to-top-btn {
        position: fixed;
        bottom: 50px;
        right: 50px;
        width: 50px;
        height: 50px;
        /* border-radius: 50%;*/
        /* background-color: #f9d8de;*/
        z-index: 99;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        /*    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);*/
        transition: all 0.3s ease;
    }

        .scroll-to-top-btn:hover {
            transform: scale(1.1);
        }

    /*  平板與手機：尺寸縮小 + 更靠邊 */
    @media (max-width: 768px) {
        .scroll-to-top-btn {
            width: 40px;
            height: 40px;
            bottom: 20px;
            right: 20px;
            box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
        }

            .scroll-to-top-btn i {
                font-size: 1rem !important;
            }

            .scroll-to-top-btn img {
                width: 60%;
                height: 60%;
            }
    }
    /*#end  layout 右下 icon 設定*/

    .product-img-fixed {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1; /* 自動維持 1:1 比例 */
        object-fit: cover;
        border-radius: 0.5rem;
    }

    .swal-mt {
        margin-top: 230px !important;
    }

    /*#region  產品詳細頁*/

    .Product-title {
        font-size: calc(28px*1);
    }

.productDetail-wrap {
display:flex;
justify-content:flex-start;
align-content:flex-start;
}
.btn-outline-success {
    color: #045642;
    border-color: #045642;
}
@media (max-width: 992px) {
    .productDetail-wrap {
        display: flex;
        justify-content: center;
        align-content: center;
    }
}

/*#endgion  產品詳細頁*/
/*針對輸入框的外框顏色做設定*/
.form-control:focus {
    border-color: #045642;
    box-shadow:0 0 0 0.25rem rgba(4,86,66,0.25);
}

/**/