/**
 * Maket Ürün Yönetici - Frontend CSS v3
 * Davetika Teması - Pembe/Magenta
 */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Poppins:wght@300;400;500;600&display=swap');

/* Renk Değişkenleri */
:root {
    --muy-primary: #e91e8c;
    --muy-primary-light: #ff69b4;
    --muy-primary-dark: #c4177a;
    --muy-secondary: #f8e1eb;
    --muy-accent: #ffd1e8;
    --muy-text: #333333;
    --muy-text-light: #666666;
    --muy-bg: #fffbfd;
    --muy-white: #ffffff;
    --muy-border: #f0d4e4;
    --muy-shadow: rgba(233, 30, 140, 0.15);
    --muy-gradient: linear-gradient(135deg, #e91e8c 0%, #ff69b4 50%, #e91e8c 100%);
}

/* Wrapper */
.muy-products-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'Poppins', sans-serif;
}

/* Filtre Bar */
.muy-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 25px;
    background: var(--muy-white);
    border-radius: 20px;
    align-items: center;
    box-shadow: 0 5px 30px var(--muy-shadow);
    border: 1px solid var(--muy-border);
}

.muy-search-box {
    flex: 1;
    min-width: 280px;
    display: flex;
    position: relative;
}

.muy-search-input {
    flex: 1;
    padding: 14px 55px 14px 22px;
    border: 2px solid var(--muy-border);
    border-radius: 50px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: var(--muy-white);
}

.muy-search-input:focus {
    border-color: var(--muy-primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(233, 30, 140, 0.1);
}

.muy-search-input::placeholder {
    color: #aaa;
}

.muy-search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background: var(--muy-gradient);
    color: var(--muy-white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(233, 30, 140, 0.3);
}

.muy-search-btn:hover {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 20px rgba(233, 30, 140, 0.4);
}

.muy-filter-box,
.muy-sort-box {
    min-width: 180px;
}

.muy-filter-select {
    width: 100%;
    padding: 14px 45px 14px 20px;
    border: 2px solid var(--muy-border);
    border-radius: 50px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    background: var(--muy-white);
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e91e8c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    color: var(--muy-text);
}

.muy-filter-select:focus {
    border-color: var(--muy-primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(233, 30, 140, 0.1);
}

/* Sonuç Bilgisi */
.muy-results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 12px 20px;
    font-size: 14px;
    color: var(--muy-text-light);
    background: var(--muy-white);
    border-radius: 12px;
    border-left: 4px solid var(--muy-primary);
}

.muy-results-info #muy-total-count {
    font-weight: 600;
    color: var(--muy-primary);
}

.muy-loading-text {
    color: var(--muy-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.muy-loading-text::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--muy-border);
    border-top-color: var(--muy-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Loading Spinner */
.muy-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--muy-text-light);
}

.muy-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--muy-secondary);
    border-top-color: var(--muy-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Ürün Grid */
.muy-products-grid {
    display: grid;
    gap: 25px;
}

.muy-cols-2 { grid-template-columns: repeat(2, 1fr); }
.muy-cols-3 { grid-template-columns: repeat(3, 1fr); }
.muy-cols-4 { grid-template-columns: repeat(4, 1fr); }
.muy-cols-5 { grid-template-columns: repeat(5, 1fr); }
.muy-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1200px) {
    .muy-cols-5, .muy-cols-6 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 992px) {
    .muy-cols-4, .muy-cols-5, .muy-cols-6 { grid-template-columns: repeat(3, 1fr); }
    .muy-filter-bar { flex-direction: column; }
    .muy-search-box, .muy-filter-box, .muy-sort-box { width: 100%; min-width: 100%; }
}

@media (max-width: 768px) {
    .muy-cols-3, .muy-cols-4, .muy-cols-5, .muy-cols-6 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .muy-products-grid { grid-template-columns: 1fr !important; gap: 20px; }
    .muy-products-wrapper { padding: 15px 10px; }
}

/* Ürün Kartı */
.muy-product-card {
    background: var(--muy-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--muy-border);
    position: relative;
}

.muy-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--muy-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.muy-product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(233, 30, 140, 0.2);
    border-color: var(--muy-primary-light);
}

.muy-product-card:hover::before {
    opacity: 1;
}

/* Görsel Alanı */
.muy-product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--muy-secondary) 0%, var(--muy-accent) 100%);
}

.muy-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.muy-product-card:hover .muy-product-image img {
    transform: scale(1.1);
}

.muy-no-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--muy-primary-light);
    font-size: 50px;
}

/* Overlay */
.muy-product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(233, 30, 140, 0.85) 0%, rgba(233, 30, 140, 0.4) 40%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.muy-product-card:hover .muy-product-overlay {
    opacity: 1;
}

.muy-zoom-btn {
    background: var(--muy-white);
    color: var(--muy-primary);
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateY(20px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.muy-product-card:hover .muy-zoom-btn {
    transform: translateY(0);
}

.muy-zoom-btn:hover {
    background: var(--muy-primary);
    color: var(--muy-white);
    transform: scale(1.05);
}

/* Ürün Bilgisi */
.muy-product-info {
    padding: 20px;
    text-align: center;
    background: var(--muy-white);
}

.muy-product-title {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--muy-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.muy-product-sku {
    display: inline-block;
    background: var(--muy-gradient);
    color: var(--muy-white);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(233, 30, 140, 0.3);
}

.muy-no-products {
    text-align: center;
    padding: 80px 20px;
    color: var(--muy-text-light);
    grid-column: 1 / -1;
    background: var(--muy-white);
    border-radius: 20px;
    border: 2px dashed var(--muy-border);
}

.muy-no-products p {
    font-size: 18px;
    margin: 0;
}

/* Sayfalama */
.muy-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.muy-page-btn {
    min-width: 45px;
    height: 45px;
    border: 2px solid var(--muy-border);
    background: var(--muy-white);
    color: var(--muy-text);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.muy-page-btn:hover {
    border-color: var(--muy-primary);
    color: var(--muy-primary);
    transform: scale(1.1);
}

.muy-page-btn.active {
    background: var(--muy-gradient);
    border-color: var(--muy-primary);
    color: var(--muy-white);
    box-shadow: 0 5px 20px rgba(233, 30, 140, 0.3);
}

.muy-page-info {
    margin-left: 20px;
    color: var(--muy-text-light);
    font-size: 14px;
    background: var(--muy-secondary);
    padding: 8px 18px;
    border-radius: 50px;
}

/* Kategoriler */
.muy-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 30px 0;
    justify-content: center;
}

.muy-categories.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.muy-category-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--muy-white);
    border-radius: 50px;
    text-decoration: none;
    color: var(--muy-text);
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    border: 2px solid var(--muy-border);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
}

.muy-category-item:hover {
    background: var(--muy-secondary);
    border-color: var(--muy-primary);
    color: var(--muy-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(233, 30, 140, 0.15);
}

.muy-category-item.active {
    background: var(--muy-gradient);
    color: var(--muy-white);
    border-color: var(--muy-primary);
    box-shadow: 0 8px 25px rgba(233, 30, 140, 0.3);
}

.muy-cat-count {
    font-size: 12px;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

/* ========================================
   KATEGORI CAROUSEL
   ======================================== */

.muy-category-carousel-wrapper {
    position: relative;
    padding: 30px 60px;
    margin: 20px 0 40px 0;
    background: var(--muy-white);
    border-radius: 20px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
}

.muy-category-carousel {
    overflow: hidden;
}

.muy-category-carousel .swiper-slide {
    width: auto;
    display: flex;
    justify-content: center;
}

.muy-cat-carousel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 15px;
    transition: all 0.3s ease;
}

.muy-cat-carousel-item:hover {
    transform: translateY(-5px);
}

.muy-cat-image-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--muy-accent);
    box-shadow: 0 5px 20px rgba(233, 30, 140, 0.15);
    transition: all 0.3s ease;
    background: var(--muy-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.muy-cat-carousel-item:hover .muy-cat-image-wrapper,
.muy-cat-carousel-item.active .muy-cat-image-wrapper {
    border-color: var(--muy-primary);
    box-shadow: 0 8px 30px rgba(233, 30, 140, 0.3);
    transform: scale(1.05);
}

.muy-cat-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.muy-cat-carousel-item:hover .muy-cat-image-wrapper img {
    transform: scale(1.1);
}

.muy-cat-no-image {
    font-size: 40px;
    color: var(--muy-primary-light);
}

.muy-cat-carousel-name {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muy-text);
    text-align: center;
    max-width: 130px;
    line-height: 1.3;
    font-family: 'Poppins', sans-serif;
    transition: color 0.3s ease;
}

.muy-cat-carousel-item:hover .muy-cat-carousel-name,
.muy-cat-carousel-item.active .muy-cat-carousel-name {
    color: var(--muy-primary);
}

/* Carousel Navigation */
.muy-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: var(--muy-white);
    border: 2px solid var(--muy-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: var(--muy-text-light);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.muy-carousel-nav:hover {
    background: var(--muy-primary);
    border-color: var(--muy-primary);
    color: var(--muy-white);
    box-shadow: 0 5px 20px rgba(233, 30, 140, 0.3);
}

.muy-carousel-prev {
    left: 10px;
}

.muy-carousel-next {
    right: 10px;
}

.muy-carousel-nav.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.muy-carousel-nav.swiper-button-disabled:hover {
    background: var(--muy-white);
    border-color: var(--muy-border);
    color: var(--muy-text-light);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

/* Carousel Responsive */
@media (max-width: 768px) {
    .muy-category-carousel-wrapper {
        padding: 20px 45px;
    }
    
    .muy-cat-image-wrapper {
        width: 90px;
        height: 90px;
        border-width: 3px;
    }
    
    .muy-cat-carousel-name {
        font-size: 11px;
        max-width: 100px;
    }
    
    .muy-carousel-nav {
        width: 38px;
        height: 38px;
    }
    
    .muy-carousel-prev {
        left: 5px;
    }
    
    .muy-carousel-next {
        right: 5px;
    }
}

@media (max-width: 480px) {
    .muy-category-carousel-wrapper {
        padding: 15px 35px;
        margin: 10px 0 30px 0;
    }
    
    .muy-cat-image-wrapper {
        width: 75px;
        height: 75px;
    }
    
    .muy-cat-carousel-name {
        font-size: 10px;
        max-width: 85px;
    }
    
    .muy-carousel-nav {
        width: 32px;
        height: 32px;
    }
    
    .muy-carousel-nav svg {
        width: 16px;
        height: 16px;
    }
}

/* Lightbox */
.muy-lightbox {
    display: none;
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
}

.muy-lightbox.active {
    display: flex;
}

.muy-lightbox-content {
    position: relative;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.muy-lightbox-content img {
    max-width: 100%;
    max-height: 65vh;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    border: 4px solid var(--muy-white);
}

.muy-lightbox-close {
    position: absolute;
    top: -55px;
    right: 0;
    color: var(--muy-white);
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--muy-primary);
    box-shadow: 0 5px 20px rgba(233, 30, 140, 0.5);
}

.muy-lightbox-close:hover {
    background: var(--muy-primary-dark);
    transform: rotate(90deg) scale(1.1);
}

.muy-lightbox-info {
    color: var(--muy-white);
    margin-top: 30px;
    text-align: center;
    width: 100%;
}

.muy-lightbox-info h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

.muy-lightbox-sku {
    display: inline-block;
    background: var(--muy-gradient);
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: 500;
}

.muy-lightbox-desc {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.9;
    max-height: 150px;
    overflow-y: auto;
    white-space: pre-line;
    text-align: left;
    background: rgba(255, 255, 255, 0.08);
    padding: 20px 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Scrollbar */
.muy-lightbox-desc::-webkit-scrollbar {
    width: 6px;
}

.muy-lightbox-desc::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.muy-lightbox-desc::-webkit-scrollbar-thumb {
    background: var(--muy-primary);
    border-radius: 3px;
}

/* Animasyonlar */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.muy-lightbox.active .muy-lightbox-content {
    animation: fadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.muy-product-card {
    animation: slideUp 0.5s ease forwards;
    opacity: 0;
}

.muy-products-grid .muy-product-card:nth-child(1) { animation-delay: 0.05s; }
.muy-products-grid .muy-product-card:nth-child(2) { animation-delay: 0.1s; }
.muy-products-grid .muy-product-card:nth-child(3) { animation-delay: 0.15s; }
.muy-products-grid .muy-product-card:nth-child(4) { animation-delay: 0.2s; }
.muy-products-grid .muy-product-card:nth-child(5) { animation-delay: 0.25s; }
.muy-products-grid .muy-product-card:nth-child(6) { animation-delay: 0.3s; }
.muy-products-grid .muy-product-card:nth-child(7) { animation-delay: 0.35s; }
.muy-products-grid .muy-product-card:nth-child(8) { animation-delay: 0.4s; }
.muy-products-grid .muy-product-card:nth-child(n+9) { animation-delay: 0.45s; }

/* Kalp İkonu Dekorasyon */
.muy-product-card::after {
    content: '♥';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: var(--muy-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muy-primary);
    font-size: 16px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.muy-product-card:hover::after {
    opacity: 1;
    transform: scale(1);
}

/* Responsive */
@media (max-width: 768px) {
    .muy-lightbox-content img {
        max-height: 45vh;
    }
    
    .muy-lightbox-close {
        top: -50px;
        width: 44px;
        height: 44px;
        font-size: 28px;
    }
    
    .muy-pagination {
        gap: 6px;
    }
    
    .muy-page-btn {
        min-width: 40px;
        height: 40px;
        font-size: 13px;
    }
    
    .muy-product-info {
        padding: 15px;
    }
    
    .muy-product-title {
        font-size: 14px;
    }
}

/* Özel Hover Efekti */
@media (hover: hover) {
    .muy-product-card:hover .muy-product-title {
        color: var(--muy-primary);
    }
}

/* Print Styles */
@media print {
    .muy-filter-bar,
    .muy-pagination,
    .muy-product-overlay {
        display: none !important;
    }
    
    .muy-product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
