/* ============================================
   DODO PIZZA CART MODAL STYLES
   ============================================ */

:root {
    --dodo-orange: #FF6900;
    --dodo-orange-hover: #E85D00;
    --dodo-orange-light: #FFF5ED;
    --dodo-gray: #F9F9F9;
    --dodo-text: #000000;
    --dodo-text-secondary: #92929D;
    --dodo-border: #E8E8E8;
    --dodo-success: #1AC84B;
    --dodo-error: #F03226;
    --dodo-radius: 16px;
    --dodo-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    --dodo-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   MODAL OVERLAY
   ============================================ */

.dodo-cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dodo-cart-modal.show {
    display: block;
    opacity: 1;
    visibility: visible;
}

.dodo-cart-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: dodoFadeIn 0.3s ease;
}

@keyframes dodoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   CART CONTAINER
   ============================================ */

.dodo-cart-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: #FFFFFF;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dodo-cart-modal.show .dodo-cart-container {
    transform: translateX(0);
}

/* ============================================
   HEADER
   ============================================ */

.dodo-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--dodo-border);
    background: #FFFFFF;
    flex-shrink: 0;
}

.dodo-cart-back,
.dodo-cart-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--dodo-transition);
    color: var(--dodo-text-secondary);
}

.dodo-cart-back:hover,
.dodo-cart-close:hover {
    background: var(--dodo-gray);
    color: var(--dodo-text);
}

.dodo-cart-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--dodo-text);
    letter-spacing: -0.5px;
}

/* ============================================
   BODY (СПИСОК ТОВАРОВ)
   ============================================ */

.dodo-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.dodo-cart-body::-webkit-scrollbar {
    width: 8px;
}

.dodo-cart-body::-webkit-scrollbar-track {
    background: transparent;
}

.dodo-cart-body::-webkit-scrollbar-thumb {
    background: var(--dodo-border);
    border-radius: 4px;
}

.dodo-cart-body::-webkit-scrollbar-thumb:hover {
    background: var(--dodo-text-secondary);
}

.dodo-cart-items {
    padding: 16px 24px;
}

/* ============================================
   ПУСТАЯ КОРЗИНА
   ============================================ */

.dodo-cart-empty {
    text-align: center;
    padding: 80px 40px;
    animation: dodoFadeIn 0.5s ease;
}

.dodo-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    color: var(--dodo-text-secondary);
    opacity: 0.3;
}

.dodo-empty-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--dodo-text);
    margin-bottom: 8px;
}

.dodo-empty-subtext {
    font-size: 16px;
    color: var(--dodo-text-secondary);
}

/* ============================================
   ТОВАР В КОРЗИНЕ
   ============================================ */

.dodo-cart-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--dodo-border);
    animation: dodoSlideIn 0.3s ease;
}

@keyframes dodoSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dodo-cart-item:last-child {
    border-bottom: none;
}

.dodo-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--dodo-gray);
}

.dodo-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dodo-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dodo-item-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--dodo-text);
    line-height: 1.3;
}

.dodo-item-options {
    font-size: 14px;
    color: var(--dodo-text-secondary);
    line-height: 1.4;
}

.dodo-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.dodo-item-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--dodo-text);
}

/* ============================================
   СЧЕТЧИК КОЛИЧЕСТВА
   ============================================ */

.dodo-quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--dodo-gray);
    border-radius: 12px;
    padding: 4px;
}

.dodo-quantity-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--dodo-transition);
    color: var(--dodo-orange);
    font-size: 20px;
    font-weight: 700;
}

.dodo-quantity-btn:hover {
    background: rgba(255, 105, 0, 0.1);
}

.dodo-quantity-btn:active {
    transform: scale(0.95);
}

.dodo-quantity-value {
    min-width: 32px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--dodo-text);
}

/* ============================================
   FOOTER (ИТОГИ)
   ============================================ */

.dodo-cart-footer {
    padding: 24px;
    border-top: 1px solid var(--dodo-border);
    background: #FFFFFF;
    flex-shrink: 0;
}

.dodo-cart-summary {
    margin-bottom: 20px;
}

.dodo-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.dodo-summary-label {
    font-size: 16px;
    color: var(--dodo-text-secondary);
}

.dodo-summary-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--dodo-text);
}

.dodo-summary-total {
    padding-top: 16px;
    margin-top: 12px;
    border-top: 1px solid var(--dodo-border);
}

.dodo-summary-total .dodo-summary-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--dodo-text);
}

.dodo-summary-total .dodo-summary-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--dodo-text);
}

/* ============================================
   КНОПКА ОФОРМЛЕНИЯ
   ============================================ */

.dodo-checkout-btn {
    width: 100%;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--dodo-orange);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--dodo-transition);
}

.dodo-checkout-btn:hover:not(:disabled) {
    background: var(--dodo-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 105, 0, 0.3);
}

.dodo-checkout-btn:active:not(:disabled) {
    transform: translateY(0);
}

.dodo-checkout-btn:disabled {
    background: var(--dodo-border);
    color: var(--dodo-text-secondary);
    cursor: not-allowed;
}

.dodo-checkout-btn svg {
    transition: transform 0.3s ease;
}

.dodo-checkout-btn:hover:not(:disabled) svg {
    transform: translateX(4px);
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 768px) {
    .dodo-cart-container {
        max-width: 100%;
    }
    
    .dodo-cart-header {
        padding: 16px 20px;
    }
    
    .dodo-cart-title {
        font-size: 20px;
    }
    
    .dodo-cart-items {
        padding: 12px 20px;
    }
    
    .dodo-cart-item {
        gap: 12px;
    }
    
    .dodo-item-image {
        width: 64px;
        height: 64px;
    }
    
    .dodo-item-name {
        font-size: 15px;
    }
    
    .dodo-item-options {
        font-size: 13px;
    }
    
    .dodo-item-price {
        font-size: 16px;
    }
    
    .dodo-cart-footer {
        padding: 20px;
    }
    
    .dodo-checkout-btn {
        height: 52px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .dodo-cart-empty {
        padding: 60px 20px;
    }
    
    .dodo-empty-icon {
        width: 64px;
        height: 64px;
    }
    
    .dodo-empty-text {
        font-size: 18px;
    }
    
    .dodo-empty-subtext {
        font-size: 14px;
    }
}