/* Storefront catalog UX, kept out of Sass.
   Active category tabs use the store btnColor / textbtnColor inline.
   Everything else copies the existing storefront: v-tab metrics, the
   discount-flag badge box, and grey lighten-4 cards. */

@media (max-width: 599px) {
    .qc-cat-bar {
        position: sticky;
        top: 0;
        z-index: 4;
        width: 100%;
    }

    .qc-cat-scroll {
        overflow-x: auto;
        overflow-y: hidden;
        width: 100%;
        height: 48px;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        scrollbar-width: none;
    }

    .qc-cat-scroll::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .qc-cat-scroll .v-slide-group__content {
        display: flex;
        flex-wrap: nowrap;
        width: max-content;
        transform: none !important;
    }

    .qc-cat-scroll .v-tab {
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        flex: 0 0 auto;
        height: 48px;
        min-width: 90px;
        max-width: 360px;
        padding: 0 16px;
        font-family: inherit;
        font-size: 0.875rem;
        font-weight: 500;
        letter-spacing: 0.0892857143em;
        line-height: normal;
        text-transform: uppercase;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
    }

    .qc-cat-scroll .v-tab--active {
        background-color: var(--qc-btn-color);
        color: var(--qc-textbtn-color);
    }

    .qc-cat-scroll .v-tab--active > div {
        color: var(--qc-textbtn-color) !important;
    }

    .qc-cat-scroll .v-tab--active .line {
        background-color: var(--qc-textbtn-color) !important;
    }
}

@media (min-width: 600px) {
    .qc-cat-bar {
        display: none !important;
    }
}

/* Same box as .discount-flag (65x50, padding 5px, 25px end radius).
   Hung on the left edge so it does not cover the red discount flag.
   Grey instead of #ff0000: muted, still white type like the other flags. */
.qc-stock-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 0;
    background-color: #757575;
    color: white;
    width: 65px;
    height: 50px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 25px 25px 0 !important;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: normal;
    text-transform: none;
    text-align: center;
    box-shadow: none;
    pointer-events: none;
}

.qc-stock-badge--inline {
    position: static;
    margin-left: 8px;
    flex: 0 0 auto;
}

.main-store .v-card > .qc-card-media,
.main-store .v-card > .qc-card-skeleton__media {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.qc-card-media {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: pointer;
    background-color: #eeeeee;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.qc-card-media img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.qc-card-media.has-ratio img {
    height: 100%;
}

.qc-card-media.is-loaded img {
    opacity: 1;
}

.qc-card-media.is-out.is-loaded img {
    opacity: 0.78;
    filter: grayscale(0.2);
}

.qc-card-media__shine {
    position: absolute;
    inset: 0;
    background-color: #eeeeee;
    background-image: linear-gradient(90deg, #eeeeee 0%, #f5f5f5 45%, #e0e0e0 80%);
    background-size: 200% 100%;
    animation: qc-shimmer 1.15s ease-in-out infinite;
    pointer-events: none;
}

.qc-card-media.is-loaded .qc-card-media__shine,
.qc-card-media.is-empty .qc-card-media__shine {
    display: none;
}

.qc-suggest-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #eeeeee;
}

.qc-suggest-thumb.is-out {
    filter: grayscale(0.2);
    opacity: 0.78;
}

/* Shimmer sits inside a real v-card (grey lighten-4, 4px radius). */
.qc-card-skeleton__media,
.qc-card-skeleton__line {
    background-color: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0 0%, #f5f5f5 45%, #eeeeee 80%);
    background-size: 200% 100%;
    animation: qc-shimmer 1.15s ease-in-out infinite;
}

.qc-card-skeleton__media {
    width: 100%;
}

.qc-card-skeleton__line {
    height: 14px;
    margin: 0 0 10px;
}

.qc-card-skeleton__line--short {
    width: 46%;
    margin-bottom: 0;
}

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

@media (prefers-reduced-motion: reduce) {
    .qc-card-media__shine,
    .qc-card-skeleton__media,
    .qc-card-skeleton__line {
        animation: none;
    }
    .qc-card-media img {
        transition: none;
    }
}

/* Floating Ver carrito. Same fixed sheet as .ed-sheet and the sticky Agregar
   bar: the v-btn carries btnColor / textbtnColor, rounded, large, and block.
   Padding keeps the last catalog card above the bar. */
.qc-cart-bar.ed-sheet {
    z-index: 4;
    padding-bottom: env(safe-area-inset-bottom);
}

.v-application:has(.qc-cart-bar) .v-application--wrap {
    padding-bottom: calc(var(--qc-cart-bar-offset, 96px) + env(safe-area-inset-bottom));
}

.qc-added-snack.v-snack--bottom {
    bottom: calc(16px + env(safe-area-inset-bottom)) !important;
}

.v-application:has(.qc-cart-bar) .qc-added-snack.v-snack--bottom {
    bottom: calc(var(--qc-cart-bar-offset, 96px) + 12px + env(safe-area-inset-bottom)) !important;
}

.v-application:has(.product-sticky-cta) .qc-added-snack.v-snack--bottom {
    bottom: calc(var(--product-sticky-stack, 84px) + 12px + env(safe-area-inset-bottom)) !important;
}
