/* Shopping Cart CSS Styles */

/* Kosár modal */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: flex-end;
    z-index: 10000;
}

.cart-modal.show {
    display: flex;
}

.cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.cart-modal-content {
    background: white;
    width: 450px;
    height: 100%;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2c3e50;
    color: white;
}

.cart-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--admin-radius-sm);
    transition: background 0.2s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Kosár tartalom */
.cart-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cart-items-section {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Üres kosár */
.empty-cart {
    text-align: center;
    padding: var(--admin-spacing-2xl);
    color: #666;
}

.empty-cart i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-cart p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Kosár tételek */
.cart-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    align-items: center;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: var(--admin-radius-md);
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.cart-item:hover {
    border-color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cart-item-info {
    min-width: 0;
}

.cart-item-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #333;
    line-height: 1.3;
    word-wrap: break-word;
}

.cart-item-variant {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 600;
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--admin-light);
    border-radius: var(--admin-radius-sm);
    padding: 0.25rem;
}

.quantity-btn {
    background: white;
    border: 1px solid #e0e0e0;
    width: 28px;
    height: 28px;
    border-radius: var(--admin-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.quantity-btn:hover:not(:disabled) {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.remove-item-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--admin-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.remove-item-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.cart-item-total {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1rem;
    text-align: right;
}

/* Kupon szekció */
.cart-coupon-section {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background: var(--admin-light);
}

.coupon-input-section h4 {
    font-size: 1rem;
    margin: 0 0 15px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.coupon-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.coupon-input-group input {
    flex: 1;
    padding: 0.75rem 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--admin-radius-md);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.coupon-input-group input:focus {
    border-color: #2c3e50;
    outline: none;
}

.coupon-input-group .btn {
    padding: 0.75rem 20px;
    white-space: nowrap;
    font-size: 0.9rem;
}

/* Alkalmazott kupon */
.applied-coupon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #27ae60;
    color: white;
    padding: 15px;
    border-radius: var(--admin-radius-md);
    margin-bottom: 10px;
}

.coupon-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coupon-code {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.remove-coupon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: var(--admin-radius-sm);
    cursor: pointer;
    transition: background 0.2s ease;
}

.remove-coupon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Kosár összesítés */
.cart-summary {
    padding: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-row.total {
    font-size: 1.1rem;
    font-weight: 700;
    padding-top: 10px;
    border-top: 2px solid #e0e0e0;
    color: #2c3e50;
}

.summary-label {
    color: #666;
}

.summary-value {
    font-weight: 600;
    color: #333;
}

.summary-value.discount {
    color: #27ae60;
}

.summary-value.free {
    color: #27ae60;
    font-style: italic;
}

/* Kosár műveletek */
.cart-actions {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background: var(--admin-light);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checkout-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: var(--admin-radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.checkout-btn:hover {
    background: #27ae60;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.checkout-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cart-secondary-actions {
    display: flex;
    gap: 10px;
}

.continue-shopping-btn,
.clear-cart-btn {
    flex: 1;
    padding: 0.75rem 15px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: var(--admin-radius-md);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.continue-shopping-btn:hover {
    border-color: #2c3e50;
    color: #2c3e50;
}

.clear-cart-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

/* Kosár overlay */
.cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    cursor: pointer;
}

/* Responsive design */
@media (max-width: 768px) {
    .cart-modal-content {
        width: 100%;
        max-width: 400px;
    }
    
    .cart-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 10px;
    }
    
    .cart-item-controls {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .cart-secondary-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .cart-modal-content {
        width: 100%;
    }
    
    .coupon-input-group {
        flex-direction: column;
    }
    
    .applied-coupon {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}


/* Checkout gomb */
.checkout-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.checkout-btn:hover {
    background: #229954;
}

.checkout-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Másodlagos akciók */
.cart-secondary-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.continue-shopping-btn {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    flex: 1;
    transition: all 0.2s ease;
}

.continue-shopping-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.clear-cart-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    flex: 1;
    transition: background-color 0.2s ease;
}

.clear-cart-btn:hover {
    background: #c82333;
}

/* Kosár akciók konténer */
.cart-actions {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}
