/**
 * Modern Sepet CSS Dosyası - Optimize Edilmiş
 */


/* Modern Sepet Container */
.modern-cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: var(--font-stack);
}

/* Modern Adım Göstergeleri */
.steps-container {
    margin-bottom: 2rem;
}

.steps-progress-container {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1rem;
}

.progress-track {
    position: absolute;
    top: 30px;
    left: 60px;
    right: 60px;
    height: 8px;
    background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 2px;
    z-index: 1;
}

.progress-bar {
    position: absolute;
    top: 30px;
    left: 60px;
    height: 8px;
    background: linear-gradient(90deg, var(--green-background) 0%, var(--green-background) 100%);
    z-index: 2;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    max-width: calc(100% - 120px);
}

.steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 3;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 120px;
}

.step-indicator>div:first-child {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    line-height: 1;
}

/* Varsayılan durum - Gri */
.step-indicator>div:first-child {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    color: #9ca3af;
    border-color: #e5e7eb;
}

/* Aktif durum - Mavi */
.step-indicator.active>div:first-child {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    transform: scale(1.05);
}

/* Tamamlanmış durum - Yeşil */
.step-indicator.completed>div:first-child {
    background: linear-gradient(135deg, var(--green-background) 0%, var(--green-background) 100%);
    color: white;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 18px;
    transition: all 0.3s ease;
    line-height: 1;
}

.step-indicator.active .step-number {
    background-color: var(--green-background);
    color: white;
}

.step-check-icon {
    display: none;
    width: 30px;
    height: 30px;
    transition: all 0.3s ease;
}

.step-indicator.completed .step-number {
    display: none;
}

.step-indicator.completed .step-check-icon {
    display: block;
}

.step-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-text);
    margin-bottom: 2px;
    transition: all 0.3s ease;
    text-align: center;
}

.step-subtitle {
    font-size: 11px;
    color: #6b7280;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.2;
}

.step-indicator.active .step-title {
    color: var(--primary-text);
    font-weight: 700;
}

.step-indicator.active .step-subtitle {
    color: var(--primary-text);
}

.step-indicator.completed .step-title {
    color: var(--primary-dark);
    font-weight: 600;
}

.step-indicator.completed .step-subtitle {
    color: var(--primary-color);
}

/* Hover efektleri */
.step-indicator:not(.active):not(.completed)>div:first-child:hover {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Tıklanabilir adımlar için cursor */
.step-indicator.completed {
    cursor: pointer;
}

.step-indicator.completed:hover>div:first-child {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.step-indicator.completed:hover .step-title {
    color: var(--primary-color);
}

.step-indicator.completed:hover .step-subtitle {
    color: var(--primary-dark);
}

/* Pulse animasyonu aktif adım için */
.step-indicator.active>div:first-child::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, #ADCF3F 0%, #ADCF3F 100%);
    opacity: 0.2;
    animation: pulse-step 2s infinite;
    z-index: -1;
}

@keyframes pulse-step {
    0% {
        transform: scale(0.8);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }

    100% {
        transform: scale(0.8);
        opacity: 0.3;
    }
}

/* Adım geçiş animasyonları */
.step-indicator {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-indicator.active {
    animation: step-activate 0.6s ease-out;
}

.step-indicator.completed {
    animation: step-complete 0.5s ease-out;
}

@keyframes step-activate {
    0% {
        transform: scale(0.9);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes step-complete {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* İlerleme çubuğu animasyonu */
.progress-bar {
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Başlık animasyonları */
.cart-header h1 {
    animation: fade-in-up 0.8s ease-out;
}

.cart-header p {
    animation: fade-in-up 0.8s ease-out 0.2s both;
}

.steps-container {
    animation: fade-in-up 0.8s ease-out 0.4s both;
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sepet Boş Durumu */
.cart-empty {
    text-align: center;
    padding: 4rem 0;
}

.empty-cart-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.empty-cart-message svg {
    color: var(--border-medium);
    margin-bottom: 1.5rem;
    width: 80px;
    height: 80px;
}

.empty-cart-message h2 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: var(--text-dark);
}

.empty-cart-message p {
    margin-bottom: 2rem;
    color: var(--text-light);
}

/* Temel Buton Stilleri */
.button,
.btn,
.return-to-shop,
.checkout-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    font-size: 16px;
    transition: all var(--transition-fast);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.button:hover,
.btn:hover,
.return-to-shop:hover,
.checkout-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* İkincil Buton */
.button.secondary,
.back-button {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--border-medium);
}

.button.secondary:hover,
.back-button:hover {
    background-color: var(--border-light);
    color: var(--text-dark);
}

/* Sepet ve Checkout Wrapper */
.cart-content,
.checkout-content {
    transition: all 0.5s ease;
}

.cart-title,
.checkout-title {
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--text-dark);
    text-align: center;
}

.cart-wrapper,
.checkout-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}






/* Sepet Özeti */
.cart-summary,
.payment-summary {
    background-color: var(--background-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.cart-summary h3,
.payment-summary h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.summary-label {
    color: var(--text-light);
}

.summary-value {
    font-weight: 600;
    color: var(--text-dark);
}

.total-row {
    border-top: 2px solid var(--border-light);
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Form Stilleri */
.checkout-form {
    background-color: var(--background-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.form-row {
    margin-bottom: 1.5rem;
}

.form-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-medium);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: border-color var(--transition-fast);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Ödeme Yöntemleri */
.payment-methods-container {
    margin-bottom: 2rem;
}

.payment-method-item {
    margin-bottom: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.payment-method-item:hover {
    border-color: var(--green-background);
    box-shadow: var(--shadow-light);
}

.payment-method-item input[type="radio"] {
    margin-right: 1rem;
}

.payment-method-item input[type="radio"]:checked+label {
    color: var(--primary-color);
}

.payment-method-item label {
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* Eklenen: Dinamik ödeme yöntemleri için tipografi ve yerleşim düzeltmeleri */
.payment-methods-container h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: var(--text-dark);
}

.payment-method-icon {
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-method-details {
    display: flex;
    flex-direction: column;
}

.payment-method-title {
    display: block;
    font-weight: 600;
    line-height: 1.3;
}

.payment-method-description {
    display: block;
    color: #6b7280;
    /* gray-500 */
    margin-top: 4px;
    font-weight: 400;
    font-size: 0.9rem;
}

/* Notification */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.cart-notification.show {
    transform: translateX(0);
}

.cart-notification.success {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.cart-notification.error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

/* Yükleme Animasyonu */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .modern-cart-container {
        padding: 1rem;
    }

    .cart-wrapper,
    .checkout-wrapper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cart-summary,
    .payment-summary {
        position: static;
        margin-top: 2rem;
    }

    /* Tablet için adım göstergeleri */
    .steps-progress-container {
        padding: 0 0.5rem;
    }

    .progress-track {
        left: 48px;
        right: 48px;
    }

    .progress-bar {
        left: 48px;
        max-width: calc(100% - 96px);
    }

    .step-indicator>div:first-child {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .step-title {
        font-size: 13px;
    }

    .step-subtitle {
        font-size: 10px;
    }
}

@media (max-width: 768px) {

    /* Mobil için header */
    .cart-header {
        padding: 1rem 0;
    }

    .cart-header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .cart-header p {
        font-size: 0.875rem;
    }

    /* Mobil için adım göstergeleri */
    .steps-progress-container {
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .progress-track {
        left: 38px;
        right: 38px;
        top: 14px;
    }

    .progress-bar {
        left: 38px;
        top: 14px;
        max-width: calc(100% - 76px);
    }

    .step-indicator {
        max-width: 80px;
    }

    .step-indicator>div:first-child {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin-bottom: 6px;
    }

    .step-title {
        font-size: 12px;
        margin-bottom: 1px;
    }

    .step-subtitle {
        font-size: 9px;
        line-height: 1.1;
    }

    .step-check-icon {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .cart-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .quantity-controls {
        justify-self: center;
        margin: 0.5rem 0;
    }

    .item-subtotal {
        font-size: 1.2rem;
        margin-top: 0.5rem;
    }
}

/* Contract Modal Styles for Notification System */
.contract-modal .custom-alert-content {
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
}

.contract-modal .custom-alert-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 24px;
}

.contract-modal .custom-alert-body h1,
.contract-modal .custom-alert-body h2,
.contract-modal .custom-alert-body h3 {
    color: #111827;
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

.contract-modal .custom-alert-body h1 {
    font-size: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 8px;
}

.contract-modal .custom-alert-body h2 {
    font-size: 1.25rem;
}

.contract-modal .custom-alert-body h3 {
    font-size: 1.125rem;
}

.contract-modal .custom-alert-body p {
    margin-bottom: 16px;
    line-height: 1.6;
    color: #374151;
}

.contract-modal .custom-alert-body ul,
.contract-modal .custom-alert-body ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.contract-modal .custom-alert-body li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #374151;
}

.contract-modal .custom-alert-body strong {
    color: #111827;
    font-weight: 600;
}

/* Custom Scrollbar for Contract Modal */
.contract-modal .custom-alert-body::-webkit-scrollbar {
    width: 8px;
}

.contract-modal .custom-alert-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.contract-modal .custom-alert-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.contract-modal .custom-alert-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Contract Link Hover Effects */
.contract-link {
    transition: all 0.2s ease;
    position: relative;
}

.contract-link:hover {
    color: #3b82f6 !important;
    text-decoration: underline;
}

.contract-link:before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

.contract-link:hover:before {
    width: 100%;
}

/* Responsive Design for Contract Modal */
@media (max-width: 768px) {
    .contract-modal .custom-alert-content {
        width: 95vw;
        max-height: 95vh;
    }
    
    .contract-modal .custom-alert-body {
        max-height: 50vh;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .contract-modal .custom-alert-content {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .contract-modal .custom-alert-body {
        max-height: calc(100vh - 200px);
    }
}