/* TEMEL STİLLER */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
}

/* =========================
   STICKY BUTON KAPSÜLÜ
   ========================= */
.sticky-button-wrapper {
    position: sticky;
    bottom: 0;
    background: white;
    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;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    padding-right: 80px;
}

/* =========================
   SEPETE EKLE BUTONU
   ========================= */
.btn-add-cart {
    flex: 1;
    background: #3b82f6;
    color: #fff;
    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 ease;
    white-space: nowrap;
}

/* =========================
   HEMEN AL BUTONU
   ========================= */
.btn-buy-now {
    flex: 1;
    background: #10b981;
    color: #fff;
    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 ease;
    white-space: nowrap;
}

.btn-add-cart span,
.btn-buy-now span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobil düzenlemeler (özet) */
@media (max-width: 640px) {
    .sticky-button-wrapper { padding: 8px 12px; }
    .sticky-button-container { gap: 8px; padding-right: 70px; }
    .btn-add-cart, .btn-buy-now { padding: 8px 10px; height: 44px; font-size: 13px; }
}
@media (max-width: 480px) {
    .sticky-button-wrapper { padding: 6px 10px; }
    .sticky-button-container { gap: 6px; padding-right: 60px; }
    .btn-add-cart, .btn-buy-now { padding: 6px 8px; height: 42px; font-size: 12px; }
}
@media (min-width: 1025px) {
    .sticky-button-container { max-width: 900px; margin: 0 auto; gap: 14px; padding-right: 85px; }
}

/* BİLDİRİM STİLLERİ */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 400px;
    border-left: 4px solid #3b82f6;
}
.notification.show { transform: translateX(0); }
.notification.success { border-left-color: #10b981; }
.notification.error { border-left-color: #ef4444; }
.notification.warning { border-left-color: #f59e0b; }
.notification.info { border-left-color: #3b82f6; }
.notification-content { display: flex; align-items: center; gap: 12px; }
.notification-content i { font-size: 20px; }
.notification span { font-weight: 500; color: #1e293b; font-size: 14px; }

/* RENK SEÇENEKLERİ */
.color-option {
    width: clamp(12px, 4vw, 18px);
    height: clamp(12px, 4vw, 18px);
    min-width: 15px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.color-option:hover, .color-option.active {
    border-color: #3b82f6;
    transform: scale(1.08);
    box-shadow: 0 2px 6px rgba(59,130,246,0.2);
}
.color-option.out-of-stock {
    opacity: 0.5;
    position: relative;
    cursor: not-allowed;
    filter: grayscale(0.3);
}
.color-option.out-of-stock::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -2px;
    right: -2px;
    height: 2px;
    background-color: #ef4444;
    transform: translateY(-50%) rotate(-45deg);
    border-radius: 2px;
}
.size-option.out-of-stock {
    opacity: 0.6;
    position: relative;
    cursor: not-allowed;
    background: #f9fafb;
    color: #9ca3af;
    text-decoration: line-through;
    border-color: #e5e7eb;
}
.size-option.out-of-stock:hover { transform: none; }
.size-option.out-of-stock.active {
    border-color: #e5e7eb;
    background: #f9fafb;
    color: #9ca3af;
}
.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: #374151; font-size: clamp(13px, 3.5vw, 15px); white-space: nowrap; }
.size-options-container { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.size-option {
    padding: 6px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 40px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: clamp(12px, 3vw, 14px);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.size-option:hover:not(:disabled):not(.out-of-stock) {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-1px);
}
.size-option.active:not(.out-of-stock) {
    border-color: #3b82f6;
    background: #3b82f6;
    color: white;
    box-shadow: 0 2px 6px rgba(59,130,246,0.3);
}
.size-option:disabled { cursor: not-allowed; opacity: 0.6; }
@media (max-width: 640px) {
    .size-option { padding: 5px 12px; font-size: 11px; }
    .color-option { width: 24px; height: 24px; min-width: 24px; }
}
@media (max-width: 480px) { .size-option { padding: 4px 10px; font-size: 10px; } }

/* ÜRÜN RESİMLERİ VE ZOOM */
.product-zoom-container {
    position: relative;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.zoom-base-image {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    background: white;
    cursor: crosshair;
}
.zoom-lens {
    position: absolute;
    border: 2px solid #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    cursor: none;
    pointer-events: none;
    display: none;
    z-index: 10;
}
.zoom-window {
    position: absolute;
    top: 0;
    left: calc(100% + 20px);
    width: 400px;
    height: 700px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: white;
    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: 200%;
    height: 220%;
    object-fit: cover;
    transform-origin: top left;
}
@media (max-width: 768px), (pointer: coarse) {
    .zoom-lens, .zoom-window { display: none !important; }
    .zoom-base-image { cursor: pointer; max-height: 180px; }
}
.product-thumbnail {
    width: 90px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}
.product-thumbnail:hover, .product-thumbnail.active {
    border-color: #3b82f6;
    transform: scale(1.05);
}

/* GALERİ MODAL (mobil/tablet) */
.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: 60vh;
    object-fit: contain;
    border-radius: 8px;
}

/* GALERİ NAVİGASYON OKLARI - TÜM CİHAZLARDA GÖRÜNÜR VE KOLAY TIKLANABİLİR */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    font-size: 28px;
    z-index: 10001;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.05);
}
.gallery-prev { left: 20px; }
.gallery-next { right: 20px; }
@media (max-width: 768px) {
    .gallery-nav { width: 44px; height: 44px; font-size: 24px; background: rgba(0, 0, 0, 0.7); }
    .gallery-prev { left: 12px; }
    .gallery-next { right: 12px; }
}
@media (max-width: 480px) {
    .gallery-nav { width: 40px; height: 40px; font-size: 20px; }
}
.gallery-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 32px;
    color: white;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0,0,0,0.5);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.gallery-close:hover { background: rgba(0,0,0,0.8); transform: scale(1.05); }
.gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    overflow-x: auto;
    padding: 10px;
    max-width: 90vw;
}
.gallery-thumbnails img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: 0.2s;
}
.gallery-thumbnails img.active { border-color: white; transform: scale(1.05); }

/* Küçük resim kaydırma */
#thumbnailsContainer { scroll-behavior: smooth; }
#thumbnailsContainer::-webkit-scrollbar { height: 4px; }

/* RTL */
[dir="rtl"] .text-left { text-align: right; }
[dir="rtl"] .text-right { text-align: left; }
[dir="rtl"] .mr-2 { margin-right: 0; margin-left: 0.5rem; }
[dir="rtl"] .ml-2 { margin-left: 0; margin-right: 0.5rem; }

/* Yükleme animasyonu */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Responsive düzenlemeler (benzer ürünler vs) */
@media (max-width: 768px) {
    .product-thumbnail { width: 70px; height: 80px; }
    .zoom-window { display: none !important; }
}
@media (max-width: 640px) {
    .product-zoom-container { min-height: 150px; }
    .zoom-base-image { max-height: 150px; }
    .product-thumbnail { width: 50px; height: 50px; }
}
@media (max-width: 480px) {
    .similar-products .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
.similar-products .grid {
    display: grid;
    gap: 1rem;
    width: 100%;
}
@media (max-width: 767px) {
    .similar-products .grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.75rem; }
}
@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); gap: 1.25rem; }
}
.similar-products .bg-white {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.similar-products .relative { position: relative; overflow: hidden; background: #f8fafc; height: 180px; }
@media (min-width: 1024px) { .similar-products .relative { height: 250px; } }
.similar-products img.product-card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.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: clamp(0.7rem, 2.5vw, 0.8rem); color: #6b7280; margin-left: 6px; }
.similar-products .flex.space-x-2 { margin-top: auto; }
.similar-products .bg-blue-600 {
    width: 50%;
    text-align: center;
    background: #2563eb;
    color: #fff;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: 0.3s;
}
.similar-products .add-to-cart-similar { display: none !important; }

/* Tabs */
.tab-button {
    transition: all 0.2s ease;
    color: #1e293b;
    font-weight: 500;
}
.tab-button.border-blue-500, .tab-button.text-blue-600 { color: #2563eb !important; }
.tab-content, .tab-content p, .tab-content div, .tab-content span, .tab-content .prose { color: #1e293b !important; }
@media (max-width: 640px) {
    .tab-button { padding: 0.75rem 0.5rem; font-size: 0.85rem; white-space: normal; word-break: break-word; }
}

/* Stok uyarı modal */
.variant-stock-modal {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1f2937;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    white-space: nowrap;
    pointer-events: none;
}
.variant-stock-modal.show { transform: translateX(-50%) translateY(0); opacity: 1; }
@media (max-width: 640px) {
    .variant-stock-modal { font-size: 12px; padding: 8px 16px; white-space: normal; text-align: center; max-width: 90%; border-radius: 30px; }
}