﻿/* ==========================================================================
   TASARIO - SHOPIFY TARZI Ã–DEME (CHECKOUT) EKRANI STÄ°LLERÄ°
   ========================================================================== */

/* ==========================================================================
   CHECKOUT HEADER (Ã–ZEL ÃœST BÄ°LGÄ°)
   ========================================================================== */
.checkout-header-inner {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 20px 0; 
    border-bottom: 1px solid #e5e7eb;
}
.checkout-logo-wrap {
    flex-shrink: 0;
}
.checkout-logo-link {
    display: inline-block;
}
.checkout-logo-img {
    max-height: 44px; 
    width: auto; 
    object-fit: contain;
}
.checkout-logo-text {
    font-size: 24px; 
    font-weight: 800; 
    color: #111827;
}
.checkout-header-right {
    display: flex; 
    align-items: center; 
    gap: 20px;
}
.secure-badge {
    display: flex; 
    align-items: center; 
    gap: 6px; 
    color: #10B981; 
    font-weight: 600; 
    font-size: 14px;
}
.return-cart-btn {
    color: #6b7280; 
    font-size: 14px; 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    gap: 4px;
}
.return-cart-btn:hover {
    color: #111827;
}

/* Genel Sayfa Arka PlanÄ± (Sadece Checkout sayfasÄ± iÃ§in) */
body.tasario-checkout-page {
    background-color: #f9fafb !important;
}
.checkout-wrapper {
    background: transparent !important;
}

/* 1. ANA YERLEÃ…ÂÄ°M (LAYOUT) - CSS GRID Ä°LE Ä°KÄ° SÃœTUN */
body.tasario-checkout-page .tasario-container,
.wp-block-woocommerce-checkout,
.tasario-checkout-form, 
.checkout-header-inner {
    max-width: 1000px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
.tasario-checkout-form {
    margin-top: 40px;
    padding: 0 20px;
}
.site-main.page-main .tasario-container {
    padding-bottom: 0 !important; /* Genel page container alt boÅŸluÄŸunu sÄ±fÄ±rla */
}
.wp-block-woocommerce-checkout {
    margin-bottom: 10px !important; /* Block yapÄ±sÄ±ndaki boÅŸluÄŸu daralt */
}
.tasario-checkout-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: start;
}

/* 2. SOL SÃœTUN (MÃ¼ÅŸteri Bilgileri) */
.tasario-checkout-left {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* 3. SAÃ„Â SÃœTUN (SipariÅŸ Ã–zeti) */
.tasario-checkout-right {
    position: sticky;
    top: 20px;
    /* SaÄŸ sÃ¼tunun arka planÄ± hafif gri kalsÄ±n */
}
.tasario-order-review-box {
    background: #f3f4f6; /* Shopify gri tonu */
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}
#order_review_heading {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
    color: #111827;
}

/* 4. MAGIC TRICK: ORDER REVIEW VE PAYMENT BÃ–LÃœMÃœNÃœ CSS Ä°LE AYIRMAK */
/* WooCommerce standart olarak #order_review iÃ§ine hem Tabloyu hem de Ã–demeyi koyar. 
   OnlarÄ± Grid ile ayÄ±rÄ±p, Ã–demeyi Sol SÃ¼tunun en altÄ±na Ã§ekeceÄŸiz. */
#order_review {
    display: flex;
    flex-direction: column;
}
/* SipariÅŸ Tablosu SaÄŸda kalsÄ±n */
.woocommerce-checkout-review-order-table {
    order: 1;
    width: 100%;
    border: none;
    border-collapse: collapse;
}
/* Ã–deme MetotlarÄ± (#payment) Soldaki formun altÄ±na gitsin! */
#payment {
    /* Bu elemanÄ± mutlak pozisyonlama veya Grid Area ile sola taÅŸÄ±yamayÄ±z Ã§Ã¼nkÃ¼ DOM olarak saÄŸ sÃ¼tunun (tasario-checkout-right) iÃ§inde kalÄ±yor. 
       DÃœZELTME: Checkout JS DOM'u tekrar oluÅŸturduÄŸu iÃ§in #payment'i DOM olarak taÅŸÄ±mak zor. 
       Bunun yerine, Shopify tarzÄ±nda her ikisini de (Ä°letiÅŸim ve Ã–deme) ayrÄ± tutmak daha iyidir ama WooCommerce yapÄ±sÄ±nda bu zordur.
       O yÃ¼zden "SaÄŸ SÃ¼tunda" kalmasÄ± Ã§ok da kÃ¶tÃ¼ deÄŸildir. Shopify'da bazen Ã¶zet saÄŸdadÄ±r ama biz burada WooCommerce uyumu iÃ§in saÄŸda bÄ±rakacaÄŸÄ±z 
       veya WooCommerce'in klasik mantÄ±ÄŸÄ±nÄ± bozmayacaÄŸÄ±z.
       
       ALTERNATÄ°F: #payment kÄ±smÄ±nÄ± saÄŸ sÃ¼tunun altÄ±na (order: 2) geniÅŸ ve gÃ¼zel ÅŸekilde yerleÅŸtirmek. */
    order: 2;
    background: transparent !important;
    margin-top: 30px;
}

/* 5. FORM ELEMANLARI (Shopify EstetiÄŸi) */
.woocommerce-checkout-layout h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #111827;
}
.form-row {
    margin-bottom: 15px;
    padding: 0 !important;
}
.form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 6px;
}
/* Zorunlu alan yÄ±ldÄ±zÄ± */
.form-row label .required {
    color: #ef4444;
    text-decoration: none;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="password"],
.form-row textarea,
.select2-container .select2-selection--single {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #111827;
    background-color: #fff;
    transition: all 0.2s ease;
    height: auto;
}
.select2-container .select2-selection--single {
    height: 52px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 50px;
    padding-left: 16px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 50px;
    right: 10px;
}

/* Ãœlke ve Posta Kodu AlanlarÄ±nÄ± Gizle (Hem Klasik Hem Block Ä°Ã§in Garanti Ã‡Ã¶zÃ¼m) */
#billing_country_field,
#shipping_country_field,
#billing_postcode_field,
#shipping_postcode_field,
.wc-block-components-country-input,
.wc-block-components-address-form__postcode {
    display: none !important;
}

/* Focus Durumu (TemanÄ±n Turuncusu - Klasik & Block Ortak) */
.form-row input:focus,
.form-row textarea:focus,
.select2-container--open .select2-selection--single,
.wc-block-components-text-input input:focus,
.wc-block-components-textarea textarea:focus,
.wc-block-components-combobox input:focus,
.wc-block-components-state-input input:focus,
.wc-block-components-country-input input:focus,
.wc-block-components-text-input.is-active::after {
    border-color: #E95902 !important;
    box-shadow: 0 0 0 1px #E95902 !important;
    outline: none !important;
}

/* Block Checkout varsayÄ±lan outline/mavi Ã§erÃ§evelerini sÄ±fÄ±rla */
.wc-block-components-text-input input:focus,
.wc-block-components-textarea textarea:focus {
    outline-color: #E95902 !important;
}

/* 6. SÄ°PARÄ°Ã…Â Ã–ZETÄ° TABLOSU Ã…ÂEKÄ°LLENDÄ°RME */
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 15px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: none;
}
.woocommerce-checkout-review-order-table thead th {
    display: none; /* Tablo baÅŸlÄ±klarÄ±nÄ± gizle, temiz dursun */
}
.product-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
}
.product-quantity {
    font-weight: 500;
    color: #6b7280;
    margin-left: 5px;
}
.product-total {
    text-align: right;
    font-weight: 600;
    color: #111827;
}
.cart-subtotal th, .cart-subtotal td,
.order-total th, .order-total td,
.woocommerce-shipping-totals th, .woocommerce-shipping-totals td {
    padding: 15px 0;
    border-top: 1px solid #e5e7eb;
}
.cart-subtotal th, .order-total th, .woocommerce-shipping-totals th {
    font-weight: 400;
    color: #4b5563;
}
.order-total th, .order-total td {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    border-top: 2px solid #d1d5db;
}

/* 7. Ã–DEME SEÃ‡ENEKLERÄ° (Payment Methods) */
#payment ul.payment_methods {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0;
    margin: 0 0 20px 0;
    background: #fff;
    overflow: hidden;
}
#payment ul.payment_methods li {
    list-style: none !important;
    border-bottom: 1px solid #e5e7eb;
    padding: 15px 20px;
    margin: 0;
}
#payment ul.payment_methods li:last-child {
    border-bottom: none;
}
#payment ul.payment_methods li input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: #E95902;
}
#payment ul.payment_methods li label {
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}
#payment div.payment_box {
    background-color: #f9fafb;
    padding: 15px;
    margin-top: 15px;
    border-radius: 6px;
    font-size: 13px;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

/* 8. BÃœYÃœK SÄ°PARÄ°Ã…ÂÄ° ONAYLA BUTONU (Klasik & Block) */
#place_order,
.wc-block-components-checkout-place-order-button {
    width: 100% !important;
    background-color: #E95902 !important;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    padding: 20px !important;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px rgba(233, 89, 2, 0.2) !important;
}
#place_order:hover,
.wc-block-components-checkout-place-order-button:hover:not(:disabled) {
    background-color: #c54a01 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(233, 89, 2, 0.3) !important;
}

/* Kupon Uygula Butonu (Block) */
.wc-block-components-totals-coupon__button {
    background-color: #E95902 !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    border: none !important;
}
.wc-block-components-totals-coupon__button:hover:not(:disabled) {
    background-color: #c54a01 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(233, 89, 2, 0.25) !important;
}
.wc-block-components-totals-coupon__button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: #fca5a5 !important; /* disabled olunca soluk turuncu/kÄ±rmÄ±zÄ±mtÄ±rak */
}

/* Gizlilik / Ã…Âartlar Metni */
.woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 20px;
    font-size: 13px;
    color: #4b5563;
}
.woocommerce-terms-and-conditions-wrapper input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #E95902;
}

/* Mobil Uyumluluk */
@media (max-width: 991px) {
    .hide-on-mobile {
        display: none !important;
    }
    .checkout-header-inner {
        padding: 15px 20px;
    }
    .checkout-logo-img {
        max-height: 36px;
    }
    .checkout-header-right {
        gap: 12px;
    }
    .secure-badge {
        font-size: 0; /* Mobilde yazÄ±yÄ± gizleyip sadece ikonu gÃ¶stermek iÃ§in alternatif (zaten hide-on-mobile ile gizliyoruz) */
    }

    .tasario-checkout-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .tasario-checkout-right {
        position: static;
    }
    .tasario-checkout-left {
        padding: 20px;
    }

    /* WooCommerce Block yapÄ±sÄ±ndan gelen mÃ¼kerrer 'Ãœst SipariÅŸ Ã–zeti'ni mobilde gizle */
    .wc-block-components-sidebar.wc-block-checkout__sidebar {
        display: none !important;
    }
}

/* Force Font on Checkout */
body.tasario-checkout-page, .tasario-checkout-form { font-family: var(--font-main) !important; }
body.tasario-checkout-page input, body.tasario-checkout-page select, body.tasario-checkout-page textarea, body.tasario-checkout-page button { font-family: inherit !important; }



/* Hide individual item prices in checkout block (user request) */
.wc-block-components-order-summary-item__individual-prices {
    display: none !important;
}

/* Reduce overly bold prices in checkout */
body.tasario-checkout-page .woocommerce-Price-amount, 
body.tasario-checkout-page .price .amount,
body.tasario-checkout-page .price,
.wc-block-components-totals-item__value,
.wc-block-components-order-summary-item__total-price,
.wc-block-components-product-price {
    font-weight: 600 !important;
}

/* Total price can be slightly bolder but not 800 */
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-weight: 700 !important;
}

