:root {
    --header-bg: #0f2a52;
    --header-bg-light: #1c3f6e;
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --accent: #f0a202;
    --accent-dark: #cc8600;
    --gold: #f0a202;
    --success: #1e8e3e;
    --success-bg: #e6f4ea;
    --danger: #d93025;
    --danger-bg: #fce8e6;
    --warning-bg: #fef7e0;
    --warning-text: #b06000;
    --bg: #f4f6f8;
    --card-bg: #ffffff;
    --border: #e0e3e7;
    --text: #202124;
    --muted: #5f6368;
    --radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
}

* { box-sizing: border-box; }

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: inherit; }

/* ---------- Promo bar ---------- */

.promo-bar {
    background: var(--primary);
    color: #fff;
}

.promo-bar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 6px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 12.5px;
    flex-wrap: wrap;
}

.promo-bar-text { display: flex; align-items: center; gap: 6px; font-weight: 600; }

.promo-bar-links { display: flex; gap: 18px; flex-wrap: wrap; }

.promo-bar-links a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.9;
}

.promo-bar-links a:hover { opacity: 1; text-decoration: underline; }

/* ---------- Header ---------- */

.navbar {
    background: var(--card-bg);
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: var(--shadow-sm);
}

.navbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.brand {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.brand .brand-dot { color: var(--text); }

.brand-lockup { display: flex; flex-direction: column; }
.brand-tagline { font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }

.search-form {
    flex: 1;
    display: flex;
    min-width: 200px;
    max-width: 640px;
    background: var(--bg);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.search-form:focus-within { box-shadow: 0 0 0 2px var(--primary-light); border-color: var(--primary); }

.category-select {
    border: none;
    border-right: 1px solid var(--border);
    background: #ececec;
    font-size: 13px;
    padding: 0 10px;
    color: var(--muted);
    max-width: 130px;
    border-radius: 0;
}

.search-form input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    font-size: 14px;
    border-radius: 0;
    background: #fff;
}

.search-form input:focus { outline: none; }

.search-form button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 18px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

.search-form button:hover { background: var(--primary-dark); }

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px 22px;
    font-size: 13px;
    color: var(--text);
    margin-left: auto;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a:hover { color: var(--primary); }

.btn-link {
    background: var(--primary) !important;
    color: #fff !important;
    padding: 7px 14px;
    border-radius: 4px;
    font-weight: 600;
}

.btn-link:hover { background: var(--primary-dark) !important; color: #fff !important; }

.wishlist-icon {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    text-decoration: none;
    position: relative;
}

.wishlist-icon:hover { color: var(--text); }

.cart-link { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.cart-link .cart-label { display: flex; align-items: center; gap: 6px; }
.cart-link .cart-total-amount { font-size: 12px; font-weight: 700; color: var(--text); margin-top: 1px; }

.badge {
    background: var(--primary);
    color: white;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 11px;
    position: absolute;
    top: -8px;
    right: 10px;
}

.hello { color: var(--muted); }

.icon { flex-shrink: 0; }

.account-menu { position: relative; }

.account-menu-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font: inherit;
    color: var(--text);
    cursor: pointer;
    padding: 0;
}

.account-menu-trigger:hover { color: var(--primary); }

.account-menu-panel {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    min-width: 190px;
    padding: 6px;
    z-index: 30;
}

.account-menu-panel.open { display: block; }

.account-menu-panel a {
    display: block;
    padding: 9px 12px;
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    font-size: 13.5px;
}

.account-menu-panel a:hover { background: var(--bg); color: var(--primary); }

/* ---------- Category strip ---------- */

.category-strip {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.category-strip-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    gap: 24px;
    overflow-x: auto;
    font-size: 13.5px;
}

.category-strip a {
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 2px;
    border-bottom: 2px solid transparent;
    font-weight: 500;
}

.category-strip a:hover { color: var(--primary); }

.category-strip a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 700;
}

/* ---------- Layout ---------- */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px;
    min-height: 60vh;
}

.messages { margin-bottom: 16px; }

.message {
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 14px;
}

.message.success { background: var(--success-bg); color: var(--success); }
.message.error { background: var(--danger-bg); color: var(--danger); }
.message.warning { background: var(--warning-bg); color: var(--warning-text); }
.message.info { background: var(--primary-light); color: var(--primary); }

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 16px;
}

.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumbs .sep { margin: 0 6px; }

/* ---------- Hero + trust sidebar ---------- */

.hero-split {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    margin-bottom: 24px;
}

.hero-banner {
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 36px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 260px;
}

.hero-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    margin-bottom: 8px;
}

.hero-banner h1 { margin: 0 0 10px; font-size: 32px; font-weight: 800; line-height: 1.15; }
.hero-banner p { margin: 0 0 22px; color: rgba(255,255,255,0.9); font-size: 15px; max-width: 420px; }

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    padding: 11px 24px;
    border-radius: 6px;
    text-decoration: none;
}

.hero-cta:hover { background: var(--primary-light); }

.trust-sidebar { display: flex; flex-direction: column; gap: 12px; }

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    flex: 1;
}

.trust-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trust-item-title { font-size: 13px; font-weight: 700; margin: 0; }
.trust-item-sub { font-size: 11.5px; color: var(--muted); margin: 0; }

@media (max-width: 800px) {
    .hero-split { grid-template-columns: 1fr; }
    .trust-sidebar { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Category icon row ---------- */

.category-icon-row {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 4px 4px;
    margin-bottom: 24px;
}

.category-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    flex-shrink: 0;
    width: 76px;
}

.category-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    transition: border-color 0.15s, transform 0.15s;
}

.category-icon-item:hover .category-icon-circle { border-color: var(--primary); transform: translateY(-2px); }
.category-icon-label { font-size: 12px; text-align: center; font-weight: 500; }

/* ---------- Deal of the Day ---------- */

.deal-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

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

.deal-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
}

.deal-panel-title { font-weight: 800; font-size: 15px; margin: 0 0 10px; }

.deal-panel-tag {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 5px;
    background: var(--accent);
    color: #232323;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    margin-top: 12px;
}

.deal-panel-name { font-size: 13.5px; font-weight: 600; margin: 8px 0 4px; }

/* ---------- Discount badge / price row (shared with product grid) ---------- */

.product-media { position: relative; }

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 1;
}

/* ---------- Wishlist toggle on product cards ---------- */

.product-card-wrap { position: relative; }

.wishlist-toggle-form { position: absolute; top: 10px; right: 10px; z-index: 2; margin: 0; }

.wishlist-toggle-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease, transform 0.1s ease;
}

.wishlist-toggle-btn:hover { color: #e0245e; transform: scale(1.08); }
.wishlist-toggle-btn.active { color: #e0245e; }

a.wishlist-toggle-btn { position: absolute; top: 10px; right: 10px; z-index: 2; }

.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-was { color: var(--muted); font-size: 12.5px; text-decoration: line-through; }
.price-off { color: var(--success); font-size: 12px; font-weight: 700; }

/* ---------- Bottom trust strip ---------- */

.bottom-trust-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin: 32px 0 8px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
}

.bottom-trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--muted);
}

.bottom-trust-item svg { color: var(--primary); flex-shrink: 0; }

/* ---------- Side promo banner ---------- */

.side-promo-banner {
    background: linear-gradient(160deg, var(--primary-light), #ffffff);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.side-promo-eyebrow {
    color: var(--primary);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.side-promo-banner h3 { margin: 0 0 14px; font-size: 20px; }
.side-promo-banner .btn { align-self: flex-start; margin-top: auto; }

/* ---------- Filters / category chips ---------- */

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filters a {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 17px;
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    background: var(--card-bg);
    white-space: nowrap;
    box-sizing: border-box;
}

.filters a:hover { border-color: var(--primary); color: var(--primary); }

.filters a.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 700;
}

/* ---------- Product grid / cards ---------- */

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

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow 0.15s, transform 0.15s;
}

.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.product-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #f0f2f4;
    display: block;
}

.product-img.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 13px;
}

.placeholder-img { display: flex; align-items: center; justify-content: center; }

.vendor-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.vendor-thumb.placeholder-img svg { width: 20px; height: 20px; }

.placeholder-electronics { background: linear-gradient(135deg, #e8f0fe, #c3d9fb); color: var(--primary-dark); }
.placeholder-fashion { background: linear-gradient(135deg, #fdeee3, #fbd9bd); color: var(--accent-dark); }
.placeholder-grocery { background: linear-gradient(135deg, #e6f4ea, #bfe6cb); color: var(--success); }
.placeholder-home-kitchen { background: linear-gradient(135deg, #f3e8fd, #ddc2f7); color: #7c3aed; }
.placeholder-books { background: linear-gradient(135deg, #fef7e0, #fbe6a8); color: var(--warning-text); }
.placeholder-default { background: #eef0f2; color: var(--muted); }

.product-info { padding: 12px 14px 14px; }

.product-name {
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0 0 6px;
    color: #d5d9dd;
}

.rating-row .rating-text {
    color: var(--muted);
    font-size: 11px;
    margin-left: 5px;
}

.product-vendor {
    color: var(--muted);
    font-size: 12px;
    margin: 0 0 8px;
}

.product-price {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* ---------- Product detail ---------- */

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

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

.detail-img {
    width: 100%;
    border-radius: var(--radius);
    background: #f0f2f4;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.product-gallery { display: flex; flex-direction: column; gap: 12px; }

.gallery-thumbs { display: flex; gap: 8px; }

.gallery-thumb {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--border);
    cursor: pointer;
    background: #f0f2f4;
    padding: 0;
}

.gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img, .gallery-thumb .placeholder-img { width: 100%; height: 100%; object-fit: cover; }

.vendor-trust {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text);
    background: var(--bg);
    padding: 5px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.vendor-trust svg { color: var(--primary); flex-shrink: 0; }

.price-large {
    font-size: 30px;
    font-weight: 800;
    margin: 12px 0;
}

.stock-ok {
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
}

.stock-out {
    color: var(--danger);
    font-size: 13px;
    font-weight: 600;
}

.category-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    padding: 11px 22px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s;
}

.btn:hover { background: var(--primary-dark); }
.btn:disabled { background: #ccc; cursor: not-allowed; }

.btn-accent { background: var(--accent); color: #232f3e; }
.btn-accent:hover { background: var(--accent-dark); }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover { background: var(--primary-light); }

.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ---------- Cards / forms ---------- */

.auth-card, .checkout-card {
    max-width: 440px;
    margin: 32px auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.checkout-card { max-width: 560px; }

.auth-card h2, .checkout-card h2 { margin-top: 0; }

/* ---------- Split-panel auth (login / register) ---------- */

.auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 960px;
    margin: 32px auto;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

@media (max-width: 760px) {
    .auth-layout { grid-template-columns: 1fr; max-width: 460px; }
    .auth-brand-panel { display: none; }
}

.auth-brand-panel {
    background: linear-gradient(135deg, var(--header-bg) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-brand-panel .brand { font-size: 28px; margin-bottom: 16px; }
.auth-brand-panel p { color: #d7e3fc; font-size: 14px; line-height: 1.6; margin: 0 0 12px; }
.auth-brand-panel ul { margin: 16px 0 0; padding: 0; list-style: none; }
.auth-brand-panel li { font-size: 13px; color: #d7e3fc; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }

.auth-form-panel {
    background: var(--card-bg);
    padding: 48px 40px;
}

.auth-form-panel h2 { margin-top: 0; }

/* ---------- Role-branded login pages (customer / vendor / admin) ---------- */
/* Each page sets its palette via one modifier class; everything else reads
   the --role-* custom properties so the structure only has to be written once. */

.role-login--customer {
    --role-bg: var(--bg);
    --role-card-bg: #ffffff;
    --role-border: var(--border);
    --role-text: var(--text);
    --role-muted: var(--muted);
    --role-accent: var(--accent);
    --role-accent-hover: var(--accent-dark);
    --role-accent-text: #232f3e;
    --role-field-bg: #fbfbfb;
    --role-badge-bg: var(--warning-bg);
    --role-badge-text: var(--warning-text);
}

.role-login--vendor {
    --role-bg: linear-gradient(180deg, #eaf2ff 0%, #f5f9ff 100%);
    --role-card-bg: #ffffff;
    --role-border: #dce8fb;
    --role-text: var(--text);
    --role-muted: var(--muted);
    --role-accent: var(--primary);
    --role-accent-hover: var(--primary-dark);
    --role-accent-text: #ffffff;
    --role-field-bg: #f7faff;
    --role-badge-bg: var(--primary-light);
    --role-badge-text: var(--primary-dark);
}

.role-login--admin {
    --role-bg: radial-gradient(circle at 18% 15%, #1e1836 0%, #100c1c 55%, #0a0812 100%);
    --role-card-bg: #17132a;
    --role-border: #2b2440;
    --role-text: #f1eefb;
    --role-muted: #9b93bb;
    --role-accent: #7c5cff;
    --role-accent-hover: #6947e0;
    --role-accent-text: #ffffff;
    --role-field-bg: #1e1832;
    --role-badge-bg: rgba(124,92,255,0.16);
    --role-badge-text: #b7a6ff;
}

.role-login {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    background: var(--role-bg);
}

.role-login__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--role-badge-bg);
    color: var(--role-badge-text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 20px;
}

.role-login__tabs {
    display: flex;
    background: var(--role-field-bg);
    border: 1px solid var(--role-border);
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 24px;
}

.role-login__tab {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 7px;
    background: none;
    color: var(--role-muted);
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.role-login__tab:hover { color: var(--role-text); }
.role-login__tab.active { background: var(--role-accent); color: var(--role-accent-text); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }
.role-login__access.tab-panel.active { display: flex; }

.role-login__card {
    width: 100%;
    max-width: 400px;
    background: var(--role-card-bg);
    border: 1px solid var(--role-border);
    border-radius: 14px;
    padding: 36px 32px;
    box-shadow: 0 12px 40px rgba(10,8,20,0.14);
}

.role-login__brand { text-align: center; margin-bottom: 22px; }
.role-login__brand .brand { font-size: 22px; color: var(--role-accent); }
.role-login__brand .brand-dot { color: var(--role-text); }

.role-login__title { text-align: center; font-size: 20px; margin: 0 0 4px; color: var(--role-text); }
.role-login__subtitle { text-align: center; font-size: 13px; color: var(--role-muted); margin: 0 0 24px; }

.role-login__field { margin-bottom: 16px; }
.role-login__field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--role-text); margin-bottom: 6px; }

.role-login__input-wrap { position: relative; display: flex; align-items: center; }
.role-login__input-wrap .icon { position: absolute; left: 12px; color: var(--role-muted); pointer-events: none; }

.role-login__input-wrap input {
    width: 100%;
    padding: 11px 14px 11px 38px;
    border-radius: 8px;
    border: 1px solid var(--role-border);
    background: var(--role-field-bg);
    color: var(--role-text);
    font-size: 14px;
    font-family: inherit;
}
.role-login__input-wrap input::placeholder { color: var(--role-muted); opacity: 0.8; }
.role-login__input-wrap input:focus { outline: none; border-color: var(--role-accent); }

.role-login__toggle-visibility {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--role-muted);
    display: flex;
    border-radius: 6px;
}
.role-login__toggle-visibility:hover { color: var(--role-text); }

.role-login__row { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 22px; font-size: 13px; }
.role-login__remember { display: flex; align-items: center; gap: 6px; color: var(--role-muted); cursor: pointer; }
.role-login__remember input { accent-color: var(--role-accent); }
.role-login__row a { color: var(--role-accent); text-decoration: none; font-weight: 600; }
.role-login__row a:hover { text-decoration: underline; }

.role-login__submit {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: var(--role-accent);
    color: var(--role-accent-text);
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.role-login__submit:hover { background: var(--role-accent-hover); }

.role-login__footer { margin-top: 18px; text-align: center; font-size: 13px; color: var(--role-muted); }
.role-login__footer a { color: var(--role-accent); font-weight: 600; text-decoration: none; }
.role-login__footer a:hover { text-decoration: underline; }

.role-login__back { margin-top: 10px; text-align: center; font-size: 12.5px; }
.role-login__back a { color: var(--role-muted); text-decoration: none; }
.role-login__back a:hover { color: var(--role-text); }

.role-login__access {
    width: 100%;
    max-width: 400px;
    margin-top: 18px;
    background: var(--role-card-bg);
    border: 1px solid var(--role-border);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.role-login__access-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--role-badge-bg);
    color: var(--role-badge-text);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.role-login__access h3 { margin: 0 0 4px; font-size: 13.5px; color: var(--role-text); }
.role-login__access p { margin: 0; font-size: 12.5px; color: var(--role-muted); line-height: 1.5; }

@media (max-width: 480px) {
    .role-login__card, .role-login__access { max-width: 100%; }
}

/* ---------- Outcome pages (payment success/failed) ---------- */

.icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.icon-circle.success { background: var(--success-bg); color: var(--success); }
.icon-circle.danger { background: var(--danger-bg); color: var(--danger); }

form p { margin: 14px 0; }

input, textarea, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

label { display: block; font-size: 13px; margin-bottom: 4px; color: var(--muted); font-weight: 500; }

/* ---------- Tables ---------- */

table.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

table.cart-table th {
    background: #fafbfc;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--muted);
}

table.cart-table th, table.cart-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 14px;
}

table.cart-table tbody tr:last-child td { border-bottom: none; }
table.cart-table tbody tr:hover { background: #fafbfc; }

/* ---------- Order summary sidebar (cart + checkout) ---------- */

.commerce-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 800px) {
    .commerce-layout { grid-template-columns: 1fr; }
}

.summary-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: sticky;
    top: 84px;
}

.summary-card h3 {
    margin: 0 0 14px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--muted);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--muted);
    gap: 10px;
}

.summary-row-product { display: flex; align-items: center; gap: 10px; min-width: 0; }
.summary-row-product span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.summary-thumb { width: 34px; height: 34px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.summary-thumb.placeholder-img svg { width: 16px; height: 16px; }

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 12px;
    color: var(--text);
}

.cart-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.cart-thumb.placeholder-img svg { width: 24px; height: 24px; }

.cart-product-cell { display: flex; align-items: center; gap: 12px; }

.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; width: fit-content; }

.qty-stepper button {
    background: var(--bg);
    border: none;
    width: 28px;
    height: 28px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    color: var(--text);
}

.qty-stepper button:hover:not(:disabled) { background: var(--primary-light); color: var(--primary); }
.qty-stepper button:disabled { color: var(--border); cursor: not-allowed; }
.qty-stepper span { width: 34px; text-align: center; font-size: 13px; font-weight: 600; }

.cart-total {
    text-align: right;
    font-size: 18px;
    font-weight: 700;
    margin: 20px 0;
}

.upi-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--success-bg);
    color: var(--success);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.pay-box {
    max-width: 440px;
    margin: 40px auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-paid { background: var(--success-bg); color: var(--success); }
.status-pending { background: var(--warning-bg); color: var(--warning-text); }
.status-failed { background: var(--danger-bg); color: var(--danger); }

.status-processing { background: var(--warning-bg); color: var(--warning-text); }
.status-shipped { background: #e0edff; color: #1a56db; }
.status-delivered { background: var(--success-bg); color: var(--success); }
.status-cancelled { background: var(--danger-bg); color: var(--danger); }

/* ---------- Vendor dashboard: dark sidebar shell ---------- */

.vendor-shell { display: flex; min-height: 100vh; background: var(--bg); }

.vendor-sidebar-dark {
    width: 240px;
    background: #0f1b2d;
    color: #cbd3db;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.vendor-sidebar-dark-header { padding: 20px; border-bottom: 1px solid #1f2c40; }
.vendor-sidebar-logo { color: #fff; font-weight: 800; font-size: 18px; letter-spacing: -0.3px; }
.vendor-sidebar-logo .brand-dot { color: var(--primary); }

.vendor-sidebar-dark nav { padding: 12px; display: flex; flex-direction: column; gap: 2px; }

.vendor-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #9aa9c0;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
}

.vendor-nav-link:hover { background: #182640; color: #fff; }
.vendor-nav-link.active { background: var(--primary); color: #fff; }
.vendor-nav-link.disabled { color: #5c6b85; cursor: default; }

/* ---------- Settings sub-nav (light background, unlike the dark sidebar) ---------- */

.settings-nav-link {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 2px;
}
.settings-nav-link:hover { background: var(--bg); }
.settings-nav-link.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 700; }

.vendor-nav-count {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
}

.coming-soon-badge {
    margin-left: auto;
    background: #1f2c40;
    color: #7c8aa3;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 8px;
}

.vendor-nav-divider {
    padding: 14px 12px 6px;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5c6b85;
    font-weight: 700;
}

.vendor-sidebar-footer { padding: 16px; border-top: 1px solid #1f2c40; margin-top: auto; }

.store-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.store-status-badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.store-status-badge.is-active { background: rgba(30,142,62,0.18); color: #4ade80; }
.store-status-badge.is-active .dot { background: #4ade80; }
.store-status-badge.is-pending { background: rgba(240,162,2,0.18); color: #f0a202; }
.store-status-badge.is-pending .dot { background: #f0a202; }

.vendor-sidebar-footer p { font-size: 11px; color: #7c8aa3; margin: 0 0 10px; }

.vendor-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.vendor-topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.vendor-sidebar-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 4px; }

.vendor-search-form {
    flex: 1;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
    color: var(--muted);
}

.vendor-search-form input { border: none; background: none; flex: 1; font-size: 13.5px; font-family: inherit; }
.vendor-search-form input:focus { outline: none; }

.vendor-topbar-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }

.vendor-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: var(--bg);
}

.vendor-icon-btn:hover { color: var(--primary); }

.vendor-account { display: flex; align-items: center; gap: 10px; }

.vendor-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.vendor-account div { display: flex; flex-direction: column; line-height: 1.3; }
.vendor-account strong { font-size: 13px; }
.vendor-account span { font-size: 11px; color: var(--muted); }

.vendor-content-area { padding: 24px; flex: 1; }

.vendor-welcome h1 { margin: 0 0 4px; font-size: 24px; }
.vendor-welcome p { margin: 0 0 20px; color: var(--muted); font-size: 13.5px; }

.dashboard-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-top: 20px; }

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

.settings-layout { display: grid; grid-template-columns: 220px 1fr 300px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .settings-layout { grid-template-columns: 1fr; } }

.settings-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); gap: 16px; }
.settings-toggle-row:last-child { border-bottom: none; }
.settings-toggle-row h4 { margin: 0 0 2px; font-size: 13.5px; }
.settings-toggle-row p { margin: 0; font-size: 12px; color: var(--muted); }

.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; cursor: pointer; inset: 0; background: var(--border); border-radius: 22px; transition: 0.15s; }
.switch-slider::before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.15s; }
.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }

.dashboard-panel { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.dashboard-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.dashboard-panel-head h3 { margin: 0; font-size: 15px; }
.dashboard-panel-head a { font-size: 12.5px; font-weight: 600; color: var(--primary); text-decoration: none; }

.dashboard-mini-table { width: 100%; border-collapse: collapse; }
.dashboard-mini-table td { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.dashboard-mini-table tr:last-child td { border-bottom: none; }
.dashboard-mini-table td:first-child strong { display: block; font-size: 13px; }
.dashboard-mini-table td:first-child span { display: block; font-size: 11px; color: var(--muted); }
.dashboard-mini-table td:nth-child(2) { font-weight: 700; text-align: right; }
.dashboard-mini-table td:last-child { text-align: right; }

@media (max-width: 800px) {
    .vendor-sidebar-dark { position: fixed; left: -240px; top: 0; z-index: 40; transition: left 0.2s; box-shadow: 4px 0 12px rgba(0,0,0,0.15); }
    .vendor-sidebar-dark.open { left: 0; }
    .vendor-sidebar-toggle { display: flex; align-items: center; justify-content: center; }
    .vendor-search-form { max-width: none; }
    .vendor-content-area { padding: 16px; }
}

/* ---------- Public vendor storefront ---------- */

.store-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.store-banner-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.store-banner h1 { margin: 0 0 4px; font-size: 20px; }
.store-banner p { margin: 0 0 4px; color: var(--muted); font-size: 13.5px; }
.store-banner-meta { font-size: 12px !important; color: var(--muted); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

a.stat-card {
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
a.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--primary); }

.stat-card-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card.stat-warning { border-color: #f9ab00; background: var(--warning-bg); }
.stat-card.stat-warning .stat-card-icon { background: #fdecc8; color: var(--warning-text); }

.stat-num {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------- Invoice ---------- */

.invoice { max-width: 720px; margin: 0 auto 24px; background: var(--card-bg); padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); }
.invoice-meta, .invoice-items { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.invoice-meta th { text-align: left; color: var(--muted); padding: 4px 12px 4px 0; vertical-align: top; }
.invoice-meta td { padding: 4px 0; }
.invoice-items th, .invoice-items td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.invoice-items thead th { background: var(--header-bg); color: #fff; }
.invoice-items tfoot th { text-align: right; }
.invoice-footer { font-size: 13px; color: var(--muted); }

@media print {
    .navbar, .category-strip, .footer, .messages, .no-print { display: none !important; }
    body { background: #fff; }
}

/* ---------- Footer ---------- */

.footer {
    background: var(--header-bg);
    color: #cbd3db;
    margin-top: 48px;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 20px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
}

.footer-col h4 {
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 14px;
}

.footer-col a {
    display: block;
    color: #cbd3db;
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 10px;
}

.footer-col a:hover { color: #fff; text-decoration: underline; }

.footer-bottom {
    border-top: 1px solid var(--header-bg-light);
    text-align: center;
    padding: 16px 20px;
    font-size: 12px;
    color: #9aa5b1;
}

/* ---------- Checkout: minimal header/footer ---------- */

.checkout-header { background: var(--card-bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }

.checkout-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    background: var(--success-bg);
    color: var(--success);
    padding: 8px 16px;
    border-radius: 24px;
}

.secure-badge div { display: flex; flex-direction: column; line-height: 1.3; }
.secure-badge strong { font-size: 12.5px; color: var(--text); font-weight: 700; }
.secure-badge span { font-size: 10.5px; color: var(--muted); }

.checkout-footer-strip { max-width: 1280px; margin: 0 auto; padding: 24px 20px 8px; border-top: 1px solid var(--border); }

/* ---------- Checkout: step indicator ---------- */

.checkout-steps { display: flex; align-items: flex-start; gap: 0; }

.checkout-step { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 84px; }

.checkout-step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--border);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    transition: background 0.15s, box-shadow 0.15s;
}

.checkout-step span { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }

.checkout-step.active .checkout-step-circle { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px var(--primary-light); }
.checkout-step.active span { color: var(--text); font-weight: 700; }

.checkout-step.done .checkout-step-circle { background: var(--success); color: #fff; }
.checkout-step.done span { color: var(--text); }

.checkout-step-line { width: 40px; height: 2px; background: var(--border); margin: 16px -4px 0; }
.checkout-step-line.done { background: var(--success); }

@media (max-width: 760px) {
    .checkout-header-inner { justify-content: center; }
    .secure-badge, .brand-lockup { display: none; }
}

/* ---------- Checkout: sections & address card ---------- */

.checkout-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.checkout-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.checkout-section-number {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.address-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }

.address-card-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; color: var(--text); text-transform: none; letter-spacing: normal; }

.address-tag { background: var(--primary-light); color: var(--primary-dark); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }

.address-card address { font-style: normal; font-size: 13.5px; color: var(--muted); line-height: 1.8; margin: 8px 0 0; }

/* ---------- Checkout: payment method tabs ---------- */

.payment-layout {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card-bg);
}

.payment-tabs { display: flex; flex-direction: column; width: 168px; border-right: 1px solid var(--border); background: var(--bg); flex-shrink: 0; padding: 6px; gap: 2px; }

.payment-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    border: none;
    border-radius: 6px;
    background: none;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}

.payment-tab-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.payment-tab:hover { background: rgba(0,0,0,0.03); color: var(--text); }
.payment-tab.active { background: var(--primary-light); color: var(--primary-dark); }
.payment-tab.active .payment-tab-icon { background: var(--primary); border-color: var(--primary); color: #fff; }

.payment-tab-content { flex: 1; padding: 26px 28px; min-width: 0; }
.payment-tab-panel { display: none; }
.payment-tab-panel.active { display: block; }

@media (max-width: 640px) {
    .payment-layout { flex-direction: column; }
    .payment-tabs { flex-direction: row; width: auto; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); }
    .payment-tab { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
    .payment-tab.active { border-left-color: transparent; border-bottom-color: var(--primary); }
}

/* ---------- Checkout: honest UPI panel (no fake QR, no fabricated app logos) ---------- */

.upi-visual { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }

.upi-qr-illustration {
    width: 120px;
    height: 120px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary-light), #fff);
    flex-shrink: 0;
    text-align: center;
}

.upi-qr-illustration span { color: var(--muted); }

.upi-qr-illustration span { font-size: 10px; padding: 0 10px; line-height: 1.4; }

.upi-apps-label { font-size: 12px; color: var(--muted); margin: 0 0 8px; }

.app-chip-row { display: flex; gap: 10px; flex-wrap: wrap; }

.app-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    background: #fff;
}

.app-chip-icon {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    flex-shrink: 0;
}

.upi-id-row { display: flex; gap: 10px; margin-top: 4px; }
.upi-id-row input { flex: 1; }

/* ---------- Mobile tightening ---------- */

@media (max-width: 640px) {
    .promo-bar-inner { padding: 6px 14px; gap: 8px 14px; }
    .navbar-inner { padding: 10px 14px; gap: 12px; }
    .brand-tagline { display: none; }
    .search-form { order: 3; flex-basis: 100%; max-width: none; }
    .category-select { max-width: 90px; }
    .account-hello { display: none; }
    .wishlist-label { display: none; }
    .nav-links { gap: 12px 16px; }
    .hero-banner { padding: 24px 22px; min-height: unset; }
    .hero-banner h1 { font-size: 24px; }
    .hero-split { gap: 12px; }
    .deal-grid { gap: 14px; }
}
