/**
 * Modern Cart CSS
 * Современный дизайн корзины
 */

/* Ozon Cart Page Styles */
.ozon-cart-page {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 20px 0;
}

.ozon-breadcrumbs {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.ozon-breadcrumbs a {
    color: #36895f;
    text-decoration: none;
}

.ozon-breadcrumbs a:hover {
    text-decoration: underline;
}

.ozon-breadcrumbs .separator {
    margin: 0 8px;
    color: #999;
}

.ozon-breadcrumbs .current {
    color: #333;
}

.ozon-cart-header {
    margin-bottom: 24px;
}

.ozon-cart-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ozon-cart-count {
    background: #36895f;
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

.ozon-cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    align-items: start;
}

/* Left Panel - Cart Items */
.ozon-cart-main {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ozon-cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.ozon-cart-empty__icon {
    margin-bottom: 24px;
    opacity: 0.6;
}

.ozon-cart-empty__title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.ozon-cart-empty__text {
    font-size: 16px;
    color: #666;
    margin: 0 0 32px 0;
}

/* Global Actions */
.ozon-cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e9ecef;
}

.ozon-cart-actions__right {
    display: flex;
    gap: 12px;
}

/* Checkbox Styles */
.ozon-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.ozon-checkbox input[type="checkbox"] {
    display: none;
}

.ozon-checkbox__mark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.ozon-checkbox input[type="checkbox"]:checked + .ozon-checkbox__mark {
    background: #36895f;
    border-color: #36895f;
}

.ozon-checkbox input[type="checkbox"]:checked + .ozon-checkbox__mark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Button Styles */
.ozon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ozon-btn--primary {
    background: #36895f;
    color: white;
}

.ozon-btn--primary:hover {
    background: #2d6b47;
}

.ozon-btn--secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e9ecef;
}

.ozon-btn--secondary:hover {
    background: #e9ecef;
}

.ozon-btn--danger {
    background: #dc3545;
    color: white;
}

.ozon-btn--danger:hover {
    background: #c82333;
}

.ozon-btn--large {
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
}

.ozon-btn--icon {
    padding: 8px;
    min-width: 36px;
    height: 36px;
}

.ozon-btn--share {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e9ecef;
}


.ozon-btn--delete {
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
}

.ozon-btn--delete:hover {
    background: #dc3545;
    color: white;
}

.ozon-btn--checkout {
    margin-bottom: 20px;
}

.ozon-btn--checkout:disabled {
    background: #6c757d;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

.ozon-btn--checkout:disabled:hover {
    background: #6c757d;
}

.ozon-summary-item--no-selection {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px 0;
}

/* Cart Section */
.ozon-cart-section {
    margin-bottom: 32px;
}

.ozon-cart-section__title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
}

/* Cart Items */
.ozon-cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ozon-cart-item {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 16px;
    align-items: start;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: white;
    transition: all 0.2s ease;
}

.ozon-cart-item:hover {
    border-color: #36895f;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.1);
}

.ozon-cart-item__checkbox {
    margin-top: 4px;
}

.ozon-cart-item__image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ozon-cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ozon-cart-item__info {
    flex: 1;
    min-width: 0;
}

.ozon-cart-item__name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.ozon-cart-item__name a {
    color: inherit;
    text-decoration: none;
}

.ozon-cart-item__name a:hover {
    color: #36895f;
}

.ozon-cart-item__attributes {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.ozon-cart-item__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.ozon-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.ozon-tag--warning {
    background: #fff3cd;
    color: #856404;
}

.ozon-tag--wholesale {
    background: #d4edda;
    color: #1a4d33;
}

.ozon-tag--retail {
    background: #cce5ff;
    color: #004085;
}

.ozon-tag--discount {
    background: #f8d7da;
    color: #721c24;
}

.ozon-tag__count {
    font-weight: 600;
}

.ozon-cart-item__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Price and Quantity */
.ozon-cart-item__price-qty {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-end;
    min-width: 200px;
}

.ozon-cart-item__price {
    text-align: right;
}

.ozon-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ozon-price__current {
    font-size: 20px;
    font-weight: 700;
    color: #36895f;
}

.ozon-price__old {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.ozon-price__unit {
    font-size: 12px;
    color: #666;
}

/* Quantity Controls */
.ozon-cart-item__qty {
    display: flex;
    justify-content: flex-end;
}

.ozon-qty-controls {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.ozon-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f8f9fa;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ozon-qty-btn:hover {
    background: #e9ecef;
    color: #333;
}

.ozon-qty-btn:active {
    background: #dee2e6;
}

.ozon-qty-input {
    width: 60px;
    height: 36px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background: white;
}

.ozon-qty-input:focus {
    outline: none;
    background: #f8f9fa;
}

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

.ozon-qty-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Right Panel - Order Summary */
.ozon-cart-sidebar {
    position: sticky;
    top: 20px;
}

.ozon-cart-summary {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ozon-delivery-info {
    margin-bottom: 24px;
}

.ozon-delivery-info__text {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.ozon-delivery-info__warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    font-size: 14px;
    color: #856404;
}

.ozon-cart-summary__header {
    margin-bottom: 20px;
}

.ozon-cart-summary__header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.ozon-cart-summary__meta {
    font-size: 14px;
    color: #666;
}

.ozon-cart-summary__items {
    margin-bottom: 20px;
}

.ozon-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.ozon-summary-item:last-child {
    border-bottom: none;
}

.ozon-summary-item__label {
    font-size: 14px;
    color: #666;
}

.ozon-summary-item__value {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.ozon-summary-item--discount .ozon-summary-item__value {
    color: #dc3545;
}

.ozon-summary-item--total {
    border-top: 2px solid #e9ecef;
    margin-top: 12px;
    padding-top: 16px;
}

.ozon-summary-item--total .ozon-summary-item__label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.ozon-summary-item--total .ozon-summary-item__value {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}


/* Loading State */
.ozon-loading {
    opacity: 0.6;
    pointer-events: none;
}

.ozon-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #36895f;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: ozon-spin 1s linear infinite;
}

@keyframes ozon-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications */
.ozon-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-width: 400px;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid #36895f;
}

.ozon-notification--success {
    border-left-color: #36895f;
    color: #1a4d33;
}

.ozon-notification--error {
    border-left-color: #dc3545;
    color: #721c24;
}

.ozon-notification--warning {
    border-left-color: #ffc107;
    color: #856404;
}

.ozon-notification--info {
    border-left-color: #17a2b8;
    color: #0c5460;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .ozon-cart-layout {
        grid-template-columns: 1fr 350px;
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .ozon-cart-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ozon-cart-sidebar {
        position: static;
    }
    
    .ozon-cart-item {
        grid-template-columns: auto auto 1fr;
        gap: 12px;
    }
    
    .ozon-cart-item__price-qty {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 16px;
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .ozon-cart-page {
        padding: 16px 0;
    }
    
    .ozon-cart-main {
        padding: 16px;
    }
    
    .ozon-cart-summary {
        padding: 16px;
    }
    
    .ozon-cart-title {
        font-size: 24px;
    }
    
    .ozon-cart-item {
        padding: 16px;
    }
    
    .ozon-cart-item__image {
        width: 60px;
        height: 60px;
    }
    
    .ozon-cart-item__name {
        font-size: 14px;
    }
    
    .ozon-price__current {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .ozon-cart-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .ozon-cart-actions__right {
        justify-content: space-between;
    }
    
    .ozon-cart-item {
        grid-template-columns: auto 1fr;
        gap: 12px;
    }
    
    .ozon-cart-item__checkbox {
        grid-column: 1;
        grid-row: 1;
    }
    
    .ozon-cart-item__image {
        grid-column: 2;
        grid-row: 1;
        width: 50px;
        height: 50px;
    }
    
    .ozon-cart-item__info {
        grid-column: 1 / -1;
        grid-row: 2;
    }
    
    .ozon-cart-item__price-qty {
        grid-column: 1 / -1;
        grid-row: 3;
    }
}

/* Модальное окно для поделиться */
.ozon-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ozon-modal.active {
    display: flex;
}

.ozon-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.ozon-modal__content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ozon-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 24px;
}

.ozon-modal__title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.ozon-modal__close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    color: #6c757d;
    transition: all 0.2s ease;
}

.ozon-modal__close:hover {
    background: #f8f9fa;
    color: #495057;
}

.ozon-modal__body {
    padding: 0 24px 24px;
}

/* Секции поделиться */
.ozon-share-section {
    margin-bottom: 32px;
}

.ozon-share-section:last-child {
    margin-bottom: 0;
}

.ozon-share-section__title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.ozon-share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

/* Кнопки поделиться */
.ozon-share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
}

.ozon-share-btn:hover {
    border-color: #007bff;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.ozon-share-btn svg {
    width: 24px;
    height: 24px;
}

/* Цвета для разных социальных сетей */
.ozon-share-btn--telegram {
    border-color: #0088cc;
    color: #0088cc;
}

.ozon-share-btn--telegram:hover {
    background: #e6f3ff;
    border-color: #0066aa;
}

.ozon-share-btn--whatsapp {
    border-color: #25d366;
    color: #25d366;
}

.ozon-share-btn--whatsapp:hover {
    background: #e6f7ed;
    border-color: #1ea952;
}

.ozon-share-btn--viber {
    border-color: #665cac;
    color: #665cac;
}

.ozon-share-btn--viber:hover {
    background: #f0eef7;
    border-color: #4a3d8a;
}

.ozon-share-btn--vk {
    border-color: #4680c2;
    color: #4680c2;
}

.ozon-share-btn--vk:hover {
    background: #e6f0ff;
    border-color: #2e5a9a;
}

.ozon-share-btn--facebook {
    border-color: #1877f2;
    color: #1877f2;
}

.ozon-share-btn--facebook:hover {
    background: #e6f2ff;
    border-color: #0d5bb8;
}

.ozon-share-btn--twitter {
    border-color: #1da1f2;
    color: #1da1f2;
}

.ozon-share-btn--twitter:hover {
    background: #e6f5ff;
    border-color: #0d8bd8;
}

.ozon-share-btn--phone {
    border-color: #36895f;
    color: #36895f;
}

.ozon-share-btn--phone:hover {
    background: #e6f7ed;
    border-color: #2d6b47;
}

.ozon-share-btn--sms {
    border-color: #17a2b8;
    color: #17a2b8;
}

.ozon-share-btn--sms:hover {
    background: #e6f7fa;
    border-color: #117a8b;
}

.ozon-share-btn--email {
    border-color: #6f42c1;
    color: #6f42c1;
}

.ozon-share-btn--email:hover {
    background: #f0eef7;
    border-color: #5a2d9a;
}

.ozon-share-btn--copy {
    border-color: #6c757d;
    color: #6c757d;
}

.ozon-share-btn--copy:hover {
    background: #f8f9fa;
    border-color: #495057;
}

/* QR код секция */
.ozon-share-qr {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.ozon-qr-code {
    display: inline-block;
    margin-bottom: 12px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ozon-qr-text {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

/* Адаптивность */
@media (max-width: 768px) {
    .ozon-modal {
        padding: 10px;
    }
    
    .ozon-modal__content {
        max-height: 95vh;
    }
    
    .ozon-modal__header {
        padding: 20px 20px 0;
        margin-bottom: 20px;
    }
    
    .ozon-modal__body {
        padding: 0 20px 20px;
    }
    
    .ozon-share-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .ozon-share-btn {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .ozon-share-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .ozon-qr-code {
        padding: 12px;
    }
    
    .ozon-qr-code canvas {
        max-width: 150px;
        height: auto;
    }
}

@media (max-width: 480px) {
    .ozon-share-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ozon-share-btn {
        padding: 16px 12px;
    }
}

/* Стили для заблокированной кнопки удаления */
.ozon-btn--delete-selected.processing {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.ozon-btn--delete-selected.processing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}