.cart-container {
    max-width: 800px; /* Ограниченная ширина */
    width: 100%; /* Гарантирует, что контейнер не превысит 800px */
    margin: 40px auto !important; /* Центрирование с приоритетом */
    padding: 0 15px;
    font-family: 'Roboto', sans-serif;
    min-height: 400px; /* Минимальная высота */
    display: flex;
    flex-direction: column;
    box-sizing: border-box; /* Учитывает padding в ширине */
    background: #fff; /* Белый фон */
}

main {
    background: #fff; /* Белый фон */
}

/* Убедимся, что родительские элементы не ломают центрирование */
#primary, .site-main {
    margin: 0 auto !important;
    width: 100%;
    max-width: 800px; /* Синхронизация с cart-container */
}

/* Кнопка "Weiter" в корзине */
.cart-proceed-to-checkout {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
}

.cart-proceed-to-checkout .button {
    position: relative;
    background: #000;
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 300px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(0);
    opacity: 1;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Иконка стрелки — белая изначально */
.cart-proceed-to-checkout .button::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"></path><path d="M12 5l7 7-7 7"></path></svg>') no-repeat center;
    background-size: contain;
    filter: brightness(0) invert(1);
    transition: filter 0.35s ease, transform 0.3s ease;
}

/* Hover: кнопка белая, иконка чёрная */
.cart-proceed-to-checkout .button:hover {
    background: #f9f9f9;
    color: #000;
    border: 1px solid #000;
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.cart-proceed-to-checkout .button:hover::after {
    filter: brightness(0) invert(0);
    transform: translateX(4px);
}

/* Пульсация при клике */
.cart-proceed-to-checkout .button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
    opacity: 0;
    z-index: 0;
}

.cart-proceed-to-checkout .button:active::before {
    width: 300px;
    height: 300px;
    opacity: 0;
    transition: 0s;
}

/* Анимация появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .cart-proceed-to-checkout {
        margin-top: 25px;
        margin-bottom: 25px;
    }
    .cart-proceed-to-checkout .button {
        width: 100%;
        max-width: 280px;
        font-size: 13px;
        padding: 14px 28px;
    }
}

@media (max-width: 480px) {
    .cart-proceed-to-checkout .button {
        font-size: 12px;
        padding: 13px 26px;
    }
    .cart-proceed-to-checkout .button::after {
        width: 14px;
        height: 14px;
    }
}

/* Gutschein-Block */
.cart-coupon {
    margin-bottom: 20px;
}
.cart-coupon .woocommerce-cart-coupon {
    display: flex;
    gap: 10px;
}
.cart-coupon .woocommerce-cart-coupon input {
    width: 200px;
    padding: 10px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    border: 1px solid #ddd;
    border-radius: 5px;
}
.cart-coupon .woocommerce-cart-coupon .button {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px 20px;
    font-size: 14px;
    color: #333;
    font-family: 'Roboto', sans-serif;
    border-radius: 5px;
    cursor: pointer;
}
.cart-coupon .woocommerce-cart-coupon .button:hover {
    background: #e0e0e0;
}

/* Gesamtpreis */
.cart-totals {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}
.cart-totals .totals-label {
    font-size: 24px;
    font-weight: 400;
    color: #333;
}
.cart-totals .totals-amount {
    font-size: 24px;
    font-weight: 400;
    color: #333;
}

/* Leerer Warenkorb */
.cart-empty {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    font-family: 'Roboto', sans-serif;
    color: #333;
}

/* Warenkorb-Produkte */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
}
.cart-item-image {
    position: relative;
    width: 80px;
    height: 80px;
}
.cart-item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}
.cart-item-image .quantity-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    background: #000;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-family: 'Roboto', sans-serif;
}
.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cart-item-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0;
}
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cart-item-quantity input {
    width: 60px;
    padding: 5px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}
.cart-item-quantity .button {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 5px 10px;
    font-size: 12px;
    color: #333;
    font-family: 'Roboto', sans-serif;
    border-radius: 5px;
    cursor: pointer;
}
.cart-item-quantity .button:hover {
    background: #e0e0e0;
}
.cart-item-price {
    font-size: 16px;
    font-weight: 400;
    color: #333;
}
.cart-item-remove {
    font-size: 14px;
    color: #333;
    text-decoration: underline;
    cursor: pointer;
}
.cart-item-remove:hover {
    color: #000;
}

/* Responsives Design */
@media (max-width: 768px) {
    .cart-container {
        margin: 20px auto !important;
        padding: 0 10px;
        min-height: 300px;
    }
    .cart-proceed-to-checkout .button {
        width: 100%; /* Полная ширина на мобильных */
        padding: 10px;
    }
    .cart-coupon .woocommerce-cart-coupon {
        flex-direction: column;
    }
    .cart-coupon .woocommerce-cart-coupon input {
        width: 100%;
        margin-bottom: 10px;
    }
    .cart-coupon .woocommerce-cart-coupon .button {
        width: 100%;
        padding: 10px;
    }
    .cart-totals {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .cart-totals .totals-label,
    .cart-totals .totals-amount {
        font-size: 20px;
    }
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .cart-item-image {
        width: 60px;
        height: 60px;
    }
    .cart-item-image img {
        width: 60px;
        height: 60px;
    }
    .cart-item-image .quantity-badge {
        width: 20px;
        height: 20px;
        font-size: 10px;
        top: -8px;
        left: -8px;
    }
    .cart-item-quantity input {
        width: 50px;
    }
}
@media (max-width: 480px) {
    .cart-totals .totals-label,
    .cart-totals .totals-amount {
        font-size: 18px;
    }
    .cart-item-title {
        font-size: 16px;
    }
    .cart-item-price {
        font-size: 14px;
    }
}