/* Vendor public shop — themed with CSS variables from VendorShopTheme */

/* Theme variables (--shop-primary, --shop-accent, --shop-btn-radius) are set per vendor. */
.vendor-shop-page {
    --shop-primary: #0b1b3c;
    --shop-accent: #2563eb;
    --shop-btn-radius: 0.5rem;
}

.vendor-shop-page__breadcrumb {
    padding-top: 0.75rem;
    padding-bottom: 0.25rem;
}

.vendor-shop-page__main {
    padding-top: 0.75rem;
    padding-bottom: 2rem;
}

.vendor-shop-breadcrumb {
    font-size: 0.8125rem;
    margin-bottom: 0;
}

.vendor-shop-breadcrumb a {
    color: var(--shop-primary);
}

.vendor-shop-section-title {
    color: var(--shop-primary);
}

.vendor-shop-btn {
    background: var(--shop-accent);
    border-color: var(--shop-accent);
    color: #fff;
    border-radius: var(--shop-btn-radius);
}

.vendor-shop-btn:hover,
.vendor-shop-btn:focus {
    background: color-mix(in srgb, var(--shop-accent) 85%, #000);
    border-color: color-mix(in srgb, var(--shop-accent) 85%, #000);
    color: #fff;
}

.vendor-shop-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: color-mix(in srgb, var(--shop-accent) 12%, #fff);
    color: var(--shop-primary);
    border: 1px solid color-mix(in srgb, var(--shop-accent) 25%, #fff);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.vendor-shop-badge--muted {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #4b5563;
}

/* Hero — banner */
.vendor-shop-hero {
    margin-bottom: 0.75rem;
}

.vendor-shop-hero__banner {
    position: relative;
    --shop-banner-height: 140px;
    height: var(--shop-banner-height);
    min-height: var(--shop-banner-height);
    max-height: var(--shop-banner-height);
    overflow: hidden;
    /* Color fill always wins when no cover. Use `none` fallbacks so unset
       --shop-banner-* vars do not invalidate the whole background-image. */
    background-color: var(--shop-primary);
    background-image:
        var(--shop-banner-mobile, var(--shop-banner-desktop, none)),
        linear-gradient(
            135deg,
            var(--shop-primary) 0%,
            color-mix(in srgb, var(--shop-primary) 70%, var(--shop-accent)) 100%
        );
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.vendor-shop-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.25) 100%);
}

.vendor-shop-hero__inner {
    position: relative;
    z-index: 1;
    color: #fff;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vendor-shop-hero__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.vendor-shop-hero__logo {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 1rem;
    border: 3px solid rgba(255, 255, 255, 0.85);
    background: #fff;
}

.vendor-shop-hero__logo-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
}

.vendor-shop-hero__title {
    font-size: clamp(1.25rem, 2.5vw, 1.875rem);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.vendor-shop-hero__verified {
    color: #86efac;
    font-size: 1.25rem;
    vertical-align: middle;
}

.vendor-shop-hero__tagline {
    margin: 0.2rem 0 0;
    opacity: 0.92;
    font-size: 0.875rem;
    max-width: 42rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vendor-shop-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    opacity: 0.95;
}

.vendor-shop-hero__stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.vendor-shop-hero__contact {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: inherit;
    text-decoration: none;
}

.vendor-shop-hero__contact:hover {
    opacity: 0.85;
    color: inherit;
}

.vendor-shop-hero--minimal .vendor-shop-hero__contact {
    font-size: 0.875rem;
}

/* Hero — classic */
.vendor-shop-hero__classic {
    border-top: 4px solid var(--shop-accent) !important;
}

.vendor-shop-hero__logo--classic {
    width: 96px;
    height: 96px;
    object-fit: cover;
}

.vendor-shop-hero__logo-placeholder--classic {
    width: 96px;
    height: 96px;
    background: color-mix(in srgb, var(--shop-accent) 10%, #fff);
    color: var(--shop-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.vendor-shop-hero__stats--classic {
    gap: 0.5rem;
}

/* Hero — minimal */
.vendor-shop-hero__minimal {
    text-align: center;
    padding: 1rem 1rem 0.25rem;
}

.vendor-shop-hero__logo--minimal {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 0.75rem;
}

.vendor-shop-hero__title--minimal {
    color: var(--shop-primary);
    font-size: 2rem;
}

.vendor-shop-hero__tagline--minimal {
    color: #6b7280;
    max-width: 36rem;
    margin: 0.5rem auto 0;
}

/* Sidebar */
.vendor-shop-sidebar__header {
    background: var(--shop-primary);
    color: #fff;
    border: 0;
}

.vendor-shop-sidebar .form-label {
    font-weight: 600;
    color: var(--shop-primary);
    font-size: 0.875rem;
}

/* Product cards inside vendor shop */
.vendor-shop-page .product-card .btn-primary,
.vendor-shop-page .product-card-mobile-cart {
    background: var(--shop-accent) !important;
    border-color: var(--shop-accent) !important;
    border-radius: var(--shop-btn-radius);
}

.vendor-shop-page .product-card .product-price,
.vendor-shop-page .product-card-mobile-price {
    color: var(--shop-primary);
}

.vendor-shop-empty__icon {
    font-size: 4rem;
    color: color-mix(in srgb, var(--shop-accent) 35%, #dee2e6);
}

.vendor-shop-hero__classic .card-body {
    padding: 1rem 1.125rem !important;
}

/* Product grid — 2 columns on mobile */
.vendor-shop-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
}

.vendor-shop-grid-card {
    background: #fff;
    border: 1px solid #eef0f2;
    border-radius: 0.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
}

.vendor-shop-grid-card__media {
    position: relative;
    display: block;
    aspect-ratio: 1;
    background: #f8fafc;
}

.vendor-shop-grid-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vendor-shop-grid-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 1.5rem;
}

.vendor-shop-grid-card__badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    left: auto;
    background: #dc2626;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    line-height: 1.2;
    z-index: 1;
}

.vendor-shop-grid-card__body {
    padding: 0.5rem 0.55rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-height: 4.25rem;
}

.vendor-shop-grid-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
    font-size: 0.75rem;
    line-height: 1.25;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
}

.vendor-shop-grid-card__price-row {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin-top: auto;
}

.vendor-shop-grid-card__price {
    font-size: 0.8125rem;
    font-weight: 800;
    color: var(--shop-primary);
    line-height: 1.2;
}

.vendor-shop-grid-card__price-old {
    font-size: 0.6875rem;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 500;
}

@media (min-width: 768px) {
    .vendor-shop-product-grid {
        gap: 0.875rem;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .vendor-shop-grid-card__body {
        padding: 0.65rem 0.75rem 0.85rem;
        min-height: 4.75rem;
    }

    .vendor-shop-grid-card__title {
        font-size: 0.8125rem;
    }

    .vendor-shop-grid-card__price {
        font-size: 0.9375rem;
    }

    .vendor-shop-hero__banner {
        --shop-banner-height: 180px;
    }

    .vendor-shop-hero__inner {
        padding: 1.1rem 1rem;
    }

    .vendor-shop-hero__logo {
        width: 64px;
        height: 64px;
    }

    .vendor-shop-hero__logo-placeholder {
        width: 64px;
        height: 64px;
    }
}

@media (min-width: 992px) {
    .vendor-shop-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .vendor-shop-hero__banner {
        background-image:
            var(--shop-banner-desktop, var(--shop-banner-mobile, none)),
            linear-gradient(
                135deg,
                var(--shop-primary) 0%,
                color-mix(in srgb, var(--shop-primary) 70%, var(--shop-accent)) 100%
            );
    }
}

@media (max-width: 767.98px) {
    .vendor-shop-hero__logo {
        width: 56px;
        height: 56px;
    }

    .vendor-shop-hero__logo-placeholder {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    .vendor-shop-sidebar .card-body {
        padding: 1rem;
    }
}
