/* ============================================
   SKELETON LOADING SYSTEM — Premium Shimmer
   ============================================ */

/* Base skeleton element */
.skeleton {
    background: linear-gradient(90deg, 
        #eceee9 0%, 
        #f5f7f2 40%, 
        #eceee9 60%, 
        #eceee9 100%);
    background-size: 300% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

@keyframes skeleton-shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Skeleton text lines */
.skeleton-text {
    height: 14px;
    border-radius: 6px;
    margin-bottom: 10px;
}
.skeleton-text.lg { height: 28px; border-radius: 8px; }
.skeleton-text.xl { height: 42px; border-radius: 10px; }
.skeleton-text.sm { height: 10px; }
.skeleton-text:last-child { width: 60%; }

/* Skeleton circle */
.skeleton-circle {
    border-radius: 50%;
}

/* ---- HERO SECTION SKELETON ---- */
.skeleton-hero {
    display: flex;
    align-items: center;
    gap: 48px;
    padding: var(--section-gap) 0;
    min-height: 819px;
}
.skeleton-hero-content {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.skeleton-hero-label {
    width: 140px;
    height: 12px;
}
.skeleton-hero-title {
    width: 100%;
    height: 48px;
    border-radius: 10px;
}
.skeleton-hero-title-2 {
    width: 75%;
    height: 48px;
    border-radius: 10px;
}
.skeleton-hero-desc {
    width: 90%;
    height: 16px;
}
.skeleton-hero-desc-2 {
    width: 70%;
    height: 16px;
}
.skeleton-hero-btn {
    width: 180px;
    height: 52px;
    border-radius: var(--radius-md);
    margin-top: 8px;
}
.skeleton-hero-minicards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}
.skeleton-hero-minicard {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 256px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--surface-high);
}
.skeleton-hero-minicard-img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    flex-shrink: 0;
}
.skeleton-hero-minicard-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.skeleton-hero-arch {
    flex: 0 0 55%;
    display: flex;
    justify-content: center;
}
.skeleton-hero-arch-shape {
    width: 400px;
    height: 550px;
    border-radius: 200px 200px 100px 100px;
}

/* ---- CATEGORIES SKELETON ---- */
.skeleton-categories {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    padding: 40px 0;
}
.skeleton-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.skeleton-category-circle {
    width: 128px;
    height: 128px;
}
.skeleton-category-label {
    width: 80px;
    height: 12px;
    border-radius: 6px;
}

/* ---- PRODUCT CARD SKELETON ---- */
.skeleton-product-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.skeleton-product-img {
    aspect-ratio: 3/4;
    border-radius: var(--radius-md);
}
.skeleton-product-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.skeleton-product-title {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.skeleton-product-title-line {
    height: 16px;
    border-radius: 6px;
}
.skeleton-product-title-line:first-child { width: 85%; }
.skeleton-product-title-line:last-child { width: 55%; }
.skeleton-product-price {
    width: 64px;
    height: 14px;
    border-radius: 6px;
    flex-shrink: 0;
}

/* ---- SHOP PAGE SKELETON ---- */
.skeleton-shop-hero {
    height: 250px;
    border-radius: 0;
    background: linear-gradient(90deg, 
        #3a5f3a 0%, 
        #4a7a4a 40%, 
        #3a5f3a 60%, 
        #3a5f3a 100%);
    background-size: 300% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
}
.skeleton-shop-hero-title {
    width: 200px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
}
.skeleton-shop-hero-breadcrumb {
    width: 140px;
    height: 14px;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
}

/* Shop card skeleton (square aspect) */
.skeleton-shop-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.skeleton-shop-card-img {
    aspect-ratio: 1;
    border-radius: var(--radius);
}
.skeleton-shop-card-title {
    height: 16px;
    width: 80%;
    border-radius: 6px;
}
.skeleton-shop-card-price {
    height: 14px;
    width: 50%;
    border-radius: 6px;
}

/* ---- BANNER SKELETON ---- */
.skeleton-banner {
    width: 100%;
    height: 600px;
    border-radius: 0;
}

/* ---- FADE IN / OUT LOGIC ---- */
.skeleton-wrapper {
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.skeleton-wrapper.hidden {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    position: absolute;
    width: 100%;
}

.real-content {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s;
}
.real-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Container for skeleton/real content pairs */
.skeleton-zone {
    position: relative;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 991px) {
    .skeleton-hero { flex-direction: column; min-height: auto; gap: 32px; padding: 40px 0; }
    .skeleton-hero-content { flex: none; width: 100%; }
    .skeleton-hero-arch { flex: none; width: 100%; }
    .skeleton-hero-arch-shape { width: 300px; height: 400px; }
    .skeleton-banner { height: 400px; }
}
@media (max-width: 767px) {
    .skeleton-hero-arch-shape { width: 100%; height: 350px; border-radius: 24px; }
    .skeleton-hero-title, .skeleton-hero-title-2 { height: 28px; }
    .skeleton-hero-minicard { width: 100%; }
    .skeleton-banner { height: 300px; }
    .skeleton-categories { gap: 24px; }
    .skeleton-category-circle { width: 80px; height: 80px; }
}
