/* =========================
   GLOBAL RESET & TEMEL
========================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* =========================
   KATEGORİ SAYFASI ÖZEL
========================= */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.kategori-baslik {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin: 1.5rem 0 0.5rem;
    color: #333;
}

.kategori-alt-baslik {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: #333;
}

.kategori-aciklama {
    text-align: center;
    color: #666;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
}

/* Alt Kategoriler */
.alt-kategoriler {
    margin-bottom: 2rem;
}

.alt-kategoriler h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.alt-kategoriler-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.alt-kategori-item {
    display: block;
    padding: 0.75rem 1rem;
    background: #f3f4f6;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: #374151;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.alt-kategori-item:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
}

/* =========================
   ÜRÜN GRID SİSTEMİ - 4-3-2
========================= */
.urunler-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .urunler-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .urunler-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .urunler-grid {
        gap: 0.5rem;
    }
}

/* =========================
   ÜRÜN KARTI
========================= */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Görsel Alanı */
.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8fafc;
    cursor: pointer;
}

.product-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-image-container:hover .product-image {
    transform: scale(1.05);
}

/* Zoom Overlay */
.zoom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border: none;
    cursor: pointer;
    z-index: 3;
}

.zoom-overlay .zoom-icon {
    color: white;
    font-size: 2rem;
}

.product-image-container:hover .zoom-overlay {
    opacity: 1;
}

/* Etiketler */
.product-labels-left {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.product-discount-right {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

.label {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    backdrop-filter: blur(2px);
    white-space: nowrap;
}

.label-new {
    background: #10b981;
}

.label-bestseller {
    background: #8b5cf6;
}

.label-discount {
    background: #3b82f6;
    font-size: 11px;
    padding: 4px 10px;
}

@media (max-width: 480px) {
    .label {
        font-size: 8px;
        padding: 2px 6px;
    }
    .label-discount {
        font-size: 9px;
        padding: 3px 8px;
    }
}

/* İçerik */
.product-content {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: #111;
    text-decoration: none;
}

.product-title a:hover {
    color: #3b82f6;
}

.product-stats {
    display: flex;
    gap: 0.75rem;
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.stat-sold i, .stat-views i {
    margin-right: 3px;
}

.product-price {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.new-price {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
}

.old-price {
    font-size: 0.75rem;
    text-decoration: line-through;
    color: #9ca3af;
}

.discount-percent {
    font-size: 0.7rem;
    font-weight: 700;
    color: #ef4444;
    background: #fee2e2;
    padding: 2px 5px;
    border-radius: 20px;
}

/* Buton Düzeni */
.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 6px;
}

.product-buy-now {
    width: 100%;
}

.btn-view, .btn-add-cart, .btn-buy-now {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-view {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn-view:hover {
    background: #e5e7eb;
}

.btn-add-cart {
    background: #3b82f6;
    color: white;
}

.btn-add-cart:hover {
    background: #2563eb;
}

.btn-buy-now {
    background: #10b981;
    color: white;
    width: 100%;
}

.btn-buy-now:hover {
    background: #059669;
}

@media (max-width: 480px) {
    .btn-view, .btn-add-cart, .btn-buy-now {
        padding: 5px 4px;
        font-size: 0.65rem;
    }
    .product-actions {
        gap: 4px;
    }
}

/* Resim Büyütme Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    background: transparent;
    border: none;
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 95vw;
        max-height: 75vh;
    }
    .close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}

/* Renk/Beden Modalı */
.variant-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.variant-modal.active {
    display: flex;
}

.variant-modal-content {
    background: white;
    border-radius: 16px;
    padding: 1.2rem;
    max-width: 450px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
}

.variant-modal h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.option-group {
    margin-bottom: 1rem;
}

.option-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-option, .size-option {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 40px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.color-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
}

.color-option.selected, .size-option.selected {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.variant-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 1.2rem;
}

.variant-modal-actions button {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.variant-cancel {
    background: #f3f4f6;
    color: #333;
}

.variant-confirm {
    background: #3b82f6;
    color: white;
}

@media (max-width: 480px) {
    .variant-modal-content {
        padding: 1rem;
        width: 95%;
    }
}

/* Bildirim */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    z-index: 1200;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    max-width: 280px;
    font-size: 0.85rem;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background: #10b981;
}

.notification.error {
    background: #ef4444;
}

@media (max-width: 480px) {
    .notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        text-align: center;
    }
}

/* Sepet Modalı (header ile uyumlu) */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.cart-modal.active {
    display: block;
    transform: translateX(0);
}

.cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.cart-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .cart-modal {
        width: 100%;
    }
}

/* Yardımcı */
.text-center { text-align: center; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.mb-4 { margin-bottom: 1rem; }