/* Halaman toko penjual — layout Lapak Warga /u/{slug} */

.mk-lapak-vendor {
    padding: 0 0 48px;
    background: var(--mk-bg, #f4f6f9);
}

.mk-lapak-vendor__breadcrumb {
    background: var(--mk-surface, #fff);
    border-bottom: 1px solid var(--mk-border, #e2e8f0);
    margin: 0;
    padding: 12px 0;
}

.mk-lapak-vendor__breadcrumb .breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 0.875rem;
}

.mk-lapak-vendor__breadcrumb .breadcrumb a {
    color: var(--mk-primary);
}

.mk-lapak-vendor__layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 20px;
    padding-top: 20px;
    padding-bottom: 20px;
    align-items: start;
}

/* ---- Sidebar ---- */

.mk-lapak-vendor__sidebar {
    min-width: 0;
}

.mk-lapak-vendor__profile {
    background: var(--mk-surface, #fff);
    border: 1px solid var(--mk-border, #e2e8f0);
    border-radius: 6px;
    overflow: hidden;
}

.mk-lapak-vendor__cover {
    position: relative;
    min-height: 100px;
    background: #e8ecf1;
}

.mk-lapak-vendor__cover.is-empty {
    background: #eef2f6;
    padding-bottom: 0;
}

.mk-lapak-vendor__cover > img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.mk-lapak-vendor__identity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.mk-lapak-vendor__cover:not(.is-empty) .mk-lapak-vendor__identity {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 14px 12px;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.55) 100%);
}

.mk-lapak-vendor__avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #d1d5db;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.mk-lapak-vendor__cover:not(.is-empty) .mk-lapak-vendor__avatar {
    width: 52px;
    height: 52px;
}

.mk-lapak-vendor__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mk-lapak-vendor__avatar span {
    font-size: 1.25rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.mk-lapak-vendor__titles {
    flex: 1;
    min-width: 0;
}

.mk-lapak-vendor__cover:not(.is-empty) .mk-lapak-vendor__titles {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.mk-lapak-vendor__titles h1 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.25;
    word-break: break-word;
}

.mk-lapak-vendor__titles p {
    margin: 2px 0 0;
    font-size: 0.8125rem;
    opacity: 0.85;
    text-transform: lowercase;
}

.mk-lapak-vendor__profile-body {
    padding: 14px 16px 16px;
    border-top: 1px solid var(--mk-border, #e2e8f0);
}

.mk-lapak-vendor__store-id {
    margin-bottom: 12px;
    font-size: 0.8125rem;
    color: var(--mk-text, #1e293b);
    line-height: 1.45;
}

.mk-lapak-vendor__store-id strong {
    font-weight: 700;
}

.mk-lapak-vendor__verified {
    color: #059669;
    font-weight: 600;
    white-space: nowrap;
}

.mk-lapak-vendor__verified i {
    margin-right: 2px;
}

.mk-lapak-vendor__store-id code {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--mk-muted, #64748b);
    word-break: break-all;
    background: transparent;
    padding: 0;
}

.mk-lapak-vendor__chat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 12px;
    border: 1px solid var(--mk-border, #e2e8f0);
    border-radius: 6px;
    background: var(--mk-surface, #fff);
    color: var(--mk-text, #1e293b) !important;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none !important;
    transition: border-color 0.2s, color 0.2s;
}

.mk-lapak-vendor__chat:hover {
    border-color: var(--mk-primary);
    color: var(--mk-primary) !important;
}

.mk-lapak-vendor__address {
    margin: 0 0 12px;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--mk-muted, #64748b);
}

.mk-lapak-vendor__stats {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mk-lapak-vendor__stats li {
    padding: 3px 0;
    font-size: 0.8125rem;
    color: var(--mk-text, #1e293b);
    line-height: 1.5;
}

.mk-lapak-vendor__stats li span {
    color: #059669;
    font-weight: 700;
}

.mk-lapak-vendor__categories {
    margin-top: 16px;
    padding: 14px 16px;
    background: var(--mk-surface, #fff);
    border: 1px solid var(--mk-border, #e2e8f0);
    border-radius: 6px;
}

.mk-lapak-vendor__categories h4 {
    margin: 0 0 10px;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--mk-text, #1e293b);
}

.mk-lapak-vendor__cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mk-lapak-vendor__cat-list li + li {
    border-top: 1px solid var(--mk-border, #f1f5f9);
}

.mk-lapak-vendor__cat-list a {
    display: block;
    padding: 8px 0;
    font-size: 0.875rem;
    color: var(--mk-text, #334155) !important;
    text-decoration: none !important;
    line-height: 1.35;
}

.mk-lapak-vendor__cat-list a.is-active,
.mk-lapak-vendor__cat-list a:hover {
    color: var(--mk-primary) !important;
    font-weight: 600;
}

.mk-lapak-vendor__tagline {
    margin: 12px 0 0;
    padding: 10px 12px;
    font-size: 0.8125rem;
    color: var(--mk-muted, #64748b);
    line-height: 1.5;
    background: var(--mk-surface, #fff);
    border: 1px solid var(--mk-border, #e2e8f0);
    border-radius: 6px;
}

/* ---- Main content ---- */

.mk-lapak-vendor__main {
    min-width: 0;
    background: var(--mk-surface, #fff);
    border: 1px solid var(--mk-border, #e2e8f0);
    border-radius: 6px;
    padding: 16px 18px 20px;
}

.mk-lapak-vendor__main-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--mk-border, #e2e8f0);
}

.mk-lapak-vendor__count {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mk-muted, #64748b);
}

.mk-lapak-vendor__search {
    display: flex;
    align-items: stretch;
    flex: 1;
    max-width: 360px;
    min-width: 200px;
    border: 1px solid var(--mk-border, #e2e8f0);
    border-radius: 6px;
    overflow: hidden;
    background: var(--mk-surface, #fff);
}

.mk-lapak-vendor__search input {
    flex: 1;
    border: none;
    padding: 9px 12px;
    font-size: 0.875rem;
    min-width: 0;
    background: transparent;
    color: var(--mk-text, #1e293b);
}

.mk-lapak-vendor__search input:focus {
    outline: none;
}

.mk-lapak-vendor__search button {
    border: none;
    background: var(--mk-primary);
    color: #fff;
    padding: 0 14px;
    cursor: pointer;
    flex-shrink: 0;
}

.mk-lapak-vendor__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.mk-lapak-vendor__empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--mk-muted, #64748b);
    font-size: 0.9375rem;
}

/* ---- Kartu produk ---- */

.mk-lapak-product {
    display: flex;
    flex-direction: column;
    background: var(--mk-surface, #fff);
    border: 1px solid var(--mk-border, #e2e8f0);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
    height: 100%;
}

.mk-lapak-product:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.mk-lapak-product__img {
    display: block;
    position: relative;
    aspect-ratio: 1;
    background: #f8fafc;
    overflow: hidden;
}

.mk-lapak-product__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mk-lapak-product__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 8px 10px 10px;
    gap: 4px;
}

.mk-lapak-product__views {
    margin: 0;
    font-size: 0.6875rem;
    color: var(--mk-muted, #94a3b8);
}

.mk-lapak-product__title {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mk-lapak-product__title a {
    color: var(--mk-text, #1e293b) !important;
    text-decoration: none !important;
}

.mk-lapak-product__title a:hover {
    color: var(--mk-primary) !important;
}

.mk-lapak-product__price {
    margin: 4px 0 0;
    font-size: 0.9375rem;
    font-weight: 800;
    color: #2563eb;
}

/* ---- Pagination ---- */

.mk-lapak-vendor__pager {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.mk-lapak-vendor__pager .pagination {
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.mk-lapak-vendor__pager .page-link {
    color: var(--mk-text, #1e293b);
    border-color: var(--mk-border, #e2e8f0);
    border-radius: 4px !important;
    padding: 6px 12px;
    font-size: 0.875rem;
}

.mk-lapak-vendor__pager .page-item.active .page-link {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
}

/* ---- Responsive ---- */

@media (max-width: 1399px) {
    .mk-lapak-vendor__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1199px) {
    .mk-lapak-vendor__layout {
        grid-template-columns: 260px minmax(0, 1fr);
    }

    .mk-lapak-vendor__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .mk-lapak-vendor {
        padding-bottom: 24px;
    }

    .mk-lapak-vendor__breadcrumb {
        display: none;
    }

    .mk-lapak-vendor__layout {
        grid-template-columns: 1fr;
        gap: 0;
        padding-top: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .mk-lapak-vendor__profile {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .mk-lapak-vendor__categories {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
    }

    .mk-lapak-vendor__tagline {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
    }

    .mk-lapak-vendor__main {
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        padding: 14px 12px 18px;
    }

    .mk-lapak-vendor__main-head {
        flex-direction: column;
        align-items: stretch;
    }

    .mk-lapak-vendor__search {
        max-width: none;
        min-width: 0;
    }

    .mk-lapak-vendor__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

@media (min-width: 992px) {
    .mk-vendor-page .mk-lapak-vendor__sidebar {
        position: sticky;
        top: 12px;
    }
}

/* Dark mode */
html.mk-dark .mk-lapak-vendor {
    background: #0f172a;
}

html.mk-dark .mk-lapak-vendor__cover,
html.mk-dark .mk-lapak-vendor__cover.is-empty {
    background: #334155;
}

html.mk-dark .mk-lapak-vendor__stats li span {
    color: #6ee7b7;
}

html.mk-dark .mk-lapak-product__price {
    color: #60a5fa;
}

html.mk-dark .mk-lapak-product__img {
    background: #1e293b;
}
