/* ============================================================
   PMB HUB - CONSUMIDOR & PÚBLICO
   Design System: Modern Art
   ============================================================ */

/* Hero Section */
.hero-modern {
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

/* ============================================================
   CONSUMIDOR - CAMADA DE PRODUTO
   Escopo fechado para o painel logado.
   ============================================================ */

body[data-authenticated-role="consumidor"] {
    --consumer-sidebar: 268px;
    background: #f8fafc;
}

body[data-authenticated-role="consumidor"] .admin-sidebar.consumer-sidebar {
    width: var(--consumer-sidebar);
    padding: 22px 18px;
    background: #0f172a;
    gap: 18px;
}

body[data-authenticated-role="consumidor"] .admin-main {
    margin-left: var(--consumer-sidebar);
    width: calc(100vw - var(--consumer-sidebar));
    max-width: calc(100vw - var(--consumer-sidebar));
    min-width: 0;
    overflow-x: clip;
}

body[data-authenticated-role="consumidor"] .content-shell {
    width: 100%;
    max-width: 1180px;
    min-width: 0;
    margin: 0 auto;
    padding: 28px 28px 112px;
    overflow-x: clip;
}

body[data-authenticated-role="consumidor"] .content-shell > *,
body[data-authenticated-role="consumidor"] .content-shell section,
body[data-authenticated-role="consumidor"] .content-shell article,
body[data-authenticated-role="consumidor"] .content-shell form {
    max-width: 100%;
    min-width: 0;
}

body[data-authenticated-role="consumidor"] .content-shell p,
body[data-authenticated-role="consumidor"] .content-shell span,
body[data-authenticated-role="consumidor"] .content-shell strong,
body[data-authenticated-role="consumidor"] .content-shell h1,
body[data-authenticated-role="consumidor"] .content-shell h2,
body[data-authenticated-role="consumidor"] .content-shell h3,
body[data-authenticated-role="consumidor"] .content-shell h4 {
    overflow-wrap: anywhere;
}

body[data-authenticated-role="consumidor"] .consumer-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 8px 8px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-authenticated-role="consumidor"] .consumer-sidebar-brand img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
}

body[data-authenticated-role="consumidor"] .consumer-sidebar-brand strong,
body[data-authenticated-role="consumidor"] .consumer-sidebar-brand span {
    display: block;
    min-width: 0;
}

body[data-authenticated-role="consumidor"] .consumer-sidebar-brand strong {
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.15;
}

body[data-authenticated-role="consumidor"] .consumer-sidebar-brand span {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-authenticated-role="consumidor"] .consumer-sidebar-nav,
body[data-authenticated-role="consumidor"] .consumer-sidebar-footer {
    display: grid;
    gap: 6px;
}

body[data-authenticated-role="consumidor"] .consumer-sidebar-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-authenticated-role="consumidor"] .sidebar-link {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    text-align: left;
    text-decoration: none;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

body[data-authenticated-role="consumidor"] .sidebar-link i {
    width: 18px;
    text-align: center;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.68);
}

body[data-authenticated-role="consumidor"] .sidebar-link:hover,
body[data-authenticated-role="consumidor"] .sidebar-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

body[data-authenticated-role="consumidor"] .sidebar-link.active i {
    color: var(--primary, #2eb7a9);
}

body[data-authenticated-role="consumidor"] .consumer-topbar {
    min-height: 72px;
    padding: 0 28px;
    overflow: visible;
}

body[data-authenticated-role="consumidor"] .consumer-topbar-title {
    min-width: 0;
}

body[data-authenticated-role="consumidor"] .consumer-topbar-title h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.2;
}

body[data-authenticated-role="consumidor"] .consumer-topbar-title span {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-authenticated-role="consumidor"] .consumer-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

body[data-authenticated-role="consumidor"] .consumer-icon-btn,
body[data-authenticated-role="consumidor"] .consumer-mobile-logout {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    display: grid;
    place-items: center;
    text-decoration: none;
    cursor: pointer;
}

body[data-authenticated-role="consumidor"] .consumer-cart-btn {
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--primary, #2eb7a9);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(46, 183, 169, 0.22);
}

body[data-authenticated-role="consumidor"] #cartBadgeCount {
    min-width: 23px;
    height: 23px;
    border-radius: 999px;
    background: #f97316;
    color: #fff;
    display: inline-grid;
    place-items: center;
    border: 2px solid #fff;
    padding: 0 6px;
    font-size: 0.74rem;
    font-weight: 950;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.38);
}

body[data-authenticated-role="consumidor"] .consumer-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 900;
    overflow: hidden;
    flex: 0 0 auto;
}

body[data-authenticated-role="consumidor"] .consumer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body[data-authenticated-role="consumidor"] .consumer-account {
    position: relative;
    flex: 0 0 auto;
}

body[data-authenticated-role="consumidor"] .consumer-avatar-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 3px 8px 3px 3px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    cursor: pointer;
}

body[data-authenticated-role="consumidor"] .consumer-avatar-button .consumer-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
}

body[data-authenticated-role="consumidor"] .consumer-avatar-button > i {
    font-size: 0.82rem;
}

body[data-authenticated-role="consumidor"] .consumer-account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(280px, calc(100vw - 24px));
    max-height: min(560px, calc(100vh - 92px));
    overflow: auto;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
    display: none;
    z-index: 1200;
}

body[data-authenticated-role="consumidor"] .consumer-account-menu.open {
    display: grid;
}

body[data-authenticated-role="consumidor"] .consumer-account-head {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid #eef2f7;
}

body[data-authenticated-role="consumidor"] .consumer-account-preview {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    display: grid;
    place-items: center;
    overflow: hidden;
    font-weight: 900;
}

body[data-authenticated-role="consumidor"] .consumer-account-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body[data-authenticated-role="consumidor"] .consumer-account-head strong,
body[data-authenticated-role="consumidor"] .consumer-account-head small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-authenticated-role="consumidor"] .consumer-account-head strong {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 900;
}

body[data-authenticated-role="consumidor"] .consumer-account-head small {
    margin-top: 2px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 750;
}

body[data-authenticated-role="consumidor"] .consumer-account-menu a,
body[data-authenticated-role="consumidor"] .consumer-account-menu button {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #0f172a;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 850;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

body[data-authenticated-role="consumidor"] .consumer-account-menu a:hover,
body[data-authenticated-role="consumidor"] .consumer-account-menu button:hover {
    background: #f1f5f9;
}

body[data-authenticated-role="consumidor"] .consumer-account-menu i {
    color: #64748b;
    font-size: 1rem;
}

body[data-authenticated-role="consumidor"] .consumer-account-menu .is-danger {
    color: #dc2626;
}

body[data-authenticated-role="consumidor"] .consumer-account-menu .is-danger i {
    color: #dc2626;
}

body[data-authenticated-role="consumidor"] .consumer-page-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

body[data-authenticated-role="consumidor"] .consumer-kicker {
    color: var(--primary, #2eb7a9);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 7px;
}

body[data-authenticated-role="consumidor"] .consumer-page-title,
body[data-authenticated-role="consumidor"] .consumer-primary-title {
    margin: 0;
    color: #0f172a;
    letter-spacing: 0;
    line-height: 1.08;
}

body[data-authenticated-role="consumidor"] .consumer-page-title {
    font-size: clamp(1.55rem, 3vw, 2.3rem);
}

body[data-authenticated-role="consumidor"] .consumer-primary-title {
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
}

body[data-authenticated-role="consumidor"] .consumer-page-subtitle,
body[data-authenticated-role="consumidor"] .consumer-muted {
    color: #64748b;
    line-height: 1.55;
    margin: 8px 0 0;
}

body[data-authenticated-role="consumidor"] .consumer-page-subtitle {
    max-width: 700px;
}

body[data-authenticated-role="consumidor"] .consumer-stack {
    display: grid;
    gap: 18px;
}

body[data-authenticated-role="consumidor"] .consumer-card,
body[data-authenticated-role="consumidor"] .surface-card,
body[data-authenticated-role="consumidor"] .location-panel,
body[data-authenticated-role="consumidor"] .plan-status-card,
body[data-authenticated-role="consumidor"] .plan-checkout-card,
body[data-authenticated-role="consumidor"] .plan-how-card,
body[data-authenticated-role="consumidor"] .plan-offer-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

body[data-authenticated-role="consumidor"] .consumer-card {
    padding: 22px;
}

body[data-authenticated-role="consumidor"] .consumer-focus-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 24px;
    border-left: 5px solid var(--primary, #2eb7a9);
}

body[data-authenticated-role="consumidor"] .consumer-focus-number {
    font-size: clamp(2.8rem, 8vw, 5rem);
    line-height: 0.95;
    color: #0f172a;
    font-weight: 950;
    letter-spacing: 0;
}

body[data-authenticated-role="consumidor"] .consumer-action-row,
body[data-authenticated-role="consumidor"] .purchase-actions,
body[data-authenticated-role="consumidor"] .location-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

body[data-authenticated-role="consumidor"] .consumer-stat-grid,
body[data-authenticated-role="consumidor"] .consumer-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 14px;
}

body[data-authenticated-role="consumidor"] .consumer-stat-card {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

body[data-authenticated-role="consumidor"] .consumer-stat-label {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 800;
}

body[data-authenticated-role="consumidor"] .consumer-stat-value {
    margin-top: 6px;
    color: #0f172a;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 950;
}

body[data-authenticated-role="consumidor"] .consumer-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

body[data-authenticated-role="consumidor"] .consumer-section-head h2,
body[data-authenticated-role="consumidor"] .consumer-section-head h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.08rem;
    line-height: 1.2;
}

body[data-authenticated-role="consumidor"] .consumer-order-list,
body[data-authenticated-role="consumidor"] .purchase-list {
    display: grid;
    gap: 12px;
}

body[data-authenticated-role="consumidor"] .consumer-order-card,
body[data-authenticated-role="consumidor"] .purchase-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: inherit;
}

body[data-authenticated-role="consumidor"] .consumer-order-main,
body[data-authenticated-role="consumidor"] .purchase-main {
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 0;
}

body[data-authenticated-role="consumidor"] .consumer-order-main img,
body[data-authenticated-role="consumidor"] .purchase-main img,
body[data-authenticated-role="consumidor"] .consumer-thumb {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
    background: #f1f5f9;
    flex: 0 0 auto;
}

body[data-authenticated-role="consumidor"] .consumer-order-title,
body[data-authenticated-role="consumidor"] .purchase-title {
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.25;
}

body[data-authenticated-role="consumidor"] .consumer-order-meta,
body[data-authenticated-role="consumidor"] .purchase-meta {
    margin-top: 4px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 650;
}

body[data-authenticated-role="consumidor"] .consumer-status,
body[data-authenticated-role="consumidor"] .purchase-filter-btn,
body[data-authenticated-role="consumidor"] .active-order-filter {
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
}

body[data-authenticated-role="consumidor"] .consumer-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #ecfdf5;
    color: #047857;
}

body[data-authenticated-role="consumidor"] .purchase-filter-row,
body[data-authenticated-role="consumidor"] .active-order-filter-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

body[data-authenticated-role="consumidor"] .purchase-filter-row::-webkit-scrollbar,
body[data-authenticated-role="consumidor"] .active-order-filter-row::-webkit-scrollbar {
    display: none;
}

body[data-authenticated-role="consumidor"] .purchase-filter-btn,
body[data-authenticated-role="consumidor"] .active-order-filter {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    min-height: 38px;
    padding: 0 14px;
    cursor: pointer;
    white-space: nowrap;
}

body[data-authenticated-role="consumidor"] .purchase-filter-btn.active,
body[data-authenticated-role="consumidor"] .active-order-filter.active {
    border-color: var(--primary, #2eb7a9);
    background: var(--primary-soft, #e7f8f5);
    color: #0f766e;
}

body[data-authenticated-role="consumidor"] .consumer-empty-state {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 34px 18px;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
}

body[data-authenticated-role="consumidor"] .consumer-empty-state i {
    color: var(--primary, #2eb7a9);
    font-size: 2rem;
}

body[data-authenticated-role="consumidor"] .field,
body[data-authenticated-role="consumidor"] .location-input,
body[data-authenticated-role="consumidor"] select,
body[data-authenticated-role="consumidor"] textarea {
    max-width: 100%;
    min-width: 0;
}

body[data-authenticated-role="consumidor"] .consumer-profile-grid,
body[data-authenticated-role="consumidor"] .location-form-grid,
body[data-authenticated-role="consumidor"] .plan-page-grid,
body[data-authenticated-role="consumidor"] .plan-checkout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 14px;
}

body[data-authenticated-role="consumidor"] .location-field-full,
body[data-authenticated-role="consumidor"] .location-card,
body[data-authenticated-role="consumidor"] .locations-grid {
    min-width: 0;
    max-width: 100%;
}

body[data-authenticated-role="consumidor"] .locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 14px;
}

body[data-authenticated-role="consumidor"] .location-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    padding: 18px;
}

body[data-authenticated-role="consumidor"] .location-card.is-default {
    border-color: var(--primary, #2eb7a9);
}

body[data-authenticated-role="consumidor"] .location-map-card,
body[data-authenticated-role="consumidor"] .cart-modal-card {
    width: min(720px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    overflow: auto;
}

body[data-authenticated-role="consumidor"] #cartModal {
    padding: 12px;
}

body[data-authenticated-role="consumidor"] .mobile-bottom-nav {
    height: 68px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    gap: 4px;
}

body[data-authenticated-role="consumidor"] .mobile-bottom-nav .mobile-nav-link {
    min-width: 0;
    border: 0;
    background: transparent;
    color: #64748b;
    display: grid;
    place-items: center;
    gap: 3px;
    font: inherit;
    font-size: 0.66rem;
    font-weight: 850;
    text-decoration: none;
}

body[data-authenticated-role="consumidor"] .mobile-bottom-nav .mobile-nav-link i {
    font-size: 1.12rem;
}

body[data-authenticated-role="consumidor"] .mobile-bottom-nav .mobile-nav-link.active,
body[data-authenticated-role="consumidor"] .mobile-bottom-nav .mobile-cart-link {
    color: var(--primary, #2eb7a9);
}

body[data-authenticated-role="consumidor"] .mobile-more-sheet {
    width: min(420px, calc(100vw - 24px));
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(110%);
    border-radius: 18px 18px 0 0;
    padding: 12px;
}

body[data-authenticated-role="consumidor"] .mobile-more-sheet.open {
    transform: translateX(-50%) translateY(0);
}

body[data-authenticated-role="consumidor"] .mobile-more-item {
    min-height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
    text-decoration: none;
    font-weight: 850;
}

/* Busca publica do consumidor */
.consumer-search-first {
    max-width: 920px;
    margin: 0 auto;
}

.search-portal-hero {
    text-align: left;
    border-radius: 0 0 28px 28px;
}

.search-portal-hero .page-shell {
    max-width: 1040px;
}

.dashboard-fusion-header {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.guided-search-wrap {
    width: min(920px, 100%);
}

.unified-search-box {
    border-radius: 18px;
}

.active-orders-section,
#resultsGrid,
#gridContainer {
    max-width: 100%;
    min-width: 0;
}

.active-orders-section {
    margin-top: 22px;
}

@media (max-width: 1024px) {
    body[data-authenticated-role="consumidor"] .admin-sidebar.consumer-sidebar {
        display: none;
    }

    body[data-authenticated-role="consumidor"] .admin-main {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }

    body[data-authenticated-role="consumidor"] .content-shell {
        padding: 22px 18px 104px;
    }
}

@media (max-width: 760px) {
    body[data-authenticated-role="consumidor"] .consumer-topbar {
        min-height: 66px;
        padding: 0 14px;
        gap: 8px;
    }

    body[data-authenticated-role="consumidor"] .consumer-topbar-title h2 {
        font-size: 1rem;
    }

    body[data-authenticated-role="consumidor"] .consumer-topbar-title span {
        max-width: 150px;
    }

    body[data-authenticated-role="consumidor"] .consumer-icon-btn,
    body[data-authenticated-role="consumidor"] .consumer-mobile-logout,
    body[data-authenticated-role="consumidor"] .consumer-avatar {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    body[data-authenticated-role="consumidor"] .consumer-avatar-button {
        height: 38px;
        padding: 2px 7px 2px 2px;
    }

    body[data-authenticated-role="consumidor"] .consumer-avatar-button .consumer-avatar {
        width: 34px;
        height: 34px;
        border-radius: 999px;
    }

    body[data-authenticated-role="consumidor"] .consumer-account-menu {
        right: 0;
        width: min(280px, calc(100vw - 18px));
        max-height: min(540px, calc(100vh - 86px));
    }

    body[data-authenticated-role="consumidor"] .consumer-cart-btn {
        width: 42px;
        height: 38px;
        min-height: 38px;
        padding: 0;
        justify-content: center;
        position: relative;
    }

    body[data-authenticated-role="consumidor"] .consumer-cart-label {
        display: none;
    }

    body[data-authenticated-role="consumidor"] #cartBadgeCount {
        position: absolute;
        top: -6px;
        right: -7px;
        min-width: 19px;
        height: 19px;
        background: #ef4444;
    }

    body[data-authenticated-role="consumidor"] .consumer-page-intro,
    body[data-authenticated-role="consumidor"] .consumer-focus-card,
    body[data-authenticated-role="consumidor"] .consumer-order-card,
    body[data-authenticated-role="consumidor"] .purchase-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    body[data-authenticated-role="consumidor"] .consumer-page-intro {
        display: grid;
        gap: 12px;
    }

    body[data-authenticated-role="consumidor"] .consumer-action-row,
    body[data-authenticated-role="consumidor"] .purchase-actions,
    body[data-authenticated-role="consumidor"] .location-actions {
        justify-content: stretch;
    }

    body[data-authenticated-role="consumidor"] .consumer-action-row > *,
    body[data-authenticated-role="consumidor"] .purchase-actions > *,
    body[data-authenticated-role="consumidor"] .location-actions > * {
        width: 100%;
    }

    body[data-authenticated-role="consumidor"] .consumer-order-main,
    body[data-authenticated-role="consumidor"] .purchase-main {
        align-items: flex-start;
    }

    body[data-authenticated-role="consumidor"] .consumer-card,
    body[data-authenticated-role="consumidor"] .surface-card,
    body[data-authenticated-role="consumidor"] .location-panel,
    body[data-authenticated-role="consumidor"] .plan-status-card,
    body[data-authenticated-role="consumidor"] .plan-checkout-card,
    body[data-authenticated-role="consumidor"] .plan-how-card,
    body[data-authenticated-role="consumidor"] .plan-offer-card {
        border-radius: 14px;
    }

    .search-portal-hero {
        padding: 42px 0 82px;
        border-radius: 0 0 22px 22px;
    }

    .guided-search-wrap {
        margin-top: -52px;
    }

    .dashboard-fusion-header {
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    body[data-authenticated-role="consumidor"] .content-shell {
        padding: 18px 12px 102px;
    }

    body[data-authenticated-role="consumidor"] .consumer-topbar-title span {
        display: none;
    }

    body[data-authenticated-role="consumidor"] .consumer-mobile-logout {
        display: none;
    }

    body[data-authenticated-role="consumidor"] .consumer-avatar-button {
        padding-right: 2px;
    }

    body[data-authenticated-role="consumidor"] .consumer-avatar-button > i {
        display: none;
    }

    body[data-authenticated-role="consumidor"] .consumer-avatar-button .consumer-avatar {
        display: grid;
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: radial-gradient(circle at 90% 10%, rgba(155, 212, 58, 0.1) 0%, transparent 40%),
                radial-gradient(circle at 10% 90%, rgba(46, 183, 169, 0.1) 0%, transparent 40%);
}

.hero-content {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: center;
    justify-content: space-between;
}

.hero-text {
    flex: 1.2;
    min-width: 300px;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--secondary);
    font-weight: 900;
}

.hero-text p {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 48px;
}

.hero-image {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-visual-logo {
    width: 100%;
    max-width: 450px;
    filter: drop-shadow(0 20px 40px rgba(46, 183, 169, 0.2));
    animation: float 6s ease-in-out infinite;
}

/* Search Portal Hero (Consumer Dash) */
.search-portal-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 80px 0 140px;
    color: #fff;
    text-align: center;
    border-radius: 0 0 40px 40px;
}

.guided-search-wrap {
    max-width: 860px;
    margin: -70px auto 0;
    position: relative;
    z-index: 20;
}

.unified-search-box {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    display: grid;
    gap: 28px;
}

.search-row-layout {
    display: flex;
    gap: 12px;
    background: var(--bg-strong);
    padding: 8px;
    border-radius: 18px;
    border: 1px solid var(--line);
}

.search-row-layout input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    outline: none;
}

.search-row-layout .btn-execute {
    background: var(--primary);
    color: #fff;
    padding: 14px 32px;
    border-radius: 14px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.search-row-layout .btn-execute:hover {
    background: var(--primary-strong);
}

/* Category Cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.category-card {
    background: white;
    padding: 24px 12px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.category-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-premium);
}

.category-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    border-radius: 16px;
    color: var(--primary);
    font-size: 1.75rem;
}

.category-label {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--secondary);
    letter-spacing: 0.05em;
    text-align: center;
}

/* Public Vitrine / Product Cards */
.product-grid-public {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 24px;
}

.product-card-premium {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card-premium:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary-soft);
}

/* Results Grid & View Modes */
.results-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
    padding: 80px 0;
}

.product-surface-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-surface-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    border-color: var(--primary-soft);
}

.filter-pills-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-pills-row .pill-filter {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.1;
    white-space: nowrap;
    cursor: pointer;
}

.filter-pills-row .pill-filter input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
    flex: 0 0 auto;
}

.filter-pills-row .pill-filter.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}

.filter-pills-row .search-sort-select {
    min-width: 164px;
    min-height: 44px;
    max-width: 100%;
    padding: 0 40px 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background-color: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 44px;
    white-space: nowrap;
    cursor: pointer;
    appearance: auto;
}

.filter-pills-row .search-sort-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.filter-pills-row .search-sort-select option {
    color: #0f172a;
    background: #fff;
}

.view-toggle-bar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 4px;
}

.view-toggle-btn {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-muted);
    display: grid;
    place-items: center;
    cursor: pointer;
}

.view-toggle-btn.active {
    background: var(--primary);
    color: #fff;
}

.consumer-filter-nav {
    display: none;
}

.consumer-filter-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-decoration: none;
}

.consumer-filter-link.active {
    color: var(--primary);
}

.consumer-filter-link svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.4;
}

/* Active Orders & Status */
.active-orders-section {
    margin-top: -40px;
    position: relative;
    z-index: 30;
}

.pinned-order-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 2px solid var(--primary);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
    cursor: pointer;
    transition: 0.3s;
}

.status-badge-live {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--primary-soft);
    color: var(--primary);
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(79, 70, 229, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
}

@media (max-width: 600px) {
    html,
    body {
        overflow-x: hidden;
    }

    .consumer-filter-nav {
        position: sticky;
        top: 76px;
        z-index: 40;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 10px;
        margin-bottom: 16px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    }

    .guided-search-wrap {
        width: 100%;
        margin-top: 0;
    }

    .search-row-layout {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
        gap: 16px;
    }

    .search-row-layout input {
        background: var(--bg-strong);
        border-radius: 14px;
        border: 1px solid var(--line);
    }

    .search-row-layout .btn-execute {
        width: 100%;
        padding: 18px;
    }

    .unified-search-box {
        padding: 18px;
        border-radius: 18px;
    }

    .filter-pills-row {
        justify-content: stretch;
        gap: 8px;
    }

    .filter-pills-row > * {
        min-width: 0;
    }

    .filter-pills-row .pill-filter {
        flex: 1 1 calc(50% - 4px);
        min-width: min(100%, 138px);
        padding: 10px 12px;
        font-size: 0.84rem;
    }

    .filter-pills-row > div {
        display: none;
    }

    .filter-pills-row .search-sort-select {
        flex: 1 1 100%;
        width: 100% !important;
        min-width: 0;
        height: 46px;
        line-height: 46px;
    }

    .results-product-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
        padding: 32px 0 96px;
    }

    #gridContainer {
        width: 100%;
    }

    .product-surface-card {
        width: 100%;
        max-width: 100%;
    }

    .product-surface-card[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .product-surface-card > div:first-child {
        border-right: 0 !important;
        border-bottom: 1px solid var(--line);
        min-height: 220px;
    }

    .product-list-item {
        flex-wrap: wrap;
        gap: 12px;
    }

    .view-toggle-bar {
        display: none;
    }
}

/* Consumer final overrides */
body[data-authenticated-role="consumidor"] .consumer-nested-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: none;
    padding: 16px;
}

body[data-authenticated-role="consumidor"] .consumer-profile-form {
    display: grid;
    gap: 16px;
}

body[data-authenticated-role="consumidor"] .consumer-sticky-actions {
    position: sticky;
    bottom: 82px;
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
    background: linear-gradient(to top, #fff 65%, rgba(255, 255, 255, 0));
}

body[data-authenticated-role="consumidor"] .consumer-sticky-actions .btn {
    min-width: 180px;
}

body[data-authenticated-role="consumidor"] .location-field-full {
    grid-column: 1 / -1;
}

body[data-authenticated-role="consumidor"] .location-address {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    color: #334155;
    line-height: 1.45;
}

body[data-authenticated-role="consumidor"] .location-edit {
    margin-top: 14px;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

body[data-authenticated-role="consumidor"] .location-edit summary {
    cursor: pointer;
    color: #0f172a;
    font-weight: 850;
}

body[data-authenticated-role="consumidor"] .plan-page-grid {
    align-items: start;
}

body[data-authenticated-role="consumidor"] .plan-offer-card,
body[data-authenticated-role="consumidor"] .plan-status-card,
body[data-authenticated-role="consumidor"] .plan-checkout-card,
body[data-authenticated-role="consumidor"] .plan-how-card {
    padding: 22px;
}

body[data-authenticated-role="consumidor"] .plan-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin: 14px 0;
    color: #0f172a;
}

body[data-authenticated-role="consumidor"] .plan-price span:nth-child(2) {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 950;
}

body[data-authenticated-role="consumidor"] .plan-feature-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 18px 0;
    list-style: none;
}

body[data-authenticated-role="consumidor"] .plan-feature-list li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    color: #334155;
    font-weight: 700;
}

body[data-authenticated-role="consumidor"] .plan-feature-list i {
    color: var(--primary, #2eb7a9);
}

body[data-authenticated-role="consumidor"] .pmb-csp-1920 {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #e2e8f0;
}

body[data-authenticated-role="consumidor"] .pmb-csp-1920 span:last-child {
    white-space: nowrap;
    font-weight: 850;
}

body[data-authenticated-role="consumidor"] .plan-checkout-grid img,
body[data-authenticated-role="consumidor"] .pmb-csp-1896 img,
body[data-authenticated-role="consumidor"] .pmb-csp-0127 img {
    max-width: min(260px, 100%);
    height: auto;
    display: block;
    margin: 0 auto;
}

body[data-authenticated-role="consumidor"] textarea.field,
body[data-authenticated-role="consumidor"] .pmb-csp-1900,
body[data-authenticated-role="consumidor"] .pmb-csp-1965 {
    width: 100%;
    max-width: 100%;
    min-height: 112px;
    resize: vertical;
    overflow-wrap: anywhere;
}

body[data-authenticated-role="consumidor"] .btn {
    white-space: normal;
}

.search-portal-hero {
    text-align: left;
    border-radius: 0 0 28px 28px;
}

.search-portal-hero .page-shell {
    max-width: 1040px;
}

.consumer-search-first {
    width: min(920px, 100%);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.active-orders-section,
#resultsGrid,
#gridContainer {
    max-width: 100%;
    min-width: 0;
}

.active-orders-section {
    margin-top: 22px;
}

body.consumer-search-page {
    overflow-x: hidden;
}

body.consumer-search-page.has-active-order-bar .page-block {
    padding-bottom: 132px;
}

body.consumer-search-page #pmbActiveOrdersBar {
    left: 50%;
    right: auto;
    bottom: max(14px, env(safe-area-inset-bottom));
    width: min(720px, calc(100vw - 24px));
    transform: translateX(-50%);
    z-index: 120;
    animation: none;
}

body.consumer-search-page #pmbActiveOrdersBar .surface-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid var(--primary, #2eb7a9);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

body.consumer-search-page #pmbActiveOrdersBar .pmb-csp-0898 {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.consumer-search-page #pmbActiveOrdersBar .pmb-csp-1620 {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    flex: 0 0 auto;
}

body.consumer-search-page #pmbActiveOrdersBar .pmb-csp-1621,
body.consumer-search-page #pmbActiveOrdersBar .pmb-csp-1622 {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.consumer-search-page #pmbActiveOrdersBar .pmb-csp-1621 {
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 900;
}

body.consumer-search-page #pmbActiveOrdersBar .pmb-csp-1622 {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
}

body.consumer-search-page #pmbTrackOrderBtn {
    min-height: 40px;
    border-radius: 12px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

body.consumer-search-page .public-topbar {
    z-index: 800;
}

body.consumer-search-page .public-topbar .topbar-inner {
    min-width: 0;
    gap: 14px;
}

body.consumer-search-page .public-topbar .brand-modern,
body.consumer-search-page .public-topbar .topbar-actions,
body.consumer-search-page .public-consumer-header-actions {
    min-width: 0;
}

body.consumer-search-page .public-topbar .brand-modern {
    flex: 0 1 auto;
}

body.consumer-search-page .public-topbar .brand-text,
body.consumer-search-page .public-topbar .brand-name {
    min-width: 0;
}

body.consumer-search-page .public-topbar .brand-name {
    display: block;
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.consumer-search-page .public-topbar .topbar-actions {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    overflow: visible;
}

body.consumer-search-page .public-consumer-header-actions {
    max-width: 100%;
}

@media (max-width: 760px) {
    body[data-authenticated-role="consumidor"] .consumer-sticky-actions {
        bottom: 70px;
        justify-content: stretch;
    }

    body[data-authenticated-role="consumidor"] .consumer-sticky-actions .btn {
        width: 100%;
        min-width: 0;
    }

    body[data-authenticated-role="consumidor"] .plan-offer-card,
    body[data-authenticated-role="consumidor"] .plan-status-card,
    body[data-authenticated-role="consumidor"] .plan-checkout-card,
    body[data-authenticated-role="consumidor"] .plan-how-card {
        padding: 18px;
    }

    body[data-authenticated-role="consumidor"] .pmb-csp-1920 {
        display: grid;
    }

    body.consumer-search-page.has-active-order-bar .page-block {
        padding-bottom: 118px;
    }

    body.consumer-search-page #pmbActiveOrdersBar {
        bottom: max(8px, env(safe-area-inset-bottom));
        width: calc(100vw - 16px);
    }

    body.consumer-search-page #pmbActiveOrdersBar .surface-card {
        gap: 8px;
        padding: 9px 10px;
        border-radius: 14px;
    }

    body.consumer-search-page #pmbActiveOrdersBar .pmb-csp-1620 {
        display: none;
    }

    body.consumer-search-page #pmbActiveOrdersBar .pmb-csp-1621 {
        font-size: 0.82rem;
    }

    body.consumer-search-page #pmbActiveOrdersBar .pmb-csp-1622 {
        max-width: 100%;
        font-size: 0.7rem;
    }

    body.consumer-search-page #pmbTrackOrderBtn {
        min-height: 38px;
        padding: 0 10px;
        font-size: 0.78rem;
    }

    body.consumer-search-page .public-topbar .page-shell {
        width: min(100% - 16px, 1180px) !important;
    }

    body.consumer-search-page .public-topbar .topbar-inner {
        gap: 10px !important;
    }

    body.consumer-search-page .public-topbar .brand-modern {
        flex: 0 0 auto;
        gap: 0;
    }

    body.consumer-search-page .public-topbar .brand-text {
        display: none;
    }

    body.consumer-search-page .public-topbar .logo-cube {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    body.consumer-search-page .public-topbar .topbar-actions {
        flex: 1 1 auto;
        max-width: none !important;
        overflow: visible !important;
    }

    body.consumer-search-page .public-consumer-header-actions {
        width: 100%;
        max-width: none;
        justify-content: flex-end;
        gap: 6px;
    }

    body.consumer-search-page .public-location-chip {
        flex: 1 1 auto;
        width: auto;
        max-width: 168px;
        min-width: 0;
        min-height: 38px;
        padding: 7px 9px;
        justify-content: flex-start;
    }

    body.consumer-search-page .public-location-chip span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.consumer-search-page .public-header-action {
        width: 38px;
        height: 38px;
        min-height: 38px;
        flex: 0 0 38px;
        padding: 0;
        border-radius: 11px;
    }

    body.consumer-search-page .public-header-action span {
        display: none;
    }
}

@media (max-width: 380px) {
    body.consumer-search-page .public-location-chip {
        max-width: 142px;
    }
}
