/* css/cart-account.css */

.product-options-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin: 25px 0 35px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    max-width: 580px;
}

.product-options-box h4 {
    margin: 0 0 16px 0;
    font-size: 17px;
    font-weight: 600;
    color: #1a202c;
}

.option-checkbox-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 15px;
    color: #4a5568;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.option-checkbox-row:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.option-checkbox-row span {
    display: flex;
    align-items: center;
}

.option-checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    accent-color: #2b6cb0;
    cursor: pointer;
}

.option-checkbox-row .opt-price {
    font-weight: 600;
    color: #2b6cb0;
    white-space: nowrap;
}

.btn-add-cart {
    display: inline-block;
    background-color: #0097A7;
    color: #ffffff !important;
    padding: 14px 28px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.15s ease;
    text-align: center;
    text-decoration: none;
}

.btn-add-cart:hover {
    background-color: #111827;
    transform: translateY(-1px);
}

.cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--colorPrimary-green);
    color: #ffffff;
    border-radius: 10px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
}

.shop-page-wrapper {
    padding: 120px 20px 80px 20px;
    background: #f7fafc;
    min-height: 80vh;
}

.shop-main-card {
    max-width: 960px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 36px 40px;
}

/* Расширенный контейнер для двухколоночной корзины */
.shop-main-card.shop-cart-container {
    max-width: 1240px;
}

.shop-page-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 24px;
}

/* === ДВУХКОЛОНОЧНАЯ СЕТКА КОРЗИНЫ === */
.cart-two-columns {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 36px;
    align-items: start;
}

.cart-two-columns.is-empty {
    grid-template-columns: 1fr;
}

.cart-left-col {
    min-width: 0;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Карточка товара в корзине */
.cart-product-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.cart-product-card:hover {
    border-color: #cbd5e0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.cart-product-thumb {
    width: 82px;
    height: 82px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-product-thumb img {
    /*width: 100%;*/
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-product-info {
    flex: 1 1 auto;
    min-width: 0;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.35;
}

.cart-options-badge {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
    line-height: 1.45;
}

.cart-unit-price {
    font-size: 13px;
    color: #718096;
    margin-top: 6px;
}

.cart-product-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.cart-qty-box {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    background: #f8fafc;
    overflow: hidden;
}

.cart-qty-btn {
    width: 30px;
    height: 34px;
    border: none;
    background: transparent;
    color: #334155;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease;
}

.cart-qty-btn:hover {
    background: #e2e8f0;
}

.cart-qty-input {
    width: 44px;
    height: 34px;
    padding: 0;
    border: none;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    background: #ffffff;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #1a202c;
    -moz-appearance: textfield;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-product-subtotal {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    min-width: 96px;
    text-align: right;
    white-space: nowrap;
}

.btn-delete-item {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-delete-item:hover {
    background: #fca5a5;
    color: #991b1b;
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 18px 22px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
}

.cart-summary-total span {
    font-size: 24px;
    color: var(--color-darcgreen, #0097A7);
    font-weight: 700;
}

/* Правая колонка с формой контактов */
.cart-right-col {
    position: sticky;
    top: 100px;
}

.checkout-form-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px 26px;
}

.checkout-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 20px 0;
}

.cart-empty-box {
    text-align: center;
    padding: 50px 20px;
    background: #f8fafc;
    border: 1px dashed #cbd5e0;
    border-radius: 14px;
    color: #718096;
    font-size: 16px;
}

/* Адаптивность для планшетов и мобильных */
@media (max-width: 992px) {
    .cart-two-columns {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .cart-right-col {
        position: static;
    }
}

@media (max-width: 640px) {
    .cart-product-card {
        flex-wrap: wrap;
        padding: 14px;
        padding-right: 44px;
    }
    .cart-product-thumb {
        width: 68px;
        height: 68px;
    }
    .cart-product-controls {
        width: 100%;
        justify-content: space-between;
        padding-top: 10px;
        margin-top: 4px;
        border-top: 1px solid #f1f5f9;
    }
    .cart-product-subtotal {
        text-align: left;
    }
    .cart-product-card .btn-delete-item {
        position: absolute;
        top: 14px;
        right: 14px;
    }
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .auth-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .shop-main-card {
        padding: 24px 18px;
    }
    .shop-page-wrapper {
        padding-top: 90px;
    }
    .checkout-form-card {
        padding: 22px 18px;
    }
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 15px;
    background: #ffffff;
    box-sizing: border-box;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #0097A7;
    box-shadow: 0 0 0 3px rgba(0, 151, 167, 0.15);
}

.status-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-processing { background: #fef3c7; color: #b45309; }
.status-accepted   { background: #e0f2fe; color: #0369a1; }
.status-shipped    { background: #ede9fe; color: #6d28d9; }
.status-completed  { background: #dcfce7; color: #15803d; }

.order-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    background: #ffffff;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Интеграция чекбоксов в фирменные блоки .enterDop */
.option-dop-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.option-dop-label .dop-left {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333333;
}

.option-dop-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #0097A7;
    cursor: pointer;
    flex-shrink: 0;
}

.option-dop-label.checked-opt {
    border-color: #F2994A;
    background: linear-gradient(125deg, rgba(220, 239, 241, 0.71) 23.64%, rgba(236, 210, 187, 0.71) 120.54%);
}

/* Фиксированная кнопка плавающей корзины справа */
.floating-cart-btn {
    position: fixed;
    right: 3%;
    top: 15%;
    width: 62px;
    height: 62px;
    background: #0097A7;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 151, 167, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    text-decoration: none;
    transition: transform 0.25s ease, background-color 0.2s ease;
    cursor: pointer;
}

.floating-cart-btn:hover {
    transform: scale(1.08);
    background: #007f8d;
}

.floating-cart-btn svg {
    width: 28px;
    height: 28px;
    fill: #ffffff;
}

.floating-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #F2994A;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

@media (max-width: 600px) {
    .floating-cart-btn {
        width: 54px;
        height: 54px;
    }
    .floating-cart-btn svg {
        width: 24px;
        height: 24px;
    }
}

/* Стили иконок шапки меню */
.header-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    vertical-align: middle;
}

.header-menu-svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    transition: transform 0.2s ease, stroke 0.2s ease;
}

.header-icon-link:hover .header-menu-svg {
    stroke: var(--color-orange);
    transform: scale(1.1);
}

.menu-icon-item {
    display: inline-flex;
    align-items: center;
}

@media (max-width: 860px) {
    .header-menu-svg {
        width: 30px;
        height: 30px;
    }
}

/* Всплывающее окно после добавления товара в корзину */
.cart-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 16px;
    box-sizing: border-box;
}

.cart-modal-backdrop.active {
    display: flex;
}

.cart-modal-window {
    background: #ffffff;
    border-radius: 18px;
    max-width: 460px;
    width: 100%;
    padding: 32px 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    text-align: center;
    box-sizing: border-box;
    animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cart-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.cart-modal-close:hover {
    color: #ef4444;
}

.cart-modal-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #e0f2fe;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-modal-icon svg {
    width: 30px;
    height: 30px;
    stroke: #0284c7;
}

.cart-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.cart-modal-item-name {
    font-size: 15px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 24px;
    line-height: 1.4;
}

.cart-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-modal-continue {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e0;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-modal-continue:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-modal-go-cart {
    background: #0097A7;
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.btn-modal-go-cart:hover {
    background: #007f8d;
    transform: translateY(-1px);
}