/* =========================================
   1. GİZLEME (ESKİ FORMU YOK ET)
   ========================================= */
form.variations_form table.variations, 
form.variations_form .single_variation_wrap, 
.woocommerce-variation-add-to-cart { 
    display: none !important; 
}

/* =========================================
   2. ANA KUTU TASARIMI
   ========================================= */
#deus-app { 
    border: 1px solid #eee; 
    
    /* --- ARKA PLAN GÖRSEL AYARLARI --- */
    background-color: #fff; 
    background-image: url('th-bg1.jpg'); /* Arka plan resmi */
    background-size: cover; 
    background-position: center center;
    background-repeat: no-repeat;

    padding: 30px; 
    border-radius: 16px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.03); 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    position: relative; /* Toast mesajları ve diğer elementler için referans */
}

/* --- YENİ: İLERLEME ÇUBUĞU (PROGRESS BAR) --- */
.deus-progress-container {
    background-color: #e0e0e0;
    border-radius: 10px;
    height: 8px;
    width: 100%;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
/* MEVCUT KODU GÜNCELLEYİN: .deus-progress-bar */
.deus-progress-bar {
    background-color: #222; 
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease; /* Renk geçişi eklendi */
    
    /* Hareketli Şerit Efekti */
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 40px 40px; /* Boyut artırıldı */
    animation: deus-stripes-move 1s linear infinite; /* Animasyon atandı */
}

/* YENİ EKLENECEK: Son Adım Rengi (Yeşil/Gold vs.) */
.deus-progress-bar.is-finished {
    background-color: #27ae60 !important; /* Başarı Yeşili */
    box-shadow: 0 0 15px rgba(39, 174, 96, 0.6); /* Parlama efekti */
}

/* YENİ EKLENECEK: Hareket Animasyonu Keyframes */
@keyframes deus-stripes-move {
    0% {
        background-position: 40px 0;
    }
    100% {
        background-position: 0 0;
    }
}

.step-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 2px solid #f9f9f9; 
    padding-bottom: 15px; 
    margin-bottom: 25px; 
}

.step-header h3 { 
    margin: 0; 
    font-size: 20px; 
    font-weight: 700; 
    color: #222; 
}

.step-count { 
    background: #222; 
    color: #fff; 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-size: 12px; 
    font-weight: bold; 
}

.attr-group h4, .custom-group h4 { 
    font-size: 13px; 
    color: #888; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin-bottom: 15px; 
    font-weight: 600; 
}

.attr-group {
    margin-bottom: 30px; 
}

.opt-container { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 12px; 
}

/* =========================================
   3. BUTON TİPLERİ
   ========================================= */

/* A. Renk Topları */
.is-color-swatch {
    padding: 0; 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    overflow: hidden; 
    border: 2px solid #e1e1e1; 
    cursor: pointer; 
    position: relative;
}
.is-color-swatch input { display: none; }
.is-color-swatch:hover { transform: scale(1.1); }
.is-color-swatch:has(input:checked) { 
    transform: scale(1.2); 
    border-color: #fff; 
    box-shadow: 0 0 0 3px #222; 
}

/* B. Görselli Kartlar (Ürün Seçimi) */
.is-image-card {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    width: 90px; 
    height: 90px; 
    border: 2px solid #eee; 
    border-radius: 12px; 
    cursor: pointer; 
    transition: 0.2s; 
    background: #fff; 
    padding: 8px; 
}
.is-image-card input { display: none; }
.is-image-card .img-wrap { 
    width: 40px; 
    height: 40px; 
    margin-bottom: 4px; 
}
.is-image-card img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
}
.is-image-card span { 
    font-size: 11px; 
    font-weight: bold; 
    color: #555; 
    text-align: center; 
}
.is-image-card:hover { border-color: #ccc; }
.is-image-card:has(input:checked) { 
    border-color: #222; 
    background: #fdfdfd; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
}

/* C. Standart Text Buton */
.is-text-btn {
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    padding: 8px 18px; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    cursor: pointer; 
    background: #fff; 
    min-width: 50px; 
    font-size: 14px; 
}
.is-text-btn input { display: none; }
.is-text-btn:hover { background: #f9f9f9; }
.is-text-btn:has(input:checked) { 
    background: #222; 
    color: #fff; 
    border-color: #222; 
    font-weight: 600; 
}

/* =========================================
   4. EKSTRALAR VE DİĞERLERİ
   ========================================= */
.custom-group { 
    background: #fbfbfb; 
    border: 1px solid #eee; 
    border-radius: 10px; 
    padding: 20px; 
    margin-bottom: 30px; 
}

.option-item { 
    background: #fff; 
    border: 1px solid #e5e5e5; 
    border-radius: 8px; 
    padding: 12px 15px; 
    margin-bottom: 10px; 
    transition: 0.2s; 
    position: relative; /* Karakter sayacı için */
}
.option-item:has(input:checked) { 
    background: #fffcf0; 
    border-color: #e6b800; 
}

.option-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.option-header label { 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    width: 100%; 
    font-size: 15px; 
}
.option-header input { 
    margin-right: 12px; 
    width: 20px; 
    height: 20px; 
    accent-color: #222; 
}

.price-tag { 
    background: #eef9f0; 
    color: #27ae60; 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-size: 12px; 
    margin-left: 8px; 
    font-weight: bold; 
}

.text-box { 
    margin-top: 10px; 
    padding-left: 32px; 
    border-top: 1px dashed #eee; 
    padding-top: 10px; 
    position: relative;
}
.user-text { 
    width: 100%; 
    padding: 10px; 
    border: 1px solid #ccc; 
    border-radius: 6px; 
    background: #fafafa; 
    transition: border 0.2s;
}
.user-text:focus {
    border-color: #222;
    background: #fff;
    outline: none;
}

/* --- YENİ: KARAKTER SAYACI --- */
.char-counter {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 10px;
    color: #999;
    pointer-events: none;
    background: rgba(255,255,255,0.8);
    padding: 2px 4px;
    border-radius: 4px;
}

/* =========================================
   MODERN UPLOAD (DRAG & DROP) ALANI
   ========================================= */
.file-drop-zone {
    position: relative;
    width: 100%;
    padding: 30px 20px;
    background-color: #f8f9fa;
    border: 2px dashed #cbd5e0; 
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    margin-top: 10px;
}

.file-drop-zone.drag-over {
    background-color: #ebf8ff;
    border-color: #3182ce; 
    transform: scale(1.02);
}

.file-drop-zone input[type="file"] {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0; 
    cursor: pointer;
    z-index: 10;
}

.upload-placeholder {
    pointer-events: none; 
}
.upload-placeholder svg {
    width: 40px; height: 40px;
    fill: #a0aec0;
    margin-bottom: 10px;
    transition: 0.3s;
}
.file-drop-zone:hover .upload-placeholder svg {
    fill: #3182ce;
    transform: translateY(-5px);
}
.upload-text {
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
}
.upload-subtext {
    font-size: 11px;
    color: #718096;
    margin-top: 5px;
}

.file-preview-area {
    display: none; 
    margin-top: 10px;
    position: relative;
    z-index: 5; 
}
.preview-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background: #fff;
}
.file-info {
    margin-top: 8px;
    font-size: 12px;
    color: #27ae60;
    font-weight: bold;
}
.change-file-btn {
    font-size: 12px;
    color: #e53e3e;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 5px;
    display: inline-block;
    padding: 5px;
    background: #fff;
    border-radius: 4px;
}

/* =========================================
   TOOLTIP TASARIMI
   ========================================= */
.tooltip-wrap {
    position: relative;
    margin-left: 8px;
    display: inline-block;
    vertical-align: middle;
    z-index: 100;
}
.tooltip-icon { 
    display: inline-flex; 
    width: 18px; 
    height: 18px; 
    background: #555;
    color: #fff; 
    border-radius: 50%; 
    font-size: 11px; 
    justify-content: center; 
    align-items: center; 
    cursor: help; 
    font-weight: bold; 
    transition: all 0.2s ease;
}
.tooltip-wrap:hover .tooltip-icon {
    background: #000;
    transform: scale(1.1);
}
.tooltip-box { 
    visibility: hidden;
    opacity: 0;
    position: absolute; 
    bottom: 140%; 
    left: 50%; 
    transform: translateX(-50%) translateY(10px); 
    width: 220px; 
    background: #fff; 
    padding: 15px; 
    border-radius: 8px; 
    box-shadow: 0 5px 25px rgba(0,0,0,0.15); 
    text-align: center;
    border: 1px solid #f0f0f0;
    transition: all 0.25s cubic-bezier(0.68, -0.55, 0.265, 1.55); 
    pointer-events: none; 
}
.tooltip-wrap:hover .tooltip-box { 
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.tooltip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}
.tooltip-box img { 
    width: 80px !important; 
    height: auto !important;
    margin: 0 auto 10px auto !important;
    display: block !important;
    border-radius: 4px;
}
.tooltip-box p {
    font-size: 13px !important;
    font-weight: 300 !important; 
    color: #444 !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* MOBİL TOOLTIP DÜZELTME */
@media only screen and (max-width: 480px) {
    .tooltip-wrap {
        position: static; 
        display: inline-flex; 
        margin-left: 5px;
    }
    .tooltip-wrap:hover .tooltip-box,
    .tooltip-wrap:active .tooltip-box,
    .tooltip-wrap:focus-within .tooltip-box { 
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }
    .tooltip-box {
        position: fixed !important; 
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important; 
        width: 90% !important; 
        max-width: 320px !important;
        margin: 0 !important;
        right: auto !important;
        bottom: auto !important;
        z-index: 99999 !important; 
        background: #fff;
        padding: 20px !important;
        box-shadow: 0 0 0 1000px rgba(0,0,0,0.5), 0 10px 30px rgba(0,0,0,0.3) !important; 
        border-radius: 12px !important;
        text-align: center !important;
        box-sizing: border-box;
        white-space: normal !important; 
    }
    .tooltip-box::after { display: none !important; }
    .tooltip-box img {
        max-width: 100% !important;
        width: auto !important;
        height: auto !important;
        max-height: 200px !important;
        margin: 0 auto 15px auto !important;
    }
    .tooltip-box p {
        font-size: 14px !important;
        line-height: 1.6 !important;
        color: #333 !important;
    }
}

/* =========================================
   5. ALT ALAN (Action Area)
   ========================================= */
.action-area { 
    margin-top: 30px; 
    padding-top: 20px; 
    border-top: 2px dashed #eee; 
    text-align: center; 
}
#price-display { 
    font-size: 24px; 
    font-weight: 800; 
    color: #222; 
    margin-bottom: 20px; 
}
.btn-group { display: flex; gap: 15px; }
.nav-btn { 
    flex: 1; 
    padding: 16px; 
    border-radius: 8px; 
    border: none; 
    font-size: 16px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: 0.2s; 
    text-transform: uppercase; 
}
.prev-btn { background: #f0f0f0; color: #555; } 
.next-btn { background: #222; color: #fff; }
.next-btn:disabled { background: #ccc; cursor: not-allowed; }

.pay-btn {
    flex: 1.5; 
    padding: 16px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    background: #27ae60; 
    color: #fff;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
    margin-left: 10px;
}

.pay-btn:hover {
    background: #219150;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.6);
}

.pay-btn:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* =========================================
   BEDEN TABLOSU MODALI
   ========================================= */
#deus-size-guide-modal {
    position: fixed; 
    z-index: 9999; 
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: hidden; 
    background-color: rgba(0,0,0,0.7); 
    display: flex; 
    justify-content: center;
    align-items: center;
}
.deus-modal-content {
    background-color: #fefefe;
    padding: 30px; 
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4); 
    position: relative;
    width: 90%; 
    max-width: 600px; 
    max-height: 90vh; 
    overflow-y: scroll;
    -ms-overflow-style: none; 
    scrollbar-width: none; 
    text-align: center; 
    animation: fadeInScale 0.3s ease-out; 
}
.deus-modal-content::-webkit-scrollbar { display: none; }
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.deus-modal-content h3 {
    margin-top: 0;
    color: #222;
    font-size: 24px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.deus-modal-content img {
    max-width: 100%; 
    height: auto;
    display: block;
    margin: 0 auto; 
}
.deus-modal-close {
    color: #555; 
    font-size: 32px; 
    font-weight: 300; 
    position: absolute; 
    top: 5px; right: 15px;
    cursor: pointer;
    line-height: 1;
    transition: 0.2s;
}
.deus-modal-close:hover { color: #000; }

/* =========================================
   6. RESPONSIVE
   ========================================= */
@media only screen and (max-width: 768px) {
    .deus-modal-content { padding: 15px; max-width: 95%; }
    .deus-modal-content h3 { font-size: 20px; }

    .attr-group[data-key*="urun"] .opt-container,
    .attr-group[data-key*="product"] .opt-container {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important; 
        gap: 5px !important; 
    }

    .attr-group[data-key*="urun"] .opt-btn,
    .attr-group[data-key*="product"] .opt-btn {
        width: 100% !important;
        height: 100px !important; 
        min-width: 0 !important;
        flex-direction: column;
        padding: 2px !important; 
        font-size: 8px !important; 
    }

    .is-image-card .img-wrap { 
        width: 40px !important; 
        height: 40px !important; 
        margin-bottom: 5px; 
    }
    
    .is-image-card span { 
        font-size: 11px !important; 
        font-weight: 600; 
    }

    .attr-group[data-key*="beden"] .opt-container,
    .attr-group[data-key*="size"] .opt-container {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 12px !important; 
    }
    .attr-group[data-key*="beden"] .opt-btn,
    .attr-group[data-key*="size"] .opt-btn {
        width: 100% !important; min-width: 0 !important;
        padding: 8px 0 !important; text-align: center;
        font-size: 13px !important;
    }
    .attr-group[data-key*="renk"] .opt-btn,
    .attr-group[data-key*="color"] .opt-btn {
        width: 32px !important; 
        height: 32px !important; 
        border-radius: 50% !important; 
        flex: none !important; 
        padding: 0 !important;
        min-width: 0 !important;
    }

    .btn-group { flex-direction: column; }
    .pay-btn { width: 100%; margin-left: 0; margin-bottom: 10px; order: -1; }
    .next-btn { width: 100%; margin-bottom: 10px; order: 1; }
    .prev-btn { width: 100%; margin-left: 0 !important; order: 2; }
}

/* =========================================
   --- YENİ: TOAST NOTIFICATION (MODERN UYARI) ---
   ========================================= */
.deus-toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 50px;
    padding: 16px;
    position: fixed;
    z-index: 99999;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}
.deus-toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px; /* Yukarı doğru hafif kayma efekti */
}

/* =========================================
   7. BİLGİ MODÜLÜ (GÜVEN ROZETLERİ & AKORDİYON)
   ========================================= */
.deus-info-module {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.deus-trust-badges {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    margin-bottom: 10px;
    text-align: center;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 33%;
}

.badge-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px; 
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.2);
    position: relative;
    transform: rotate(45deg); 
}

.badge-icon svg, .badge-icon span {
    transform: rotate(-45deg); 
}

.badge-icon svg {
    width: 35px;
    height: 35px;
}

.badge-item span {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.deus-accordion {
    border-top: 1px solid #f0f0f0;
}

.acc-item {
    border-bottom: 1px solid #f0f0f0;
}

.acc-header {
    display: flex;
    align-items: center;
    padding: 15px 5px;
    cursor: pointer;
    background: #fff;
    transition: background 0.2s;
}
.acc-header:hover {
    background: #fbfbfb;
}

.acc-icon {
    font-size: 18px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.acc-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #222;
}

.acc-arrow {
    font-size: 10px;
    color: #999;
    transition: transform 0.3s ease;
}

.acc-item.active .acc-arrow {
    transform: rotate(180deg);
}

.acc-content {
    display: none; 
    padding: 10px 15px 20px 40px; 
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}

.price-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 18px;
    font-weight: 500;
}

.current-price {
    color: #222; 
    font-size: 28px;
    font-weight: 800;
}

.discount-label {
    background-color: #d63638; 
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 4px;
    transform: translateY(-2px); 
    box-shadow: 0 2px 5px rgba(214, 54, 56, 0.3);
    animation: pulseBadge 2s infinite; 
}

@keyframes pulseBadge {
    0% { transform: scale(1) translateY(-2px); }
    50% { transform: scale(1.05) translateY(-2px); }
    100% { transform: scale(1) translateY(-2px); }
}

@media only screen and (max-width: 480px) {
    .current-price { font-size: 24px; }
    .old-price { font-size: 16px; }
}

/* =========================================
   8. SİPARİŞ ÖZETİ KUTUSU (SON ADIM)
   ========================================= */
.deus-summary-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.deus-summary-box h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #e2e6ea;
    padding-bottom: 10px;
}

.deus-summary-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.summary-section {
    flex: 1;
    min-width: 200px;
}

.summary-section h5 {
    font-size: 14px;
    color: #6c757d;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 700;
}

.summary-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-section li {
    background: #fff;
    border: 1px solid #eee;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 6px;
    font-size: 14px;
    color: #444;
}

.summary-file-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-thumb {
    width: 60px !important; 
    height: 60px !important; 
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

@media only screen and (max-width: 480px) {
    .deus-summary-content {
        flex-direction: column;
        gap: 10px;
    }
}
/* EKSİK SEÇİM UYARI ALANI */
#deus-missing-alert {
    margin-top: 15px;
    font-size: 13px;
    color: #c0392b; /* Kırmızı tonu */
    background-color: #fceceb;
    border: 1px solid #e74c3c;
    padding: 10px;
    border-radius: 6px;
    display: none; /* Varsayılan olarak gizli, JS ile açacağız */
    animation: fadeIn 0.3s ease-in-out;
}

#deus-missing-alert strong {
    font-weight: 700;
    text-decoration: underline;
}