:root {
  --primary-color: #2563eb;
  --secondary-color: #059669;
  --danger-color: #dc2626;
  --warning-color: #d97706;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --border-color: #e2e8f0;
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body {
  font-family: system-ui, -apple-system, sans-serif;
}

.sticky-button-wrapper {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 10px 16px;
  z-index: 20;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.08);
  border-top: 1px solid #e5e7eb;
}

.sticky-button-container {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-right: 80px;
}

.btn-add-cart,
.btn-buy-now {
  flex: 1;
  padding: 10px 16px;
  height: 44px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-add-cart {
  background: #2563eb;
  color: #fff;
}

.btn-buy-now {
  background: #059669;
  color: #fff;
}

.btn-add-cart:hover {
  background: #1d4ed8;
}

.btn-buy-now:hover {
  background: #047857;
}

.btn-add-cart:disabled,
.btn-buy-now:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-add-cart:focus-visible,
.btn-buy-now:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #10b981;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  max-width: 300px;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

.notification.success {
  background: #10b981;
}

.notification.error {
  background: #dc2626;
}

.notification.warning {
  background: #d97706;
}

.notification i {
  font-size: 16px;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-option {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  position: relative;
}

.color-option:hover,
.color-option.active {
  border-color: #2563eb;
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.color-option.out-of-stock {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

.color-option.out-of-stock::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 80%;
  height: 2px;
  margin: auto;
  background: #dc2626;
  transform: rotate(-45deg);
  border-radius: 2px;
}

.color-option:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.size-option {
  padding: 6px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 40px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  font-size: clamp(0.7rem, 1.2vw, 0.9rem);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.size-option:hover:not(:disabled):not(.out-of-stock) {
  border-color: #2563eb;
  background: #eff6ff;
  transform: translateY(-1px);
}

.size-option.active:not(.out-of-stock) {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.size-option.out-of-stock {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f9fafb;
  color: #9ca3af;
  text-decoration: line-through;
  text-decoration-color: #dc2626;
  text-decoration-thickness: 2px;
  border-color: #e5e7eb;
}

.size-option:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.size-selector-wrapper {
  width: 100%;
  margin-top: 12px;
}

.size-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.size-label {
  font-weight: 600;
  color: #1e293b;
  font-size: 15px;
  white-space: nowrap;
}

.size-options-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.product-zoom-container {
  position: relative;
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px;
}

.zoom-base-image {
  width: 100%;
  height: auto;
  max-height: 470px;
  object-fit: contain;
  background: #fff;
  cursor: crosshair;
}

.zoom-lens {
  position: absolute;
  border: 2px solid #2563eb;
  background: rgba(37, 99, 235, 0.08);
  cursor: none;
  pointer-events: none;
  display: none;
  z-index: 10;
  border-radius: 50%;
}

.zoom-window {
  position: absolute;
  top: 0;
  left: calc(100% + 20px);
  width: 400px;
  height: 400px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 100;
}

.zoom-window-image {
  position: absolute;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
}

@media (max-width: 1024px) {
  .zoom-lens,
  .zoom-window {
    display: none !important;
  }
  .zoom-base-image {
    cursor: pointer;
  }
}

.product-thumbnail {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
}

.product-thumbnail:hover,
.product-thumbnail.active {
  border-color: #2563eb;
  transform: scale(1.05);
}

#thumbnailsContainer {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px;
}

#thumbnailsContainer::-webkit-scrollbar {
  height: 4px;
}

#thumbnailsContainer::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.gallery-modal.active {
  display: flex;
}

.gallery-modal .modal-content {
  position: relative;
  width: 100%;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-modal img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.75);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 28px;
  z-index: 10001;
  border: none;
  transition: all 0.2s;
}

.gallery-nav:hover {
  background: rgba(0, 0, 0, 0.9);
}

.gallery-prev {
  left: 20px;
}

.gallery-next {
  right: 20px;
}

.gallery-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.6);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.gallery-close:hover {
  background: rgba(0, 0, 0, 0.9);
}

.gallery-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  overflow-x: auto;
  padding: 10px;
  max-width: 90vw;
}

.gallery-thumbnails img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
}

.gallery-thumbnails img.active {
  border-color: #fff;
}

.variant-stock-modal {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  color: #fff;
  padding: 12px 24px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.variant-stock-modal.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.live-stats {
  font-size: 14px;
  color: #059669;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  white-space: nowrap;
}

.live-stats i {
  color: #059669;
}

.tab-button {
  transition: all 0.2s;
  color: #1e293b;
  font-weight: 500;
  background: 0 0;
  border: none;
  cursor: pointer;
}

.tab-button.border-blue-500,
.tab-button.text-blue-600 {
  color: #2563eb !important;
}

.tab-button:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}

.similar-products .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.similar-products .bg-white {
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.similar-products .relative {
  position: relative;
  overflow: hidden;
  background: #f8fafc;
  height: 180px;
}

.similar-products img.product-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.similar-products .bg-white:hover img {
  transform: scale(1.05);
}

.similar-products h3 {
  font-size: clamp(0.75rem, 3vw, 1rem);
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.similar-products .text-green-600 {
  color: #15803d;
  font-weight: 600;
  font-size: clamp(0.9rem, 3.5vw, 1.05rem);
}

.similar-products .line-through {
  text-decoration: line-through;
  font-size: 0.8rem;
  color: #6b7280;
}

.similar-products .flex.space-x-2 {
  margin-top: auto;
}

.similar-products .bg-blue-600 {
  background: #2563eb;
}

@media (max-width: 767px) {
  .similar-products .grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .similar-products .relative {
    height: 150px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .similar-products .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .similar-products .grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .similar-products .relative {
    height: 250px;
  }
}

[dir="rtl"] .text-left {
  text-align: right;
}

[dir="rtl"] .mr-2 {
  margin-right: 0;
  margin-left: 0.5rem;
}

[dir="rtl"] .ml-2 {
  margin-left: 0;
  margin-right: 0.5rem;
}

[dir="rtl"] .notification {
  right: auto;
  left: 20px;
}

[dir="rtl"] .gallery-prev {
  left: auto;
  right: 20px;
}

[dir="rtl"] .gallery-next {
  right: auto;
  left: 20px;
}

[dir="rtl"] .gallery-close {
  right: auto;
  left: 30px;
}

[dir="rtl"] .zoom-window {
  left: auto;
  right: calc(100% + 20px);
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#cartFooter {
  flex-shrink: 0;
  padding: 12px 20px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-footer-row.total-row {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.cart-footer-row.buttons-row {
  gap: 10px;
}

.btn-continue-shopping,
.btn-checkout {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-continue-shopping {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-continue-shopping:hover {
  background: #e5e7eb;
}

.btn-checkout {
  background: #059669;
  color: #fff;
  border: none;
}

.btn-checkout:hover {
  background: #047857;
}

@media (max-width: 480px) {
  .btn-continue-shopping,
  .btn-checkout {
    font-size: 13px;
    padding: 8px 6px;
  }
}

/* ============================================================
   YENİ EKLENEN STİLLER (urun.php için)
   ============================================================ */

/* ===== ADET SEÇİCİ ===== */
.quantity-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.quantity-selector-wrapper label {
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}
.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.quantity-control button {
  width: 36px;
  height: 36px;
  background: #f8fafc;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  color: #334155;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quantity-control button:hover {
  background: #e2e8f0;
}
.quantity-control input {
  width: 48px;
  height: 36px;
  border: none;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  background: #fff;
  -moz-appearance: textfield;
}
.quantity-control input::-webkit-outer-spin-button,
.quantity-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ===== BUTON GRİD ===== */
.product-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 480px) {
  .product-actions-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  pointer-events: none;
}
.product-actions-grid .btn-view {
  display: none;
}

/* ===== BENZER ÜRÜN KARTI BUTONLARI ===== */
.similar-product-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.similar-product-actions .row-buttons {
  display: flex;
  gap: 6px;
}
.similar-product-actions .row-buttons .btn-incele,
.similar-product-actions .row-buttons .btn-sepete-ekle {
  flex: 1;
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.similar-product-actions .row-buttons .btn-incele {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}
.similar-product-actions .row-buttons .btn-incele:hover {
  background: #e5e7eb;
}
.similar-product-actions .row-buttons .btn-sepete-ekle {
  background: #3b82f6;
  color: #fff;
}
.similar-product-actions .row-buttons .btn-sepete-ekle:hover {
  background: #2563eb;
}
.similar-product-actions .btn-hemen-al {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  border: none;
  background: #059669;
  color: #fff;
  font-weight: 500;
  transition: background 0.2s;
}
.similar-product-actions .btn-hemen-al:hover {
  background: #047857;
}
.similar-product-actions .btn-hemen-al.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== SHIPPING RESTRICTED BADGE & WARNING ===== */
.shipping-restricted-badge {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 10px;
  padding: 2px 10px;
  border-radius: 12px;
  white-space: nowrap;
  pointer-events: none;
}
.shipping-restricted-warning {
  background: #fee2e2;
  color: #dc2626;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}