/* ================================
   基础表格样式
   ================================ */
.clwc-price-table-wrapper,
.clwc-logo-price-table-wrapper {
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.clwc-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.clwc-price-table,
.clwc-logo-price-table,
.clwc-simple-price-table,
.clwc-total-price-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    background: #fff;
}

.clwc-price-table th,
.clwc-price-table td,
.clwc-logo-price-table th,
.clwc-logo-price-table td,
.clwc-simple-price-table th,
.clwc-simple-price-table td,
.clwc-total-price-table th,
.clwc-total-price-table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: center;
    white-space: nowrap;
}

.clwc-price-table th,
.clwc-logo-price-table th,
.clwc-simple-price-table th,
.clwc-total-price-table th {
    background-color: #f4f4f4;
    font-weight: 600;
}

.clwc-price-table .price-cell,
.clwc-logo-price-table .price-cell {
    cursor: default;
}

.clwc-price-table .price-cell.current-tier,
.clwc-price-table .current-tier,
.clwc-logo-price-table .current-tier {
    background-color: #c39086 !important;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.clwc-price-table .quantity-header {
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}
.clwc-price-table .quantity-header:hover {
    background-color: #e8e8e8;
}
.clwc-price-table .quantity-header.clicked,
.clwc-price-table .price-cell.clicked {
    animation: clickPulse 0.3s ease;
}

@keyframes clickPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); background-color: #d0d0d0; }
    100% { transform: scale(1); }
}

/* ================================
   简单价格表
   ================================ */
.clwc-simple-price-table {
    max-width: 100%;
    font-size: 16px;
    border-radius: 6px;
    overflow: hidden;
}

.clwc-simple-price-table th,
.clwc-simple-price-table td {
    text-align: center;
}

.clwc-simple-price-table .row-label {
    font-weight: normal;
    color: #000;
    text-align: left;
    background: #fff;
}
.clwc-simple-price-table .clwc-unit-price,
.clwc-simple-price-table .clwc-quantity,
.clwc-simple-price-table .clwc-subtotal {
    font-weight: 600;
    color: #333;
}


/* 合计行 */
.clwc-total-price-table .total-row td {
    background-color: #f9f9f9;
    font-weight: bold;
}

/* ================================
   自定义Logo与属性区块
   ================================ */
.clwc-custom-logo-section {
    margin: 15px 0;
}

.clwc-logo-checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.clwc-logo-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}
.clwc-logo-checkbox-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
}
.clwc-logo-checkbox-label .checkbox-text {
    font-weight: 600;
}
.clwc-logo-checkbox-label.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}
.clwc-logo-checkbox-label.disabled:after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.5);
    pointer-events: none;
}
.clwc-logo-checkbox-label.disabled input {
    cursor: not-allowed;
}

.logo-example-link {
    margin-left: 20px;
    color: #0073aa;
    text-decoration: none;
    font-weight: normal;
}
.logo-example-link:hover {
    text-decoration: underline;
}

#clwc-logo-options {
    margin-top: 15px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.clwc-logo-attribute {
    margin-bottom: 15px;
}
.clwc-logo-attribute label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}
.clwc-logo-attribute select {
    width: 100%;
    max-width: 300px;
    padding: 6px 10px;
}

/* ================================
   可变属性样式
   ================================ */
.clwc-variable-attributes {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}
.clwc-variable-attributes .clwc-attribute-row {
    margin-bottom: 10px;
}
.clwc-variable-attributes label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

/* ================================
   自定义按钮样式
   ================================ */
.clwc-custom-buttons {
    margin-top: 15px;
}
.clwc-custom-buttons .button {
    margin-right: 10px;
    margin-bottom: 10px;
}
.clwc-custom-buttons a.button {
    text-decoration: none;
    display: inline-block;
}

/* ================================
   其它样式
   ================================ */
.clwc-no-price-found {
    color: #999;
    font-style: italic;
    padding: 10px 0;
}

.clwc-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px;
    border-radius: 4px;
    margin: 10px 0;
    animation: fadeIn 0.3s ease;
}
.clwc-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin: 10px 0;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.clwc-loading {
    text-align: center;
    padding: 20px;
    color: #666;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* 禁用按钮样式 */
.single_add_to_cart_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 平滑过渡与视觉反馈 */
#clwc-simple-price-display,
#clwc-total-price-display {
    border: 1px solid #ddd;
    padding: 10px;
    margin: 10px 0;
}
#clwc-current-price,
#clwc-current-subtotal {
    transition: opacity 0.1s ease;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .clwc-table-container {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }
    .clwc-simple-price-table {
        font-size: 14px;
    }
}

