/* Custom Select Container */
.custom-select-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  font-family: inherit;
  margin-bottom: 10px;
}

/* Trigger Button */
.custom-select-trigger {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  min-height: 48px;
  box-sizing: border-box;
}

/* Trigger Arrow */
.custom-select-trigger::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid #333;
  border-bottom: 2px solid #333;
  transform: rotate(45deg);
  margin-top: -4px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

/* Open State Arrow */
.custom-select-trigger.open::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

/* Hover & Focus States */
.custom-select-trigger:hover {
  border-color: #ccc;
  background-color: #f9f9f9;
}

.custom-select-trigger:focus,
.custom-select-trigger:focus-visible {
  outline: 2px solid #007bff;
  outline-offset: 2px;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Options Dropdown */
.custom-select-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
  border: 1px solid rgba(224, 224, 224, 0.8);
  display: none;
  z-index: 1000;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
  will-change: transform, opacity;
  transform: translateZ(0);
}

/* Option Items */
.custom-select-option {
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
  color: #333;
}

/* Option States - Birleştirilmiş */
.custom-select-option:hover,
.custom-select-option.selected,
.custom-select-option[aria-selected="true"] {
  background: rgba(0, 0, 0, 0.9);
  color: white;
}

/* Focus State for Accessibility */
.custom-select-option:focus,
.custom-select-option:focus-visible {
  outline: 2px solid #007bff;
  outline-offset: -2px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
}

/* Seçili durumu için checkmark */
.custom-select-option[aria-selected="true"]::after {
  content: "✓";
  position: absolute;
  right: 12px;
  color: currentColor;
}

/* Reset Button - Gizli */
.reset_variations {
  display: none !important;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-select-options.fade-in {
  animation: fadeIn 0.2s ease;
}

/* Scrollbar Styling */
.custom-select-options::-webkit-scrollbar {
  width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.custom-select-options::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Sales Booster Container */
.e-con-full[data-id="a35a3d3"] {
  padding: 15px 0;
  margin: 15px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* Widget Styles */
.elementor-element-40209d1,
.elementor-element-a276ade {
  width: auto !important;
  margin-bottom: 0 !important;
}

.elementor-element-40209d1 .elementor-widget-container,
.elementor-element-a276ade .elementor-widget-container {
  padding: 0 !important;
  margin: 0 !important;
}

/* Live Viewing */
.sales-booster-live-viewing {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #333;
  font-weight: 500;
  transition: all 0.3s ease;
}

.sales-booster-live-viewing i {
  margin-right: 8px;
  font-size: 16px;
  color: #222;
  animation: pulse 2s infinite;
}

/* Pulse Animation */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

/* Delivery Styles */
.sales-booster-estimated-delivery {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #333;
  transition: all 0.3s ease;
}

.sales-booster-estimated-delivery i {
  margin-right: 8px;
  font-size: 16px;
  color: #222;
}

.sales-booster-estimated-delivery span:first-of-type {
  font-weight: 400;
  margin-right: 5px;
}

.delivery-date {
  font-weight: 600;
  color: #000;
}

/* Hover Effects */
.sales-booster-live-viewing:hover,
.sales-booster-estimated-delivery:hover {
  transform: translateY(-2px);
}

/* Loading State */
.variations_form.loading .custom-select-wrapper::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* Mobile Panel Styles */
.et-mobile-panel .with-dot > a .et_b-icon::before {
  content: "";
  position: absolute;
  width: 0.3em;
  height: 0.3em;
  left: -0.15em;
  top: 0;
  background: #000;
  border-radius: 50%;
  z-index: 1;
}

.et-mobile-panel .with-dot > a .et_b-icon::after {
  border: 1px solid #000;
}

/* Thumbnails */
.vertical-thumbnails-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-height: 100%;
}

.thumbnails-list .thumbnail-item {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* Z-index Fix */
.elementor-7835 .elementor-element.elementor-element-9ddb297 {
  z-index: 0;
}

/* Select Element Hiding */
.variations select,
form.variations_form select,
form.cart select[name^="attribute_"],
select[name^="attribute_"],
select[data-attribute_name^="attribute_"] {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Responsive Design */
@media (max-width: 767px) {
  .custom-select-trigger {
    padding: 10px 14px;
    min-height: 44px;
  }

  .custom-select-option {
    padding: 14px 16px;
  }

  .custom-select-options {
    max-height: 250px;
  }

  .e-con-full[data-id="a35a3d3"] {
    flex-direction: column;
    align-items: flex-start;
  }

  .elementor-element-40209d1,
  .elementor-element-a276ade {
    width: 100% !important;
  }

  .elementor-element-a276ade {
    margin-top: 10px !important;
  }

  /* Mobil için buton boyutları */
  .single_add_to_cart_button,
  .et-single-buy-now {
    min-height: 48px;
    font-size: 16px;
  }
}

/* ======================================
   WooCommerce Ürün Galerisi Düzenlemeleri
   ====================================== */

/* Ana slider (üst görsel) için düzenlemeler */
.swiper-control-top.main-slider-on {
  padding-top: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 10px !important; /* Alt thumbnail'lerle arası için minimal boşluk */
}

/* Ana slider wrapper */
.swiper-control-top .swiper-wrapper {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Ana slider görselleri */
.swiper-control-top .swiper-slide img {
  margin-top: 0 !important;
  padding-top: 0 !important;
  display: block;
}

/* Ana slider container yüksekliği */
.swiper-control-top {
  height: auto !important;
  min-height: unset !important;
}

/* Alt thumbnail slider düzenlemeleri */
.swiper-control-bottom {
  margin-top: 0 !important;
  padding-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Alt thumbnail wrapper */
.swiper-control-bottom .swiper-wrapper {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Alt thumbnail görselleri */
.swiper-control-bottom .swiper-slide {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* WooCommerce galeri wrapper düzenlemeleri */
.woocommerce-product-gallery {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Galeri içindeki figure elementi */
.woocommerce-product-gallery__wrapper {
  margin-top: 0 !important;
  padding-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Flex galeri düzenlemeleri */
.woocommerce-product-gallery--with-images {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Thumbnail'ler için özel düzenleme */
.flex-control-thumbs {
  margin-top: 10px !important; /* Sadece 10px boşluk */
  padding-top: 0 !important;
}

/* Ürün detay sayfası özel düzenlemeler */
.single-product .product {
  margin-top: 0 !important;
  padding-top: 20px !important; /* Sayfa üstünden minimal boşluk */
}

/* Summary (ürün başlık ve detayları) ile galeri arası düzenleme */
.single-product div.product .summary {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Mobil görünüm için düzenlemeler */
@media (max-width: 768px) {
  .swiper-control-top.main-slider-on {
    margin-bottom: 5px !important;
  }

  .flex-control-thumbs {
    margin-top: 5px !important;
  }
}

/* Video varsa düzenlemeler */
.woocommerce-product-gallery__image--placeholder,
.woocommerce-product-gallery__image iframe,
.woocommerce-product-gallery__image video {
  margin: 0 !important;
  padding: 0 !important;
  display: block;
}

/* Zoom ve lightbox düzenlemeleri */
.woocommerce-product-gallery__trigger {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  margin: 0 !important;
}

/* Genel reset kuralları - en sonda olmalı */
.woocommerce div.product div.images,
.woocommerce div.product div.images .woocommerce-product-gallery__wrapper,
.woocommerce div.product div.images .flex-viewport {
  margin: 0 !important;
  padding: 0 !important;
}

/* ============================================
   WooBT Birlikte Satın Alın - Düzeltmeler
   ============================================ */

/* 1. Başlangıçta toplam fiyat alanını gizle */
.woobt-summary {
  display: none;
}

/* Checkbox seçili olduğunda göster */
.woobt-summary.show {
  display: block;
}

/* 2. Ürün kutularının kenarlıklarını siyah yap */
.woobt-product {
  border: 1px solid #000 !important;
}

/* Ana ürün vurgusunu kaldır */
.woobt-product-this {
  border: 1px solid #000 !important;
  background: white !important;
}

/* 3. Checkbox seçildiğinde siyah kare efekti */
.woobt-checkbox:checked + .checkmark {
  background-color: #000 !important;
  position: relative;
}

.woobt-checkbox:checked + .checkmark:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  background: white;
  transform: translate(-50%, -50%);
}

/* Alternatif: Checkbox'ın kendisine siyah stil ver */
.woobt-checkbox {
  accent-color: #000 !important;
}

.woobt-checkbox:checked {
  background-color: #000 !important;
}

/* 4. Toplam fiyat stili */
.woobt-total {
  background: white;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}

.woobt-total .amount {
  color: #000;
  font-size: 20px;
}
