/*
Theme Name: Blocksy Child
Theme URI: https://creativethemes.com/blocksy/
Description: Child theme for Blocksy.
Author: CreativeThemes
Author URI: https://creativethemes.com
Template: blocksy
Version: 1.0.0
Text Domain: blocksy-child
*/

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap');

/* --- 全站字体族（不锁定字号，允许 Customizer 接管） --- */
body {
    font-family: 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #2E363F;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: inherit;
}
/* ---------------------------------------------------- */

/* 产品页面表格样式 */
:root {
    --theme-table-font-size: 14px;
}

table, th, td {
    font-size: var(--theme-table-font-size);
    border-width: var(--theme-table-border-width, 1px);
    border-style: var(--theme-table-border-style, solid);
    border-color: var(--theme-table-border-color, var(--theme-border-color));
    text-align: left !important;
}

/* 产品页：短描述和描述内表格白底 */
.single-product .woocommerce-tabs .woocommerce-Tabs-panel table,
.single-product .entry-content table,
.single-product .woocommerce-product-details__short-description table.table.table-bordered {
    background: #ffffff;
}

.single-product .woocommerce-tabs .woocommerce-Tabs-panel table th,
.single-product .woocommerce-tabs .woocommerce-Tabs-panel table td,
.single-product .entry-content table th,
.single-product .entry-content table td,
.single-product .woocommerce-product-details__short-description table.table.table-bordered th,
.single-product .woocommerce-product-details__short-description table.table.table-bordered td {
    background: #ffffff;
}

@media (max-width: 768px) {
    .single-product .woocommerce-product-details__short-description table.table,
    .single-product .woocommerce-Tabs-panel table.table,
    .single-product .entry-content table.table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .single-product .woocommerce-product-details__short-description table.table tbody,
    .single-product .woocommerce-Tabs-panel table.table tbody,
    .single-product .entry-content table.table tbody {
        display: table;
        min-width: 760px;
        width: 100%;
    }
}

/* 手机端字号由主题 Customizer 控制，不在子主题写死 */

/* 产品归档卡片：白底 + 标题四边间距 */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.wc-block-grid__product {
    background: #ffffff;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title,
.wc-block-grid__product .wc-block-grid__product-title {
    padding: 10px;
    box-sizing: border-box;
}

.ds-archive-description-bottom {
    margin-top: 24px;
}

.woo-listing-top {
    display: flex;
    align-items: center;
    gap: 13px;
    justify-content: space-between;
}

.woocommerce .woocommerce-ordering.ds-cat-ordering,
.woocommerce-page .woocommerce-ordering.ds-cat-ordering {
    float: right;
    margin: 0 0 1.2em;
    position: relative;
}

.woocommerce .woocommerce-ordering.ds-cat-ordering:after,
.woocommerce-page .woocommerce-ordering.ds-cat-ordering:after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #667085;
    border-bottom: 2px solid #667085;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.woocommerce .woocommerce-ordering.ds-cat-ordering select,
.woocommerce-page .woocommerce-ordering.ds-cat-ordering select {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    display: inline-block;
    height: 36px;
    padding-right: 34px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #ffffff;
    color: #344054;
    font-size: 14px;
    line-height: 36px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.woocommerce .woocommerce-ordering.ds-cat-ordering select option,
.woocommerce-page .woocommerce-ordering.ds-cat-ordering select option {
    color: #344054;
}

@media (max-width: 768px) {
    .woo-listing-top {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .woocommerce .woocommerce-ordering.ds-cat-ordering,
    .woocommerce-page .woocommerce-ordering.ds-cat-ordering {
        float: none;
        margin: 8px 0 0;
        width: 100%;
    }

    .woocommerce .woocommerce-ordering.ds-cat-ordering select,
    .woocommerce-page .woocommerce-ordering.ds-cat-ordering select {
        width: 100%;
        min-width: 0;
    }
}

.ds-inquiry-btn-wrap {
    margin: 20px 0 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ds-inquiry-btn-wrap > a.button {
    flex: 1 1 0;
    text-align: center;
    justify-content: center;
}

.ds-inquiry-btn-basket {
    background: #4a7fc1 !important;
    border-color: #4a7fc1 !important;
}

.ds-inquiry-btn-paypal-prod {
    background: #0070ba !important;
    border-color: #0070ba !important;
    color: #fff !important;
}

/* ── Inquiry Basket page ── */
.ds-basket-page {
    max-width: 1170px;
    margin: 20px auto;
    background: #ffffff;
    padding: 24px;
    border-radius: 6px;
}

.ds-basket-notice {
    padding: 14px 18px;
    margin-bottom: 20px;
    background: #fffbea;
    border: 1px solid #e8d97a;
    border-radius: 6px;
    font-size: 14px;
    color: #7a6500;
}

.ds-basket-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.ds-basket-table th,
.ds-basket-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #efefef;
    text-align: left !important;
    font-size: 14px;
}

.ds-basket-table thead th {
    background: #f5f7fa;
    font-weight: 600;
    color: #333;
}

.ds-basket-table tbody tr:last-child td {
    border-bottom: none;
}

.ds-basket-table tbody tr:hover {
    background: #fafbfc;
}

.ds-basket-product {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ds-basket-thumb img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
    display: block;
}

.ds-basket-name {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
}

.ds-basket-name:hover {
    color: #3b6fd4;
    text-decoration: underline;
}

.ds-basket-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ds-basket-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ds-basket-btn {
    display: inline-flex !important;
    align-items: center;
    padding: 8px 18px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer;
}

.ds-basket-btn-inquiry {
    background: #3b6fd4 !important;
    border-color: #3b6fd4 !important;
    color: #fff !important;
}

.ds-basket-btn-paypal {
    background: #0070ba !important;
    border-color: #0070ba !important;
    color: #fff !important;
}

.ds-basket-btn-delete {
    background: #888 !important;
    border-color: #888 !important;
    color: #fff !important;
}

.ds-basket-total {
    font-size: 15px;
    color: #555;
}

.ds-basket-total strong {
    color: #333;
}

@media (max-width: 768px) {
    .ds-basket-table th:nth-child(3),
    .ds-basket-table td:nth-child(3),
    .ds-basket-table th:nth-child(4),
    .ds-basket-table td:nth-child(4) {
        display: none;
    }

    .ds-basket-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

.ds-inquiry-btn {
    display: inline-block;
}

.ds-inquiry-page {
    max-width: 980px;
    margin: 0px auto;
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
}

.ds-basket-accordion {
    margin-bottom: 20px;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    overflow: hidden;
}

.ds-basket-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: #f5f7fa;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    text-align: left;
}

.ds-basket-toggle:hover {
    background: #eef1f6;
}

.ds-basket-toggle-icon {
    font-size: 18px;
    line-height: 1;
    color: #3b6fd4;
    font-style: normal;
    width: 20px;
    text-align: center;
}

.ds-basket-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: #3b6fd4;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    margin-left: 4px;
}

.ds-inquiry-basket {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px;
    background: #ffffff;
}

.ds-inquiry-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px;
    text-align: center;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
}

.ds-inquiry-thumb img {
    max-width: 80px;
    height: auto;
}

.ds-inquiry-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.ds-inquiry-meta {
    font-size: 12px;
    font-weight: 400;
    color: #555;
    line-height: 1.4;
    text-decoration: none;
}

.ds-inquiry-meta:hover {
    color: #333;
    text-decoration: underline;
}

.ds-inquiry-thumb {
    display: block;
}

.ds-inquiry-remove {
    color: #b42318;
    text-decoration: none;
    font-size: 12px;
}

.ds-form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0 16px;
}

@media (max-width: 600px) {
    .ds-form-row-3 {
        grid-template-columns: 1fr;
    }
}

.ds-inquiry-form p {
    margin-bottom: 12px;
}

.ds-inquiry-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.ds-inquiry-form input,
.ds-inquiry-form textarea {
    width: 100%;
}

.ds-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 8px;
}

.ds-submit-row .button {
    flex-shrink: 0;
}

.ds-submit-row .ds-captcha-row {
    flex: 0 0 auto;
    justify-content: flex-end;
    margin-bottom: 0;
}

.ds-captcha-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.ds-captcha-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 110px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #1a1a2e;
    background: linear-gradient(135deg, #e8f0fe 0%, #d0e4ff 100%);
    user-select: none;
    cursor: pointer;
}

.ds-captcha-code:hover {
    background: linear-gradient(135deg, #d0e4ff 0%, #b8d4ff 100%);
}

.ds-captcha-input-wrap {
    flex: 1;
}

.ds-captcha-input-wrap label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 12px;
}

.ds-captcha-input-wrap input {
    width: 100%;
}

.ds-inquiry-success {
    color: #067647;
}

.ds-inquiry-error {
    color: #b42318;
}

/* 全站固定背景图 + 白色膜层（Blocksy / Elementor） */
:root {
    --global-fixed-bg-image: url('https://orthopedic-instruments.com/wp-content/uploads/2026/05/background.jpg');
    --global-bg-overlay: rgba(255, 255, 255, 0.85);
}

html,
body {
    background: transparent !important;
}

body {
    position: relative;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    background-image: var(--global-fixed-bg-image);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: -2;
}

body::after {
    background: var(--global-bg-overlay);
    z-index: -1;
}

.site,
#main-container,
.ct-site-container,
.ct-container,
.ct-container-full,
.content-area,
.site-main,
.elementor,
.elementor-location-header,
.elementor-location-footer {
    background: transparent !important;
}

@media (max-width: 768px) {
    .ds-inquiry-basket {
        grid-template-columns: 1fr;
    }

    .ds-inquiry-item {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        text-align: left;
        gap: 10px;
    }

    .ds-inquiry-thumb {
        flex: 0 0 35%;
        max-width: 35%;
    }

    .ds-inquiry-thumb img {
        max-width: 100%;
        width: 100%;
        height: auto;
    }

    .ds-inquiry-info {
        flex: 1;
        align-items: flex-start;
        gap: 4px;
    }

    .ds-inquiry-meta {
        flex: unset;
        align-self: unset;
    }

    .ds-inquiry-remove {
        display: block;
        margin-top: 2px;
        font-size: 12px;
    }

    .ds-captcha-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ds-captcha-box-wrap {
        text-align: left;
        min-width: 0;
    }

    .ds-refresh-captcha {
        margin-left: 0;
        margin-top: 8px;
    }

    .ds-submit-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .ds-submit-row .ds-captcha-row {
        flex-direction: row;
        align-items: center;
        width: 100%;
    }

    .ds-submit-row .button {
        order: 2;
        width: 100%;
        text-align: center;
    }

    .ds-submit-row .ds-captcha-row {
        order: 1;
    }
}

/* ── Floating Inquiry Basket Widget ── */
.ds-float-basket {
    position: relative;
    display: inline-block;
}

.ds-float-basket-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    position: relative;
    transition: opacity 0.2s;
}

.ds-float-basket-btn:hover {
    opacity: 0.7;
}

.ds-float-basket-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

.ds-float-basket-popup {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    overflow: hidden;
    z-index: 99999;
}

.ds-float-basket-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    background: #fff8e1;
    border-bottom: 1px solid #f0e68c;
    font-size: 14px;
    color: #555;
    font-weight: 500;
    line-height: 1.5;
}

.ds-float-basket-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 10px 16px;
}

.ds-float-basket-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f2f2f2;
}

/* Category archive column masonry: left-to-right order for each new row */
body.category .entries[data-layout*="grid"].ds-col-masonry {
    position: relative;
    display: block;
    min-height: 1px;
}

body.category .entries[data-layout*="grid"].ds-col-masonry > article {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    will-change: top, left;
}

.ds-float-basket-item:last-child {
    border-bottom: none;
}

.ds-float-basket-thumb img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
    display: block;
}

.ds-float-basket-pname {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    flex: 1;
}

.ds-float-basket-footer {
    display: flex;
    gap: 0;
    border-top: 1px solid #eee;
}

.ds-float-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: opacity 0.15s;
}

.ds-float-btn:hover {
    opacity: 0.85;
    text-decoration: none;
}

.ds-float-btn-view {
    background: #888;
    color: #fff !important;
}

.ds-float-btn-inquiry {
    background: #29b6d4;
    color: #fff !important;
}

/* ── Search modal → PC dropdown ── */
@media (min-width: 769px) {
    #search-modal.ct-panel {
        display: none !important;
        pointer-events: none !important;
    }
}

.ds-header-search-dropdown {
    position: fixed;
    width: 500px;
    max-width: calc(100vw - 20px);
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
    border-radius: 2px;
    padding: 10px;
    z-index: 999999;
}

.ds-header-search-form {
    display: flex;
    align-items: stretch;
}

.ds-header-search-input {
    flex: 1;
    height: 52px;
    min-height: 52px !important;
    max-height: 52px;
    box-sizing: border-box;
    border: 1px solid #d7d7d7;
    background: #fff;
    font-size: 18px;
    color: #777;
    padding: 0 16px;
    margin: 0;
    outline: none;
}

.ds-header-search-input:focus {
    border-color: #c8c8c8;
}

.ds-header-search-submit {
    width: 58px;
    height: 52px;
    min-height: 52px !important;
    max-height: 52px;
    box-sizing: border-box;
    border: 1px solid #9ea4ab;
    border-left: none;
    background: #9ea4ab;
    padding: 0;
    margin: 0;
    line-height: 1;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ds-header-search-submit svg {
    fill: currentColor;
}

.ds-header-search-submit:hover {
    background: #8f959d;
}

@media (max-width: 768px) {
    .ds-header-search-dropdown {
        display: none !important;
    }
}
