/*
 * Redesigned shop card (front.inc.items.shop_card): .sc--full (showcase of best sellers, logo over its edge),
 * .sc--compact (logo beside the text), .sc--circle (logo and name). Built on the gozar-ui.css tokens.
 */

.sc {
    --sc-pad: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--gz-border);
    border-radius: var(--gz-radius-lg);
    background: var(--gz-surface);
    font-family: var(--gz-font);
    transition: border-color var(--gz-normal), box-shadow var(--gz-normal);
}
.sc:hover { border-color: var(--gz-brand-200); box-shadow: 0 12px 28px rgba(40, 25, 51, .10); }
/* carousels: slides of cards stretch to the tallest */
.swiper-slide:has(> .sc) { height: auto; }
/* the card's pictures size themselves with !important: carousels stretch every picture in a slide
   (main.css .swiper-slide img) */

/* ---- showcase: the shop's best sellers ---- */
.sc-showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; height: 116px; padding: 6px 6px 0; }
.sc-showcase--2 { grid-template-columns: repeat(2, 1fr); }
.sc-showcase--1 { grid-template-columns: 1fr; }
.sc-shot { display: block; overflow: hidden; background: #F4F2F7; }
.sc-shot:first-child { border-start-start-radius: calc(var(--gz-radius-lg) - 4px); border-end-start-radius: calc(var(--gz-radius-lg) - 4px); }
.sc-shot:last-child { border-start-end-radius: calc(var(--gz-radius-lg) - 4px); border-end-end-radius: calc(var(--gz-radius-lg) - 4px); }
.sc .sc-shot img { display: block; width: 100% !important; height: 100% !important; object-fit: contain; mix-blend-mode: multiply; transition: transform .45s var(--gz-ease); }
.sc:hover .sc-shot img { transform: scale(1.05); }

/* ---- logo and name ---- */
.sc-head { display: flex; align-items: flex-end; gap: 10px; padding: var(--sc-pad) var(--sc-pad) 0; }
/* the logo overlaps the showcase's edge; the name starts just below that edge, never over the pictures */
.sc.has-showcase .sc-head { align-items: flex-start; margin-top: -30px; padding-top: 0; }
.sc.has-showcase .sc-titles { padding-top: 37px; padding-bottom: 0; }
.sc-logo { position: relative; flex-shrink: 0; width: 64px; height: 64px; }
.sc .sc-logo img {
    width: 64px !important; height: 64px !important; border: 3px solid var(--gz-surface); border-radius: 50%;
    object-fit: cover; background: var(--gz-surface); box-shadow: 0 4px 14px rgba(40, 25, 51, .14);
}
.sc-online { position: absolute; bottom: 4px; inset-inline-end: 4px; width: 13px; height: 13px; border: 2px solid var(--gz-surface); border-radius: 50%; background: var(--gz-success); }
.sc-titles { min-width: 0; padding-bottom: 2px; }
.sc-name { margin: 0; font-size: 15px; font-weight: 800; line-height: 1.6; }
.sc-link { display: block; overflow: hidden; color: var(--gz-ink) !important; text-decoration: none; white-space: nowrap; text-overflow: ellipsis; }
.sc-link::after { content: ""; position: absolute; inset: 0; z-index: 0; } /* the whole card opens the shop */
.sc:hover .sc-link { color: var(--gz-brand-700) !important; }

/* ---- rating · city · sales · products ---- */
.sc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px var(--sc-pad) 0; color: var(--gz-ink-3); font-size: 12px; }
.sc-rating { display: inline-flex; align-items: center; gap: 3px; color: var(--gz-ink-4); }
.sc-rating .gzi { font-size: 14px; color: var(--gz-star); }
.sc-rating b { color: var(--gz-ink-2); font-weight: 700; }
.sc-new { padding: 0 7px; border-radius: var(--gz-radius-pill); background: var(--gz-success-50); color: var(--gz-success); font-size: 11px; font-weight: 700; line-height: 20px; }

/* ---- the shop's card badges, with their titles ---- */
.sc-badges { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px var(--sc-pad) 0; }
.sc-badge {
    display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; max-width: 100%;
    border: 1px solid color-mix(in srgb, var(--badge-color) 28%, transparent); border-radius: var(--gz-radius-pill);
    background: color-mix(in srgb, var(--badge-color) 9%, var(--gz-surface)); color: var(--badge-color);
    font-size: 11px; font-weight: 700; white-space: nowrap;
}
.sc-badge > span { overflow: hidden; text-overflow: ellipsis; }
.sc-badge i, .sc-badge svg { font-size: 13px; width: 13px; height: 13px; }

/* ---- call to action ---- */
/* pinned to the bottom, so the buttons of a carousel row line up; the line above keeps it 14px away at least */
.sc-cta {
    display: flex; align-items: center; justify-content: center; gap: 4px; height: 38px; margin: auto var(--sc-pad) var(--sc-pad);
    border-radius: var(--gz-radius-md); background: var(--gz-brand-50); color: var(--gz-brand-700);
    font-size: 13px; font-weight: 700; transition: background var(--gz-fast), color var(--gz-fast);
}
.sc--full > :nth-last-child(2) { margin-bottom: 14px; }
.sc-end { display: block; margin-top: auto; }
.sc-cta .gzi { font-size: 16px; transform: rotate(90deg); } /* the down chevron turned to point onwards (left) */
.sc:hover .sc-cta { background: var(--gz-brand-500); color: #fff; }

/* ---- compact: logo beside the text ---- */
.sc--compact { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-content: center; padding: 12px var(--sc-pad); }
.sc--compact .sc-head { display: contents; }
.sc--compact .sc-logo { grid-row: 1 / span 3; align-self: center; width: 56px; height: 56px; }
.sc.sc--compact .sc-logo img { width: 56px !important; height: 56px !important; box-shadow: none; border-color: var(--gz-border); border-width: 1px; }
.sc--compact .sc-titles, .sc--compact .sc-meta, .sc--compact .sc-badges { grid-column: 2; padding-inline: 0; }
.sc--compact .sc-meta, .sc--compact .sc-badges { padding-top: 6px; }

/* ---- circle: logo and name, for narrow strips ---- */
.sc--circle {
    align-items: center; gap: 8px; width: 92px; padding: 0; overflow: visible; border: 0; border-radius: 0;
    background: none; color: var(--gz-ink-2) !important; text-align: center; text-decoration: none;
}
.sc--circle:hover { box-shadow: none; }
.sc--circle .sc-logo { width: 76px; height: 76px; padding: 3px; border-radius: 50%; background: linear-gradient(135deg, var(--gz-brand-400), var(--gz-accent-500)); }
.sc.sc--circle .sc-logo img { width: 70px !important; height: 70px !important; box-shadow: none; }
.sc--circle .sc-online { bottom: 6px; inset-inline-end: 6px; }
.sc--circle .sc-name { display: -webkit-box; width: 100%; overflow: hidden; font-size: 12px; font-weight: 600; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.sc--circle:hover .sc-name { color: var(--gz-brand-600); }

@media (max-width: 767.98px) {
    /* the phone list: logo beside the text, no frame, rows parted by a thin line (like the product list) */
    .sc--row-mobile {
        display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-content: center;
        padding: 12px; border: 0; border-bottom: 1px solid var(--gz-border); border-radius: 0; background: transparent;
    }
    .sc--row-mobile:hover { box-shadow: none; }
    .sc.sc--row-mobile { border-radius: 0; }
    *:has(> .sc--row-mobile) { margin-bottom: 0 !important; }
    .sc--row-mobile .sc-head { display: contents; }
    .sc--row-mobile .sc-logo { grid-row: 1 / span 3; align-self: center; width: 56px; height: 56px; }
    .sc.sc--row-mobile .sc-logo img { width: 56px !important; height: 56px !important; box-shadow: none; border: 1px solid var(--gz-border); }
    .sc--row-mobile .sc-titles, .sc--row-mobile .sc-meta, .sc--row-mobile .sc-badges { grid-column: 2; padding-inline: 0; }
    .sc--row-mobile .sc-meta, .sc--row-mobile .sc-badges { padding-top: 6px; }
    .sc--row-mobile > :nth-last-child(2) { margin-bottom: 0; }
    .sc--row-mobile .sc-cta { display: none; }
}
@media (max-width: 575.98px) {
    .sc { --sc-pad: 12px; border-radius: var(--gz-radius-md); }
    .sc-showcase { height: 96px; padding: 4px 4px 0; }
    .sc-name { font-size: 14px; }
    .sc-meta { gap: 3px 10px; font-size: 11.5px; }
}
