.shop-bc {
    font-size: 0.88rem;
    color: #6b7c8d;
    margin-bottom: 16px;
}

.shop-bc a {
    color: #003C71;
    text-decoration: none;
}

.shop-bc span {
    margin: 0 6px;
}

.shop-profile {
    background: #fff;
    color: #1d2a38;
    border: 1px solid #e7eef5;
    border-radius: 18px;
    padding: 20px 22px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0, 60, 113, 0.05);
}

.shop-profile-id {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.shop-avatar {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    overflow: hidden;
    background: #eef3f8;
    flex-shrink: 0;
    border: 1px solid #e7eef5;
}

.shop-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shop-profile-text {
    min-width: 0;
    flex: 1;
}

.shop-profile-chat {
    margin-left: auto;
    flex-shrink: 0;
    align-self: center;
}

.shop-chat-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.shop-badge {
    display: inline-block;
    background: #eef3f8;
    color: #003C71;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.72rem;
    font-weight: 700;
}

.shop-profile-text h1 {
    font-size: clamp(1.12rem, 2vw, 1.4rem);
    margin: 6px 0 8px;
    font-weight: 700;
    color: #003C71;
    line-height: 1.3;
    word-break: break-word;
}

.shop-profile-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    color: #6b7c8d;
    font-size: 0.86rem;
}

.shop-profile-stats i {
    margin-right: 4px;
    color: #8aa0b5;
}

.shop-stat-rating {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.82rem;
    font-weight: 500;
}

.shop-stat-rating i.fa-star {
    color: #f59e0b;
    margin-right: 2px;
}

.shop-stat-rating strong {
    color: #b45309;
    font-weight: 700;
}

.shop-stat-rating-count {
    color: #78350f;
    opacity: 0.88;
    font-size: 0.78rem;
}

.shop-stat-rating.is-empty {
    background: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0;
}

.shop-stat-rating.is-empty i {
    color: #94a3b8;
}

.shop-stat-rating.is-empty span {
    color: #64748b;
}

.shop-profile-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eef3f8;
}

.shop-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: #5b6b7c;
    text-decoration: none;
    font-size: 0.86rem;
    line-height: 1.3;
}

.shop-link i {
    width: 16px;
    text-align: center;
    color: #003C71;
    flex-shrink: 0;
}

.shop-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-link:hover {
    color: #003C71;
}

.shop-link.is-fb i {
    color: #1877f2;
}

.shop-link.is-line i {
    color: #06c755;
}

.shop-filters {
    background: #fff;
    border: 1px solid #e7eef5;
    border-radius: 18px;
    padding: 16px 18px 18px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0, 60, 113, 0.05);
}

.shop-filters-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef3f8;
}

.shop-filters-title {
    color: #003C71;
    font-weight: 700;
    font-size: 0.95rem;
}

.shop-filters-title i {
    margin-right: 6px;
    opacity: 0.85;
}

.shop-filters-clear {
    color: #6b7c8d;
    font-size: 0.84rem;
    text-decoration: none;
    white-space: nowrap;
}

.shop-filters-clear:hover {
    color: #003C71;
}

.shop-product-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f6f9fc;
    border: 1px solid #dbe6f1;
    border-radius: 12px;
    padding: 6px 6px 6px 14px;
    margin-bottom: 14px;
}

.shop-product-search:focus-within {
    background: #fff;
    border-color: #003C71;
    box-shadow: 0 0 0 3px rgba(0, 60, 113, 0.08);
}

.shop-product-search>i {
    color: #7b8b9c;
    flex-shrink: 0;
}

.shop-product-search input[type="text"] {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    min-width: 0;
    font-size: 0.95rem;
    color: #1d2a38;
}

.shop-product-search input::placeholder {
    color: #93a3b5;
}

.shop-product-search-clear {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7b8b9c;
    border-radius: 50%;
    flex-shrink: 0;
}

.shop-product-search-clear:hover {
    background: #eef3f8;
    color: #1d2a38;
}

.shop-product-search button {
    flex-shrink: 0;
}

.shop-filter-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 12px;
}

.shop-filter-row:last-child {
    margin-bottom: 0;
}

.shop-filter-label {
    color: #6b7c8d;
    font-size: 0.82rem;
    font-weight: 600;
}

.shop-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shop-chip {
    text-decoration: none;
    font-size: 0.86rem;
    line-height: 1.2;
}

.shop-segments {
    display: grid;
    gap: 8px;
    width: 100%;
}

.shop-segments.is-price {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.shop-segments.is-sort {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shop-segment {
    gap: 6px;
    text-decoration: none;
    font-size: 0.82rem;
    line-height: 1.25;
    text-align: center;
}

.shop-segment i {
    font-size: 0.78rem;
    opacity: 0.85;
}

.shop-results-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.shop-results-head h2 {
    font-size: 1.15rem;
    color: #003C71;
    font-weight: 700;
    margin: 0;
}

.shop-results-head span {
    color: #6b7c8d;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    border: 1px solid #e7eef5;
    box-shadow: 0 8px 20px rgba(0, 60, 113, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    color: inherit;
    text-decoration: none;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 28px rgba(0, 60, 113, 0.12);
    color: inherit;
}

.product-thumb {
    aspect-ratio: 1 / 1;
    background: #eef3f8;
    overflow: hidden;
    position: relative;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-thumb-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aacbf;
    font-size: 32px;
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
}

.badge-stock,
.badge-out {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
}

.badge-stock {
    background: #1f8a4c;
}

.badge-out {
    background: #9aa6b2;
}

.product-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 600;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    color: #7b8b9c;
    font-size: 0.78rem;
    margin-top: 6px;
}

.product-meta .is-preorder {
    color: #8a6d12;
    font-weight: 600;
}

.product-foot {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.product-price {
    color: #c1121f;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.2;
}

.product-foot-stats {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-wrap: wrap;
}

.product-rating {
    display: inline-flex;
    align-items: center;
    gap: 2.5px;
    color: #2b3b4c;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
}

.product-rating i {
    color: #f59e0b;
    font-size: 0.72rem;
}

.product-rating-count {
    color: #8aa0b5;
    font-size: 0.72rem;
    font-weight: 500;
}

.product-sold {
    color: #7b8b9c;
    font-size: 0.76rem;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1;
}

.empty-box {
    background: #fff;
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    color: #6b7c8d;
    border: 1px dashed #d5e1ee;
}

.empty-box i {
    font-size: 32px;
    color: #9aacbf;
    display: block;
}

.empty-box .btn-outline-primary {
    border-color: #003C71;
    color: #003C71;
}

.shop-pagination {
    margin-top: 28px;
}

.shop-pagination .pagination {
    gap: 4px;
    flex-wrap: wrap;
}

.shop-pagination .page-link {
    color: #003C71;
    border-color: #dbe6f1;
    border-radius: 10px !important;
    min-width: 38px;
    text-align: center;
    padding: 7px 12px;
}

.shop-pagination .page-link:hover {
    background: #eef3f8;
    border-color: #c5d6e8;
    color: #003C71;
}

.shop-pagination .page-item.active .page-link {
    background: #003C71;
    border-color: #003C71;
    color: #fff;
}

.shop-pagination .page-item.disabled .page-link {
    color: #9aacbf;
    background: #f7fafc;
}

@media (max-width: 991px) {
    .shop-segments.is-price {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .shop-filters {
        padding: 14px;
    }

    .shop-filter-row {
        grid-template-columns: 1fr;
        gap: 6px;
        align-items: start;
    }

    .shop-segments.is-price,
    .shop-segments.is-sort {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-segments.is-sort .shop-segment:first-child {
        grid-column: 1 / -1;
    }

    .shop-segment {
        font-size: 0.78rem;
        min-height: 36px;
    }

    .shop-profile {
        padding: 16px;
    }

    .shop-profile-id {
        align-items: flex-start;
        gap: 12px;
        flex-wrap: wrap;
    }

    .shop-avatar {
        width: 64px;
        height: 64px;
        border-radius: 14px;
    }

    .shop-profile-chat {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
    }

    .shop-chat-open-btn {
        width: 100%;
    }

    .shop-profile-links {
        gap: 10px 14px;
        margin-top: 12px;
        padding-top: 12px;
    }

    .shop-link span {
        white-space: normal;
        word-break: break-word;
    }

    .product-foot {
        padding-top: 8px;
        gap: 3px 6px;
    }

    .product-price {
        font-size: 0.98rem;
    }

    .product-foot-stats {
        width: 100%;
        justify-content: space-between;
    }

    .product-rating {
        font-size: 0.72rem;
    }

    .product-sold {
        font-size: 0.72rem;
        margin-left: auto;
    }
}

/* ── All Shops Directory (หน้ารวมร้านค้าทั้งหมด) ── */
.allshops-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f6fafd 100%);
    border: 1px solid #dbe7f2;
    border-radius: 24px;
    padding: 38px 24px 30px;
    text-align: center;
    margin-bottom: 28px;
    box-shadow: 0 12px 28px rgba(0, 60, 113, 0.04);
}

.allshops-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eaf3fb;
    color: #003C71;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 999px;
    margin-bottom: 12px;
    border: 1px solid #d2e4f5;
}

.allshops-hero h1 {
    color: #003C71;
    font-size: clamp(1.4rem, 2.8vw, 1.95rem);
    font-weight: 700;
    margin: 0 0 8px;
}

.allshops-hero p {
    color: #5b6f84;
    font-size: 0.96rem;
    max-width: 580px;
    margin: 0 auto 20px;
    line-height: 1.55;
}

.allshops-search-form {
    max-width: 540px;
    margin: 0 auto 14px;
}

.allshops-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #cfe0f0;
    border-radius: 999px;
    padding: 4px 6px 4px 18px;
    box-shadow: 0 4px 14px rgba(0, 60, 113, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.allshops-search-box:focus-within {
    border-color: #003C71;
    box-shadow: 0 6px 20px rgba(0, 60, 113, 0.12);
}

.allshops-search-box>i {
    color: #8aa0b6;
    font-size: 1rem;
    margin-right: 10px;
    flex-shrink: 0;
}

.allshops-search-box input {
    border: 0;
    outline: 0;
    width: 100%;
    font-size: 0.92rem;
    color: #1d2a38;
    background: transparent;
}

.allshops-search-clear {
    color: #9aaec2;
    padding: 6px 10px;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.15s ease;
}

.allshops-search-clear:hover {
    color: #d64545;
}

.allshops-search-box .btn {
    border-radius: 999px;
    padding: 7px 18px;
    font-size: 0.88rem;
    flex-shrink: 0;
}

.allshops-summary {
    color: #6c7f93;
    font-size: 0.86rem;
}

.allshops-summary strong {
    color: #003C71;
}

/* Grid ของร้านค้า */
.allshops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.allshop-card {
    background: #ffffff;
    border: 1px solid #e2ecf5;
    border-radius: 18px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(0, 40, 80, 0.03);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.allshop-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 60, 113, 0.1);
    border-color: #bcd4ea;
}

.allshop-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.allshop-avatar {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    overflow: hidden;
    background: #f0f5fa;
    border: 1px solid #e1ecf6;
    flex-shrink: 0;
}

.allshop-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.allshop-head-text {
    min-width: 0;
    flex: 1;
}

.allshop-badge-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #1a7f4b;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.allshop-name {
    font-size: 1.02rem;
    font-weight: 700;
    color: #003C71;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.allshop-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 14px;
}

.allshop-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f4f8fc;
    color: #4a5d70;
    border: 1px solid #e2ecf5;
    border-radius: 8px;
    padding: 3px 9px;
    font-size: 0.78rem;
    font-weight: 600;
}

.allshop-stat-chip.is-rating {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.allshop-stat-chip.is-rating i {
    color: #f59e0b;
}

/* ภาพตัวอย่างสินค้า 3 รูปในร้าน */
.allshop-previews {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px;
    background: #f8fbfe;
    border-radius: 12px;
    border: 1px solid #edf3f8;
}

.allshop-thumb {
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5edf5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.allshop-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.allshop-card:hover .allshop-thumb img {
    transform: scale(1.06);
}

.allshop-thumb.is-empty {
    color: #c0d1e2;
    font-size: 1rem;
    background: #f5f8fb;
}

.allshop-no-previews {
    grid-column: 1 / -1;
    text-align: center;
    color: #8c9fae;
    font-size: 0.8rem;
    padding: 16px 8px;
}

.allshop-card-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f5fa;
}

.allshop-contacts {
    display: flex;
    align-items: center;
    gap: 6px;
}

.allshop-contact-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 8px;
    background: #f0f5fa;
    color: #556c82;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    padding: 0;
    text-decoration: none;
}

.allshop-contact-icon:hover,
.allshop-contact-icon:focus-visible {
    background: #e2edf7;
    color: #0b3d6e;
}

.allshop-btn {
    flex: 1;
    font-size: 0.88rem;
    padding: 8px 12px;
}

/* กรณีค้นหาไม่พบร้าน */
.allshops-empty {
    background: #ffffff;
    border: 1px dashed #cfe0f0;
    border-radius: 24px;
    padding: 56px 24px;
    text-align: center;
    width: 100%;
    margin: 0 0 28px;
    box-shadow: 0 8px 24px rgba(0, 60, 113, 0.03);
}

.allshops-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f4f8fc;
    color: #8aa0b6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 14px;
}

.allshops-empty h3 {
    color: #003C71;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.allshops-empty p {
    color: #6b7c8d;
    font-size: 0.92rem;
    margin: 0 0 18px;
}

/* ── สถานะร้านค้าไม่พบ / ปิดให้บริการ (Shop Status Card) ── */
.shop-status-card {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbfe 100%);
    border: 1px solid #d8e6f3;
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(0, 48, 92, 0.05);
    padding: 56px 24px 44px;
    text-align: center;
    max-width: 580px;
    margin: 30px auto;
}

.shop-status-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 18px;
}

.shop-status-icon.is-danger {
    background: #fde8e8;
    color: #d64545;
    border: 2px solid #f8c8c8;
}

.shop-status-icon.is-warn {
    background: #fef4e6;
    color: #d97706;
    border: 2px solid #fde0b2;
}

.shop-status-card h2 {
    color: #003C71;
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.shop-status-card p {
    color: #5f7387;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 24px;
}

.shop-status-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 575px) {
    .allshops-hero {
        padding: 26px 16px 20px;
        border-radius: 18px;
    }

    .allshops-grid {
        grid-template-columns: 1fr;
    }

    .allshop-card {
        padding: 16px;
    }

    .shop-status-actions {
        flex-direction: column;
    }

    .shop-status-actions .btn {
        width: 100%;
    }
}