/* ================================================================
   OCTemplates ShowCase — Фіксована бокова корзина
   Файл: catalog/view/theme/oct_showcase/stylesheet/oct-fixed-cart.css
   ================================================================ */

/* ---------- Overlay ---------- */
.oct-fixed-cart-overlay {
    display: none !important;
}

/* ---------- Sidebar panel ---------- */
.oct-fixed-cart {
    position: fixed;
    top: 0;
    right: 0;
    width: 340px;
    max-width: 100vw;
    height: 100%;
    background: #fff;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    overflow: hidden;
}
.oct-fixed-cart.is-open {
    transform: translateX(0);
}

/* prevent body scroll when cart is open */
body.oct-fixed-cart-open {
    padding-right: 356px;
}

@media (max-width: 991px) {
    body.oct-fixed-cart-open {
        padding-right: 0;
    }
}

/* ---------- Header ---------- */
.oct-fixed-cart__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    flex-shrink: 0;
}
.oct-fixed-cart__header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    color: #1c1c28;
}
.oct-fixed-cart__count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #f97316;
    color: #fff;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
.oct-fixed-cart__close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #e5e5e5;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    transition: background .2s, color .2s;
    flex-shrink: 0;
}
.oct-fixed-cart__close:hover {
    background: #f0f0f0;
    color: #1c1c28;
}

/* ---------- Body (scrollable) ---------- */
.oct-fixed-cart__body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}
.oct-fixed-cart__body::-webkit-scrollbar { width: 4px; }
.oct-fixed-cart__body::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 4px; }

/* ---------- Summary row ---------- */
.oct-fixed-cart__summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #f5f5f5;
    flex-shrink: 0;
}
.oct-fixed-cart__view-all {
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    transition: color .2s;
}
.oct-fixed-cart__view-all:hover { color: #1d4ed8; }

/* ---------- Items list ---------- */
.oct-fixed-cart__items {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
}

/* ---------- Single item ---------- */
.oct-fixed-cart__item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f5f5f5;
}
.oct-fixed-cart__item:last-child { border-bottom: none; }

.oct-fixed-cart__item-img {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8f8f8;
}
.oct-fixed-cart__item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.oct-fixed-cart__item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.oct-fixed-cart__item-name {
    font-size: 13px;
    font-weight: 600;
    color: #1c1c28;
    text-decoration: none;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
}
.oct-fixed-cart__item-name:hover { color: #2563eb; }
.oct-fixed-cart__no-stock { color: #e74c3c; }

.oct-fixed-cart__item-options {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.oct-fixed-cart__option {
    font-size: 11px;
    color: #888;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 1px 6px;
}

/* ---------- Item actions row ---------- */
.oct-fixed-cart__item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
}

/* Quantity stepper */
.oct-fixed-cart__qty {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    height: 32px;
}
.oct-fixed-cart__qty-btn {
    width: 30px;
    height: 100%;
    background: #f5f5f5;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    flex-shrink: 0;
}
.oct-fixed-cart__qty-btn:hover { background: #ebebeb; }
.oct-fixed-cart__qty-input {
    width: 36px;
    height: 100%;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #1c1c28;
    background: #fff;
    outline: none;
    padding: 0;
}

.oct-fixed-cart__item-price {
    font-size: 14px;
    font-weight: 800;
    color: #f97316;
    white-space: nowrap;
    margin-left: auto;
}

.oct-fixed-cart__remove {
    width: 30px;
    height: 30px;
    border: 1px solid #fce8e8;
    border-radius: 8px;
    background: #fff5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #e74c3c;
    flex-shrink: 0;
    transition: background .15s, border-color .15s;
}
.oct-fixed-cart__remove:hover {
    background: #fce8e8;
    border-color: #e74c3c;
}

/* ---------- Error ---------- */
.oct-fixed-cart__error {
    color: #e74c3c;
    font-size: 13px;
    padding: 8px 0;
}

/* ---------- Empty state ---------- */
.oct-fixed-cart__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex: 1;
    padding: 40px 20px;
    text-align: center;
}
.oct-fixed-cart__empty img { opacity: .6; }
.oct-fixed-cart__empty-text {
    font-size: 15px;
    font-weight: 500;
    color: #888;
    margin: 0;
}

/* ---------- Footer ---------- */
.oct-fixed-cart__footer {
    padding: 16px 20px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Totals */
.oct-fixed-cart__totals {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}
.oct-fixed-cart__total-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #555;
}
.oct-fixed-cart__total-row--main {
    font-size: 16px;
    font-weight: 800;
    color: #1c1c28;
    padding-top: 6px;
}
.oct-fixed-cart__total-row--main span:last-child { color: #f97316; }

/* CTA buttons */
.oct-fixed-cart__btn {
    display: block;
    width: 100%;
    padding: 13px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, transform .1s;
    border: none;
    line-height: 1.2;
}
.oct-fixed-cart__btn:active { transform: scale(.98); }

.oct-fixed-cart__btn--primary {
    background: #f97316;
    color: #fff;
}
.oct-fixed-cart__btn--primary:hover {
    background: #ea6c0a;
    color: #fff;
    text-decoration: none;
}

.oct-fixed-cart__btn--secondary {
    background: #f5f5f5;
    color: #444;
}
.oct-fixed-cart__btn--secondary:hover {
    background: #ebebeb;
    color: #222;
}

/* ---------- Voucher item ---------- */
.oct-fixed-cart__item--voucher {
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .oct-fixed-cart {
        width: 100vw;
        border-radius: 0;
    }
}


.oct-fixed-cart.is-locked .oct-fixed-cart__close,
.oct-fixed-cart__close.is-hidden {
    display: none;
}
