/* UNIMART Commerce Products — /commerce/ marketplace
   Brand: orange #f68b1e · slate #2c3e50 · white professional shell */

/* ── Page shell — white bg ── */
body.commerce-products-active .content-wrapper.full-width,
body.commerce-products-active .content-wrapper.full-width .content-inner,
body.commerce-products-active .content-inner,
body.services-products-active .content-wrapper.full-width,
body.services-products-active .content-wrapper.full-width .content-inner,
body.services-products-active .content-inner,
body.opportunities-products-active .content-wrapper.full-width,
body.opportunities-products-active .content-wrapper.full-width .content-inner,
body.opportunities-products-active .content-inner,
body.discover-products-active .content-wrapper.full-width,
body.discover-products-active .content-wrapper.full-width .content-inner,
body.discover-products-active .content-inner,
body.build-products-active .content-wrapper.full-width,
body.build-products-active .content-wrapper.full-width .content-inner,
body.build-products-active .content-inner,
body.business-discovery-active .content-wrapper.full-width,
body.business-discovery-active .content-wrapper.full-width .content-inner,
body.business-discovery-active .content-inner {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    background: var(--unimart-bg-muted) !important;
}

.cp-dashboard {
    --cp-orange: var(--unimart-orange, #f68b1e);
    --cp-orange-dark: var(--primary);
    --cp-slate: var(--unimart-slate, #2c3e50);
    --cp-white: #ffffff;
    --cp-muted: var(--gray);
    --cp-text: #2c3e50;
    --cp-surface: var(--unimart-bg-muted);
    --cp-radius-md: 10px;
    --cp-pad-x: 1rem;
    width: 100%;
    background: var(--unimart-bg-muted);
    color: var(--cp-text);
    padding-bottom: 1.5rem;
}

.cp-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--cp-pad-x);
}

@media (min-width: 768px) {
    .cp-wrap { padding: 0 1.25rem; }
}

/* ── Hero ── */
.cp-hero {
    padding: 0.85rem 0 0.6rem;
}

.cp-hero__brand {
    margin: 0 0 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cp-muted);
}

.cp-hero__brand span { color: var(--cp-orange); }

.cp-hero__greeting {
    margin: 0 0 0.15rem;
    font-size: clamp(1.2rem, 4vw, 1.45rem);
    font-weight: 700;
    color: var(--cp-slate);
    line-height: 1.25;
}

.cp-hero__sub {
    margin: 0;
    font-size: 0.8rem;
    color: var(--cp-muted);
}

/* ── Psychology-first hero ── */
.cp-hero--psych {
    padding-bottom: 0.15rem;
}

.cp-hero--compact {
    margin-bottom: 0.1rem;
    padding-bottom: 0;
}

.cp-hero--compact .cp-hero__greeting {
    font-size: 1.28rem;
    margin-bottom: 0.25rem;
}

.cp-wrap--intent {
    margin-bottom: 0.35rem;
    padding-left: 0;
    padding-right: 0;
}

.cp-hero__hook {
    margin: 0.45rem 0 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--cp-muted);
    max-width: 36rem;
}

.cp-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.cp-trust__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.58rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--cp-slate);
    background: #fff;
    border: 1px solid var(--unimart-border, #e5e7eb);
}

.cp-trust__pill i {
    color: var(--cp-orange);
    font-size: 0.62rem;
}

/* ── Category shortcut chips (recognition > recall) ── */
.cp-cat-chips {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0.15rem 0 0.65rem;
    padding-bottom: 0.15rem;
}

.cp-cat-chips::-webkit-scrollbar {
    display: none;
}

.cp-cat-chip {
    flex: 0 0 auto;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--cp-slate);
    background: #fff;
    border: 1px solid var(--unimart-border, #e5e7eb);
    white-space: nowrap;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.cp-cat-chip:hover {
    border-color: rgba(246, 139, 30, 0.4);
    background: rgba(246, 139, 30, 0.06);
    color: var(--cp-slate);
    text-decoration: none;
}

.cp-cat-chip--all {
    color: var(--cp-orange);
    border-color: rgba(246, 139, 30, 0.28);
    background: rgba(246, 139, 30, 0.06);
}

.cp-cat-chip__count {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--cp-muted);
    background: rgba(15, 23, 42, 0.06);
    padding: 0.08rem 0.35rem;
    border-radius: 999px;
    margin-left: 0.15rem;
}

.cp-cat-chips--learn .cp-cat-chip i {
    color: var(--cp-orange);
    font-size: 0.68rem;
}

.cp-trust__pill--urgent {
    color: var(--danger, #dc3545);
    border-color: rgba(220, 53, 69, 0.25);
    background: rgba(220, 53, 69, 0.06);
}

.cp-trust__pill--urgent i {
    color: var(--danger, #dc3545);
}

.cp-dashboard--opportunity .cp-section--featured {
    border-color: rgba(59, 130, 246, 0.2);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.04) 0%, #fff 100%);
}

.cp-dashboard--opportunity .cp-section--featured .cp-section__title i {
    color: var(--info, #3b82f6);
}

/* ── Earn / services layer ── */
.cp-dashboard--service .cp-section--featured {
    border-color: rgba(246, 139, 30, 0.22);
    background: linear-gradient(180deg, rgba(246, 139, 30, 0.05) 0%, #fff 100%);
}

.cp-trust--earn .cp-trust__pill i {
    color: var(--cp-orange);
}

.cp-cat-chips--earn .cp-cat-chip i {
    color: var(--cp-orange);
    font-size: 0.68rem;
    margin-right: 0.15rem;
}

.cp-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.65rem;
}

.cp-hero-cta {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    min-width: 8.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--cp-radius-md);
    text-decoration: none;
    color: var(--cp-slate);
    background: #fff;
    border: 1px solid var(--unimart-border, #e5e7eb);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cp-hero-cta:hover {
    border-color: rgba(246, 139, 30, 0.35);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    text-decoration: none;
    color: var(--cp-slate);
}

.cp-hero-cta--primary {
    background: linear-gradient(135deg, rgba(246, 139, 30, 0.12) 0%, #fff 100%);
    border-color: rgba(246, 139, 30, 0.35);
}

.cp-hero-cta i {
    color: var(--cp-orange);
    font-size: 0.85rem;
}

.cp-hero-cta__label {
    font-size: 0.78rem;
    font-weight: 700;
}

.cp-hero-cta__sub {
    font-size: 0.65rem;
    color: var(--cp-muted);
    line-height: 1.3;
}

.cp-skill-chips {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
}

.cp-skill-chips::-webkit-scrollbar {
    display: none;
}

.cp-skill-chip {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 6.5rem;
    padding: 0.55rem 0.7rem;
    border-radius: var(--cp-radius-md);
    text-decoration: none;
    color: var(--cp-slate);
    background: #fff;
    border: 1px solid var(--unimart-border, #e5e7eb);
}

.cp-skill-chip:hover {
    border-color: rgba(246, 139, 30, 0.35);
    text-decoration: none;
    color: var(--cp-slate);
}

.cp-skill-chip--hot {
    border-color: rgba(246, 139, 30, 0.4);
    background: rgba(246, 139, 30, 0.06);
}

.cp-skill-chip__name {
    font-size: 0.78rem;
    font-weight: 600;
}

.cp-skill-chip__meta {
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--cp-orange);
}

.cp-dashboard--service .sp-nav {
    margin: 0.35rem 0 0.65rem;
}

.cp-dashboard--service .sp-section {
    margin-bottom: 0.85rem;
}

/* ── Sections ── */
.cp-section {
    margin-bottom: 1rem;
    padding: 0.5rem 0 0;
}

.cp-section__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.cp-section__intro {
    min-width: 0;
}

.cp-section__sub {
    margin: 0.12rem 0 0;
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--cp-muted);
}

.cp-section--featured {
    padding: 0.55rem 0.65rem 0.35rem;
    margin-bottom: 0.85rem;
    border-radius: var(--cp-radius-md);
    background: #fff;
    border: 1px solid rgba(246, 139, 30, 0.18);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.cp-section--featured .cp-section__title i {
    color: var(--cp-orange);
}

.cp-section__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cp-slate);
}

.cp-section__title i {
    color: var(--cp-orange);
    margin-right: 0.35rem;
    font-size: 0.85rem;
}

.cp-section__link {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--cp-orange);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.cp-section__link:hover {
    color: var(--cp-orange-dark);
    text-decoration: underline;
}

.cp-quick {
    margin: 0.6rem 0 0.85rem;
}

.cp-quick__scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
}

.cp-quick__scroll::-webkit-scrollbar { display: none; }

@media (min-width: 768px) {
    .cp-quick__scroll {
        flex-wrap: wrap;
        overflow-x: visible;
    }
}

.cp-quick__btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    color: var(--cp-slate);
    background: var(--cp-white);
    border: 1px solid var(--unimart-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.cp-quick__btn i {
    color: var(--cp-orange);
    font-size: 0.82rem;
}

.cp-quick__btn:hover {
    background: var(--primary-light);
    border-color: rgba(246, 139, 30, 0.35);
    color: var(--cp-slate);
}

.cp-quick__btn--primary {
    background: var(--cp-orange);
    border-color: var(--cp-orange);
    color: #fff;
    box-shadow: 0 2px 6px rgba(246, 139, 30, 0.25);
}

.cp-quick__btn--primary i { color: #fff; }

.cp-quick__btn--primary:hover {
    background: var(--cp-orange-dark);
    border-color: var(--cp-orange-dark);
    color: #fff;
}

/* ── Product grid — compact cards on white shell ── */
.cp-grid .row {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
}

.cp-grid .product-card {
    background: #fff;
    border-radius: var(--cp-radius-md);
    overflow: hidden;
    border: 1px solid var(--primary);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    height: auto;
    min-height: 0;
}

.cp-grid .product-card-link {
    color: var(--cp-slate);
}

.cp-grid .product-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

body.commerce-products-active .cp-grid .product-image {
    aspect-ratio: 1 / 1;
    border-radius: var(--cp-radius-md) var(--cp-radius-md) 0 0;
}

body.commerce-products-active.um-hub-hero-page .cp-grid .product-image {
    aspect-ratio: 1 / 1;
}

body.commerce-products-active .cp-grid .product-info {
    padding: 0.35rem 0.45rem 0.4rem;
}

.cp-grid .product-title {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 0.1rem;
    height: auto;
    max-height: 2.5em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cp-grid .product-price {
    margin: 0.1rem 0 0.05rem;
    line-height: 1.2;
}

.cp-grid .current-price {
    color: var(--cp-orange);
    font-weight: 700;
    font-size: 0.8rem;
}

.cp-grid .old-price {
    font-size: 0.68rem;
    color: var(--gray);
}

.cp-grid .product-rating {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-top: 0.05rem;
    line-height: 1;
}

.cp-grid .stars {
    color: var(--cp-orange);
    font-size: 0.55rem;
    line-height: 1;
}

.cp-grid .rating-count {
    font-size: 0.58rem;
    color: var(--gray);
}

/* Compact seller trust / metadata row */
.cp-grid .seller-trust-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.2rem;
    margin: 0.08rem 0 0.12rem;
    overflow: hidden;
}

.cp-grid .seller-trust-row__badge {
    flex: 0 1 auto;
    min-width: 0;
    font-size: 0.55rem;
    font-weight: 600;
    padding: 0.08rem 0.3rem;
    border-radius: 999px;
    background: var(--unimart-bg-muted);
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-grid .seller-trust-row__badge i {
    font-size: 0.5rem;
}

.cp-grid .seller-trust-row__badge--verified {
    background: rgba(25, 135, 84, 0.1);
    color: var(--success);
}

.cp-grid .seller-trust-row__badge--stars {
    background: rgba(246, 139, 30, 0.1);
    color: var(--primary-dark);
}

.cp-grid .seller-trust-row__badge--business,
.cp-grid .seller-trust-row__badge--top {
    background: rgba(44, 62, 80, 0.08);
    color: var(--cp-slate);
}

/* Cart button — tuned for compact cards */
.cp-add-to-cart {
    position: absolute;
    bottom: 3.6rem;
    right: 6px;
    left: auto;
    z-index: 3;
    opacity: 1;
    transform: none;
}

@media (min-width: 768px) {
    .cp-add-to-cart {
        bottom: 3.75rem;
        left: 6px;
        right: auto;
        opacity: 0;
        transform: translateY(6px);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .cp-grid .product-card:hover .cp-add-to-cart {
        opacity: 1;
        transform: translateY(0);
    }
}

.cp-grid .add-to-cart-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    box-shadow: 0 2px 6px rgba(241, 120, 15, 0.35);
    font-size: 0.65rem;
    padding: 0.2rem 0.45rem !important;
}

/* ── Horizontal scroll rails (spotlight, trending) ── */
.cp-grid--rail .cp-grid__scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
    margin: 0 -0.15rem;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
}

.cp-grid--rail .cp-grid__scroll::-webkit-scrollbar {
    display: none;
}

/* Match grid column widths: 2-col mobile, 3-col md, 4-col xl */
.cp-grid--rail .cp-grid__item {
    flex: 0 0 calc(50% - 0.25rem);
    max-width: calc(50% - 0.25rem);
    min-width: 0;
}

@media (min-width: 768px) {
    .cp-grid--rail .cp-grid__item {
        flex: 0 0 calc(33.333% - 0.34rem);
        max-width: calc(33.333% - 0.34rem);
    }
}

@media (min-width: 1200px) {
    .cp-grid--rail .cp-grid__item {
        flex: 0 0 calc(25% - 0.375rem);
        max-width: calc(25% - 0.375rem);
    }
}

.cp-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--cp-muted);
}

.cp-empty i {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--cp-orange);
}

.cp-empty p { margin: 0; font-size: 0.85rem; }

/* Geo badge legibility on cards */
.cp-grid .geo-badge,
.cp-grid .sale-badge {
    font-size: 0.55rem;
    padding: 0.12rem 0.32rem;
}

.cp-grid .wishlist-toggle,
.cp-grid a[title="Save to wishlist"] {
    width: 24px !important;
    height: 24px !important;
    margin: 0.35rem !important;
}

.sp-layer-discover__grid { display: grid; gap: 0.75rem; }
@media (min-width: 640px) { .sp-layer-discover__grid { grid-template-columns: repeat(2, 1fr); } }
.sp-layer-discover__card {
    display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.85rem 1rem;
    border-radius: 10px; border: 1px solid rgba(15, 23, 42, 0.08); background: #fff;
    text-decoration: none; color: inherit;
}
.sp-layer-discover__icon {
    flex-shrink: 0; width: 2.25rem; height: 2.25rem; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(246, 139, 30, 0.12); color: var(--primary);
}
.sp-layer-discover__body { flex: 1; min-width: 0; }
.sp-layer-discover__body strong { display: block; font-size: 0.92rem; margin-bottom: 0.2rem; }
.sp-layer-discover__body p { margin: 0; font-size: 0.78rem; color: var(--gray); line-height: 1.4; }
.sp-layer-discover__badge {
    display: inline-block; font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--primary); margin-bottom: 0.15rem;
}
.sp-layer-discover__arrow { color: var(--gray); margin-top: 0.35rem; font-size: 0.75rem; }
