/*
 * Custom code goes here.
 * 物豐商行 - 深色背景設定（與 PS1 一致）
 */

/* 深色背景 */
html,
body {
    background-color: #1a1a1a !important;
    color: #f5f5f5 !important;
}

#wrapper,
.wrapper,
main,
#main {
    background-color: #1a1a1a !important;
}

#header,
header,
.header {
    background-color: #1a1a1a !important;
}

#footer,
footer {
    background-color: #16181c !important;
}

#footer *,
footer * {
    color: #f5f5f5;
}

/* 頂部橫幅 - 白色 */
.header-banner,
.header-banner a,
.header-banner span,
.header-banner p {
    color: #fff !important;
}

.header-banner a:hover {
    color: #ccc !important;
}

/* 一般連結顏色 - 金色（不含 Menu 和 Banner）*/
.header-top a:not(.top-menu a),
.breadcrumb a {
    color: #c9a86c !important;
}

.header-top a:not(.top-menu a):hover,
.breadcrumb a:hover {
    color: #e0c08a !important;
}

/* 麵包屑 */
.breadcrumb {
    background-color: transparent !important;
}

.breadcrumb a,
.breadcrumb li {
    color: #c9a86c !important;
}

/* Slider 滿版 */
#carousel,
.carousel,
.homeslider,
#homeslider,
.slider-container {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
}

#carousel img,
.carousel img,
.homeslider img,
#homeslider img,
.carousel-item img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
}


/* header-banner 滿版 */
.header-banner {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

.header-banner .container {
    max-width: 100% !important;
    padding: 0 !important;
}

/* ===== Menu 區域樣式（與 PS1 對齊）===== */

/* header-nav 區域 */
.header-nav {
    background-color: #1a1a1a !important;
    padding: 15px 0;
}

/* Logo 區域 - 白色背景 */
.header-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.simplicity-logo-wrapper {
    display: inline-block;
    background-color: #fff;
    padding: 10px 15px;
}

.simplicity-logo-wrapper .simplicity-logo {
    max-width: 400px;
    height: auto;
}

/* 右側 Icons (搜尋 + FB) - 與 PS1 對齊 */
.header-icons {
    display: flex;
    align-items: center;
}

/* 搜尋框樣式 - 點擊展開（與 PS1 一致）*/
.header-search-wrapper {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
}

.header-search-icon {
    color: #c7c7c7 !important;
    cursor: pointer;
    text-decoration: none !important;
}

.header-search-icon:hover {
    color: #fff !important;
}

.header-search-icon .material-icons {
    font-size: 22px;
    vertical-align: middle;
}

.header-search-form {
    display: none;
    align-items: center;
    border: 1px solid #c7c7c7;
    background: transparent;
    margin-right: 10px;
}

.header-search-form.active {
    display: flex;
}

.header-search-input {
    background: transparent;
    border: none;
    color: #c7c7c7;
    padding: 5px 10px;
    font-size: 14px;
    width: 120px;
    outline: none;
}

.header-search-input::placeholder {
    color: #888;
}

.header-icons a {
    color: #c7c7c7 !important;
    text-decoration: none;
    margin-left: 15px;
    font-size: 18px;
}

.header-icons a:hover {
    color: #fff !important;
}

.header-icons .header-fb-icon span {
    font-family: Georgia, serif;
    font-size: 20px;
    font-weight: bold;
}

.simplicity-menu-wrapper {
    width: 100%;
}

/* 導覽區域容器 */
.header-nav .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Menu 項目樣式 */
.header-nav .top-menu,
.header-nav #top-menu,
.header-nav .menu,
#_desktop_top_menu {
    background-color: transparent !important;
}

/* Menu 文字 - 與 PS1 一致 */
.header-nav .top-menu > li > a,
#top-menu > li > a,
.top-menu a,
.menu a,
.dropdown-item {
    color: #c7c7c7 !important;
    font-size: 1rem;
    padding: .1875rem 1.25rem .375rem 0;
    text-decoration: none;
}

.header-nav .top-menu > li > a:hover,
#top-menu > li > a:hover,
.top-menu a:hover,
.dropdown-item:hover {
    color: #949494 !important;
    background: none !important;
}

/* Menu 多行排列 - 與 PS1 對齊 */
#_desktop_top_menu,
.simplicity-menu-wrapper {
    max-width: 780px;
}

#top-menu,
.top-menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

#top-menu > li,
.top-menu > li {
    margin-right: 8px;
    margin-bottom: 8px;
}

/* 下拉選單箭頭顏色 */
.top-menu .dropdown-toggle::after,
#top-menu .dropdown-toggle::after {
    border-top-color: #c9a86c;
}

/* 右側圖標區域 */
.header-nav .right-nav,
.header-nav .user-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.header-nav .right-nav a,
.header-nav .user-info a {
    color: #c9a86c !important;
    margin-left: 15px;
}

/* 搜尋框 */
.header-nav .search-widget form input[type="text"] {
    background-color: transparent;
    border: 1px solid #c9a86c;
    color: #fff;
}

/* header-top 區域（如果 menu 在這裡）*/
.header-top {
    background-color: #1a1a1a !important;
}

/* displayNav1 區域 */
.header-nav .col-md-9 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
/* ===== CMS 頁面內容樣式（與 PS1 對齊）===== */
#content,
.page-content,
.cms-page-content,
#cms,
.page-cms {
    background-color: #1a1a1a !important;
    color: #c7c7c7 !important;
}

#content-wrapper,
.page-wrapper,
#wrapper .container {
    background-color: #1a1a1a !important;
}

/* CMS 頁面內文 */
.cms-page-content p,
.page-cms p,
#cms p,
.page-content p {
    color: #c7c7c7 !important;
}

.cms-page-content h1,
.cms-page-content h2,
.cms-page-content h3,
.page-cms h1,
.page-cms h2,
.page-cms h3 {
    color: #fff !important;
}

/* 灰色背景區塊 */
.gray-light-bg {
    background-color: #1a1a1a !important;
    color: #c7c7c7 !important;
}

.gray-light-bg p {
    color: #c7c7c7 !important;
}

/* 所有卡片與區塊 */
.card,
.block,
article {
    background-color: #1a1a1a !important;
    color: #c7c7c7 !important;
}

/* ===== 下拉選單樣式（與 PS1 對齊）===== */
.top-menu .sub-menu,
.top-menu .popover,
#top-menu .sub-menu,
#top-menu .popover {
    background-color: #1a1a1a !important;
    border: 1px solid #333 !important;
    box-shadow: 1px 1px 1px 1px #333 !important;
}

.top-menu .sub-menu a,
.top-menu .popover a,
#top-menu .sub-menu a,
#top-menu .popover a,
.top-menu .sub-menu .dropdown-item,
#top-menu .sub-menu .dropdown-item {
    color: #c7c7c7 !important;
    background: transparent !important;
    padding: 8px 15px !important;
}

.top-menu .sub-menu a:hover,
.top-menu .popover a:hover,
#top-menu .sub-menu a:hover,
#top-menu .popover a:hover {
    color: #fff !important;
    background: #333 !important;
}

.top-menu .sub-menu ul,
#top-menu .sub-menu ul {
    background-color: #1a1a1a !important;
}

/* Footer 背景統一黑色 */
.footer-container,
#footer,
footer,
.block-contact,
.linklist,
.link-block,
.links,
.wrapper-footer,
.footer-before {
    background-color: #1a1a1a !important;
}

.footer-container .container,
#footer .container {
    background-color: #1a1a1a !important;
}

/* ===== 左側選單/篩選器樣式（與 PS1 對齊）===== */
#left-column,
.left-column,
#search_filters,
.facet,
.faceted-search {
    background-color: #1a1a1a !important;
}

/* 分類標題 */
.facet .facet-title,
.block-categories .category-top-menu,
.facet-label,
#search_filters .facet-title {
    color: #fff !important;
}

/* 分類連結文字 */
.facet a,
.facet li,
.facet .custom-checkbox label,
.facet .custom-checkbox span,
#search_filters a,
#search_filters li,
.block-categories a,
.category-sub-menu a,
.category-sub-menu li {
    color: #fff !important;
}

.facet a:hover,
#search_filters a:hover,
.block-categories a:hover,
.category-sub-menu a:hover {
    color: #ccc !important;
}

/* 展開/收合圖標 */
.facet .collapse-icons .material-icons,
.facet .navbar-toggler .material-icons,
.block-categories .material-icons {
    color: #fff !important;
}

/* 分類頁標題 - 淺灰色（與 PS1 對齊）*/
#js-product-list-header h1,
.block-category h1,
.category-header h1,
#category h1,
.page-category h1 {
    color: #c7c7c7 !important;
}

/* 商品數量、排序 - 淺灰色 */
.products-sort-order,
.total-products,
.products-sort-order .select-title,
.showing {
    color: #c7c7c7 !important;
}

/* ===== 手機版樣式（與 PS1 對齊）===== */
@media (max-width: 768px) {
    /* 手機版 Header Row - 漢堡左、Logo中、購物車右 */
    .mobile-header-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
        background-color: #1a1a1a;
    }

    .mobile-menu-icon {
        color: #c7c7c7;
        cursor: pointer;
    }

    .mobile-menu-icon .material-icons {
        font-size: 28px;
    }

    .mobile-logo-wrapper {
        flex: 1;
        text-align: center;
    }

    .mobile-logo-wrapper a {
        display: inline-block;
        background-color: #fff;
        padding: 3px 8px;
    }

    .mobile-logo {
        max-height: 25px;
        width: auto;
    }

    .mobile-cart-icon {
        color: #c7c7c7;
        min-width: 28px;
    }

    /* 隱藏預設篩選器 */
    #left-column {
        display: none !important;
    }

    /* 確保商品數量和排序顯示 */
    .products-sort-order,
    .total-products {
        display: block !important;
    }
}

/* ===== Mobile Menu 樣式（與 PS1 對齊）===== */
#mobile_top_menu_wrapper {
    background-color: #1a1a1a !important;
    padding: 0 !important;
    display: none;
}

#mobile_top_menu_wrapper.open {
    display: block !important;
}

/* 搜尋框區域 */
#_mobile_search_me {
    padding: 10px 15px;
    background-color: #1a1a1a;
}

#_mobile_search_me input[type="text"],
#_mobile_search_me .search-widget input {
    background: transparent !important;
    border: 1px solid #c7c7c7 !important;
    color: #c7c7c7 !important;
    padding: 8px 12px;
    width: 100%;
}

#_mobile_search_me input::placeholder {
    color: #888;
}

/* 用戶資訊/FB 登入 */
#_mobile_user_info {
    background-color: #1a1a1a;
}

#_mobile_user_info a {
    display: block;
    padding: 10px 15px;
    color: #c7c7c7 !important;
    border-bottom: 1px solid #333;
}

/* 主選單項目 - 垂直排列 */
#_mobile_top_menu {
    background-color: #1a1a1a !important;
}

#_mobile_top_menu .top-menu,
#mobile_top_menu_wrapper .top-menu {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    background-color: #1a1a1a !important;
    list-style: none;
    padding: 0;
    margin: 0;
}

#_mobile_top_menu .top-menu > li,
#mobile_top_menu_wrapper .top-menu > li {
    width: 100% !important;
    margin: 0 !important;
}

#_mobile_top_menu .top-menu a,
#mobile_top_menu_wrapper .top-menu a {
    display: block;
    padding: 12px 15px;
    color: #c7c7c7 !important;
    border-bottom: 1px solid #333;
    background: transparent !important;
}

#_mobile_top_menu .top-menu a:hover,
#mobile_top_menu_wrapper .top-menu a:hover {
    color: #fff !important;
    background-color: #111 !important;
}

/* 展開/收合圖標 */
#_mobile_top_menu .collapse-icons .material-icons,
#mobile_top_menu_wrapper .collapse-icons .material-icons,
#_mobile_top_menu .navbar-toggler .material-icons {
    color: #c7c7c7 !important;
}

/* 子選單 */
#_mobile_top_menu .sub-menu,
#mobile_top_menu_wrapper .sub-menu {
    background-color: #111 !important;
    list-style: none;
    padding: 0;
    margin: 0;
}

#_mobile_top_menu .sub-menu a,
#mobile_top_menu_wrapper .sub-menu a {
    padding-left: 30px !important;
    color: #c7c7c7 !important;
    border-bottom: 1px solid #222;
}

#_mobile_top_menu .sub-menu li,
#mobile_top_menu_wrapper .sub-menu li {
    width: 100%;
}

/* 底部區域（語言/貨幣）*/
.js-top-menu-bottom {
    background-color: #1a1a1a;
    padding: 10px 15px;
}

.js-top-menu-bottom a {
    color: #c7c7c7 !important;
}

/* 篩選器區域 */
#_mobile_search_filters {
    background-color: #1a1a1a;
}

#_mobile_search_filters a,
#_mobile_search_filters li {
    color: #c7c7c7 !important;
}

/* ===== 訂閱電子報區塊（與 PS1 對齊）===== */
/* Footer 內的 container 和 row - 訂閱區塊容器 */
#footer > .container,
#footer > .container > .row,
footer > .container,
footer > .container > .row,
footer .container:first-child,
footer .container:first-child .row {
    background-color: #1a1a1a !important;
}

/* 父容器背景 - displayFooterBefore hook */
.footer-before,
[id^="blockEmailSubscription_"],
.block_newsletter {
    background-color: #1a1a1a !important;
}

/* 整個 row 容器 */
.block_newsletter .row {
    background-color: #1a1a1a !important;
}

/* 標題文字 - 白色 */
#block-newsletter-label,
.block_newsletter p:first-child {
    color: #fff !important;
    background-color: #1a1a1a !important;
}

/* 隱藏額外說明文字（條件說明）*/
.block_newsletter .col-xs-12 > p:not(#block-newsletter-label),
.block_newsletter form p {
    display: none !important;
}

/* 輸入框樣式 */
.block_newsletter input[type="text"],
.block_newsletter input[type="email"],
.block_newsletter .input-wrapper input {
    background-color: #333 !important;
    border: 1px solid #555 !important;
    color: #c7c7c7 !important;
    padding: 10px 15px;
}

.block_newsletter input::placeholder {
    color: #888 !important;
}

/* 確定按鈕樣式 - 深灰色 */
.block_newsletter input[type="submit"],
.block_newsletter .btn-primary {
    background-color: #444 !important;
    border: none !important;
    color: #fff !important;
}

.block_newsletter input[type="submit"]:hover {
    background-color: #555 !important;
}

/* GDPR 紅色圖標按鈕保持紅色 */
.block_newsletter .psgdpr_consent_message .btn {
    background-color: #e74c3c !important;
}

/* ===== Footer 選單樣式（與 PS1 對齊）===== */
/* Footer 選單區塊 - 商店、商品、購物協助 */
.footer-container,
.footer-container .container,
.footer-container .row,
.footer-container .links,
.footer-container .link-block,
.footer-container .linklist,
.footer-container .block-contact {
    background-color: #1a1a1a !important;
}

/* 展開的選單內容 */
.footer-container .collapse,
.footer-container .collapsing,
.footer-container .collapse.show,
.footer-container ul,
.footer-container .navbar-collapse {
    background-color: #1a1a1a !important;
}

/* 選單標題 */
.footer-container h4,
.footer-container .h4,
.footer-container .link-block h4,
.footer-container .title {
    color: #fff !important;
    background-color: #1a1a1a !important;
}

/* 選單連結 */
.footer-container a,
.footer-container li,
.footer-container .linklist a {
    color: #c7c7c7 !important;
    background-color: #1a1a1a !important;
}

.footer-container a:hover {
    color: #fff !important;
}

/* 展開/收合圖標 */
.footer-container .material-icons,
.footer-container .collapse-icons {
    color: #c7c7c7 !important;
}

/* ===== 商品頁標題顏色 ===== */
#product h1,
.product-page h1,
h1[itemprop="name"],
.product-information h1,
#product-comments-list-header {
    color: #fff !important;
}

.product-information {
    color: #fff !important;
}

.label,
label {
    color: #fff !important;
}

/* ===== 商品頁 Tabs 樣式 ===== */
.tabs .nav-tabs .nav-link.active,
.tabs .nav-tabs .nav-link:hover {
    color: #c9a86c !important;
    border-color: #c9a86c !important;
}

/* ===== 商品標籤樣式 ===== */
.product-flags li.product-flag {
    background-color: #c9a86c !important;
}

/* ===== 商品縮圖選取樣式 ===== */
.product-images > li.thumb-container > .thumb.selected,
.product-images > li.thumb-container > .thumb:hover {
    border-color: #c9a86c !important;
}

/* ===== 會員專屬價格引導（未登入時顯示）===== */
.product-login-required {
    margin: 20px 0;
}

.product-login-required .btn-login-required {
    background-color: #c9a86c !important;
    border: none !important;
    color: #000 !important;
    padding: 15px 25px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.product-login-required .btn-login-required:hover {
    background-color: #e0c08a !important;
    text-decoration: none;
}

.product-login-required .material-icons {
    margin-right: 10px;
    font-size: 20px;
}

/* 列表頁登入提示 - 遮罩內 */
.product-no-desc-overlay .product-login-hint {
    margin-top: 10px;
}

.product-no-desc-overlay .product-login-hint span {
    color: #c9a86c !important;
    font-size: 14px;
}

/* 列表頁登入提示 - 商品描述區 */
.product-description .product-login-hint {
    margin-top: 10px;
}

.product-description .product-login-hint a {
    color: #c9a86c !important;
    font-size: 14px;
    text-decoration: none;
}

.product-description .product-login-hint a:hover {
    color: #e0c08a !important;
    text-decoration: underline;
}

/* ===== 固定購物車按鈕（登入後顯示）===== */
.floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.floating-cart-btn {
    display: flex;
    align-items: center;
    background-color: #c9a86c;
    color: #000 !important;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-weight: bold;
}

.floating-cart-btn:hover {
    background-color: #e0c08a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    text-decoration: none !important;
}

.floating-cart-btn .material-icons {
    font-size: 24px;
    margin-right: 8px;
}

.floating-cart-count {
    background-color: #e74c3c;
    color: #fff;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
}

.floating-checkout-btn {
    display: flex;
    align-items: center;
    background-color: #28a745;
    color: #fff !important;
    padding: 15px 25px;
    border-radius: 50px;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 16px;
}

.floating-checkout-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    text-decoration: none !important;
}

.floating-checkout-btn .material-icons {
    font-size: 24px;
    margin-right: 8px;
}

/* 手機版調整 */
@media (max-width: 768px) {
    .floating-cart {
        bottom: 15px;
        right: 15px;
    }

    .floating-cart-btn {
        padding: 10px 15px;
    }

    .floating-checkout-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* ===== 結帳頁面深色主題 ===== */
body#checkout {
    background-color: #1a1a1a !important;
}

body#checkout #wrapper,
body#checkout .container {
    background-color: #1a1a1a !important;
}

/* 結帳步驟區塊 */
body#checkout .checkout-step {
    background-color: #111 !important;
    border-color: #333 !important;
    margin-bottom: 15px;
    border-radius: 8px;
}

body#checkout .checkout-step .step-title {
    color: #fff !important;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

body#checkout .checkout-step .step-number {
    background-color: #c9a86c;
    color: #000;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

body#checkout .checkout-step.-current {
    border: 2px solid #c9a86c !important;
}

body#checkout .checkout-step.-complete .done {
    color: #28a745 !important;
}

/* 購物車摘要 */
body#checkout .card,
body#checkout #js-checkout-summary {
    background-color: #111 !important;
    border: 1px solid #333 !important;
    border-radius: 8px;
}

body#checkout .card-block {
    color: #c7c7c7 !important;
}

body#checkout .cart-summary-line .label,
body#checkout .cart-summary-line .value {
    color: #c7c7c7 !important;
}

body#checkout .cart-total .value {
    color: #c9a86c !important;
    font-size: 1.25rem;
    font-weight: bold;
}

/* 表單元素 */
body#checkout input[type="text"],
body#checkout input[type="email"],
body#checkout input[type="tel"],
body#checkout select,
body#checkout textarea {
    background-color: #222 !important;
    border: 1px solid #444 !important;
    color: #fff !important;
}

body#checkout label {
    color: #c7c7c7 !important;
}

/* 付款選項 */
body#checkout .payment-option {
    background-color: #1a1a1a !important;
    border: 1px solid #333 !important;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
}

body#checkout .payment-option label {
    color: #fff !important;
}

/* 送出訂單按鈕 - 醒目金色 */
body#checkout #payment-confirmation .btn-primary,
body#checkout .checkout-step .btn-primary {
    background-color: #c9a86c !important;
    border: none !important;
    color: #000 !important;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 4px;
    width: 100%;
    margin-top: 20px;
}

body#checkout #payment-confirmation .btn-primary:hover {
    background-color: #e0c08a !important;
}

/* 繼續按鈕 */
body#checkout .btn.continue {
    background-color: #c9a86c !important;
    border: none !important;
    color: #000 !important;
}

/* 地址選擇卡片 */
body#checkout .address-item {
    background-color: #1a1a1a !important;
    border: 2px solid #333 !important;
}

body#checkout .address-item.selected {
    border-color: #c9a86c !important;
}

body#checkout .address-item .address {
    color: #c7c7c7 !important;
}

/* 運送選項 */
body#checkout .delivery-option {
    background-color: #1a1a1a !important;
    border: 1px solid #333 !important;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
}

body#checkout .carrier-name,
body#checkout .carrier-delay,
body#checkout .carrier-price {
    color: #fff !important;
}

/* ===== 結帳頁面手機版 ===== */
@media (max-width: 991px) {
    body#checkout .cart-grid-body {
        order: 1;
    }

    body#checkout .cart-grid-right {
        order: 2;
        margin-top: 20px;
    }

    /* 固定底部送出按鈕 */
    body#checkout #payment-confirmation {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #111;
        padding: 15px;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
    }

    body#checkout #payment-confirmation .btn-primary {
        margin-top: 0;
    }

    /* 為固定按鈕留出空間 */
    body#checkout #content {
        padding-bottom: 80px;
    }
}

/* ===== 台灣地址選擇樣式 ===== */
body#checkout .tw-address-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

body#checkout .tw-address-wrapper select {
    flex: 1;
    background-color: #222 !important;
    border: 1px solid #444 !important;
    color: #fff !important;
}

body#checkout .tw-address-wrapper select option {
    background-color: #222;
    color: #fff;
}

/* 郵遞區號欄位唯讀樣式 */
body#checkout input[name="postcode"][readonly] {
    background-color: #333 !important;
    cursor: not-allowed;
}

/* 台灣地址 - 隱藏原本的 city 輸入框 */
body#checkout .tw-city-hidden {
    display: none !important;
}

/* 縣市區選擇下拉選單樣式 */
select[name="county"],
select[name="district"] {
    background-color: #222 !important;
    border: 1px solid #444 !important;
    color: #fff !important;
    padding: 8px 12px;
    border-radius: 4px;
}

select[name="county"]:focus,
select[name="district"]:focus {
    border-color: #c9a86c !important;
    outline: none;
}

/* ===== 步驟數字垂直置中修正 ===== */
body#checkout .checkout-step .step-number {
    background-color: #c9a86c;
    color: #000;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    line-height: 1;
    padding: 0;
    font-weight: bold;
    vertical-align: middle;
}

/* ===== 購物車摘要對比度提升 ===== */

/* 商品數量與「顯示詳細」連結 */
body#checkout .cart-summary-products p {
    color: #fff !important;
}

body#checkout .cart-summary-products a {
    color: #c9a86c !important;
}

body#checkout .cart-summary-products a:hover {
    color: #e0c08a !important;
}

/* 編輯購物車按鈕 */
body#checkout .step-edit,
body#checkout .step-edit a,
body#checkout .cart-summary-products .step-edit {
    color: #c9a86c !important;
}

body#checkout .step-edit:hover,
body#checkout .step-edit a:hover {
    color: #e0c08a !important;
}

/* 商品名稱 */
body#checkout .media-list .product-name,
body#checkout .media-list a,
body#checkout #cart-summary-product-list a {
    color: #fff !important;
}

body#checkout .media-list a:hover {
    color: #c9a86c !important;
}

/* 商品數量與價格 */
body#checkout .media-list .product-quantity,
body#checkout .media-list .product-price,
body#checkout .media-list .qty {
    color: #c7c7c7 !important;
}

/* 小計標籤 */
body#checkout .cart-summary-subtotals-container .label,
body#checkout .cart-summary-line .label {
    color: #fff !important;
}

/* 小計金額 */
body#checkout .cart-summary-subtotals-container .value,
body#checkout .cart-summary-line .value {
    color: #c9a86c !important;
    font-weight: bold;
}

/* 總計標籤 */
body#checkout .cart-total .label {
    color: #fff !important;
    font-size: 1.1rem;
    font-weight: bold;
}

/* 總計金額 - 更醒目 */
body#checkout .cart-total .value {
    color: #c9a86c !important;
    font-size: 1.3rem;
    font-weight: bold;
}

/* 運費標籤和金額 */
body#checkout .cart-summary-line.cart-summary-subtotals .label,
body#checkout .cart-summary-line.cart-summary-subtotals .value {
    color: #c7c7c7 !important;
}

/* ===== 台灣地址表單樣式調整 ===== */

/* 隱藏地址補充欄位（備用 CSS 方式）*/
body#checkout .form-group:has(input[name="address2"]),
body#checkout .form-group:has(textarea[name="address2"]) {
    display: none !important;
}

/* 隱藏 firstname 欄位（備用 CSS 方式）*/
body#checkout .form-group:has(input[name="firstname"]) {
    display: none !important;
}

/* 國家欄位顯示為靜態文字 */
body#checkout .form-control-static {
    color: #c7c7c7;
    padding: 8px 0;
    font-size: 1rem;
}

/* 縣市區選擇下拉選單並排顯示 */
body#checkout .tw-address-wrapper {
    display: flex;
    gap: 10px;
    width: 100%;
}

body#checkout .tw-address-wrapper select {
    flex: 1;
    min-width: 0;
}

/* 必填欄位標籤樣式 */
body#checkout .form-control-label.required::after {
    content: " *";
    color: #e74c3c;
}

/* ===== 修正步驟數字垂直置中（覆蓋原本 padding 設定）===== */
body#checkout section.checkout-step .step-number {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    width: 30px;
    height: 30px;
    line-height: 1;
    vertical-align: middle;
}

/* ===== 購物車頁面樣式優化 ===== */

/* 購物車頁面背景 */
body#cart {
    background-color: #1a1a1a !important;
}

body#cart #wrapper,
body#cart .container {
    background-color: #1a1a1a !important;
}

/* 購物車商品項目 */
body#cart .cart-item {
    background-color: #111 !important;
    border: 1px solid #333 !important;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px;
}

/* 商品名稱 */
body#cart .product-line-info .label,
body#cart .product-line-info a {
    color: #fff !important;
    font-size: 1.1rem;
}

/* 商品價格 */
body#cart .product-price,
body#cart .current-price .price {
    color: #c9a86c !important;
    font-weight: bold;
}

/* 數量選擇器 - 修正數字不可見問題 */
body#cart .js-cart-line-product-quantity,
body#cart input[name="product-quantity-spin"] {
    background-color: #222 !important;
    border: 2px solid #c9a86c !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: bold !important;
    text-align: center !important;
    width: 70px !important;
    height: 40px !important;
    border-radius: 4px !important;
    -webkit-appearance: textfield !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

body#cart .js-cart-line-product-quantity:focus {
    border-color: #e0c08a !important;
    outline: none !important;
    box-shadow: 0 0 5px rgba(201, 168, 108, 0.5) !important;
}

/* 移除數字輸入框的上下箭頭 */
body#cart .js-cart-line-product-quantity::-webkit-outer-spin-button,
body#cart .js-cart-line-product-quantity::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* 刪除按鈕 X - 更清楚 */
body#cart .remove-from-cart {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    background-color: #e74c3c !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
}

body#cart .remove-from-cart:hover {
    background-color: #c0392b !important;
    transform: scale(1.1) !important;
}

body#cart .remove-from-cart i.material-icons {
    color: #fff !important;
    font-size: 20px !important;
    float: none !important;
}

/* 小計標籤 */
body#cart .cart-item .price,
body#cart .product-line-grid-right .price {
    text-align: right;
}

body#cart .product-line-grid-right .price .product-price {
    color: #c9a86c !important;
    font-size: 1.2rem !important;
}

/* 購物車底部總計區 */
body#cart .cart-detailed-totals {
    background-color: #111 !important;
    border: 1px solid #333 !important;
    border-radius: 8px;
    padding: 20px;
}

body#cart .cart-detailed-totals .label {
    color: #fff !important;
}

body#cart .cart-detailed-totals .value {
    color: #c9a86c !important;
    font-weight: bold;
}

body#cart .cart-total .label {
    font-size: 1.2rem !important;
    color: #fff !important;
}

body#cart .cart-total .value {
    font-size: 1.4rem !important;
    color: #c9a86c !important;
    font-weight: bold !important;
}

/* 結帳按鈕 */
body#cart .checkout a.btn-primary {
    background-color: #c9a86c !important;
    border: none !important;
    color: #000 !important;
    font-weight: bold !important;
    padding: 15px 30px !important;
    font-size: 1.1rem !important;
    width: 100% !important;
}

body#cart .checkout a.btn-primary:hover {
    background-color: #e0c08a !important;
}

/* 繼續購物連結 */
body#cart a.label,
body#cart .cart-detailed-actions a {
    color: #c9a86c !important;
}

/* 空購物車訊息 */
body#cart .no-items {
    color: #c7c7c7 !important;
    font-size: 1.2rem;
    display: block;
    text-align: center;
    padding: 40px;
}

/* 商品屬性 */
body#cart .product-line-info .value {
    color: #c7c7c7 !important;
}

/* 折扣顯示 */
body#cart .regular-price {
    color: #888 !important;
    text-decoration: line-through;
}

body#cart .discount {
    color: #e74c3c !important;
    font-weight: bold;
}

/* 重新排列商品行 - 小計放下方 */
body#cart .product-line-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

body#cart .product-line-grid-right {
    display: flex;
    flex-direction: column;
}

body#cart .product-line-grid-right .row {
    width: 100%;
}

/* 數量和刪除按鈕在同一行 */
body#cart .product-line-grid-right .qty {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 小計顯示在數量下方 */
body#cart .product-line-grid-right .price {
    margin-top: 10px;
}

/* 手機版調整 */
@media (max-width: 768px) {
    body#cart .product-line-grid-left {
        width: 30%;
    }
    
    body#cart .product-line-grid-body {
        width: 70%;
    }
    
    body#cart .product-line-grid-right {
        width: 100%;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #333;
    }
    
    body#cart .product-line-grid-right .row {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    body#cart .js-cart-line-product-quantity {
        width: 60px !important;
        height: 36px !important;
    }
    
    body#cart .remove-from-cart {
        width: 32px !important;
        height: 32px !important;
    }
}

/* ===== 購物車商品行新佈局 ===== */

/* 商品名稱連結 */
body#cart .product-name {
    color: #fff !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
    text-decoration: none !important;
}

body#cart .product-name:hover {
    color: #c9a86c !important;
}

/* 單價標籤 */
body#cart .unit-price-label {
    color: #888 !important;
    font-size: 0.9rem;
}

/* 屬性標籤 */
body#cart .attr-label {
    color: #888 !important;
}

/* 數量與刪除按鈕行 */
body#cart .qty-delete-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 15px;
}

body#cart .qty-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
}

body#cart .qty-label {
    color: #c7c7c7 !important;
    font-size: 1rem;
}

/* 小計行 */
body#cart .subtotal-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding-top: 10px;
    border-top: 1px solid #333;
    margin-top: 10px;
}

body#cart .subtotal-label {
    color: #c7c7c7 !important;
    font-size: 1rem;
    margin-right: 10px;
}

body#cart .subtotal-row .product-price {
    color: #c9a86c !important;
    font-size: 1.3rem !important;
}

/* 手機版購物車調整 */
@media (max-width: 768px) {
    body#cart .product-line-grid-right {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #333;
    }
    
    body#cart .qty-delete-row {
        flex-wrap: nowrap;
    }
    
    body#cart .subtotal-row {
        justify-content: flex-end;
    }
}

/* ===== 購物車頁面佈局 - 小計結算放下方 ===== */

body#cart .cart-grid {
    display: flex;
    flex-direction: column;
}

body#cart .cart-grid-body {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
}

body#cart .cart-grid-right {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    margin-top: 20px;
}

/* 結算卡片樣式 */
body#cart .cart-totals-card {
    background-color: #111 !important;
    border: 1px solid #333 !important;
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    margin-left: auto;
}

/* 桌面版結算區靠右 */
@media (min-width: 768px) {
    body#cart .cart-totals-card {
        margin-left: auto;
        margin-right: 0;
    }
}

/* 手機版結算區滿版 */
@media (max-width: 767px) {
    body#cart .cart-totals-card {
        max-width: 100%;
    }
}

/* ===== 結帳頁右側商品數量更醒目 ===== */

/* 商品數量徽章樣式 */
body#checkout .media-body .product-quantity,
body#checkout #cart-summary-product-list .product-quantity {
    display: inline-block !important;
    background-color: #c9a86c !important;
    color: #000 !important;
    font-weight: bold !important;
    font-size: 0.9rem !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    margin-left: 8px !important;
    vertical-align: middle !important;
}

/* 商品名稱 */
body#checkout .media-body .product-name,
body#checkout #cart-summary-product-list .product-name {
    color: #fff !important;
    font-weight: 500 !important;
}

/* 商品價格 */
body#checkout .media-body .product-price,
body#checkout #cart-summary-product-list .product-price {
    color: #c9a86c !important;
    font-weight: bold !important;
    font-size: 1rem !important;
}

/* 商品圖片 */
body#checkout .media-left img,
body#checkout #cart-summary-product-list .media-object {
    border: 1px solid #333 !important;
    border-radius: 4px !important;
}

/* 商品項目間距 */
body#checkout .media-list .media {
    padding: 10px 0 !important;
    border-bottom: 1px solid #333 !important;
    margin-bottom: 0 !important;
}

body#checkout .media-list .media:last-child {
    border-bottom: none !important;
}

/* 商品屬性文字 */
body#checkout .product-line-info-secondary {
    color: #888 !important;
    font-size: 0.85rem !important;
}

body#checkout .product-line-info-secondary .label,
body#checkout .product-line-info-secondary .value {
    color: #888 !important;
}

/* ===== 配送方式選項樣式 ===== */

/* 配送選項容器 */
body#checkout .delivery-options {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 每個配送選項 */
body#checkout .delivery-option {
    background-color: #1a1a1a !important;
    border: 1px solid #333 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 15px 20px !important;
    transition: all 0.2s ease;
    cursor: pointer;
}

body#checkout .delivery-option:first-child {
    border-radius: 8px 8px 0 0 !important;
}

body#checkout .delivery-option:last-child {
    border-radius: 0 0 8px 8px !important;
}

body#checkout .delivery-option:only-child {
    border-radius: 8px !important;
}

/* 連續選項之間不要重複邊框 */
body#checkout .delivery-option + .delivery-option {
    border-top: none !important;
}

body#checkout .delivery-option + .carrier-extra-content + .clearfix + .delivery-option {
    border-top: none !important;
}

/* 未選中狀態 - 確保邊框是灰色 */
body#checkout .delivery-option:not(.selected) {
    background-color: #1a1a1a !important;
    border-color: #333 !important;
}

body#checkout .delivery-option:not(.selected)::before {
    display: none !important;
}

/* Radio 按鈕樣式 */
body#checkout .delivery-option .custom-radio {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
}

body#checkout .delivery-option .custom-radio input[type="radio"] {
    position: absolute;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

body#checkout .delivery-option .custom-radio > span {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px !important;
    height: 22px !important;
    border: 2px solid #666 !important;
    border-radius: 50%;
    background-color: transparent;
    box-sizing: border-box;
}

body#checkout .delivery-option .custom-radio input:checked + span {
    border-color: #c9a86c !important;
}

body#checkout .delivery-option .custom-radio input:checked + span::after {
    content: '';
    position: absolute;
    background-color: #c9a86c !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50%;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
}

/* 配送方式名稱 */
body#checkout .carrier-name {
    color: #fff !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
    display: block;
    margin-bottom: 5px;
}

/* 配送說明（免運門檻等）*/
body#checkout .carrier-delay {
    color: #999 !important;
    font-size: 0.9rem !important;
    display: block;
    line-height: 1.4;
}

/* 配送價格 */
body#checkout .carrier-price {
    color: #c9a86c !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
    display: block;
    text-align: right;
}

/* FREE 免費標示 */
body#checkout .carrier-price:contains("FREE"),
body#checkout .carrier-price:contains("免費") {
    color: #28a745 !important;
}

/* Label 佈局調整 */
body#checkout .delivery-option-2 {
    padding-left: 10px !important;
}

body#checkout .delivery-option-2 .row {
    align-items: flex-start;
}

/* 配送選項內容佈局 - 垂直排列 */
body#checkout .delivery-option label.delivery-option-2 > .row {
    flex-direction: column;
}

body#checkout .delivery-option label.delivery-option-2 > .row > div {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
}

body#checkout .delivery-option label.delivery-option-2 > .row > div:last-child {
    margin-top: 8px;
}

/* 配送方式 Logo */
body#checkout .delivery-option img {
    vertical-align: middle;
    margin-right: 10px;
    border-radius: 4px;
}

/* 訂單備註 */
body#checkout .order-options {
    margin-top: 20px;
}

body#checkout .order-options textarea,
body#checkout #delivery_message {
    background-color: #222 !important;
    border: 1px solid #444 !important;
    color: #fff !important;
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    min-height: 80px;
}

body#checkout #delivery_message::placeholder {
    color: #666 !important;
}

/* 繼續按鈕 */
body#checkout .delivery-options-list .btn-primary {
    background-color: #c9a86c !important;
    border: none !important;
    color: #000 !important;
    font-weight: bold !important;
    padding: 12px 30px !important;
    margin-top: 20px;
}

body#checkout .delivery-options-list .btn-primary:hover {
    background-color: #e0c08a !important;
}

/* carrier-extra-content 隱藏時不佔空間 */
body#checkout .carrier-extra-content:empty {
    display: none !important;
}

body#checkout .carrier-extra-content {
    padding: 10px 20px;
    background-color: #1a1a1a;
    border-left: 1px solid #333;
    border-right: 1px solid #333;
}

/* ===== 配送方式新版佈局 ===== */

/* 配送選項 flex 佈局 */
body#checkout .delivery-option {
    display: flex !important;
    align-items: flex-start !important;
    flex-direction: row !important;
}

body#checkout .delivery-option-radio {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 3px;
}

body#checkout .delivery-option-content {
    flex: 1;
    padding-left: 15px;
    cursor: pointer;
}

/* 配送選項標題行 */
body#checkout .delivery-option-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

body#checkout .carrier-logo {
    width: 30px;
    height: auto;
    margin-right: 10px;
    border-radius: 4px;
}

/* 配送說明 */
body#checkout .delivery-option-info {
    margin-bottom: 8px;
}

/* 配送價格 */
body#checkout .delivery-option-price {
    text-align: left;
}

/* 選中狀態高亮 */
body#checkout .delivery-option.selected {
    background-color: #222 !important;
    border-color: #c9a86c !important;
    position: relative;
}

body#checkout .delivery-option.selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #c9a86c;
}

/* ===== 付款方式樣式 ===== */

/* 付款選項 */
body#checkout .payment-options .payment-option {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
}

body#checkout .payment-options .payment-option label {
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

body#checkout .payment-options .custom-radio span {
    border-color: #666;
}

body#checkout .payment-options .custom-radio input:checked + span {
    border-color: #c9a86c;
}

body#checkout .payment-options .custom-radio input:checked + span::after {
    background-color: #c9a86c;
}

/* 付款資訊區塊 */
body#checkout .payment-info-section {
    background-color: #222;
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
    color: #c7c7c7;
}

body#checkout .payment-info-section .payment-intro {
    color: #fff;
    margin-bottom: 15px;
}

body#checkout .payment-info-section .bank-details {
    margin-bottom: 20px;
}

body#checkout .payment-info-section .bank-info-table {
    width: 100%;
}

body#checkout .payment-info-section .bank-info-table td {
    padding: 8px 0;
    border-bottom: 1px solid #333;
}

body#checkout .payment-info-section .bank-info-table .label {
    color: #999;
    width: 100px;
}

body#checkout .payment-info-section .bank-info-table .value {
    color: #c9a86c;
    font-weight: bold;
}

body#checkout .payment-info-section .payment-notice {
    background-color: #1a1a1a;
    border-left: 3px solid #c9a86c;
    padding: 15px;
    border-radius: 0 8px 8px 0;
}

body#checkout .payment-info-section .payment-notice p {
    margin-bottom: 10px;
    color: #fff;
}

body#checkout .payment-info-section .payment-notice ul {
    margin: 0;
    padding-left: 20px;
}

body#checkout .payment-info-section .payment-notice li {
    margin-bottom: 5px;
}

/* 注意事項區塊 */
body#checkout .checkout-notice {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

body#checkout .checkout-notice h4 {
    color: #c9a86c;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

body#checkout .checkout-notice p,
body#checkout .checkout-notice li {
    color: #999;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

body#checkout .checkout-notice a {
    color: #c9a86c;
}

/* 確認按鈕 */
body#checkout #payment-confirmation .btn-primary {
    background-color: #c9a86c;
    border-color: #c9a86c;
    color: #000;
    font-weight: bold;
    padding: 12px 30px;
}

body#checkout #payment-confirmation .btn-primary:hover {
    background-color: #b8975b;
    border-color: #b8975b;
}

/* CMS 頁面 h4/h5 標題 */
.cms-page-content h4,
.cms-page-content h5,
.page-cms h4,
.page-cms h5,
#cms h4,
#cms h5 {
    color: #fff !important;
}

/* CMS heading-border 樣式 */
.cms-page-content .heading-border,
.page-cms .heading-border,
#cms .heading-border {
    color: #fff !important;
    border-bottom-color: #c9a86c !important;
}

/* CMS definition-list (付款資訊) */
.cms-page-content .definition-list,
.page-cms .definition-list,
#cms .definition-list {
    color: #c7c7c7 !important;
}

.cms-page-content dl dt,
.page-cms dl dt,
#cms dl dt {
    color: #c9a86c !important;
    font-weight: bold;
}

.cms-page-content dl dd,
.page-cms dl dd,
#cms dl dd {
    color: #e0e0e0 !important;
}

/* CMS 連結樣式 */
.cms-page-content a,
.page-cms a,
#cms a {
    color: #c9a86c !important;
}

/* CMS ul/li 列表 */
.cms-page-content ul li,
.page-cms ul li,
#cms ul li {
    color: #c7c7c7 !important;
}
