/* Renk tutarlılığı (2026-10-09): WooCommerce'in kendi renkleri (mor, yeşil, zeytin, mavi) "Bakır ve gece" paletine bağlanır.
   Kural: vurgu = bakır, hata = #E06A5A, başarı/onay = bakır, metin = --ink / --ink-2, zemin = --bg / --bg-2 / --surface. */

:root {
  --hata: #E06A5A;
  --cizgi-guclu: #3A3E44;
  --woocommerce: var(--copper);
  --wc-primary: var(--copper);
  --wc-primary-text: var(--on-copper);
  --wc-secondary: var(--surface);
  --wc-secondary-text: var(--ink);
  --wc-highlight: var(--copper);
  --wc-highligh-text: var(--on-copper);
  --wc-content-bg: var(--bg);
  --wc-subtext: var(--ink-2);
  --wc-green: var(--copper);
  --wc-red: var(--hata);
  --wc-orange: var(--copper);
  --wc-blue: var(--copper);
  --wc-destructive: var(--hata);
  --wc-form-border-color: var(--cizgi-guclu);
}

/* Bildirimlerdeki WooCommerce ikonu (metnin ilk harflerinin üstüne binen mavi kutu) */
.woocommerce-info::before, .woocommerce-message::before, .woocommerce-error::before,
.woocommerce-info::after, .woocommerce-message::after, .woocommerce-error::after { display: none !important; content: none !important; }
.woocommerce-info, .woocommerce-message, .woocommerce-error { padding-left: var(--s3) !important; }
.woocommerce-info a, .woocommerce-message a:not(.button), .woocommerce-error a { color: var(--copper); }
.woocommerce-error { border-left-color: var(--hata) !important; }
.woocommerce-error, .woocommerce-error li { color: var(--ink); }

/* Stok bilgisi: zeytin sarısı yerine sakin metin + bakır ikon */
.stock, .stock.in-stock, p.stock, .woocommerce div.product .stock { color: var(--ink-2) !important; }
.stock i { color: var(--copper); }
.stock.out-of-stock { color: var(--hata) !important; }

/* Form doğrulama: yeşil "geçerli" çerçeve yok; hata kırmızısı tek ton */
.woocommerce form .form-row.woocommerce-validated input.input-text,
.woocommerce form .form-row.woocommerce-validated select,
.woocommerce form .form-row.woocommerce-validated .select2-container:not(.select2-container--open) .select2-selection { border-color: var(--cizgi-guclu) !important; }
.woocommerce form .form-row.woocommerce-invalid label { color: var(--hata) !important; }
.woocommerce form .form-row.woocommerce-invalid input.input-text,
.woocommerce form .form-row.woocommerce-invalid select,
.woocommerce form .form-row.woocommerce-invalid .select2-container:not(.select2-container--open) .select2-selection { border-color: var(--hata) !important; }
.woocommerce form .form-row .required { color: var(--copper) !important; }

/* Şehir / ilçe seçici (selectWoo): açık ok, okunur seçenekler */
.select2-container .select2-selection--single { height: 48px !important; background: var(--bg-2) !important; border: 1px solid var(--cizgi-guclu) !important; border-radius: var(--r) !important; }
.select2-container .select2-selection--single .select2-selection__rendered { line-height: 46px !important; padding-left: 14px !important; padding-right: 40px !important; color: var(--ink) !important; }
.select2-container .select2-selection--single .select2-selection__placeholder { color: #7D786F !important; }
.select2-container .select2-selection--single .select2-selection__arrow { height: 46px !important; width: 40px !important; right: 0 !important; top: 0 !important; background: none !important; }
.select2-container .select2-selection--single .select2-selection__arrow b { position: absolute !important; left: 50% !important; top: 50% !important; width: 12px !important; height: 8px !important; margin: -4px 0 0 -6px !important; border: 0 !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23EEEAE3' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat center / 12px 8px !important; transition: transform .2s ease; }
.select2-container--open .select2-selection--single .select2-selection__arrow b { transform: rotate(180deg); }
.select2-container--open .select2-selection--single, .select2-container--focus .select2-selection--single { border-color: var(--copper) !important; }
.select2-dropdown { background: var(--surface) !important; border: 1px solid var(--cizgi-guclu) !important; color: var(--ink) !important; }
.select2-search--dropdown { padding: 8px !important; }
.select2-search--dropdown .select2-search__field { background: var(--bg-2) !important; color: var(--ink) !important; border: 1px solid var(--cizgi-guclu) !important; border-radius: var(--r); min-height: 40px; padding: 6px 10px !important; font: 400 1rem var(--sans); }
.select2-results__option { padding: 10px 14px !important; color: var(--ink) !important; background: transparent !important; }
.select2-results__option[aria-selected="true"], .select2-results__option[data-selected="true"], .select2-results__option--selected { background: var(--bg-2) !important; color: var(--copper) !important; }
.select2-results__option--highlighted, .select2-results__option--highlighted[aria-selected], .select2-results__option--highlighted[data-selected],
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted[data-selected] { background: rgb(208 122 69 / .22) !important; color: var(--ink) !important; }
.select2-results__message { color: var(--ink-2) !important; }
.select2-results__options::-webkit-scrollbar { width: 8px; }
.select2-results__options::-webkit-scrollbar-thumb { background: var(--cizgi-guclu); border-radius: 4px; }

/* Tek ülke (Türkiye): sabit alan gibi, ok yok */
.ld-woo-sayfa select.country_to_state--single { width: 100% !important; min-height: 48px; padding: 0 14px !important; background: var(--bg-2) !important; color: var(--ink-2) !important; border: 1px solid var(--cizgi-guclu) !important; border-radius: var(--r); pointer-events: none; -webkit-appearance: none; appearance: none; }

/* Yerel seçme kutuları da aynı ok */
.ld-woo-sayfa select:not(.select2-hidden-accessible):not(.country_to_state--single), .ld-talep-form select {
  -webkit-appearance: none; appearance: none; padding-right: 40px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23EEEAE3' stroke-width='1.6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 14px center !important;
}

/* Adet: − / + düğmeleri */
.quantity.adet { display: inline-flex; align-items: stretch; height: 52px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.quantity.adet input.qty { width: 52px; border: 0 !important; background: transparent !important; text-align: center; padding: 0; }
.adet-btn { width: 44px; border: 0; background: var(--bg-2); color: var(--ink); font: 400 1.375rem/1 var(--sans); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.adet-btn:hover { background: var(--surface); color: var(--copper); }
.adet-btn:focus-visible { outline: 2px solid var(--copper); outline-offset: -2px; }

/* Blok sepet (Sepet sayfası) */
.wc-block-components-quantity-selector { border-color: var(--cizgi-guclu) !important; border-radius: var(--r) !important; background: var(--bg-2) !important; }
.wc-block-components-quantity-selector::after { border-color: var(--cizgi-guclu) !important; }
.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input { color: var(--ink) !important; background: transparent !important; }
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button { color: var(--ink) !important; background: transparent !important; opacity: 1 !important; }
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover { color: var(--copper) !important; }
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled { opacity: .35 !important; }
.wc-block-cart-item__remove-link, .wc-block-components-product-name { color: var(--ink) !important; }
.wc-block-cart-item__remove-link:hover { color: var(--copper) !important; }
.wc-block-components-product-badge, .wc-block-components-sale-badge { color: var(--copper) !important; border-color: var(--copper) !important; background: transparent !important; }
.wc-block-components-totals-item__label, .wc-block-components-totals-item__value, .wc-block-components-formatted-money-amount { color: var(--ink) !important; }
.wc-block-components-totals-item__description, .wc-block-components-product-metadata, .wc-block-components-product-details { color: var(--ink-2) !important; }
.wc-block-components-panel__button, .wc-block-components-totals-coupon-link { color: var(--ink) !important; }
.wc-block-components-panel__button svg { fill: var(--ink) !important; }
.wc-block-cart__submit-button, .wc-block-components-button:not(.is-link) { background: var(--copper) !important; color: var(--on-copper) !important; border: 0 !important; }
.wc-block-cart__submit-button:hover, .wc-block-components-button:not(.is-link):hover { background: var(--copper-hover) !important; }
.wc-block-components-button.is-link { color: var(--copper) !important; }
.wc-block-cart-items__header, .wc-block-cart-items th { color: var(--ink-2) !important; }
.wc-block-cart table.wc-block-cart-items td, .wc-block-cart table.wc-block-cart-items th, .wc-block-components-totals-wrapper { border-color: var(--line) !important; }
.wc-block-components-notice-banner { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; }
.wc-block-components-notice-banner > svg { fill: var(--copper) !important; background: transparent !important; }
.wc-block-components-notice-banner.is-error > svg { fill: var(--hata) !important; }
.wc-block-cart .wc-block-components-sidebar { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3) !important; }
.wc-block-components-text-input input, .wc-block-components-text-input.is-active input { background: var(--bg-2) !important; color: var(--ink) !important; }
.wp-block-woocommerce-empty-cart-block, .wc-block-cart__empty-cart__title { color: var(--ink) !important; }
.wc-block-cart__empty-cart__title::before { background-color: var(--ink-2) !important; }

/* Odak halkası her yerde bakır */
:focus-visible { outline-color: var(--copper); }
a { -webkit-tap-highlight-color: rgb(208 122 69 / .25); }

/* Okunurluk (WCAG AA ≥ 4,5): WhatsApp yeşili bir ton koyu, yer tutucular bir ton açık */
:root { --wa: #0E7A6D; }
::placeholder, .ld-woo-sayfa ::placeholder { color: #8F8A81 !important; opacity: 1; }
.select2-container .select2-selection--single .select2-selection__placeholder { color: #8F8A81 !important; }

/* Ürün sayfası: stok bilgisi yalnızca bir kez (WooCommerce formun içinde de basıyor) */
.ld-sepet .stock { display: none !important; }
.ld-sepet form.cart:not(.variations_form), .ld-sepet .woocommerce-variation-add-to-cart { grid-template-columns: auto 1fr !important; }
/* Sözleşme onayı: ayrı duran yıldız yerine metin yeterli */
.woocommerce-terms-and-conditions-wrapper .required { display: none !important; }
.ld-sepet form.cart::before, .ld-sepet form.cart::after, .ld-sepet .woocommerce-variation-add-to-cart::before, .ld-sepet .woocommerce-variation-add-to-cart::after { display: none !important; content: none !important; }
.ld-sepet .quantity { float: none !important; margin: 0 !important; }
/* Şehir/ilçe kutusunda yazı diğer alanlarla aynı hizada */
.select2-container .select2-selection--single { display: flex !important; align-items: center; }
.select2-container .select2-selection--single .select2-selection__rendered { flex: 1; line-height: 1.4 !important; padding-top: 0 !important; padding-bottom: 0 !important; }

/* Boş sepet */
.bos-sepet { text-align: center; max-width: 560px; margin: 0 auto var(--s6); color: var(--ink-2); }
.bos-sepet p { margin: 0 0 var(--s3); }
.bos-sepet-linkler { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.bos-sepet-linkler .btn { min-height: 48px; }
.wc-block-cart__empty-cart__title { font-size: 2rem !important; margin-top: var(--s3) !important; }
.wp-block-woocommerce-empty-cart-block .wp-block-separator { display: none; }
.wp-block-woocommerce-empty-cart-block > h2:not(.wc-block-cart__empty-cart__title) { font-size: 2rem; margin: var(--s6) 0 var(--s4); }
.wc-block-grid__products { gap: var(--s3); }
.wc-block-grid__product { border: 0 !important; }
.wc-block-grid__product-title, .wc-block-grid__product-link { color: var(--ink) !important; text-decoration: none; }
.wc-block-grid__product-image img { background: #0B0D0F; object-fit: contain; aspect-ratio: 3 / 4; }
.wc-block-grid__product-add-to-cart .wp-block-button__link, .wc-block-grid__product .add_to_cart_button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px !important;
  background: transparent !important; color: var(--ink) !important; border: 1px solid var(--cizgi-guclu) !important; border-radius: var(--r) !important; font: 600 .875rem var(--sans) !important;
}
.wc-block-grid__product-add-to-cart .wp-block-button__link:hover, .wc-block-grid__product .add_to_cart_button:hover { border-color: var(--copper) !important; color: var(--copper) !important; }
.wc-block-grid__product .added_to_cart { color: var(--copper); font-size: .875rem; }
.wc-block-cart__empty-cart__title.with-empty-cart-icon::before { width: 88px !important; height: 88px !important; -webkit-mask-size: 88px !important; mask-size: 88px !important; }
@media (max-width: 767px) {
  .wc-block-grid__products { display: grid !important; grid-template-columns: 1fr 1fr; gap: var(--s4) 12px; }
  .wc-block-grid__product { max-width: none !important; flex: none !important; width: auto !important; margin: 0 !important; }
  .wc-block-grid__product-title { font-size: .8125rem !important; }
  .bos-sepet-linkler .btn { flex: 1 1 40%; }
}
@media (min-width: 768px) {
  .wc-block-grid__products { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: var(--s4) var(--s3); }
  .wc-block-grid__product { max-width: none !important; flex: none !important; width: auto !important; margin: 0 !important; }
}
