/**
 * Frontend CSS
 * TV Parça Stok Yönetimi
 */

/* Parça Listesi */
.tvparca-liste {
    margin: 20px 0;
}

.tvparca-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.tvparca-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tvparca-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tvparca-item a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.tvparca-thumb {
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.tvparca-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tvparca-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tvparca-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
}

.tvparca-code {
    font-size: 14px;
    color: #666;
    font-family: 'Courier New', monospace;
}

.tvparca-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    margin-top: 5px;
    align-self: flex-start;
}

.tvparca-status.stok-var {
    background: #d4edda;
    color: #155724;
}

.tvparca-status.stok-tukendi {
    background: #f8d7da;
    color: #721c24;
}

.tvparca-no-items {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Marka Listesi */
.tvparca-marka-liste {
    margin: 20px 0;
}

.tvparca-markalar {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.tvparca-marka-item {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s;
}

.tvparca-marka-item:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0,115,170,0.2);
}

.tvparca-marka-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    text-decoration: none;
    color: #333;
}

.marka-name {
    font-weight: bold;
    font-size: 15px;
}

.marka-count {
    color: #666;
    font-size: 13px;
}

/* Stok Durumu Widget */
.tvparca-stok-widget {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stok-item {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.stok-item.stok-toplam {
    border-color: #0073aa;
}

.stok-item.stok-mevcut {
    border-color: #46b450;
}

.stok-item.stok-bitti {
    border-color: #dc3232;
}

.stok-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stok-value {
    display: block;
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.stok-item.stok-toplam .stok-value {
    color: #0073aa;
}

.stok-item.stok-mevcut .stok-value {
    color: #46b450;
}

.stok-item.stok-bitti .stok-value {
    color: #dc3232;
}

/* Tek Parça Sayfası */
.single-tv_parca .tvparca-meta {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.single-tv_parca .tvparca-meta-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.single-tv_parca .tvparca-meta-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.single-tv_parca .tvparca-meta-label {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    display: block;
}

.single-tv_parca .tvparca-meta-value {
    color: #666;
    line-height: 1.6;
}

/* Arama Kutusu */
.tvparca-search-box {
    margin: 20px 0;
    padding: 25px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
    animation: pulseGlow 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.tvparca-search-box::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 10px 40px rgba(118, 75, 162, 0.7);
        transform: scale(1.02);
    }
}

/* CSS'te tekrar yazma kaldırıldı - HTML'de zaten var */

.tvparca-search-form {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.tvparca-search-input {
    flex: 1;
    padding: 16px 20px;
    border: 3px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-weight: 500;
}

.tvparca-search-input:focus {
    outline: none;
    border-color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.tvparca-search-input::placeholder {
    color: #999;
    font-style: italic;
    font-weight: normal;
}

.tvparca-search-button {
    padding: 16px 24px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(255, 107, 107, 0.5);
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.tvparca-search-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.tvparca-search-button:hover::before {
    width: 300px;
    height: 300px;
}

.tvparca-search-button:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff3838 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 24px rgba(255, 82, 82, 0.7);
}

.tvparca-search-button:active {
    transform: translateY(0) scale(0.98);
}

.tvparca-search-button svg {
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    position: relative;
    z-index: 1;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .tvparca-items {
        grid-template-columns: 1fr;
    }
    
    .tvparca-markalar {
        grid-template-columns: 1fr;
    }
    
    .tvparca-stok-widget {
        grid-template-columns: 1fr;
    }
}
