/* ============================================================
   Корзина divaninfo.ru — стили
   ============================================================ */
header { position: relative; }
header .header_right {
    margin-right: 48px;   /* освобождаем место под корзину справа */
}
#dv-cart {
    position: absolute;
    top: 18px;
    right: 4px;           /* прижата к правому краю header, после телефона */
    z-index: 900;
}
.dv-cart-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #333;
    cursor: pointer;
    position: relative;
    border-radius: 4px;
}
.dv-cart-toggle:hover {
    background: #f0f0f0;
}
.dv-cart-icon {
    display: block;
    width: 26px;
    height: 26px;
}
.dv-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef8569;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    border-radius: 10px;
    box-sizing: border-box;
}
.dv-cart-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 360px;
    max-width: 92vw;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
    padding: 14px;
    z-index: 1200;
    display: none;
    box-sizing: border-box;
    font-family: Arial, "Helvetica Neue", sans-serif;
    font-size: 13px;
    color: #333;
}
body.dv-cart-open .dv-cart-panel {
    display: block;
}
.dv-cart-head {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}
.dv-cart-empty {
    color: #888;
    padding: 14px 0;
    text-align: center;
}
.dv-cart-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 8px;
}
.dv-cart-item {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.dv-cart-item:last-child {
    border-bottom: none;
}
.dv-ci-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 4px;
    flex: 0 0 56px;
}
.dv-ci-img--no {
    background: #f3f3f3;
}
.dv-ci-mid {
    flex: 1;
    min-width: 0;
}
.dv-ci-name {
    display: block;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}
.dv-ci-name:hover {
    color: #ef8569;
}
.dv-ci-opt {
    color: #888;
    font-size: 12px;
    margin-bottom: 4px;
}
.dv-ci-price {
    color: #555;
    font-size: 12px;
}
.dv-qty {
    width: 44px;
    padding: 2px 4px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
}
.dv-ci-right {
    text-align: right;
    flex: 0 0 auto;
    margin-left: 10px;
}
.dv-ci-sum {
    display: block;
    color: #333;
    white-space: nowrap;
}
.dv-del {
    border: none;
    background: transparent;
    color: #bbb;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    margin-top: 4px;
    padding: 2px 4px;
}
.dv-del:hover {
    color: #e04040;
}
.dv-cart-foot {
    border-top: 1px solid #eee;
    padding-top: 10px;
}
.dv-cart-total {
    font-size: 15px;
    margin-bottom: 10px;
}
.dv-cart-total b {
    color: #ef8569;
}
.dv-cart-fields {
    display: grid;
    gap: 8px;
    margin-bottom: 8px;
}
.dv-cf,
.dv-cs {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    font-family: inherit;
}
.dv-cs {
    resize: vertical;
    margin-bottom: 8px;
}
.dv-cart-agree {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}
.dv-cart-agree a {
    color: #ef8569;
}
.dv-cart-checkout {
    width: 100%;
    height: 43px;
    line-height: 43px;
    font-size: 14px;
    color: #fff;
    background-color: #ef8569;
    border: 1px solid #ef8569;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    padding: 0 10px;
}
.dv-cart-checkout:hover {
    background-color: #e07050;
}

/* Кнопка «В корзину» на странице товара */
.dv-add-to-cart {
    display: inline-block;
    width: 100%;
    height: 60px;
    line-height: 60px;
    padding: 0 16px;
    margin-top: 10px;
    font-size: 19px;
    font-family: "OpenSansSemiBold", Arial, sans-serif;
    color: #fff;
    background-color: #f79609;
    border: 1px solid #f79609;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    text-decoration: none;
    transition: background-color .2s ease;
}
.dv-add-to-cart:hover {
    background-color: #d98606;
}
.dv-add-to-cart.dv-added {
    background-color: #4caf50;
    border-color: #4caf50;
}

/* Мобильная адаптация панели */
@media screen and (max-width: 640px) {
    #dv-cart {
        position: fixed;
        top: 4px;
        left: auto;
        right: 8px;
        z-index: 999;
    }
    .dv-cart-panel {
        position: fixed;
        top: 50px;
        right: 8px;
        left: 8px;
        width: auto;
        max-width: none;
    }
}