/* Shop Sayfası - Performans ve Güvenlik Optimizasyonlu */

/* Placeholder - Animasyonsuz */

/* Ürün Grid - Mobil 2 Sütun */
.shop-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px 12px;
    min-height: 200px;
}

/* Tablet ve üzeri */
@media (min-width: 640px) {
    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 24px 16px;
    }
}

@media (min-width: 1024px) {
    .shop-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1280px) {
    .shop-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Ürün Kartı */
.shop-product-card {
    background: #fff;
    border-radius: 12px;
    overflow: visible;
    border: 2px solid #10b981;
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding-top: 0;
}

/* Tablet ve üzeri için overflow hidden */
@media (min-width: 640px) {
    .shop-product-card {
        overflow: hidden;
    }
}

.shop-product-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #34d399;
}

/* Ürün Resim Container */
.shop-product-image {
    width: calc(100% - 16px);
    height: 120px;
    background-color: #f9fafb;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    margin-left: 8px;
    margin-right: 8px;
    border-radius: 8px;
}

/* Tablet ve üzeri için daha büyük resim */
@media (min-width: 640px) {
    .shop-product-image {
        width: 100%;
        height: 140px;
        margin-top: 0;
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
    }
}

/* Desktop için tam boyut */
@media (min-width: 1024px) {
    .shop-product-image {
        height: 160px;
    }
}

.shop-product-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #f9fafb;
    z-index: 1;
}

.shop-product-image-placeholder.hidden {
    display: none;
}

.shop-product-image img,
.shop-product-image-lazy {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.shop-product-image img.loaded,
.shop-product-image-lazy.loaded {
    opacity: 1;
}

/* Ürün İkonu */
.shop-product-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 48px;
    height: 48px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 3;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* İndirim Badge */
.shop-discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ef4444;
    color: #fff;
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

/* Ürün İçerik */
.shop-product-content {
    padding: 12px;
}

.shop-product-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.shop-product-category {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 8px;
}

/* Rating */
.shop-product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 2px;
}

.shop-product-rating svg {
    width: 12px;
    height: 12px;
}

.shop-product-rating-text {
    margin-left: 4px;
    font-size: 11px;
    color: #64748b;
}

/* Fiyat */
.shop-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 4px;
}

.shop-product-price-old {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
}

/* Detay Butonu */
.shop-product-detail-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #10b981;
    color: #fff;
    padding: 8px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s ease;
    margin-top: 8px;
    text-decoration: none;
}

.shop-product-detail-btn:hover {
    background: #059669;
    color: #fff;
}

.shop-product-detail-btn svg {
    width: 12px;
    height: 12px;
}

/* Filtre Formu */
.shop-filters {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 16px;
    margin-bottom: 16px;
}

.shop-filters form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 640px) {
    .shop-filters form {
        flex-direction: row;
        align-items: center;
    }
}

.shop-search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.shop-search-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.shop-country-select {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: all 0.2s ease;
}

@media (min-width: 640px) {
    .shop-country-select {
        width: 192px;
    }
}

.shop-country-select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.shop-filter-btn {
    padding: 10px 24px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.shop-filter-btn:hover {
    background: #059669;
}

.shop-clear-btn {
    padding: 10px 24px;
    background: #6b7280;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.shop-clear-btn:hover {
    background: #4b5563;
    color: #fff;
}

/* Toast Bildirimleri */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 90%;
    width: 100%;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    transform: translateX(calc(100% + 20px));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    font-family: 'Outfit', sans-serif;
}

@media (max-width: 640px) {
    .toast {
        right: 12px;
        left: 12px;
        max-width: none;
        transform: translateY(-100px);
    }
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

@media (max-width: 640px) {
    .toast.show {
        transform: translateY(0);
    }
}

.toast.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border-left: 4px solid #047857;
}

.toast.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    border-left: 4px solid #b91c1c;
}

.toast.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-left: 4px solid #1d4ed8;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Boş Durum */
.shop-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 16px;
}

.shop-empty-state-text {
    color: #64748b;
    font-size: 18px;
    margin-bottom: 16px;
}

.shop-empty-state-link {
    color: #10b981;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.shop-empty-state-link:hover {
    color: #059669;
}

/* Pagination */
.shop-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}


/* Performans Optimizasyonları */
.shop-product-card,
.shop-product-image,
.shop-product-detail-btn {
    will-change: transform;
}

/* Güvenlik - XSS Koruması için */
.shop-product-card * {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Erişilebilirlik */
.shop-product-card:focus-within {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

.shop-filter-btn:focus,
.shop-clear-btn:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

