/* ============================================================
   Woodmart Cross-Sell Pro — Frontend
   ============================================================ */

.wcs-pro-crosssells,
.wcs-pro-crosssells * { box-sizing: border-box; }

/* ── Section title ── */
.wcs-pro-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #888;
    margin: 0 0 8px;
}

/* ── Item card ── */
.wcs-pro-item {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e8e4de;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    min-height: 76px;
    transition: border-color .2s, box-shadow .2s;
}
.wcs-pro-item:last-child { margin-bottom: 0; }
.wcs-pro-item.wcs-item-selected {
    border-color: #8bc34a;
    background: #f7fbf0;
    box-shadow: 0 0 0 1px #8bc34a33;
}

/* ── Thumbnail ── */
.wcs-item-image-wrap {
    flex: 0 0 80px;
    width: 80px;
    height: 76px;
    position: relative;
    overflow: hidden;
    background: #f0ece6;
    text-decoration: none;
}
.wcs-item-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .3s;
}
.wcs-pro-item:hover .wcs-item-image { transform: scale(1.05); }

/* ── Info ── */
.wcs-item-info {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
}
.wcs-item-name {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #222;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.35;
    margin-bottom: 6px;
}
.wcs-item-name:hover { color: #555; }

/* ── Prices ── */
.wcs-item-price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Нова цена — зелена */
.wcs-price-new,
.wcs-price-new bdi,
.wcs-price-new ins,
.wcs-price-new ins bdi {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: #3a7d12 !important;
    text-decoration: none !important;
}

/* Стара цена — зачертана */
.wcs-price-old,
.wcs-price-old bdi,
.wcs-price-old del,
.wcs-price-old del bdi {
    font-size: 11px !important;
    color: #bbb !important;
    text-decoration: line-through !important;
}

/* OFF badge */
.wcs-off-badge {
    display: inline-block;
    background: #e8783a;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .07em;
    padding: 3px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── Toggle switch ── */
.wcs-item-toggle-wrap {
    flex: 0 0 auto;
    padding: 0 14px 0 8px;
    display: flex;
    align-items: center;
}

.wcs-toggle-btn {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    outline: none !important;
    box-shadow: none !important;
    width: 44px;
    height: 26px;
    display: flex;
    align-items: center;
}
.wcs-toggle-track {
    display: block;
    width: 44px;
    height: 24px;
    background: #d0ccc7;
    border-radius: 24px;
    position: relative;
    transition: background .25s;
    pointer-events: none;
}
.wcs-toggle-btn.is-on .wcs-toggle-track { background: #8bc34a; }

.wcs-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
    transition: transform .25s;
    pointer-events: none;
}
.wcs-toggle-btn.is-on .wcs-toggle-thumb { transform: translateX(20px); }

/* ── Summary bar ── */
.wcs-summary-bar {
    margin-top: 10px;
    padding: 10px 14px;
    background: #f0f7e6;
    border: 1px solid #c5e0a0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #4a7c1f;
}
.wcs-summary-bar::before {
    content: '✓  ';
    font-weight: 700;
    color: #6aac28;
}

/* ── Context wrappers ── */
.wcs-pro-product-page {
    margin-bottom: 16px;
}
.wcs-pro-cart,
.wcs-pro-checkout {
    margin: 20px 0;
    padding: 16px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
}
.wcs-pro-slide-cart {
    padding: 12px 16px;
    border-top: 1px solid #e5e0d8;
    background: #faf8f5;
}
.wcs-pro-slide-cart .wcs-item-image-wrap {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    min-width: 64px;
}
.wcs-pro-slide-cart .wcs-pro-item { min-height: 64px; }

/* ── Cart price badge ── */
.wcs-cart-badge {
    display: inline-block;
    background: #e8783a;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 4px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .wcs-item-image-wrap { flex: 0 0 64px; width: 64px; height: 64px; }
    .wcs-toggle-track { width: 38px; }
    .wcs-toggle-btn { width: 38px; }
    .wcs-toggle-btn.is-on .wcs-toggle-thumb { transform: translateX(14px); }
}

/* ── Slide cart — "+" add button ── */
.wcs-slide-add-wrap {
    flex: 0 0 auto;
    padding: 0 14px 0 8px;
    display: flex;
    align-items: center;
}

.wcs-slide-add-btn {
    width: 32px;
    height: 32px;
    border-radius: 50% !important;
    background: #2c2c2c !important;
    border: none !important;
    color: #fff !important;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .15s;
    padding: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    flex-shrink: 0;
}

.wcs-slide-add-btn:hover {
    background: #000 !important;
    transform: scale(1.1);
}

.wcs-slide-add-btn:disabled {
    background: #aaa !important;
    cursor: wait;
    transform: none;
}

.wcs-slide-add-icon {
    font-weight: 300;
    line-height: 1;
    margin-top: -1px;
}

.wcs-slide-add-spinner {
    display: inline-block;
    animation: wcs-spin .7s linear infinite;
    font-size: 13px;
}

@keyframes wcs-spin { to { transform: rotate(360deg); } }
