:root {
    --bg-1: #fff2d8;
    --bg-2: #dbeeff;
    --panel: #ffffff;
    --ink: #161a1d;
    --muted: #4d5b67;
    --brand: #0b6e4f;
    --brand-2: #f26419;
    --danger: #b42318;
    --ok: #067647;
    --line: #e4e7ec;
    --radius: 16px;
    --shadow: 0 14px 35px rgba(13, 24, 38, 0.09);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    font-family: "Manrope", sans-serif;
    background: radial-gradient(circle at 10% 10%, #fff9eb 0, #fff9eb 18%, transparent 40%), linear-gradient(140deg, var(--bg-1), var(--bg-2));
    min-height: 100vh;
}

.page-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(115deg, rgba(242, 100, 25, 0.06), rgba(11, 110, 79, 0.06)), repeating-linear-gradient(45deg, rgba(255,255,255,0.25), rgba(255,255,255,0.25) 2px, transparent 2px, transparent 10px);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.78);
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.brand-wrap h1 {
    margin: 0;
    font-size: 1rem;
    font-family: "Space Grotesk", sans-serif;
}

.brand-wrap p {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.brand-mark {
    background: linear-gradient(135deg, var(--brand), #13b27d);
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    font-family: "Space Grotesk", sans-serif;
    padding: 0.5rem 0.6rem;
}

.container {
    width: min(1120px, 92%);
    margin: 1.3rem auto 3rem;
}

.top-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.top-links a {
    text-decoration: none;
    color: var(--ink);
    border: 1px solid var(--line);
    background: #fff;
    padding: 0.46rem 0.7rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

/* Retailer compact back-nav (shown on enquiries/orders pages) */
.rp-back-nav a:first-child {
    background: #e8f4ff;
    border-color: #b3d4f5;
    color: #1a56db;
    font-weight: 700;
}

/* Admin portal (Flipkart-like blue surface) */
.admin-theme {
    background: #f1f3f6;
}

.admin-theme .page-bg {
    background-image: linear-gradient(115deg, rgba(40, 116, 240, 0.08), rgba(245, 158, 11, 0.06));
}

.admin-theme .topbar {
    background: #2874f0;
    border-bottom: 0;
}

.admin-theme .brand-wrap h1,
.admin-theme .brand-wrap p {
    color: #fff;
}

.admin-theme .brand-mark {
    background: #fff;
    color: #2874f0;
}

.admin-theme .top-links a {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    color: #fff;
}

.admin-theme .top-links a:hover {
    background: rgba(255,255,255,0.2);
}

.card {
    background: var(--panel);
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem;
    margin-bottom: 1rem;
}

.hero {
    max-width: 700px;
    margin: 4vh auto;
    text-align: center;
}

.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.eyebrow {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
    font-size: 0.75rem;
    margin: 0 0 0.3rem;
    font-weight: 700;
}

h2 {
    margin: 0.2rem 0 0.7rem;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.5rem;
}

.muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.grid-form, .grid-two {
    display: grid;
    gap: 0.8rem;
}

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

.grid-two .full {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--muted);
}

input, button {
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 0.65rem 0.72rem;
    font: inherit;
}

select, textarea {
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 0.65rem 0.72rem;
    font: inherit;
}

button {
    background: linear-gradient(130deg, var(--brand), #059669);
    color: #fff;
    cursor: pointer;
    border: 0;
    font-weight: 700;
}

button:hover { filter: brightness(1.04); }

.row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
}

.boxed {
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.9rem;
}

.product-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.8rem;
    background: linear-gradient(180deg, #fff, #fbfdff);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.09);
}

.product-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #f8fafc;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.search-bar {
    margin-left: auto;
}

.search-bar input {
    min-width: 260px;
}

.product-card h3 { margin: 0.4rem 0; }

.inline-form {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.7rem;
}

.inline-form input {
    flex: 1;
    min-width: 120px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

th, td {
    text-align: left;
    padding: 0.6rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.93rem;
}

.actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.actions a {
    text-decoration: none;
    color: var(--brand);
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.8rem;
}

.stats-grid article {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 0.9rem;
}

.stats-grid h3 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.6rem;
}

.unread-chat-list {
    display: grid;
    gap: 0.65rem;
}

.unread-chat-item {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.75rem;
    background: #ffffff;
}

.unread-chat-item:hover {
    border-color: #d1e9ff;
    background: #f8fbff;
}

.unread-chat-meta {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.unread-chat-item p {
    margin: 0;
    color: #1d2939;
    font-size: 0.9rem;
}

.unread-chat-foot {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.retailer-summary-grid {
    margin-top: 1rem;
}

.retailer-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.retailer-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.retailer-insight-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.retailer-insight-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.retailer-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.retailer-mini-card {
    position: relative;
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid #d6e0ea;
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    background:
        radial-gradient(circle at top right, rgba(40, 116, 240, 0.12), transparent 38%),
        linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
    overflow: hidden;
}

.retailer-mini-card::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: linear-gradient(90deg, #2874f0, #2fbf71);
    opacity: 0.9;
}

.retailer-mini-card:hover {
    transform: translateY(-3px);
    border-color: #b9cdf7;
    box-shadow: 0 16px 32px rgba(40, 116, 240, 0.14);
}

.retailer-mini-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.retailer-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2874f0, #4f9dff);
    color: #fff;
    font-weight: 800;
    font-family: "Space Grotesk", sans-serif;
    box-shadow: 0 8px 18px rgba(40, 116, 240, 0.24);
}

.retailer-mini-name {
    font-size: 1.04rem;
    line-height: 1.25;
    color: #101828;
}

.retailer-mini-sub {
    display: grid;
    gap: 0.18rem;
    color: #475467;
    font-size: 0.88rem;
}

.retailer-mini-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.retailer-mini-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.retailer-score {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 800;
    color: #0b6e4f;
    background: #ecfdf3;
    border: 1px solid #abefc6;
    border-radius: 999px;
    padding: 0.38rem 0.7rem;
}

.unread-count {
    background: #fff5f5;
    border-color: #fecaca;
    color: #b42318;
}

.chip {
    background: #eff8ff;
    color: #175cd3;
    border: 1px solid #d1e9ff;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.78rem;
    text-decoration: none;
}

.rp-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1rem 0 1.1rem;
}

.rp-profile-action-link,
.rp-profile-edit-btn {
    text-decoration: none;
    border-radius: 10px;
    padding: 0.55rem 0.8rem;
    font-weight: 700;
    font-size: 0.86rem;
    border: 1px solid #d0d5dd;
    background: #ffffff;
    color: #1d2939;
}

.rp-profile-action-link:hover,
.rp-profile-edit-btn:hover {
    border-color: #d1e9ff;
    background: #f5f9ff;
}

.rp-profile-action-logout {
    border-color: #fecdca;
    color: #b42318;
    background: #fef3f2;
}

.rp-profile-edit-btn {
    border-color: #b2ddff;
    background: #eff8ff;
    color: #175cd3;
}

.alert {
    border-radius: 10px;
    padding: 0.6rem;
    margin-bottom: 0.8rem;
}

.alert.error {
    background: #fef3f2;
    color: var(--danger);
    border: 1px solid #fecdca;
}

.alert.success {
    background: #ecfdf3;
    color: var(--ok);
    border: 1px solid #abefc6;
}

.chat-box {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.7rem;
    background: #f9fbfc;
    margin-bottom: 0.8rem;
}

.chat-item {
    position: relative;
    margin-bottom: 0;
    padding: 0.6rem 0.72rem;
    border-radius: 14px;
    max-width: min(82%, 560px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.chat-item.admin {
    align-self: flex-end;
    background: linear-gradient(145deg, #e8f1ff, #dce9ff);
    border: 1px solid #b9cdf7;
    border-bottom-right-radius: 6px;
}

.chat-item.retailer {
    align-self: flex-start;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid #dbe3ec;
    border-bottom-left-radius: 6px;
}

.chat-item header {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.chat-time {
    display: block;
    margin-top: 0.28rem;
    font-size: 0.72rem;
    color: #667085;
    text-align: right;
}

.chat-live-strip {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.65rem;
}

.chip-online {
    background: #ecfdf3;
    border-color: #abefc6;
    color: #067647;
}

.chip-offline {
    background: #f2f4f7;
    border-color: #d0d5dd;
    color: #475467;
}

.chat-image-link {
    display: inline-block;
    margin-bottom: 0.45rem;
}

.chat-image {
    max-width: 210px;
    max-height: 210px;
    border-radius: 10px;
    border: 1px solid #d0d5dd;
    object-fit: cover;
}

.chat-upload-form {
    align-items: center;
}

.chat-file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #d0d5dd;
    background: #ffffff;
    color: #344054;
    padding: 0.6rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.chat-file-btn:hover {
    border-color: #d1e9ff;
    background: #f5f9ff;
}

.reveal {
    animation: riseIn 0.5s ease both;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 820px) {
    .split {
        grid-template-columns: 1fr;
    }

    .grid-two {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ================================================================== */
/*  RETAILER PORTAL — Flipkart-style                                   */
/* ================================================================== */

:root {
    --rp-hdr:      #2874f0;
    --rp-hdr-dark: #1a5dc8;
    --rp-hdr-txt:  #ffffff;
    --rp-cat-bg:   #f5f5f5;
    --rp-card-r:   8px;
    --rp-shadow:   0 2px 10px rgba(0,0,0,0.08);
}

.rp-body {
    background: #f1f3f6;
    font-family: "Manrope", sans-serif;
    color: #212121;
}

/* ── Header ──────────────────────────────────── */
.rp-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--rp-hdr);
    box-shadow: 0 1px 6px rgba(0,0,0,0.2);
}

.rp-header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1.4rem;
    max-width: 1280px;
    margin: 0 auto;
}

.rp-logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    flex-shrink: 0;
}

.rp-logo-mark {
    background: #fff;
    color: var(--rp-hdr);
    font-weight: 800;
    font-size: 0.78rem;
    border-radius: 6px;
    padding: 0.28rem 0.5rem;
    font-family: "Space Grotesk", sans-serif;
    letter-spacing: 0.05em;
}

.rp-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.rp-logo-text strong {
    color: #fff;
    font-size: 0.95rem;
    font-family: "Space Grotesk", sans-serif;
}

.rp-logo-text em {
    color: rgba(255,255,255,0.72);
    font-size: 0.7rem;
    font-style: normal;
}

/* Search */
.rp-search-form {
    flex: 1;
    display: flex;
    border-radius: 2px;
    overflow: hidden;
    min-width: 0;
}

.rp-search-form input[type="search"] {
    flex: 1;
    border: 0;
    padding: 0.62rem 0.9rem;
    font: inherit;
    font-size: 0.96rem;
    outline: none;
    background: #fff;
    border-radius: 0;
    min-width: 0;
}

.rp-search-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: #f5a623;
    color: #212121;
    border: 0;
    padding: 0 1.1rem;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 0;
    white-space: nowrap;
}

.rp-search-btn:hover {
    background: #e09815;
    filter: none;
}

/* Actions */
.rp-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

.rp-action-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.42rem 0.7rem;
    border-radius: 4px;
    white-space: nowrap;
    transition: background 0.15s;
}

.rp-action-btn:hover {
    background: var(--rp-hdr-dark);
}

.rp-logout {
    background: rgba(255,255,255,0.12);
}

/* Category bar */
.rp-catbar {
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.rp-catbar-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0 1.4rem;
    gap: 0;
    overflow-x: auto;
    max-width: 1280px;
    margin: 0 auto;
    scrollbar-width: none;
}

.rp-catbar-list::-webkit-scrollbar { display: none; }

.rp-cat-pill {
    display: block;
    padding: 0.58rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #212121;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.rp-cat-pill:hover,
.rp-cat-pill.active {
    color: var(--rp-hdr);
    border-bottom-color: var(--rp-hdr);
}

/* ── Main container ───────────────────────────── */
.rp-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.4rem 3rem;
}

/* ── Banners ──────────────────────────────────── */
.rp-banners {
    border-radius: var(--rp-card-r);
    overflow: hidden;
    margin-bottom: 1.2rem;
    position: relative;
    user-select: none;
}

.rp-banner-viewport {
    position: relative;
    overflow: hidden;
    border-radius: var(--rp-card-r);
}

.rp-banner-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
}

.rp-banner-slide {
    flex: 0 0 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    padding: 2rem 3rem;
}

.rp-slide-1 {
    background: linear-gradient(125deg, #1565c0, #0d47a1 40%, #1976d2);
}

.rp-slide-2 {
    background: linear-gradient(125deg, #00695c, #004d40 40%, #00796b);
}

.rp-slide-3 {
    background: linear-gradient(125deg, #4527a0, #311b92 40%, #512da8);
}

.rp-banner-content {
    color: #fff;
    max-width: 520px;
}

.rp-banner-tag {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 999px;
    padding: 0.18rem 0.7rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.rp-banner-content h2 {
    margin: 0 0 0.35rem;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.7rem;
    color: #fff;
}

.rp-banner-content p {
    margin: 0 0 1rem;
    opacity: 0.85;
    font-size: 0.95rem;
}

.rp-banner-cta {
    display: inline-block;
    background: #fff;
    color: #2874f0;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.5rem 1.4rem;
    border-radius: 4px;
    text-decoration: none;
    transition: opacity 0.15s;
}

.rp-banner-cta:hover { opacity: 0.9; }

.rp-bn-prev, .rp-bn-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.85);
    color: #212121;
    border: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.rp-bn-prev { left: 10px; }
.rp-bn-next { right: 10px; }
.rp-bn-prev:hover, .rp-bn-next:hover { background: #fff; filter: none; }

.rp-bn-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 0.5rem 0 0;
}

.rp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c8c8c8;
    border: 0;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.rp-dot.active {
    background: var(--rp-hdr);
    transform: scale(1.25);
}

/* ── Section ──────────────────────────────────── */
.rp-section {
    margin-bottom: 1.6rem;
}

.rp-section-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #212121;
    margin: 0 0 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.rp-count {
    font-size: 0.8rem;
    font-weight: 500;
    color: #878787;
    background: #ebebeb;
    border-radius: 999px;
    padding: 0.1rem 0.6rem;
}

/* ── Category tiles ───────────────────────────── */
.rp-cat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.7rem;
}

.rp-cat-tile {
    background: #fff;
    border-radius: var(--rp-card-r);
    box-shadow: var(--rp-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    text-decoration: none;
    color: #212121;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
    border: 1px solid transparent;
}

.rp-cat-tile:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.rp-cat-tile.active {
    border-color: #9ec3ff;
    background: #f5f9ff;
}

.rp-cat-icon {
    font-size: 1.8rem;
    line-height: 1;
}

/* ── Product grid ─────────────────────────────── */
.rp-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.8rem;
}

.rp-product-card {
    background: #fff;
    border-radius: var(--rp-card-r);
    box-shadow: var(--rp-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.18s, transform 0.18s;
}

.rp-product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.rp-product-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #f5f5f5;
    overflow: hidden;
}

.rp-product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.rp-product-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #c8c8c8;
}

.rp-product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--rp-hdr);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rp-product-info {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.2rem;
}

.rp-product-brand {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--rp-hdr);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rp-product-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #212121;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rp-product-sku {
    font-size: 0.75rem;
    color: #878787;
    margin: 0;
}

.rp-product-desc {
    font-size: 0.78rem;
    color: #6b7280;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rp-product-bottom {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rp-price {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: #212121;
}

.rp-instock {
    font-size: 0.75rem;
    color: #26a541;
    font-weight: 600;
}

.rp-lowstock {
    font-size: 0.75rem;
    color: #9a6700;
    background: #fff7d6;
    border: 1px solid #f3d26c;
    border-radius: 999px;
    padding: 0.08rem 0.45rem;
    font-weight: 700;
}

.rp-outstock {
    font-size: 0.75rem;
    color: #ff6161;
    font-weight: 600;
}

.rp-view-btn {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    background: #eef4ff;
    color: #1a56db;
    border: 1px solid #c9dcff;
    border-radius: 4px;
    padding: 0.4rem 0.55rem;
    font-weight: 700;
    font-size: 0.8rem;
}

.rp-view-btn:hover {
    background: #dfeaff;
}

.rp-enquiry-form {
    display: flex;
    gap: 0.4rem;
}

.rp-qty-input {
    width: 56px;
    border: 1px solid #d5d9d9;
    border-radius: 4px;
    padding: 0.38rem 0.45rem;
    font: inherit;
    font-size: 0.85rem;
    text-align: center;
}

.rp-enq-btn {
    flex: 1;
    background: #ff9f00;
    color: #212121;
    border: 0;
    border-radius: 4px;
    padding: 0.42rem 0.5rem;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s;
}

.rp-enq-btn:hover {
    background: #e88e00;
    filter: none;
}

/* ── Results header ───────────────────────────── */
.rp-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.rp-clear-link {
    font-size: 0.85rem;
    color: var(--rp-hdr);
    text-decoration: none;
    font-weight: 600;
}

.rp-clear-link:hover { text-decoration: underline; }

/* ── Empty state ──────────────────────────────── */
.rp-empty {
    background: #fff;
    border-radius: var(--rp-card-r);
    padding: 3rem 1rem;
    text-align: center;
    box-shadow: var(--rp-shadow);
}

.rp-empty span { font-size: 3rem; display: block; margin-bottom: 0.5rem; }
.rp-empty p { color: #878787; margin: 0 0 1rem; }
.rp-empty a { color: var(--rp-hdr); font-weight: 700; text-decoration: none; }

/* ── Alert overrides for retailer page ───────── */
.rp-alert { max-width: 720px; margin-bottom: 1rem; }

/* ── Footer ──────────────────────────────────── */
.rp-footer {
    text-align: center;
    padding: 1.6rem 1rem;
    font-size: 0.82rem;
    color: #878787;
    border-top: 1px solid #e0e0e0;
    background: #fff;
    margin-top: 2rem;
}

.rp-product-detail {
    margin-top: 0.4rem;
}

.rp-detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.4fr;
    gap: 1rem;
}

.rp-detail-media {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    min-height: 280px;
    display: grid;
    place-items: center;
}

.rp-detail-media img {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    padding: 0.7rem;
}

.rp-tier-box {
    margin-top: 0.8rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.7rem;
    background: #fff;
}

.rp-detail-status {
    margin-top: 0.8rem;
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

/* ── Badge colors shared ──────────────────────── */
.badge-orange { background: #fff4e5; color: #b54708; border-color: #f9dbaf; }
.badge-green  { background: #ecfdf3; color: #067647; border-color: #abefc6; }
.badge-red    { background: #fef3f2; color: #b42318; border-color: #fecdca; }

/* ── Categories Page ──────────────────────────── */
.rp-categories-section {
    width: 100%;
}

.rp-categories-header {
    margin-bottom: 2rem;
}

.rp-categories-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

.rp-categories-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
}

.rp-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.2rem;
    width: 100%;
}

.rp-category-card {
    display: flex;
    gap: 1rem;
    padding: 1.2rem;
    border: 1px solid #e4e9f0;
    border-radius: 10px;
    background: #ffffff;
    text-decoration: none;
    color: #1a202c;
    transition: all 0.2s ease;
    align-items: center;
}

.rp-category-card:hover {
    border-color: #2563eb;
    background: #f5f9ff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
    transform: translateY(-2px);
}

.rp-category-icon {
    font-size: 2rem;
    min-width: 48px;
    text-align: center;
}

.rp-category-info {
    flex: 1;
    min-width: 0;
}

.rp-category-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #1a202c;
}

.rp-category-count {
    font-size: 0.85rem;
    color: #64748b;
    display: block;
}

.rp-category-arrow {
    color: #cbd5e1;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.rp-category-card:hover .rp-category-arrow {
    color: #2563eb;
}

.rp-categories-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: #94a3b8;
}

.rp-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 900px) {
    .rp-header-inner {
        flex-wrap: wrap;
        padding: 0.6rem 0.8rem;
    .retailer-admin-grid { grid-template-columns: 1fr; }
    }
    .rp-search-form { order: 3; flex: 0 0 100%; }
    .rp-actions { gap: 0.2rem; }
    .rp-action-btn { font-size: 0.78rem; padding: 0.35rem 0.5rem; }
    .rp-categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 600px) {
    .rp-banner-slide { padding: 1.2rem 1.2rem; min-height: 140px; }
    .rp-banner-content h2 { font-size: 1.2rem; }
    .rp-cat-tiles { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
    .rp-product-grid { grid-template-columns: repeat(2, 1fr); }
    .rp-main { padding: 0.7rem 0.7rem 2rem; }
    .rp-detail-grid { grid-template-columns: 1fr; }
}
