/* ==========================================================================
   SKELETON LOADERS + EMPTY STATES + ERROR BOUNDARIES
   Faz 2 ortak component'leri — tasarım dilinde brand uyumlu pattern'ler
   ========================================================================== */

/* ---------- Skeleton base ---------- */
.skeleton {
    background: linear-gradient(
        90deg,
        #eee 25%,
        #f5f5f5 50%,
        #eee 75%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
    border-radius: 8px;
    color: transparent !important;
    user-select: none;
    pointer-events: none;
}

@keyframes skeletonShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Skeleton tipleri — ölçü helper'lar */
.skeleton--text   { height: 0.875rem; margin-bottom: 0.5rem; }
.skeleton--title  { height: 1.25rem; width: 80%; margin-bottom: 0.5rem; }
.skeleton--price  { height: 1.5rem; width: 40%; }
.skeleton--button { height: 44px; width: 100%; border-radius: 10px; }
.skeleton--badge  { height: 1.25rem; width: 70px; border-radius: 100px; }
.skeleton--img    { width: 100%; aspect-ratio: 1; border-radius: 12px; }
.skeleton--img-wide { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; }
.skeleton--avatar { width: 48px; height: 48px; border-radius: 50%; }
.skeleton--row    { height: 60px; margin-bottom: 0.75rem; }

/* Skeleton ürün kartı — products grid içinde kullanılır */
.skeleton-product-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
}

.skeleton-product-card__image {
    aspect-ratio: 1;
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
}

.skeleton-product-card__content {
    padding: 1rem 1.25rem;
}

/* Skeleton sipariş satırı */
.skeleton-order-row {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.skeleton-order-row__avatar {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    flex-shrink: 0;
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
}

.skeleton-order-row__body {
    flex: 1;
    min-width: 0;
}

/* ==========================================================================
   EMPTY STATE — brand renkleri + brand ikon
   ========================================================================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
    text-align: center;
    background: var(--color-cream, #f5f3ef);
    border-radius: 16px;
    min-height: 360px;
}

.empty-state__icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(45, 95, 45, 0.08);
    color: var(--color-primary, #2D5F2D);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.empty-state__icon svg {
    width: 40px;
    height: 40px;
    stroke-width: 1.5;
}

.empty-state__title {
    font-family: var(--font-primary, 'DM Sans', sans-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary-dark, #1E4620);
    margin: 0 0 0.5rem;
}

.empty-state__desc {
    font-size: 0.9375rem;
    color: var(--color-text-secondary, #4d534a);
    max-width: 420px;
    line-height: 1.5;
    margin: 0 0 1.5rem;
}

.empty-state__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.empty-state__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    min-height: 44px;
    background: var(--color-primary, #2D5F2D);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body, sans-serif);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.empty-state__btn:hover {
    background: var(--color-primary-dark, #1E4620);
    transform: translateY(-1px);
}

.empty-state__btn--outline {
    background: transparent;
    color: var(--color-primary, #2D5F2D);
    border: 1px solid var(--color-primary, #2D5F2D);
}

.empty-state__btn--outline:hover {
    background: rgba(45, 95, 45, 0.06);
}

/* ==========================================================================
   ERROR BOUNDARY
   ========================================================================== */
.error-boundary {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 16px;
    min-height: 240px;
}

.error-boundary__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(153, 27, 27, 0.1);
    color: #991b1b;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.error-boundary__title {
    font-family: var(--font-primary, 'DM Sans', sans-serif);
    font-size: 1.125rem;
    font-weight: 600;
    color: #991b1b;
    margin: 0 0 0.5rem;
}

.error-boundary__desc {
    font-size: 0.9375rem;
    color: #7f1d1d;
    max-width: 420px;
    margin: 0 0 1.25rem;
}

.error-boundary__retry {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 20px;
    min-height: 44px;
    background: #ffffff;
    color: #991b1b;
    border: 1px solid #991b1b;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.error-boundary__retry:hover {
    background: #991b1b;
    color: #ffffff;
}
