

/* Public layout styling */
:root {
  --primary: #3b82f6;
  --dark: #1e293b;
}

body.public-site {
  font-family: 'Segoe UI', sans-serif;
  color: #334155;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

body.public-site main {
  flex: 1 0 auto;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  padding: 0;
  margin-right: 1rem;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--dark) !important;
}

.navbar-brand i {
  color: var(--primary);
}

.site-logo {
  display: block;
  width: 132px;
  max-width: 100%;
  height: auto;
}

.site-logo--navbar {
  filter: drop-shadow(0 6px 12px rgba(15, 23, 42, 0.15));
}

.site-logo--footer {
  width: 150px;
  border-radius: 999px;
  background-color: #f7f7f7;
  padding: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
}

.site-logo--sidebar {
  width: 120px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.footer-brand {
  align-items: center;
}

.navbar {
  padding: 0.75rem 0;
}

.navbar-layout {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 1rem;
}

.navbar-brand {
  flex-shrink: 0;
  flex-basis: auto;
}

.navbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.navbar-menu-search {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.navbar-nav {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  flex-wrap: nowrap;
}

.navbar-nav .nav-link {
  font-weight: 600;
  color: #4a5568;
  padding: 0.5rem 0.75rem;
  transition: color 0.2s;
  white-space: nowrap;
}

.navbar-nav .nav-link:hover {
  color: var(--primary);
}

.navbar-search-form {
  position: relative;
  width: 100%;
}

.navbar-search-form .input-group {
  min-width: 280px;
}

.navbar-search-form .form-control {
  border-radius: 20px 0 0 20px;
  border-right: none;
  border-color: #ced4da;
}

.navbar-search-form .btn {
  border-radius: 0 20px 20px 0;
  border-color: #ced4da;
}

.navbar-search-form .form-control:focus {
  border-color: #ced4da;
  box-shadow: none;
}

.navbar-search-form .form-control:focus + .btn {
  border-color: #ced4da;
}

.navbar-search-form .search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1050;
  display: none;
  margin-top: 4px;
}

.navbar-search-form .search-results.show {
  display: block;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.search-form-inline {
  position: relative;
  margin-right: 0.5rem;
}

.search-form-inline .input-group {
  min-width: 200px;
}

.search-form-inline .form-control {
  border-radius: 20px 0 0 20px;
  border-right: none;
}

.search-form-inline .btn {
  border-radius: 0 20px 20px 0;
  border-left: none;
}

.search-form-inline .form-control:focus {
  border-color: #ced4da;
  box-shadow: none;
}

.search-form-inline .search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1050;
  display: none;
  margin-top: 4px;
}

.search-form-inline .search-results.show {
  display: block;
}

.search-result-item {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-result-item:hover {
  background: #f8fafc;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-image {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-price {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin: 0;
}

.search-no-results {
  padding: 20px;
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
}

.hero-section {
  background: linear-gradient(135deg, #f9f9f9 0%, #f2f2f2 100%);
  color: #1f2933;
  padding: 80px 0;
}

.hero-slider {
  position: relative;
  padding: 40px 0;
  background: linear-gradient(135deg, #f9f9f9, #f4f4f4);
  color: #1f2933;
}

.hero-slide {
  padding: 30px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
  min-height: 420px;
}

.hero-badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-description {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 24px;
  line-height: 1.6;
}

.hero-actions .btn {
  min-width: 160px;
}

.hero-slide-visual {
  display: flex;
  justify-content: center;
}

.hero-image-frame {
  width: 100%;
  max-width: 520px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(148, 163, 184, 0.08));
  border-radius: 28px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.hero-image-frame::after {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  pointer-events: none;
}

.hero-image-frame img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 25px 40px rgba(15, 23, 42, 0.45);
}

.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
  width: 54px;
  height: 54px;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 1;
  transition: all 0.3s;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.hero-slider .carousel-control-prev:hover,
.hero-slider .carousel-control-next:hover {
  background: rgba(15, 23, 42, 0.18);
}

.hero-slider .carousel-control-prev {
  left: 30px;
}

.hero-slider .carousel-control-next {
  right: 30px;
}

.hero-slider .carousel-indicators {
  bottom: -10px;
}

.hero-slider .carousel-indicators button {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background-color: rgba(148, 163, 184, 0.5);
  border: none;
  margin: 0 6px;
}

.hero-slider .carousel-indicators button.active {
  background-color: #1f2933;
}

@media (max-width: 991px) {
  .navbar-layout {
    flex-wrap: wrap;
  }

  .navbar-center {
    flex: 1 1 100%;
    max-width: 100%;
    order: 3;
  }

  .navbar-menu-search {
    width: 100%;
    align-items: stretch;
  }

  .navbar-nav {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .navbar-search-form .input-group {
    width: 100%;
  }

  .navbar-actions {
    order: 2;
  }

  .navbar-nav {
    margin-top: 1rem;
    margin-bottom: 1rem;
  }

  .search-form-inline {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .search-form-inline .input-group {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .site-logo {
    width: 70px;
  }

  .site-logo--footer {
    width: 120px;
  }

  .navbar-nav .nav-link {
    padding: 0.5rem 0;
  }

  .navbar-search-form .input-group {
    min-width: auto;
  }

  .hero-slider {
    padding: 30px 0;
  }

  .hero-slide {
    text-align: center;
    padding: 20px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-slide-visual {
    margin-top: 24px;
  }

  .hero-slider .carousel-control-prev,
  .hero-slider .carousel-control-next {
    display: none;
  }
}

.product-card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.product-card img {
  height: 220px;
  object-fit: cover;
}

.product-card .card-body {
  padding: 16px;
}

.product-card .product-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dark);
}

.product-card .product-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

.product-card .product-old-price {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 0.85rem;
}

.category-badge {
  background: #f1f5f9;
  color: #475569;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}

.category-badge:hover,
.category-badge.active {
  background: var(--primary);
  color: #fff;
}

/* Category Cards */
.category-card {
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.category-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.category-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-card:hover .category-card-img img {
  transform: scale(1.06);
}

.category-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 2.5rem;
}

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30, 41, 59, 0.55) 0%, rgba(30, 41, 59, 0) 50%);
  pointer-events: none;
}

.category-card-body {
  padding: 14px 16px;
  text-align: center;
}

.category-card-title {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-card-count {
  font-size: 0.8rem;
  color: #94a3b8;
}

.rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff8eb;
  color: #b45309;
  border: 1px solid #facc15;
  font-size: 0.85rem;
  font-weight: 600;
}

.rating-chip i {
  color: #f59e0b;
}

.rating-chip small {
  font-weight: 500;
  color: #a16207;
}

.rating-chip-muted {
  background: #f8fafc;
  color: #94a3b8;
  border-color: #cbd5f5;
}

.rating-chip-muted i {
  color: #cbd5f5;
}

.rating-chip-muted small {
  color: #94a3b8;
}

.site-footer {
  background: #f7f7f7;
  color: #4a5568;
  padding: 40px 0 20px;
  flex-shrink: 0;
  margin-top: auto;
}

.site-footer a {
  color: #1f2933;
  text-decoration: none;
}

.site-footer a:hover {
  color: #111827;
}

/* Shared button loading styles */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading .btn-spinner {
  display: inline-block !important;
}

.btn-loading .btn-text {
  visibility: hidden;
}

.btn-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -0.5rem 0 0 -0.5rem;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   Toast stack (site.js tarafından beslenir)
   ============================================================ */
.toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
  pointer-events: none;
}

.toast-stack .toast-item {
  background: #fff;
  border-left: 4px solid #3b82f6;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
  animation: toastSlideIn 0.25s ease-out;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-stack .toast-item.toast-success { border-left-color: #16a34a; color: #14532d; }
.toast-stack .toast-item.toast-danger  { border-left-color: #dc2626; color: #7f1d1d; }
.toast-stack .toast-item.toast-warning { border-left-color: #f59e0b; color: #78350f; }
.toast-stack .toast-item.toast-info    { border-left-color: #3b82f6; color: #1e3a8a; }

.toast-stack .toast-item.leaving {
  opacity: 0;
  transform: translateX(24px);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   Cart badge bounce (ürün sepete eklendiğinde)
   ============================================================ */
@keyframes badgeBounce {
  0%   { transform: translate(-50%, -50%) scale(1); }
  40%  { transform: translate(-50%, -50%) scale(1.6); }
  70%  { transform: translate(-50%, -50%) scale(0.9); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

#cartBadge.cart-badge-bump {
  animation: badgeBounce 0.6s ease;
}

/* ============================================================
   "Uçan kart" efekti — ürün kartından sepete eklendi animasyonu
   ============================================================ */
.fly-to-cart {
  position: fixed;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.25);
  z-index: 9998;
  pointer-events: none;
  transition: transform 0.7s cubic-bezier(0.5, 0, 0.75, 0), opacity 0.7s ease;
}

/* ============================================================
   Ürün kartı hover ile hızlı sepete ekle butonu
   ============================================================ */
.product-card {
  position: relative;
}

.product-card .quick-add-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border: none;
  opacity: 0;
  transform: translateY(10px) scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.35);
  z-index: 5;
}

.product-card:hover .quick-add-btn,
.product-card .quick-add-btn:focus-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.product-card .quick-add-btn:hover {
  background: #2563eb;
  transform: translateY(0) scale(1.08);
}

.product-card .quick-add-btn.added {
  background: #16a34a;
  animation: pop 0.3s ease;
}

@keyframes pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ============================================================
   Sepet satırı güncellenirken hafif vurgu
   ============================================================ */
@keyframes rowFlash {
  0%   { background-color: rgba(59, 130, 246, 0.18); }
  100% { background-color: transparent; }
}

.cart-row-flash {
  animation: rowFlash 0.6s ease;
}

/* ============================================================
   Şifre göster/gizle input grubu
   ============================================================ */
.password-toggle-group {
  position: relative;
}

.password-toggle-group input {
  padding-right: 2.5rem;
}

.password-toggle-group .password-toggle-btn {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #64748b;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  border-radius: 6px;
}

.password-toggle-group .password-toggle-btn:hover {
  color: var(--primary);
  background: rgba(59, 130, 246, 0.08);
}

/* ============================================================
   Üst duyuru şeridi (Announcement Bar)
   ============================================================ */
.announcement-bar {
  background: #1a1a1a;
  color: #f8f9fa;
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1040;
}

.announcement-bar-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
}

.announcement-bar-icon {
  color: #fbbf24;
  font-size: 0.85rem;
}

.announcement-bar-text {
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: opacity 0.3s ease;
  opacity: 1;
}

@media (max-width: 576px) {
  .announcement-bar {
    font-size: 0.82rem;
    padding: 0.55rem 0.75rem;
  }
}

/* ============================================================
   Product Image Slider
   ============================================================ */
#mainImageContainer .image-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  color: #334155;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1;
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#mainImageContainer:hover .image-nav-btn,
#mainImageContainer:focus-within .image-nav-btn {
  opacity: 1;
}

#mainImageContainer .image-nav-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 3px 14px rgba(0,0,0,0.2);
}

#mainImageContainer .image-nav-prev { left: 1rem; }
#mainImageContainer .image-nav-next { right: 1rem; }

/* Always show on touch devices where hover doesn't exist */
@media (hover: none) {
  #mainImageContainer .image-nav-btn { opacity: 0.85; }
}

/* Mobile swipe hint */
.swipe-hint {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0.7;
  animation: swipeHintPulse 2.5s ease-in-out infinite;
}

@keyframes swipeHintPulse {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.85; transform: translateX(-50%) scale(1.05); }
}

/* Smooth image crossfade */
#mainImage {
  transition: opacity 0.25s ease;
}

#mainImage.is-changing {
  opacity: 0.6;
}