/* WC Warehouses – Frontend CSS */

/* ================================================================
 *  WAREHOUSE BANNER (selected / not selected)
 * ============================================================== */
.wcw-wh-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Not selected — red */
.wcw-wh-banner--empty {
    background: #C0392B;
    color: #fff;
}
.wcw-wh-banner--empty .wcw-wh-banner__name {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.wcw-wh-banner--empty .wcw-wh-banner__desc {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,.85);
    line-height: 1.5;
}
.wcw-wh-banner--empty .wcw-wh-banner__btn {
    background: #fff;
    color: #C0392B;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
    transition: background .15s, color .15s;
}
.wcw-wh-banner--empty .wcw-wh-banner__btn:hover {
    background: #f0f0f0;
}

/* Selected — dark */
.wcw-wh-banner--selected {
    background: #2A2A36;
    color: #fff;
}
.wcw-wh-banner--selected .wcw-wh-banner__name {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.wcw-wh-banner--selected .wcw-wh-banner__addr {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,.7);
    line-height: 1.4;
}
.wcw-wh-banner--selected .wcw-wh-banner__btn {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.5);
    border-radius: 4px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
    transition: border-color .15s, background .15s;
}
.wcw-wh-banner--selected .wcw-wh-banner__btn:hover {
    border-color: #fff;
    background: rgba(255,255,255,.1);
}

@media (max-width: 600px) {
    .wcw-wh-banner { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 16px; }
    .wcw-wh-banner__btn { width: 100%; text-align: center; }
}

/* ================================================================
 *  MODAL OVERLAY
 * ============================================================== */
body.wcw-modal-open { overflow: hidden; }

.wcw-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.55);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.wcw-modal-overlay.active { display: flex; }

.wcw-modal-box {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 780px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    padding: 36px 40px 24px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: wcw-in .2s ease;
}
@keyframes wcw-in { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Close */
.wcw-modal-close {
    position: absolute;
    top: 14px; right: 16px;
    width: 34px; height: 34px;
    background: none; border: none;
    cursor: pointer; padding: 0;
    display: flex; align-items: center; justify-content: center;
    color: #9ca3af;
    border-radius: 50%;
    transition: background .15s, color .15s;
}
.wcw-modal-close:hover { background: #f3f4f6; color: #374151; }

/* Title */
.wcw-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 18px;
    padding-right: 32px;
    flex-shrink: 0;
    line-height: 1.3;
}

/* Search */
.wcw-modal-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    padding: 0 12px;
    background: #fff;
    margin-bottom: 20px;
    flex-shrink: 0;
    transition: border-color .15s;
}
.wcw-modal-search-wrap:focus-within { border-color: #2A2A36; }
.wcw-modal-search-icon { flex-shrink: 0; color: #9ca3af; }
.wcw-modal-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 0;
    font-size: 14px;
    color: #374151;
    background: transparent;
    font-family: inherit;
}
.wcw-modal-search-clear {
    background: none; border: none;
    cursor: pointer; padding: 4px;
    color: #9ca3af;
    display: flex; align-items: center;
    transition: color .15s;
    flex-shrink: 0;
}
.wcw-modal-search-clear:hover { color: #374151; }
.wcw-modal-search-clear.wcw-hidden { opacity: 0; pointer-events: none; }

/* Body */
.wcw-modal-body {
    flex: 1;
    overflow-y: auto;
    min-height: 80px;
    position: relative;
}



/* ── Warehouse list items (search results + region lists) ── */
.warehouses-list-data {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.warehouses-list-data-item { display: block; }
.wcw-select-form { margin: 0; padding: 0; }

.wcw-wh-btn {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    text-align: left;
    padding: 10px 40px 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    font-family: inherit;
    transition: border-color .15s, background .15s;
    position: relative;
}
.wcw-wh-btn:hover { border-color: #2A2A36; background: #f9fafb; }
.warehouses-list-data-item.wcw-active .wcw-wh-btn {
    border-color: #C0392B;
    background: #fff8f8;
}
.warehouses-list-data-name { font-weight: 600; font-size: 13px; color: #1f2937; }
.wcw-wh-addr  { font-size: 12px; color: #6b7280; line-height: 1.3; }
.wcw-check    {
    position: absolute; top: 50%; right: 12px;
    transform: translateY(-50%);
    color: #C0392B; font-weight: 700; font-size: 14px;
}
.wcw-no-results,
.wcw-empty { list-style: none; color: #9ca3af; text-align: center; padding: 24px 0; font-size: 13px; }

/* ── AJAX loader ── */
.wcw-ajax-loader {
    display: flex; align-items: center; justify-content: center; padding: 30px 0;
}
.wcw-spinner {
    display: block; width: 32px; height: 32px; border-radius: 50%;
    border: 3px solid #e5e7eb; border-top-color: #C0392B;
    animation: wcw-spin .65s linear infinite;
}

/* ── Footer ── */
.wcw-modal-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}
.wcw-modal-later {
    background: none; border: none;
    padding: 4px 0; cursor: pointer;
    font-size: 13px; color: #9ca3af;
    text-decoration: underline;
    font-family: inherit;
    transition: color .15s;
}
.wcw-modal-later:hover { color: #374151; }

.wcw-modal-empty { color: #9ca3af; text-align: center; padding: 24px 0; }

@media (max-width: 600px) {
    .wcw-modal-box { padding: 24px 16px 18px; max-height: 95vh; }
    .wcw-modal-title { font-size: 15px; }
}

/* wcw-filter-bar removed */

/* ================================================================
 *  OTHER WAREHOUSES TABLE (single product page)
 * ============================================================== */
.wcw-other-warehouses {
    margin: 20px 0; padding: 14px 16px;
    background: #f9fafb; border-left: 4px solid #C0392B; border-radius: 0 8px 8px 0;
}
.wcw-other-warehouses h4 { margin: 0 0 10px; font-size: .95em; color: #374151; }
.wcw-wh-prices { width: 100%; border-collapse: collapse; font-size: .88em; }
.wcw-wh-prices th,
.wcw-wh-prices td { padding: 7px 10px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.wcw-wh-prices thead th { background: #fef3e2; color: #92400e; font-weight: 600; }

/* ================================================================
 *  THANK-YOU PAGE
 * ============================================================== */
.wcw-thankyou-warehouses { margin: 24px 0; }
.wcw-thankyou-table { width: 100%; border-collapse: collapse; }
.wcw-thankyou-table th,
.wcw-thankyou-table td { padding: 9px 12px; border: 1px solid #e5e7eb; }
.wcw-thankyou-table thead th { background: #f3f4f6; font-weight: 600; }

/* ================================================================
 *  WOO products loop grid
 * ============================================================== */
.wcw-products-loop .products {
    display: grid !important;
    grid-template-columns: repeat(var(--columns, 4), 1fr) !important;
    gap: 20px !important;
}
@media (max-width: 768px) { .wcw-products-loop .products { grid-template-columns: repeat(2,1fr) !important; } }
@media (max-width: 480px) { .wcw-products-loop .products { grid-template-columns: 1fr !important; } }

/* ================================================================
 *  AVMG-style product cards — точна верстка avmg.ua
 * ============================================================== */

/* ── Wrapper & loading ──────────────────────────────────────── */
.wcw-products-wrap {
    position: relative;
}
.wcw-products-wrap.wcw-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.6);
    z-index: 10;
    pointer-events: none;
    border-radius: 4px;
}
.wcw-products-wrap.wcw-loading::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    z-index: 11;
    transform: translate(-50%,-50%);
    width: 38px; height: 38px;
    border: 3px solid #e0e0e0;
    border-top-color: #c0392b;
    border-radius: 50%;
    animation: wcw-spin .7s linear infinite;
    pointer-events: none;
}
@keyframes wcw-spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* ── Sections ──────────────────────────────────────────────── */
.wcw-products-list { display: flex; flex-direction: column; gap: 0; }
.wcw-section        { margin-bottom: 4px; }

/* Popular section wrapper — сірий фон як в оригіналі */
.wcw-section--popular {
    background: #f7f7f7;
    border-radius: 8px;
    padding: 16px 20px 4px;
    margin-bottom: 16px;
}
.wcw-section-title {
    font-size: 17px;
    font-weight: 700;
    color: #2A2A36;
    margin-bottom: 0;
    padding-bottom: 10px;
}

/* In-stock and on-order sections */
.wcw-section--instock .wcw-section-rows,
.wcw-section--onorder .wcw-section-rows {
    background: #fff;
}

/* ── Grid row = one product ─────────────────────────────────── */
/* Точна копія .grid-inner з avmg.ua — горизонтальний рядок */
.wcw-section-rows .grid-inner,
.wcw-section-rows .grid-inner-no-price {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #EBEBEB;
    background: transparent;
    position: relative;
}
.wcw-section-rows .grid-inner:last-child,
.wcw-section-rows .grid-inner-no-price:last-child {
    border-bottom: none;
}

/* ── Top badge ──────────────────────────────────────────────── */
.product-top {
    position: absolute;
    top: 14px;
    left: 0;
    background: #27AE60;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 2;
    white-space: nowrap;
}

/* ── Availability badge ─────────────────────────────────────── */
.product-availability-options {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    /* In original it sits inline before image — we make it part of title block */
}
/* Override: position it inside title column */
.grid-inner .product-availability-options,
.grid-inner-no-price .product-availability-options {
    order: -10; /* will float via flexbox trick below */
}

/* ── Image ──────────────────────────────────────────────────── */
.grid-inner .product-row-image,
.grid-inner-no-price .product-row-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
}

/* ── Title block (name + attrs + avail badge) ───────────────── */
.grid-inner .product-row-title,
.grid-inner-no-price .product-row-title {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.products-inner-varieties-name-wrap { display: flex; flex-direction: column; gap: 2px; }

a.products-inner-varieties-name {
    font-size: 14px;
    font-weight: 600;
    color: #2A2A36;
    text-decoration: none;
    line-height: 1.3;
    display: block;
}
a.products-inner-varieties-name:hover { color: #c0392b; }

.product-row-properties { margin-top: 2px; }
.product-row-properties-inner {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 12px;
}
.product-row-properties-inner-name  { color: #ABABAB; }
.product-row-properties-inner-value { font-weight: 600; color: #555; }

/* ── Counter box ────────────────────────────────────────────── */
.product-row-counter-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.counter-units-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
}
.counter-units-item {
    background: #2A2A36;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 4px 16px;
    border-radius: 4px;
    cursor: pointer;
}
.counter-units-item.active { background: #2A2A36; }

.counter {
    display: flex;
    align-items: stretch;
    border: 1px solid #DCDCDC;
    border-radius: 4px;
    overflow: hidden;
    height: 34px;
    width: 110px;
}
.icon-product-minus,
.icon-product-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #555;
    user-select: none;
    flex-shrink: 0;
    transition: background .12s;
}
.icon-product-minus:hover,
.icon-product-plus:hover { background: #f5f5f5; }
/* .icon-product-minus::before { content: '−'; } */
/* .icon-product-plus::before  { content: '+'; } */

.counter-field-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    border-left: 1px solid #DCDCDC;
    border-right: 1px solid #DCDCDC;
}
.product-counter-input {
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #2A2A36;
    background: transparent;
    -moz-appearance: textfield;
    outline: none;
}
.product-counter-input::-webkit-outer-spin-button,
.product-counter-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── Price block ────────────────────────────────────────────── */
.product-row-base-price { flex-shrink: 0; min-width: 100px; }

.products-inner-varieties-price-measure-box { display: flex; flex-direction: column; gap: 1px; }

.products-inner-varieties-price-measure-wrap {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    flex-wrap: wrap;
}
.products-inner-varieties-price-measure {
    display: flex;
    align-items: baseline;
    gap: 0;
}
.products-inner-varieties-price-in {
    font-size: 11px;
    color: #ABABAB;
    margin-right: 3px;
    align-self: flex-end;
    margin-bottom: 2px;
}
.products-inner-varieties-price-main {
    font-size: 24px;
    font-weight: 700;
    color: #2A2A36;
    line-height: 1;
}
.products-inner-varieties-price-cents {
    font-size: 14px;
    font-weight: 600;
    color: #2A2A36;
    align-self: flex-end;
    margin-bottom: 1px;
}
.products-inner-varieties-currency-measure-currency {
    font-size: 13px;
    color: #666;
    align-self: flex-end;
    margin-bottom: 2px;
}

/* Per-unit sum row */
.product-row-result-sum-box { margin-top: 1px; }
.result-sum {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    color: #ABABAB;
}
.product-result-sum-inner { font-weight: 500; }
.delimiter { margin: 0 1px; }
.products-inner-varieties-currency-measure { font-size: 11px; }

.none-current-price { display: none; }

/* ── Buttons ────────────────────────────────────────────────── */
.price-basket-data-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    min-width: 130px;
}

a.product-basket,
button.product-basket {
    display: block;
    width: 100%;
    padding: 9px 16px;
    background: #C0392B;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    border: 1.5px solid #C0392B;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s;
    box-sizing: border-box;
    line-height: 1.4;
}
a.product-basket:hover,
button.product-basket:hover {
    background: #a93226;
    border-color: #a93226;
}

.ask-question-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    padding: 7px 10px;
    background: #fff;
    color: #2A2A36;
    font-size: 12px;
    border: 1.5px solid #DCDCDC;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color .15s, color .15s;
    box-sizing: border-box;
    white-space: nowrap;
}
.ask-question-button:hover { border-color: #aaa; }
.ask-question-button svg { flex-shrink: 0; }

/* ── Availability colors ────────────────────────────────────── */
.product-in-stock     { color: #27AE60; }
.product-not-available { color: #ABABAB; }

/* ── No products ────────────────────────────────────────────── */
.wcw-no-products {
    padding: 24px;
    text-align: center;
    color: #ABABAB;
    font-size: 14px;
}

/* ── Filter bar ─────────────────────────────────────────────── */
.wcw-filter-bar [data-wcw-filter-btn] { cursor: pointer; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .grid-inner,
    .grid-inner-no-price {
        flex-wrap: wrap;
    }
    .grid-inner .product-row-image,
    .grid-inner-no-price .product-row-image { width: 50px; height: 50px; }
    .grid-inner .product-row-title,
    .grid-inner-no-price .product-row-title { flex-basis: calc(100% - 62px); }
    .product-row-counter-box { flex-direction: row; align-items: center; }
    .price-basket-data-wrap { min-width: 100px; }
    .products-inner-varieties-price-main { font-size: 20px; }
}
@media (max-width: 480px) {
    .product-row-counter-box,
    .product-row-base-price,
    .price-basket-data-wrap { flex-basis: auto; flex: 1 1 auto; }
    .price-basket-data-wrap { flex-direction: row; flex-wrap: wrap; min-width: unset; }
    a.product-basket, button.product-basket,
    .ask-question-button { flex: 1; }
}

/* ================================================================
 *  Toast notifications (add-to-cart feedback)
 * ============================================================== */
#wcw-toast-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.wcw-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    max-width: 360px;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    pointer-events: all;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .28s ease, transform .28s ease;
    line-height: 1.4;
}
.wcw-toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.wcw-toast--success { background: #27AE60; }
.wcw-toast--error   { background: #C0392B; }
.wcw-toast--info    { background: #2980B9; }

.wcw-toast-msg  { flex: 1; }

.wcw-toast-link {
    color: #fff;
    text-decoration: underline;
    white-space: nowrap;
    font-weight: 600;
    opacity: .9;
}
.wcw-toast-link:hover { opacity: 1; }

.wcw-toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,.8);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 4px;
    flex-shrink: 0;
}
.wcw-toast-close:hover { color: #fff; }

/* Disable button state while adding */
.wcw-add-to-cart-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    #wcw-toast-wrap {
        bottom: 12px;
        right: 12px;
        left: 12px;
    }
    .wcw-toast { max-width: 100%; }
}

/* ================================================================
 *  Attribute filter shortcode [wcw_attribute_filter]
 * ============================================================== */
.wcw-attr-filter-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.wcw-attr-filter-group {}

.wcw-attr-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 6px;
}

/* Buttons mode */
.wcw-attr-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.wcw-attr-btn {
    display: inline-block;
    padding: 5px 12px;
    border: 1.5px solid #DCDCDC;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #2A2A36;
    text-decoration: none;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.wcw-attr-btn:hover { border-color: #2A2A36; color: #2A2A36; }
.wcw-attr-btn.active {
    background: #2A2A36;
    color: #fff;
    border-color: #2A2A36;
}

/* Checkbox mode */
.wcw-attr-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
}
.wcw-attr-check-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
}
.wcw-attr-check-item input { cursor: pointer; margin: 0; }
.wcw-attr-check-item.active { font-weight: 600; color: #2A2A36; }
.wcw-attr-count { color: #aaa; font-size: 11px; }

/* Select mode */
.wcw-attr-select {
    width: 100%;
    max-width: 260px;
    padding: 7px 10px;
    border: 1.5px solid #DCDCDC;
    border-radius: 4px;
    font-size: 13px;
    color: #2A2A36;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color .15s;
}
.wcw-attr-select:focus { border-color: #2A2A36; }

/* Responsive */
@media (max-width: 480px) {
    .wcw-attr-buttons { gap: 4px; }
    .wcw-attr-btn { padding: 4px 10px; font-size: 12px; }
}

/* ================================================================
 *  Reset filters button
 * ============================================================== */
.wcw-filter-reset-wrap {
    margin-bottom: 10px;
}
.wcw-filter-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    background: #fff;
    border: 1.5px solid #C0392B;
    color: #C0392B;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.wcw-filter-reset-btn:hover {
    background: #C0392B;
    color: #fff;
}
.wcw-filter-reset-btn svg {
    flex-shrink: 0;
    transition: stroke .15s;
}

/* Attribute buttons — button element (no <a> needed now) */
.wcw-attr-btn {
    display: inline-block;
    padding: 5px 12px;
    border: 1.5px solid #DCDCDC;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #2A2A36;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
    line-height: 1.4;
}
.wcw-attr-btn:hover  { border-color: #2A2A36; }
.wcw-attr-btn.active { background: #2A2A36; color: #fff; border-color: #2A2A36; }

/* ================================================================
 *  Sidebar filter  [wcw_attribute_filter]
 *  Matches the design from screenshot
 * ============================================================== */
.wcw-sidebar-filter {
    background: #fff;
    border: 1px solid #E8E8E8;
    border-radius: 8px;
    padding: 20px 18px 16px;
    font-size: 14px;
    color: #2A2A36;
}

/* Header */
.wcw-sf-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.wcw-sf-header span {
    font-size: 18px;
    font-weight: 700;
    color: #2A2A36;
}
.wcw-sf-divider {
    height: 1px;
    background: #EBEBEB;
    margin-bottom: 16px;
}

/* Section */
.wcw-sf-section {
    margin-bottom: 20px;
}
.wcw-sf-label {
    font-size: 14px;
    font-weight: 600;
    color: #2A2A36;
    margin-bottom: 10px;
}

/* ── Price range ─────────────────────────────────────────────── */
.wcw-price-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}
.wcw-price-input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #DCDCDC;
    border-radius: 4px;
    font-size: 14px;
    color: #2A2A36;
    background: #fff;
    text-align: left;
    -moz-appearance: textfield;
    outline: none;
    transition: border-color .15s;
}
.wcw-price-input:focus { border-color: #2A2A36; }
.wcw-price-input::-webkit-outer-spin-button,
.wcw-price-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Dual range slider */
.wcw-range-wrap {
    position: relative;
    height: 20px;
    margin: 6px 8px 0;
    user-select: none;
}
.wcw-range-track {
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 3px;
    background: #DCDCDC;
    border-radius: 2px;
    transform: translateY(-50%);
}
.wcw-range-fill {
    position: absolute;
    top: 0; bottom: 0;
    background: #2A2A36;
    border-radius: 2px;
}
.wcw-range-thumb {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: #888;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    transition: background .15s, transform .1s;
    z-index: 2;
    touch-action: none;
}
.wcw-range-thumb:active { cursor: grabbing; transform: translate(-50%, -50%) scale(1.15); }
.wcw-range-thumb:focus  { outline: 2px solid #2A2A3666; outline-offset: 2px; }

/* ── Checkboxes (sidebar style) ──────────────────────────────── */
.wcw-sf-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
}
.wcw-sf-check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
    background: #F5F5F5;
    transition: background .12s;
    min-width: 0;
}
.wcw-sf-check-item:hover { background: #EBEBEB; }

/* Custom checkbox */
.wcw-sf-checkbox {
    position: relative;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wcw-sf-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
    margin: 0;
}
.wcw-sf-checkmark {
    display: block;
    width: 18px;
    height: 18px;
    border: 1.5px solid #BDBDBD;
    border-radius: 3px;
    background: #fff;
    transition: border-color .15s, background .15s;
    flex-shrink: 0;
}
.wcw-sf-checkbox input:checked + .wcw-sf-checkmark {
    background: #2A2A36;
    border-color: #2A2A36;
}
.wcw-sf-checkbox input:checked + .wcw-sf-checkmark::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(1px, -1px);
    margin: 1px auto 0;
}
.wcw-sf-check-item.active .wcw-sf-checkmark {
    background: #2A2A36;
    border-color: #2A2A36;
}

.wcw-sf-check-label {
    font-size: 13px;
    color: #2A2A36;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* ── Reset button (sidebar) ──────────────────────────────────── */
.wcw-sidebar-filter .wcw-filter-reset-wrap {
    margin-top: 4px;
}
.wcw-sidebar-filter .wcw-filter-reset-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #fff;
    border: 1.5px solid #DCDCDC;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #2A2A36;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, background .15s;
}
.wcw-sidebar-filter .wcw-filter-reset-btn:hover {
    border-color: #2A2A36;
    background: #f5f5f5;
}

/* ── "Selectați baza" button (no warehouse selected) ── */
.wcw-select-base-btn {
    display: block;
    width: 100%;
    padding: 9px 16px;
    background: #fff;
    color: #2A2A36;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    border: 1.5px solid #2A2A36;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s;
    box-sizing: border-box;
    line-height: 1.4;
    font-family: inherit;
}
.wcw-select-base-btn:hover {
    background: #2A2A36;
    color: #fff;
}

/* ================================================================
 *  Single product page — warehouse list
 * ============================================================== */

/* Price hint row (shown when no warehouse selected) */
.wcw-product-warehouses { margin: 16px 0; }

/* Price hint row */
.wcw-product-price-hint {
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #EBEBEB;
    border-radius: 8px;
    margin-bottom: 2px;
}
.wcw-product-price-row {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-bottom: 6px;
}
.wcw-product-price-from {
    font-size: 14px;
    color: #888;
    margin-right: 4px;
}
.wcw-product-price-main {
    font-size: 30px;
    font-weight: 700;
    color: #2A2A36;
    line-height: 1;
}
.wcw-product-price-cents {
    font-size: 17px;
    font-weight: 600;
    color: #2A2A36;
    align-self: flex-end;
    margin-bottom: 2px;
}
.wcw-product-price-currency {
    font-size: 14px;
    color: #666;
    align-self: flex-end;
    margin-bottom: 3px;
    margin-left: 2px;
}
.wcw-product-price-select-hint {
    display: block;
    font-size: 13px;
    color: #27AE60;
    text-decoration: none;
}
.wcw-product-price-select-hint:hover { text-decoration: underline; }

/* Warehouse rows — each row is a card matching catalog-offer-price-block style */
.wcw-wh-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.wcw-wh-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #E8E8E8;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: box-shadow .15s, background .12s;
}
.wcw-wh-row:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.wcw-wh-row--active {
    border-color: #C0392B;
    box-shadow: 0 2px 10px rgba(192,57,43,.1);
}

/* Info */
.wcw-wh-row__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.wcw-wh-row__name {
    font-size: 14px;
    font-weight: 600;
    color: #2A2A36;
    line-height: 1.3;
}
.wcw-wh-row__addr {
    font-size: 12px;
    color: #888;
    line-height: 1.3;
}

/* Price */
.wcw-wh-row__price {
    display: flex;
    align-items: baseline;
    gap: 1px;
    flex-shrink: 0;
    white-space: nowrap;
}
.wcw-wh-row__price-main {
    font-size: 20px;
    font-weight: 700;
    color: #2A2A36;
    line-height: 1;
}
.wcw-wh-row__price-cents {
    font-size: 12px;
    font-weight: 600;
    color: #2A2A36;
    align-self: flex-end;
    margin-bottom: 1px;
}
.wcw-wh-row__price-currency {
    font-size: 12px;
    color: #888;
    margin-left: 3px;
    align-self: flex-end;
    margin-bottom: 1px;
}
.wcw-wh-row__price-na {
    font-size: 13px;
    color: #aaa;
}

/* Action */
.wcw-wh-row__action { flex-shrink: 0; min-width: 120px; text-align: right; }
.wcw-wh-row__form   { margin: 0; padding: 0; }

.wcw-wh-row__btn {
    padding: 8px 18px;
    background: #fff;
    color: #2A2A36;
    border: 1.5px solid #2A2A36;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.wcw-wh-row__btn:hover { background: #2A2A36; color: #fff; }

.wcw-wh-row--active .wcw-wh-row__btn {
    background: #C0392B;
    color: #fff;
    border-color: #C0392B;
}

.wcw-wh-row__selected-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #27AE60;
    padding: 7px 14px;
    background: #f0faf4;
    border: 1.5px solid #27AE60;
    border-radius: 4px;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 600px) {
    .wcw-wh-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    .wcw-wh-row__info   { flex-basis: calc(100% - 130px); }
    .wcw-wh-row__price  { flex-basis: auto; }
    .wcw-wh-row__action { flex-basis: auto; min-width: unset; }
}

/* ================================================================
 *  Single product — dynamic price block [wcw_product_price_block]
 * ============================================================== */
.wcw-price-block {
    background: #fff;
    border: 1px solid #EBEBEB;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 12px 0;
}

.wcw-price-block__avail {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}
.wcw-price-block__avail.product-in-stock     { color: #27AE60; }
.wcw-price-block__avail.product-not-available { color: #999; }

.wcw-price-block__row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Price */
.wcw-price-block__price {
    min-width: 120px;
}
.wcw-price-block__from {
    font-size: 12px;
    color: #999;
    margin-right: 3px;
}
.wcw-price-block__int {
    font-size: 28px;
    font-weight: 700;
    color: #2A2A36;
    line-height: 1;
}
.wcw-price-block__cents {
    font-size: 16px;
    font-weight: 600;
    color: #2A2A36;
    vertical-align: baseline;
}
.wcw-price-block__currency {
    font-size: 14px;
    color: #666;
    margin-left: 3px;
}
.wcw-price-block__per {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* Counter */
.wcw-price-block__counter-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.wcw-price-block__units {
    display: flex;
    gap: 4px;
}
.wcw-price-block__unit-pill {
    background: #2A2A36;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 4px 16px;
    border-radius: 4px;
    cursor: default;
}
.wcw-price-block__counter {
    display: flex;
    align-items: stretch;
    border: 1px solid #DCDCDC;
    border-radius: 4px;
    overflow: hidden;
    height: 36px;
    width: 120px;
}

/* Actions */
.wcw-price-block__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    min-width: 140px;
}
.wcw-price-block__buy {
    display: block;
    padding: 10px 20px;
    background: #C0392B;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    border: 1.5px solid #C0392B;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
    line-height: 1.3;
}
.wcw-price-block__buy:hover { background: #a93226; border-color: #a93226; }
.wcw-price-block__buy--outline {
    background: #fff;
    color: #2A2A36;
    border-color: #2A2A36;
}
.wcw-price-block__buy--outline:hover { background: #2A2A36; color: #fff; }

.wcw-price-block__ask {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    color: #2A2A36;
    font-size: 13px;
    border: 1.5px solid #DCDCDC;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .15s;
}
.wcw-price-block__ask:hover { border-color: #2A2A36; }

/* Loading state */
.wcw-price-block.wcw-loading {
    opacity: .5;
    pointer-events: none;
}

@media (max-width: 600px) {
    .wcw-price-block__row { flex-direction: column; align-items: flex-start; }
    .wcw-price-block__actions { width: 100%; }
    .wcw-price-block__buy, .wcw-price-block__ask { width: 100%; justify-content: center; }
}
