/* ============================================
   Cart Notification
   ============================================ */

.cart-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: linear-gradient(135deg, rgb(var(--color-primary)) 0%, rgba(var(--color-primary), 0.95) 100%);
    color: rgb(var(--badge-color));
    padding: 1rem 1.5rem;
    border-radius: 16px;
    font-size: 0.9375rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(var(--color-primary), 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    max-width: calc(100% - 2rem);
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.cart-notification svg {
    flex-shrink: 0;
    color: rgb(var(--badge-color));
    animation: checkmarkPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.cart-notification span {
    flex: 1;
    text-align: center;
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(0deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@media (max-width: 767px) {
    .cart-notification {
        bottom: 90px;
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* Add to Cart Button in Modal - Sipariş Ver butonu gibi */
.btn-add-to-cart-modal {
    position: fixed;
    bottom: 12px; /* Mobile bottom bar'ın hemen üstünde */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 500px;
    padding: var(--guru-space-sm) var(--guru-space-md);
    background: rgb(var(--color-primary));
    color: rgb(var(--badge-color));
    border: none;
    border-radius: var(--guru-radius-md);
    font-size: 0.9375rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000; /* Mobile bottom bar'ın üstünde */
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    max-height: 48px;
    letter-spacing: 0.3px;
    gap: var(--guru-space-sm);
}

@media (min-width: 768px) {
    .btn-add-to-cart-modal {
        bottom: 20px;
    }
}

/* Mobile'da bottom bar'ın üstünde */
@media (max-width: 767px) {
    .btn-add-to-cart-modal {
        bottom: 12px; /* Bottom bar'ın hemen üstünde */
    }
}

.btn-add-to-cart-modal:hover {
    background: rgba(var(--color-primary), 0.95);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
    transform: translateX(-50%) translateY(-1px);
}

.btn-add-to-cart-modal:active {
    transform: translateX(-50%) translateY(0);
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.15);
}

.btn-add-to-cart-modal .cart-icon {
    width: 1.25rem;
    height: 1.25rem;
    stroke-width: 2;
    flex-shrink: 0;
}

.btn-add-to-cart-modal .btn-cart-text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--guru-space-sm);
}

.btn-add-to-cart-modal .btn-cart-price {
    font-size: 0.875rem;
    font-weight: 800;
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.625rem;
    border-radius: var(--guru-radius-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.toast-manager {
    position: fixed;
    left: 50%;
    bottom: 96px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 11000;
    pointer-events: none;
    max-width: min(92vw, 420px);
    width: auto;
}

.toast-manager.has-toasts {
    pointer-events: none;
}

.toast-item {
    background: rgba(17, 24, 39, 0.92);
    color: #f9fafb;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.01em;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.toast-item.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-item.success {
    border-color: rgba(var(--color-primary), 0.35);
}

.toast-item.warning {
    border-color: rgba(245, 158, 11, 0.4);
}

.toast-item.error {
    border-color: rgba(239, 68, 68, 0.4);
}

.error-modal-manager {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 12000;
}

.error-modal-manager.show {
    display: flex;
}

.error-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.35);
    backdrop-filter: blur(2px);
}

.error-modal-card {
    position: relative;
    z-index: 1;
    width: calc(100% - 32px);
    max-width: 420px;
    background: #ffffff;
    color: #111827;
    border-radius: 14px;
    padding: 20px 18px 18px 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.error-modal-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.error-modal-message {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 16px;
}

.error-modal-actions {
    display: flex;
    justify-content: flex-end;
}

.error-modal-btn {
    background: #111827;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.error-modal-btn:hover {
    background: #0f172a;
}

@media (max-width: 767px) {
    .toast-manager {
        bottom: 84px;
    }

    .toast-item {
        font-size: 0.8125rem;
        padding: 9px 12px;
    }
}

/* Safe area support */
@supports (padding: max(0px)) {
    @media (max-width: 767px) {
        .btn-add-to-cart-modal {
            bottom: max(12px, calc(12px + env(safe-area-inset-bottom)));
        }
    }
}

/* Adjust modal content padding - buton artık aşağıda, mobile bottom bar üstünde */
.product-modal-content {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

