/* Skeleton loaders (assets/js/skeleton.js): grey shapes laid out like the
   content that's on its way, with a light sweeping across -- while the
   next page loads after a click (product listings, product page, My
   Account), while a part of the page loads (Quick View, a conversation,
   an announcement, a store tab) and behind product pictures until they
   arrive. My Orders draws its own (my-order-list.css). */

.zsk-b,
.zsk-c {
    display: block;
    flex: none;
    max-width: 100%;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #eceff3 0%, #f6f8fa 40%, #eceff3 80%) 0 0 / 300% 100%;
    animation: zsk-shimmer 1.3s ease-in-out infinite;
}

.zsk-c {
    border-radius: 50%;
}

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

    to {
        background-position: 0 0;
    }
}

/* ---------- Layout pieces ---------- */

.zsk-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.zsk-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.zsk-row--top {
    align-items: flex-start;
}

.zsk-row--between {
    justify-content: space-between;
}

.zsk-row--wrap {
    flex-wrap: wrap;
}

.zsk-grow {
    flex: 1 1 0;
    min-width: 0;
}

.zsk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--zsk-min, 220px), 1fr));
    gap: 16px;
}

.zsk-split {
    display: grid;
    grid-template-columns: minmax(0, var(--zsk-left, 2fr)) minmax(0, var(--zsk-right, 3fr));
    gap: 20px;
    align-items: start;
}

.zsk-card {
    padding: 18px;
    border: 1px solid #e5e8ec;
    border-radius: 12px;
    background: #fff;
}

.zsk-card--flush {
    padding: 0;
    overflow: hidden;
}

.zsk-line + .zsk-line {
    border-top: 1px solid #eef0f3;
}

.zsk-line {
    padding: 14px 18px;
}

.zsk-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* ---------- Covering a region while its new content loads ---------- */

.zsk-covered > :not(.zsk-cover) {
    display: none !important;
}

.zsk-cover {
    animation: zsk-in 0.2s ease both;
}

@keyframes zsk-in {
    from {
        opacity: 0;
    }
}

.zsk-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* The product page skeleton fills the page below the header. */
.zsk-cover--product {
    padding: 24px 0 48px;
}

/* ---------- Product card (listings) ---------- */

.zsk-pcard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    padding: 16px;
    border: 1px solid #e5e8ec;
    border-radius: 10px;
    background: #fff;
}

.zsk-pcard-media {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 8px;
}

/* List view (listing-view.css): picture beside the details. */
.zpl-view--list .zsk-pcard {
    flex-direction: row;
    align-items: center;
    gap: 18px;
}

.zpl-view--list .zsk-pcard-media {
    width: 180px;
}

.zpl-view--list .zsk-pcard-body {
    flex: 1 1 0;
}

/* ---------- Product page ---------- */

.zsk-product {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 32px;
    align-items: start;
}

.zsk-gallery {
    display: flex;
    gap: 14px;
}

.zsk-gallery-main {
    flex: 1 1 0;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 12px;
}

/* ---------- Conversation ---------- */

.zsk-bubble {
    height: 38px;
    border-radius: 14px;
}

.zsk-bubble--mine {
    align-self: flex-end;
}

/* ---------- Product pictures waiting to arrive ---------- */

img.zsk-img {
    background: linear-gradient(90deg, #eceff3 0%, #f6f8fa 40%, #eceff3 80%) 0 0 / 300% 100%;
    animation: zsk-shimmer 1.3s ease-in-out infinite;
}

/* ---------- Smaller screens ---------- */

@media (max-width: 991.98px) {
    .zsk-product,
    .zsk-split {
        grid-template-columns: minmax(0, 1fr);
    }

    .zsk-hide-md {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .zsk-grid {
        --zsk-min: 150px;
        gap: 12px;
    }

    .zsk-hide-sm {
        display: none !important;
    }

    .zpl-view--list .zsk-pcard-media {
        width: 110px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zsk-b,
    .zsk-c,
    img.zsk-img,
    .zsk-cover {
        animation: none;
    }
}
