/* ============================================================
   Yerel Sepet — Artvin Balı temasıyla uyumlu
   Palet: #ffb801 (altın), #333 (metin), #e5e5e5 (kenarlık), #fafafa
   ============================================================ */

/* ---------- Sepete Ekle butonları: dalga (ripple) tepkisi ---------- */
.add-to-cart-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.add-to-cart-btn:active {
  transform: scale(0.96);
}

.cart-btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transform: scale(0);
  pointer-events: none;
  animation: cart-btn-ripple-anim 600ms ease-out forwards;
}

@keyframes cart-btn-ripple-anim {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* green-700: beyaz yazıyla 4.9:1 kontrast (WCAG AA). Buton normalde koyu
   yazılı olduğu için "eklendi" durumunda yazı rengi de açığa çevriliyor. */
.add-to-cart-btn.is-added {
  background-color: #15803d !important;
  color: #fff !important;
  cursor: default;
}

.add-to-cart-btn:disabled {
  opacity: 1;
}

/* ---------- Kaydırma çubuğu gizli yatay carousel'ler için ---------- */
.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ---------- Sabit panel (sepet sayfası dışında gizli) ---------- */
.local-cart-panel {
  position: fixed;
  right: 18px;
  bottom: 82px;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100vh - 120px);
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  z-index: 9999998;
  display: none;
  font-family: Roboto, Arial, sans-serif;
}

.local-cart-panel.is-open {
  display: block;
}

/* ---------- Header mini-sepet (dropdown) ---------- */
.cart {
  position: relative;
}

.cart .dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  min-width: 340px;
  width: auto;
  margin: 0 !important;
  padding: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  display: none;
  opacity: 1;
  visibility: visible;
  z-index: 9999;
  font-family: Roboto, Arial, sans-serif;
  overflow: hidden;
}

.cart:hover .dropdown-menu,
.cart.open .dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
}

.cart .dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 16px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-left: 1px solid #e5e5e5;
  border-top: 1px solid #e5e5e5;
  transform: rotate(45deg);
  z-index: 1;
}

.cart .dropdown-menu .local-cart-header {
  padding: 12px 16px;
  background: #fafafa;
  border-bottom: 1px solid #e5e5e5;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart .dropdown-menu .local-cart-header .local-cart-count {
  font-size: 12px;
  font-weight: 400;
  color: #888;
}

.cart .dropdown-menu .local-cart-body {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px 16px;
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}

.cart .dropdown-menu .local-cart-body::-webkit-scrollbar {
  width: 5px;
}

.cart .dropdown-menu .local-cart-body::-webkit-scrollbar-track {
  background: transparent;
}

.cart .dropdown-menu .local-cart-body::-webkit-scrollbar-thumb {
  background-color: #ddd;
  border-radius: 3px;
}

.cart .dropdown-menu .local-cart-footer {
  padding: 12px 16px;
  border-top: 1px solid #e5e5e5;
  background: #fafafa;
}

@media (max-width: 480px) {
  .cart .dropdown-menu {
    min-width: 290px;
    right: -10px;
  }
  .cart .dropdown-menu::before {
    right: 20px;
  }
}

/* ---------- Ürün listesi ---------- */
.local-cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.local-cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.local-cart-item:last-child {
  border-bottom: 0;
}

.local-cart-thumb {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
}

.local-cart-thumb img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
}

.local-cart-info {
  flex: 1 1 auto;
  min-width: 0;
}

.local-cart-name {
  display: block;
  color: #333;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.local-cart-name:hover {
  color: #ffb801;
}

.local-cart-meta {
  display: block;
  color: #ffb801;
  font-size: 12px;
  font-weight: 600;
  margin-top: 3px;
}

.local-cart-empty {
  color: #999;
  margin: 0;
  padding: 30px 0;
  text-align: center;
  font-size: 14px;
}

.local-cart-empty i {
  display: block;
  font-size: 36px;
  color: #ddd;
  margin-bottom: 10px;
}

/* ---------- Adet kontrolleri ---------- */
.local-cart-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.local-cart-controls button {
  width: 24px;
  height: 24px;
  line-height: 22px;
  padding: 0;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
  color: #555;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
}

.local-cart-controls button:hover {
  background: #ffb801;
  border-color: #ffb801;
  color: #fff;
}

.local-cart-controls .local-cart-remove {
  color: #bbb;
  margin-left: auto;
  border: none;
  background: transparent;
  width: auto;
  height: auto;
  font-size: 12px;
  line-height: 1;
  padding: 4px;
}

.local-cart-controls .local-cart-remove:hover {
  background: transparent;
  border: none;
  color: #e74c3c;
}

.local-cart-qty {
  min-width: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

/* ---------- Özet ve butonlar ---------- */
.local-cart-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.local-cart-summary .local-cart-total-label {
  font-size: 14px;
  color: #555;
}

.local-cart-summary .local-cart-total-value {
  font-size: 16px;
  font-weight: 700;
  color: #ffb801;
}

.local-cart-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.local-cart-actions .local-cart-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25d366;
  color: #fff !important;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: background 0.2s ease;
}

.local-cart-actions .local-cart-whatsapp:hover {
  background: #1da851;
}

.local-cart-actions .local-cart-go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffb801;
  color: #fff !important;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: background 0.2s ease;
}

.local-cart-actions .local-cart-go:hover {
  background: #e5a500;
}

.local-cart-actions .local-cart-clear {
  display: block;
  background: transparent;
  border: none;
  color: #999;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  padding: 4px;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.local-cart-actions .local-cart-clear:hover {
  color: #e74c3c;
}

.action-btn a.local-cart-order {
  background: #ffb801;
  border-color: #ffb801;
  color: #fff;
  width: auto;
  padding: 0 10px;
  line-height: 28px;
}

.action-btn a.local-cart-order:hover {
  background: #333;
  border-color: #333;
  color: #fff;
}

/* ---------- Sepet sayfası tablosu ---------- */
.local-cart-table {
  border: 1px solid #e5e5e5;
}

.local-cart-table > thead > tr > th {
  background: #fafafa;
  color: #333;
  border-bottom: 1px solid #e5e5e5;
  font-weight: 600;
}

.local-cart-table > tbody > tr > td {
  vertical-align: middle;
  border-top: 1px solid #f0f0f0;
}

.local-cart-table .price-col {
  color: #ffb801;
  white-space: nowrap;
}

.local-cart-table .remove-col {
  width: 40px;
  text-align: center;
}

.local-cart-table a.local-cart-remove {
  display: inline-block;
  width: 26px;
  height: 26px;
  line-height: 24px;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  color: #999;
  text-align: center;
}

.local-cart-table a.local-cart-remove:hover {
  background: #333;
  border-color: #333;
  color: #fff;
}

/* ---------- Sepet sayfası alt kısım ---------- */
.local-cart-page-footer {
  border-top: 1px solid #e5e5e5;
  padding: 14px 0;
  margin-top: -1px;
}

.local-cart-grand-total {
  font-size: 16px;
  color: #333;
}

.local-cart-grand-total span {
  color: #ffb801;
  font-weight: 700;
}

.local-cart-page-actions {
  margin-top: 12px;
}

.local-cart-page-actions .local-cart-order {
  display: inline-block;
  background: #ffb801;
  color: #fff !important;
  padding: 12px 22px;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none !important;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.4px;
}

.local-cart-page-actions .local-cart-order:hover {
  background: #333;
}

.local-cart-page-actions .local-cart-continue,
.local-cart-page-empty .local-cart-continue {
  display: inline-block;
  margin-left: 10px;
  padding: 11px 18px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  color: #333 !important;
  text-decoration: none !important;
  font-size: 13px;
  text-transform: uppercase;
}

.local-cart-page-actions .local-cart-continue:hover,
.local-cart-page-empty .local-cart-continue:hover {
  background: #ffb801;
  border-color: #ffb801;
  color: #fff !important;
}

/* ---------- Boş sepet (sayfa) ---------- */
.local-cart-page-empty {
  padding: 40px 15px;
  color: #6e6e6e;
}

.local-cart-page-empty .fa-shopping-cart {
  font-size: 42px;
  color: #ddd;
  margin-bottom: 10px;
}

.local-cart-page-empty p {
  margin: 0 0 16px;
  font-size: 15px;
}

/* ---------- Toast yedeği (toastr yoksa) ---------- */
.local-cart-toast {
  position: fixed;
  right: 18px;
  top: 12px;
  background: #151515;
  color: #fff;
  padding: 12px 16px;
  border-radius: 3px;
  border-left: 4px solid #ffb801;
  box-shadow: 0 0 12px #999;
  z-index: 9999999;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  font-size: 14px;
}

.local-cart-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  animation: local-cart-toast-pop 320ms ease-out;
}

@keyframes local-cart-toast-pop {
  0% {
    transform: translateY(-8px) scale(0.94);
  }
  55% {
    transform: translateY(2px) scale(1.03);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

/* ---------- Devre dışı üyelik linkleri ---------- */
.local-account-disabled {
  display: none !important;
}

/* ---------- Sabit WhatsApp butonu ---------- */
.whatsapp-se-btn {
  position: fixed;
  bottom: 15px;
  right: 15px;
  display: inline-block;
  overflow: hidden;
  padding: 4px;
  background: #1bd741;
  color: #ffffff;
  text-align: center;
  border-radius: 100px;
  box-shadow: 0 0 5px #000000;
  cursor: pointer;
  z-index: 9999999;
}

.whatsapp-se-btn img {
  width: 45px;
}

@media (max-width: 480px) {
  .local-cart-panel {
    right: 10px;
    bottom: 74px;
    width: calc(100vw - 20px);
  }
}

/* ---------- Galeri lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  background: rgba(0, 0, 0, .9);
  z-index: 10000;
}

.lightbox.is-open {
  display: flex;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  flex: 1 1 auto;
}

.lightbox-img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}

.lightbox-nav,
.lightbox-close {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  transition: background .2s;
}

.lightbox-nav:hover,
.lightbox-close:hover {
  background: rgba(255, 255, 255, .28);
}

.lightbox-nav {
  width: 48px;
  height: 48px;
  font-size: 22px;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 30px;
}

.lightbox-counter {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, .8);
  font-size: 14px;
}

@media (max-width: 640px) {
  .lightbox {
    padding: 12px;
    gap: 4px;
  }

  .lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .lightbox-img {
    max-height: 76vh;
  }
}
