/* Rivo.lt Style - Authentic Clone */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    color: #262626;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
}

html {
    scrollbar-gutter: stable;
}

/* Rivo Colors */
:root {
    --rivo-black: #262626;
    --rivo-white: #ffffff;
    --rivo-red: #ff6b6b;
    --rivo-light-red: #ff8787;
    --rivo-dark-red: #ff5252;
    --rivo-gray: #f7f7f7;
    --rivo-border: #e4e4e4;
    --rivo-text-gray: #717171;
    --rivo-link: #006dc0;
    --app-bg: #ffffff;
    --app-surface: #ffffff;
    --app-surface-soft: #f7f7f7;
    --app-text: #262626;
    --app-text-muted: #717171;
    --app-border: #e4e4e4;
    --app-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header/Navbar */
.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--rivo-border);
    padding: 0;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-row {
    display: flex;
    align-items: center;
    height: 60px;
    width: 100%;
    gap: 12px;
}

.navbar-brand {
    color: var(--rivo-black);
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 20px;
}

.navbar-brand:hover {
    color: var(--rivo-black);
    text-decoration: none;
}

.site-logo {
    flex-shrink: 0;
}

.site-logo-dark {
    display: none;
}

html[data-theme="dark"] .site-logo-light {
    display: none;
}

html[data-theme="dark"] .site-logo-dark {
    display: inline-block;
}

.navbar-nav {
    height: 60px;
    align-items: center;
}

.nav-link {
    color: var(--rivo-black);
    font-size: 14px;
    font-weight: 600;
    padding: 0 16px;
    height: 60px;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: none;
}

.nav-link:hover {
    color: var(--rivo-black);
    text-decoration: none;
    background-color: transparent;
}

.nav-link i {
    margin-right: 8px;
    font-size: 18px;
}

/* Search Bar */
.search-container {
    flex: 1;
    max-width: 600px;
    margin: 0 10px;
    position: relative;
}

.mobile-search-toggle,
.mobile-search-close {
    display: none;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--rivo-border);
    border-radius: 8px;
    font-size: 14px;
    background-color: var(--rivo-gray);
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--rivo-black);
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--rivo-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.user-avatar-with-badge {
    position: relative;
}

.menu-event-badge {
    display: none;
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 700;
    box-shadow: 0 0 0 2px var(--rivo-white);
}

.menu-event-badge.is-visible {
    display: inline-block;
}

.user-dropdown {
    position: relative;
}

.user-dropdown summary {
    list-style: none;
}

.user-dropdown summary::-webkit-details-marker {
    display: none;
}

.user-dropdown-menu {
    position: absolute;
    top: 42px;
    right: 0;
    width: 220px;
    background: var(--rivo-white);
    border: 1px solid var(--rivo-border);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    display: none;
    overflow: hidden;
    z-index: 1200;
}

.user-dropdown[open] .user-dropdown-menu {
    display: block;
}

.user-dropdown-menu a {
    display: block;
    padding: 10px 14px;
    color: var(--rivo-black);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid var(--rivo-border);
}

.user-dropdown-menu a.menu-with-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.user-dropdown-menu a.menu-with-badge > span:first-child {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-inline-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    flex: 0 0 auto;
}

.user-dropdown-menu a:last-child {
    border-bottom: none;
}

.user-dropdown-menu a:hover {
    background: var(--rivo-gray);
}

.user-dropdown-mobile-close {
    display: none;
}

.user-dropdown-menu a.danger {
    color: #b42318;
}

.theme-dropdown {
    position: relative;
}

.theme-dropdown summary {
    list-style: none;
}

.theme-dropdown summary::-webkit-details-marker {
    display: none;
}

.theme-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.theme-dropdown-menu {
    position: absolute;
    top: 42px;
    right: 0;
    width: 162px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 10px;
    box-shadow: var(--app-shadow);
    padding: 8px;
    display: grid;
    gap: 6px;
    z-index: 1200;
}

.theme-option-btn {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-surface);
    color: var(--app-text);
    padding: 7px 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
}

.theme-option-btn.is-active {
    border-color: #14b8a6;
    color: #0f766e;
    background: rgba(20, 184, 166, 0.09);
}

/* Hero Section */
.hero-section {
    background-color: var(--rivo-gray);
    padding: 40px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--rivo-black);
    margin-bottom: 16px;
}

.hero-section p {
    font-size: 16px;
    color: var(--rivo-text-gray);
    margin-bottom: 24px;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 40px 0;
}

.category-card {
    background-color: var(--rivo-white);
    border: 1px solid var(--rivo-border);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    text-decoration: none;
    color: var(--rivo-black);
    transition: box-shadow 0.2s;
}

.category-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-decoration: none;
    color: var(--rivo-black);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--rivo-black);
}

.category-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.category-description {
    font-size: 14px;
    color: var(--rivo-text-gray);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 40px 0;
}

.product-card {
    background-color: var(--rivo-white);
    border: 1px solid var(--rivo-border);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    color: var(--rivo-black);
    transition: box-shadow 0.2s;
}

.product-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-decoration: none;
    color: var(--rivo-black);
}

.promoted-highlight-card {
    border-color: #f59e0b;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25);
    background-image: linear-gradient(180deg, rgba(251, 191, 36, 0.08), transparent 42%);
}

.promoted-boost-card {
    border-color: #14b8a6;
}

.product-promoted-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #ffffff;
    background: linear-gradient(135deg, #0891b2, #0f766e);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.product-new-badge {
    position: absolute;
    top: 42px;
    right: 10px;
    z-index: 3;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #ffffff;
    background: linear-gradient(135deg, #22c55e, #15803d);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.28);
}

.product-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background-color: var(--rivo-gray);
}

.product-image-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--app-surface-soft);
}

.product-image-empty-icon {
    font-size: 48px;
    color: var(--app-text-muted);
}

.product-info {
    padding: 12px;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.product-original-price {
    font-size: 14px;
    color: var(--rivo-text-gray);
    text-decoration: line-through;
    margin-left: 8px;
}

.product-location {
    font-size: 12px;
    color: var(--rivo-text-gray);
    margin-top: 4px;
}

.sold-product-image {
    filter: blur(2px) saturate(0.85);
    opacity: 0.9;
}

.sold-product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(17, 24, 39, 0.78);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 999px;
    padding: 6px 10px;
    z-index: 3;
}

.product-favorite-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(15, 23, 42, 0.58);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 5px 9px;
    z-index: 3;
    backdrop-filter: blur(3px);
    white-space: nowrap;
    width: auto;
    max-width: calc(100% - 20px);
    right: 10px;
    left: auto;
}

.product-favorite-badge i {
    font-size: 11px;
}

.product-paid-likes-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(190, 24, 93, 0.9);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 5px 9px;
    z-index: 3;
    backdrop-filter: blur(3px);
    white-space: nowrap;
    width: auto;
    max-width: calc(100% - 20px);
    left: 10px;
    right: auto;
}

.product-paid-likes-badge i {
    font-size: 11px;
}

html[data-theme="dark"] .product-favorite-badge {
    background: rgba(2, 6, 23, 0.62);
    color: #e8f2ff;
}

html[data-theme="dark"] .product-paid-likes-badge {
    background: rgba(190, 24, 93, 0.95);
    color: #fff;
}

html[data-theme="dark"] .product-new-badge {
    background: linear-gradient(135deg, #22c55e, #166534);
    color: #ecfdf5;
}

.product-card > .product-favorite-badge,
.product-card > .product-paid-likes-badge,
.product-card > .product-new-badge,
.product-gallery-wrap > .product-favorite-badge,
.product-gallery-wrap > .product-paid-likes-badge,
.product-gallery-wrap > .product-new-badge {
    display: inline-flex !important;
    width: auto !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: var(--rivo-red);
    color: var(--rivo-white);
}

.btn-primary:hover {
    background-color: var(--rivo-dark-red);
    color: var(--rivo-white);
}

.btn-secondary {
    background-color: var(--rivo-black);
    color: var(--rivo-white);
}

.btn-secondary:hover {
    background-color: #000000;
    color: var(--rivo-white);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--rivo-black);
    color: var(--rivo-black);
}

.btn-outline:hover {
    background-color: var(--rivo-black);
    color: var(--rivo-white);
}

.btn-outline-danger-soft {
    background-color: transparent;
    border: 2px solid #fecaca;
    color: #b91c1c;
}

.btn-outline-danger-soft:hover {
    background-color: #fff1f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.btn-header-upload {
    background: #0f766e;
    border: 2px solid #0f766e;
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(15, 118, 110, 0.25);
}

.btn-header-upload:hover {
    background: #0d655f;
    border-color: #0d655f;
    color: #ffffff;
}

/* Forms */
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--rivo-border);
    border-radius: 8px;
    font-size: 14px;
    background-color: var(--rivo-white);
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--rivo-black);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--rivo-black);
}

/* Footer */
footer {
    background-color: var(--rivo-black);
    color: var(--rivo-white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--rivo-white);
    margin-bottom: 12px;
}

.footer-brand-about {
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    line-height: 1.55;
    max-width: 34ch;
}

.footer-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: var(--rivo-white);
    text-decoration: none;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-section span {
    color: var(--rivo-white);
    font-size: 14px;
    opacity: 0.8;
}

.footer-section a:hover {
    opacity: 1;
    text-decoration: none;
}

.footer-link-btn {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: var(--rivo-white);
    font-size: 14px;
    opacity: 0.8;
    cursor: pointer;
}

.footer-link-btn:hover {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    opacity: 0.8;
}

/* Cookie consent */
.cookie-consent-root {
    position: fixed;
    z-index: 3200;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.cookie-consent-banner {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.cookie-consent-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-consent-content {
    margin: 14px auto;
    max-width: 1080px;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-text);
    border-radius: 14px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
    padding: 14px;
}

.cookie-consent-title {
    font-size: 18px;
    margin: 0 0 6px;
}

.cookie-consent-text {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--app-text-muted);
    line-height: 1.55;
}

.cookie-consent-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

.cookie-consent-policy {
    font-size: 13px;
    color: var(--app-accent, var(--rivo-link));
}

.cookie-consent-modal[hidden] {
    display: none;
}

.cookie-consent-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 3300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.cookie-consent-modal.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.cookie-consent-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.cookie-consent-modal-card {
    position: relative;
    width: min(720px, calc(100vw - 24px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    border-radius: 14px;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-text);
    padding: 16px;
    box-shadow: 0 24px 42px rgba(0, 0, 0, 0.26);
}

.cookie-consent-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.cookie-consent-modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.cookie-consent-close {
    border: 1px solid var(--app-border);
    border-radius: 8px;
    width: 34px;
    height: 34px;
    background: var(--app-surface-soft);
    color: var(--app-text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.cookie-consent-modal-text {
    margin: 0 0 12px;
    color: var(--app-text-muted);
}

.cookie-consent-options {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.cookie-option {
    border: 1px solid var(--app-border);
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--app-surface-soft);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.cookie-option small {
    display: block;
    color: var(--app-text-muted);
    margin-top: 2px;
    line-height: 1.4;
}

.cookie-option input[type=\"checkbox\"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.cookie-option-fixed {
    opacity: 0.92;
}

.cookie-consent-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .navbar {
        height: 60px;
        padding: 0;
    }

    .navbar-row {
        gap: 8px;
    }

    .cookie-consent-content {
        margin: 10px 8px;
        border-radius: 12px;
        padding: 12px;
    }

    .cookie-consent-title {
        font-size: 16px;
    }

    .cookie-consent-modal-card {
        width: calc(100vw - 14px);
        max-height: calc(100vh - 20px);
        padding: 12px;
    }

    .cookie-consent-modal-header h3 {
        font-size: 18px;
    }

    .cookie-consent-modal-actions {
        justify-content: stretch;
    }

    .cookie-consent-modal-actions .btn {
        width: 100%;
    }
    
    .navbar-brand {
        height: 60px;
        padding: 0;
        font-size: 19px;
        min-width: 0;
        flex: 1 1 auto;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-search-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border: 1px solid var(--rivo-border);
        border-radius: 10px;
        background: #fff;
        color: var(--rivo-black);
        flex: 0 0 auto;
    }

    .mobile-search-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: var(--rivo-text-gray);
    }

    .search-container {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 1300;
        margin: 0;
        padding: 12px 16px;
        border-bottom: 1px solid var(--rivo-border);
        background: #fff;
        display: none;
        max-width: none;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    .search-container.is-open {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .search-container .search-input {
        min-width: 0;
        padding: 10px 12px;
        background: #fff;
    }

    .user-menu {
        gap: 6px;
        flex: 0 0 auto;
    }

    .user-menu .btn {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        border-width: 1px;
        font-size: 13px;
    }

    .btn-header-upload {
        padding: 0 12px;
        min-width: 0;
        height: 36px;
        border-radius: 10px;
        box-shadow: none;
        white-space: nowrap;
        gap: 6px;
    }

    .btn-header-upload .upload-label {
        display: inline;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
    }

    .user-dropdown[open] .user-dropdown-menu {
        position: fixed;
        top: 60px;
        right: 0;
        left: 0;
        width: auto;
        max-height: calc(100vh - 60px);
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        overflow-y: auto;
        padding-top: 44px;
    }

    .user-dropdown-mobile-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        position: absolute;
        right: 10px;
        top: 8px;
        border: 1px solid var(--app-border);
        border-radius: 10px;
        background: var(--app-surface);
        color: var(--app-text-muted);
        cursor: pointer;
    }

    .mobile-hide-label {
        display: none;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .product-image {
        height: 200px;
    }

    .footer-content {
        gap: 20px;
        margin-bottom: 22px;
    }

    .footer-brand-about {
        max-width: none;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 12px;
    }

    .navbar-brand {
        font-size: 17px;
    }

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

    .product-image {
        height: 170px;
    }

    .description-card {
        padding: 14px;
    }
}

/* Utilities */
.text-center { text-align: center; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-4 { margin-top: 32px; }
.py-5 { padding: 60px 0; }
.gap-3 { gap: 24px; }
.d-flex { display: flex; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }

/* Bootstrap Icons override */
.bi {
    font-size: inherit;
    vertical-align: middle;
}

/* Address Autocomplete */
.suggestion-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--rivo-border);
    cursor: pointer;
    background-color: var(--rivo-white);
}

.suggestion-item:hover,
.suggestion-item.highlighted {
    background-color: var(--rivo-gray);
}

.suggestion-item:last-child {
    border-bottom: none;
}

[id$="-address-suggestions"],
#address-suggestions,
#edit-address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--rivo-white);
    border: 1px solid var(--rivo-border);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.address-input-wrapper {
    position: relative;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--rivo-text-gray);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 24px;
}

/* Product Description */
.product-detail-layout > * {
    min-width: 0;
}

.description-card {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--rivo-white);
    border: 1px solid var(--rivo-border);
    border-radius: 12px;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.description-content {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.description-content p {
    margin-bottom: 12px;
    color: var(--rivo-black);
    line-height: 1.65;
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 992px) {
    .product-detail-layout {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .product-detail-sidebar {
        position: static !important;
        top: auto !important;
    }
}

.description-content p:last-child {
    margin-bottom: 0;
}

.description-list {
    margin: 0 0 12px 0;
    padding-left: 18px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.description-list li {
    margin-bottom: 8px;
    color: var(--rivo-black);
    line-height: 1.6;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.description-list li:last-child {
    margin-bottom: 0;
}

.product-attribute-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.product-attribute-item {
    padding: 14px 16px;
    border: 1px solid var(--rivo-border);
    border-radius: 10px;
    background-color: var(--rivo-gray);
}

.product-attribute-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--rivo-text-gray);
}

.product-attribute-value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--rivo-black);
}

/* Product Show */
.product-show-surface {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
}

.product-show-main-image,
.product-show-main-image-empty {
    background: var(--app-surface-soft);
}

.product-show-main-stage {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.product-show-main-image {
    display: block;
    width: 100%;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: pan-y;
}

.product-show-main-image-empty-icon {
    color: var(--app-text-muted);
}

.product-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.88);
    background: rgba(15, 23, 42, 0.42);
    color: #fff;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    backdrop-filter: blur(3px);
}

.product-gallery-nav.is-prev {
    left: 12px;
}

.product-gallery-nav.is-next {
    right: 12px;
}

.product-gallery-nav i {
    font-size: 20px;
    line-height: 1;
}

.product-gallery-counter {
    position: absolute;
    left: 12px;
    bottom: 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    background: rgba(15, 23, 42, 0.58);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 4px 9px;
    z-index: 5;
}

.product-gallery-zoom-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    background: rgba(15, 23, 42, 0.58);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
    z-index: 5;
    cursor: pointer;
    backdrop-filter: blur(3px);
}

.product-gallery-zoom-btn i {
    font-size: 14px;
}

.product-gallery-swipe-hint {
    position: absolute;
    left: 50%;
    bottom: 52px;
    transform: translateX(-50%);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    background: rgba(15, 23, 42, 0.62);
    color: #fff;
    font-size: 12px;
    line-height: 1.25;
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.product-gallery-swipe-hint.is-visible {
    opacity: 1;
}

.product-gallery-swipe-hint i {
    font-size: 13px;
}

.product-show-thumb-btn {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.product-show-thumb-more-btn {
    border: 1px dashed var(--app-border);
    background: linear-gradient(180deg, var(--app-surface-soft), var(--app-surface));
    color: var(--app-text);
    font-size: 18px;
    font-weight: 700;
    border-radius: 8px;
    min-height: 78px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.product-show-thumb-btn.is-active {
    border-color: var(--app-accent, #0f766e);
    box-shadow: 0 0 0 2px var(--app-accent-soft, rgba(15, 118, 110, 0.18));
}

.product-show-title {
    color: var(--app-text);
}

.product-show-price-main {
    color: var(--app-accent, #0f766e);
}

.product-show-price-old {
    color: var(--app-text-muted);
}

.product-meta-panel {
    margin-bottom: 10px;
}

.product-meta-split {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px 12px;
    padding: 8px 10px;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface-soft);
}

.product-meta-split-left,
.product-meta-split-right {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
}

.product-meta-split-right {
    justify-content: flex-end;
}

.product-meta-compact-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--app-text-muted);
    white-space: nowrap;
}

.product-meta-compact-item i {
    font-size: 12px;
    color: var(--app-text-muted);
    opacity: 0.95;
}

.product-meta-compact-item strong {
    font-weight: 700;
    color: var(--app-text);
}

.home-ai-hero {
    width: 100%;
    margin: 0;
    padding: 70px 0 140px;
    background: transparent;
    overflow: hidden;
}

.home-ai-hero-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.home-ai-hero-title {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
    margin: 0;
}

.home-ai-hero-highlight {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 18px rgba(99, 102, 241, 0.35);
    display: inline-block;
    padding-left: 6px;
}

.home-ai-hero-subtitle {
    max-width: 760px;
    margin: 20px auto 0;
    font-size: 1rem;
    line-height: 1.7;
    color: #475569;
}

.home-ai-hero-actions {
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.home-ai-cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 14px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
}

.home-ai-cta-primary:hover {
    background: #1d4ed8;
    color: #fff;
    transform: translateY(-1px);
}

.home-ai-cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 14px;
    border: 1px solid #cbd5f5;
    color: #0f172a;
    background: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.home-ai-cta-secondary:hover {
    background: #f8fafc;
    color: #0f172a;
}

.home-ai-features {
    width: 100%;
    margin: 0;
    background: transparent;
    padding-bottom: 24px;
}

.home-ai-features-inner {
    max-width: 1080px;
    margin: -80px auto 0;
    padding: 0 24px 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    position: relative;
    z-index: 2;
}

.home-ai-feature-card {
    background: #fff;
    border-radius: 22px;
    padding: 28px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(148, 163, 184, 0.35);
}

.home-ai-feature-card h3 {
    margin: 16px 0 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.home-ai-feature-card p {
    margin: 0;
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.5;
}

.home-ai-feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin: 0 auto;
}

.home-ai-feature-icon svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.home-ai-feature-icon.icon-blue {
    background: #2563eb;
}

.home-ai-feature-icon.icon-purple {
    background: #8b5cf6;
}

.home-ai-feature-icon.icon-cyan {
    background: #06b6d4;
}

@media (max-width: 900px) {
    .home-ai-features-inner {
        grid-template-columns: 1fr;
        margin-top: -60px;
    }
}

@media (max-width: 640px) {
    .home-ai-hero {
        padding: 56px 0 120px;
    }
    .home-ai-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .home-ai-cta-primary,
    .home-ai-cta-secondary {
        width: 100%;
    }
    .home-ai-feature-card {
        padding: 22px;
    }
}

.product-meta-share {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding-bottom: 6px;
    margin-left: auto;
    flex-shrink: 0;
}

.product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.product-price-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.product-share-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-text);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}

.product-share-trigger i {
    font-size: 13px;
}

.product-share-trigger:hover {
    background: var(--app-surface-soft);
}

.product-share-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 180px;
    padding: 8px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 12px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 15;
}

.product-meta-share.is-open .product-share-dropdown {
    display: flex;
}

.product-meta-share:focus-within .product-share-dropdown {
    display: flex;
}

@media (hover: hover) and (pointer: fine) {
    .product-meta-share:hover .product-share-dropdown {
        display: flex;
    }
}

.product-meta-share::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 8px;
}

.product-share-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    background: var(--app-surface);
    color: var(--app-text);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
}

.product-share-link i {
    font-size: 14px;
}

.product-share-link:hover {
    background: var(--app-surface-soft);
    border-color: var(--app-border);
}

.product-share-link.is-copied {
    background: var(--app-surface-soft);
    border-color: var(--app-accent);
}

.product-share-link.is-facebook { color: #1877f2; }
.product-share-link.is-messenger { color: #0ea5e9; }
.product-share-link.is-linkedin { color: #0a66c2; }
.product-share-link.is-whatsapp { color: #16a34a; }
.product-share-link.is-telegram { color: #1d9bf0; }
.product-share-link.is-copy { color: var(--app-text); }

@media (max-width: 720px) {
    .product-price-row {
        flex-wrap: nowrap;
        gap: 10px;
    }
    .product-share-trigger {
        padding: 4px 8px;
        font-size: 11px;
    }
    .product-share-dropdown {
        min-width: 160px;
    }
}

.product-listing-footer-meta {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--app-border);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}

.product-listing-footer-item {
    font-size: 11.5px;
    line-height: 1.35;
    color: var(--app-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.product-listing-footer-item strong {
    color: var(--app-text);
    font-weight: 700;
}

.product-report-inline-btn {
    border: 1px solid transparent;
    background: transparent;
    color: var(--app-text-muted);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 999px;
    margin-left: auto;
    white-space: nowrap;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
}

.product-report-inline-btn:hover {
    background: var(--app-surface-soft);
    color: var(--app-text);
    border-color: var(--app-border);
    text-decoration-color: var(--app-text-muted);
}

.product-report-inline-btn i {
    font-size: 14px;
}

.product-show-sold-notice {
    background: #fff4e5;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.product-show-phone-box {
    border: 1px dashed var(--app-border);
    background: var(--app-surface-soft);
}

.product-show-phone-link {
    font-weight: 700;
    color: var(--app-accent, #0f766e);
    text-decoration: none;
}

.product-show-offer-box {
    border: 1px solid var(--app-border);
    background: var(--app-surface-soft);
}

.product-show-meta-label,
.product-show-meta-text {
    color: var(--app-text-muted);
}

.product-show-login-cta {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
}

.product-show-login-cta-title {
    color: #1e3a8a;
}

.product-show-login-cta-text {
    color: #1d4ed8;
}

.product-show-info-note {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.product-show-sold-chip {
    border: 1px solid #fed7aa;
    color: #9a3412;
    background: #fff7ed;
}

.product-show-delete-btn {
    color: #b91c1c !important;
    border-color: #fecaca !important;
}

.product-show-delete-btn:hover {
    background-color: #fff1f2 !important;
    border-color: #fca5a5 !important;
    color: #991b1b !important;
}

.product-show-avatar-empty {
    background: var(--app-surface-soft);
    color: var(--app-text-muted);
}

.product-show-seller-badge {
    border: 1px solid #d1fae5;
    background: #ecfdf5;
}

.product-show-seller-badge-title {
    color: #065f46;
}

.product-show-seller-badge-text {
    color: #166534;
}

.product-show-review-item {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.product-show-success-text {
    color: #065f46;
}

.re-summary-block {
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: var(--app-surface-soft);
    padding: 12px;
    margin-bottom: 12px;
    display: grid;
    gap: 10px;
}

.re-summary-main {
    min-width: 0;
}

.re-summary-address {
    font-size: 14px;
    font-weight: 700;
    color: var(--app-text);
    line-height: 1.3;
}

.re-summary-city {
    margin-top: 2px;
    font-size: 12px;
    color: var(--app-text-muted);
}

.re-summary-price {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

.re-summary-price-value {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--app-accent, #0f766e);
}

.re-summary-price-sub {
    font-size: 12px;
    color: var(--app-text-muted);
}

.re-summary-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.re-summary-fact {
    border: 1px solid var(--app-border);
    border-radius: 9px;
    background: var(--app-surface);
    padding: 7px 9px;
    min-width: 0;
}

.re-summary-fact span {
    display: block;
    font-size: 11px;
    color: var(--app-text-muted);
    margin-bottom: 2px;
}

.re-summary-fact strong {
    display: block;
    font-size: 13px;
    color: var(--app-text);
    line-height: 1.25;
}

.re-object-info-block {
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: var(--app-surface-soft);
    padding: 12px;
    margin-bottom: 12px;
}

.re-object-table {
    display: grid;
    gap: 6px;
}

.re-object-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 8px;
    border-bottom: 1px dashed var(--app-border);
    padding-bottom: 5px;
}

.re-object-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.re-object-key {
    font-size: 12px;
    color: var(--app-text-muted);
}

.re-object-val {
    font-size: 13px;
    color: var(--app-text);
    font-weight: 700;
    text-align: right;
}

.nt-location-map,
.real-estate-detail-map {
    width: 100%;
    height: 240px;
    border-radius: 10px;
    border: 1px solid var(--app-border);
    overflow: hidden;
    background: var(--app-surface-soft);
}

.nt-location-meta {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--app-text-muted);
}

.product-location-card {
    display: grid;
    gap: 10px;
}

.product-location-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-location-main i {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #0f766e;
    background: rgba(20, 184, 166, 0.14);
    border: 1px solid rgba(20, 184, 166, 0.32);
    flex: 0 0 auto;
}

.product-location-city {
    font-size: 16px;
    font-weight: 700;
    color: var(--app-text);
    line-height: 1.2;
}

.product-location-subtext {
    margin-top: 2px;
    font-size: 12px;
    color: var(--app-text-muted);
}

.product-location-line {
    font-size: 12px;
    color: var(--app-text-muted);
    line-height: 1.45;
    border: 1px solid var(--app-border);
    border-radius: 9px;
    background: var(--app-surface-soft);
    padding: 8px 10px;
}

.product-location-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.product-location-info-item {
    border: 1px solid var(--app-border);
    border-radius: 9px;
    background: var(--app-surface-soft);
    padding: 7px 9px;
    min-width: 0;
}

.product-location-info-item span {
    display: block;
    font-size: 11px;
    color: var(--app-text-muted);
    margin-bottom: 2px;
}

.product-location-info-item strong {
    display: block;
    font-size: 13px;
    color: var(--app-text);
    font-weight: 700;
    line-height: 1.25;
}

.product-location-map-btn {
    width: 100%;
}

.real-estate-detail-map + .product-location-map-btn {
    margin-top: 10px;
}

.product-location-tips {
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface-soft);
    padding: 9px 10px;
    display: grid;
    gap: 8px;
}

.product-location-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--app-text-muted);
}

.product-location-tip i {
    font-size: 14px;
    line-height: 1;
    margin-top: 1px;
    color: var(--app-accent, #0f766e);
    flex: 0 0 auto;
}

.product-facts-more summary {
    color: var(--app-text);
}

.description-collapsed {
    max-height: 170px;
    overflow: hidden;
    position: relative;
}

.description-collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 54px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--app-surface) 78%);
    pointer-events: none;
}

.product-gallery-dots {
    margin-top: 10px;
    justify-content: center;
    gap: 6px;
}

.product-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #cbd5e1;
}

.product-gallery-dot.is-active {
    background: var(--app-accent, #0f766e);
    width: 18px;
}

.product-mobile-actions {
    display: none;
}

.product-action-btn,
.product-mobile-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.product-action-btn span,
.product-mobile-action-btn span {
    line-height: 1.2;
}

.mobile-revealed-phone-box {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    z-index: 1450;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    border-radius: 12px;
    padding: 10px 12px;
    text-align: center;
    box-shadow: var(--app-shadow);
}

.product-message-modal {
    position: fixed;
    inset: 0;
    z-index: 2100;
}

.product-message-modal[hidden] {
    display: none !important;
}

.product-message-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
}

.product-message-modal-card {
    position: relative;
    width: min(560px, calc(100vw - 24px));
    margin: 8vh auto 0;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 14px;
    box-shadow: var(--app-shadow);
    padding: 16px;
}

.product-message-modal-close {
    position: absolute;
    right: 10px;
    top: 10px;
    border: 1px solid var(--app-border);
    border-radius: 9px;
    width: 32px;
    height: 32px;
    background: var(--app-surface);
    color: var(--app-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

body.message-modal-open {
    overflow: hidden;
}

.product-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.product-gallery-lightbox[hidden] {
    display: none !important;
}

.product-gallery-lightbox.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.product-gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.86);
}

.product-gallery-lightbox-card {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100vw - 26px));
    height: min(88vh, 860px);
    margin: 6vh auto;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 14px;
    background: rgba(6, 12, 22, 0.9);
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.34);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-gallery-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.46);
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.product-gallery-lightbox-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.product-gallery-lightbox-bottom {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.product-gallery-lightbox-counter {
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.46);
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 11px;
}

.product-gallery-lightbox-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.product-gallery-lightbox-nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.46);
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.product-gallery-lightbox-nav-btn i {
    font-size: 19px;
    line-height: 1;
}

body.gallery-lightbox-open {
    overflow: hidden;
}

@media (max-width: 992px) {
    .product-sidebar-buyer-actions {
        display: none !important;
    }

    .product-mobile-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        gap: 6px;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
        background: var(--app-surface);
        border-top: 1px solid var(--app-border);
        box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.08);
        z-index: 1400;
    }

    .product-mobile-actions .product-mobile-action-btn {
        width: 100%;
        min-height: 54px;
        font-size: 11px;
        padding: 4px 4px 5px;
        border-width: 1px;
        border-radius: 10px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
    }

    .product-mobile-actions .product-mobile-action-btn i {
        font-size: 19px;
        line-height: 1;
    }

    .product-mobile-actions .product-mobile-action-btn span {
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.1;
    }

    .product-show-page {
        padding-bottom: 102px !important;
    }

    .product-location-card {
        gap: 9px;
    }

    .product-gallery-nav {
        width: 38px;
        height: 38px;
    }

    .product-gallery-counter {
        bottom: 10px;
        left: 10px;
    }

    .product-gallery-zoom-btn {
        right: 10px;
        bottom: 10px;
        padding: 5px 9px;
    }

    .product-gallery-swipe-hint {
        bottom: 50px;
        max-width: calc(100% - 20px);
    }

    .product-gallery-lightbox-card {
        width: calc(100vw - 12px);
        height: min(84vh, 760px);
        margin: 3vh auto;
        border-radius: 12px;
    }
}

@media (min-width: 993px) {
    .mobile-revealed-phone-box {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .product-attribute-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .product-attribute-item {
        padding: 12px;
    }

    .product-show-title {
        font-size: 22px !important;
    }

    .product-show-price-main {
        font-size: 26px !important;
    }

    .product-mobile-actions .product-mobile-action-btn {
        font-size: 10px;
        min-height: 52px;
        padding: 4px 3px 5px;
    }

    .product-mobile-actions .product-mobile-action-btn i {
        font-size: 18px;
    }

    .mobile-revealed-phone-box {
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    .product-show-thumb-btn {
        display: inline-flex;
    }
    .product-show-thumb-more-btn {
        display: inline-flex;
    }

    .product-location-title {
        margin-bottom: 8px !important;
    }

    .product-location-main i {
        width: 30px;
        height: 30px;
        font-size: 15px;
    }

    .product-location-city {
        font-size: 15px;
    }

    .product-location-line {
        font-size: 11px;
        padding: 7px 8px;
    }

    .product-location-tips {
        padding: 8px 9px;
        gap: 7px;
    }

    .product-location-tip {
        font-size: 11px;
    }

    .product-location-map-btn {
        min-height: 40px;
        font-size: 12px;
    }

    .product-gallery-nav {
        width: 34px;
        height: 34px;
    }

    .product-gallery-nav i {
        font-size: 18px;
    }

    .product-gallery-counter {
        font-size: 11px;
        padding: 4px 8px;
    }

    .product-gallery-zoom-btn {
        width: 34px;
        height: 34px;
        padding: 0;
        justify-content: center;
    }

    .product-gallery-zoom-btn span {
        display: none;
    }

    .product-gallery-swipe-hint {
        font-size: 11px;
        bottom: 46px;
        padding: 4px 8px;
    }

    .product-gallery-lightbox-bottom {
        gap: 8px;
    }

    .product-gallery-lightbox-counter {
        font-size: 12px;
        padding: 4px 9px;
    }

    .product-gallery-lightbox-nav-btn {
        width: 34px;
        height: 34px;
    }

    .product-message-modal-card {
        margin-top: auto;
        width: 100%;
        border-radius: 14px 14px 0 0;
        min-height: 52vh;
        max-height: 82vh;
        overflow-y: auto;
    }

    .product-message-modal:not([hidden]) {
        display: flex;
        align-items: flex-end;
    }
}

/* Messages */
.messages-page {
    padding: 24px 0;
}

.messages-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 18px;
    min-height: 72vh;
}

.messages-sidebar,
.chat-panel,
.messages-placeholder {
    background: var(--rivo-white);
    border: 1px solid var(--rivo-border);
    border-radius: 14px;
    overflow: hidden;
}

.messages-sidebar-header {
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--rivo-border);
}

.messages-sidebar-header h1 {
    font-size: 20px;
    margin: 0 0 4px;
}

.messages-sidebar-header p {
    margin: 0;
    color: var(--rivo-text-gray);
    font-size: 13px;
}

.messages-conversation-list {
    max-height: calc(72vh - 70px);
    overflow-y: auto;
}

.messages-conversation-item {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--rivo-border);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s;
}

.messages-conversation-item:hover,
.messages-conversation-item.is-active {
    background: #fff4f4;
}

.messages-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--rivo-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.messages-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.messages-conversation-content {
    min-width: 0;
    flex: 1;
}

.messages-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.messages-row strong {
    font-size: 14px;
}

.messages-row small {
    color: var(--rivo-text-gray);
    font-size: 11px;
    white-space: nowrap;
}

.messages-snippet {
    font-size: 13px;
    color: var(--rivo-text-gray);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.messages-thread-context {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--rivo-text-gray);
    margin: 2px 0 6px;
}

.messages-badge {
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--rivo-red);
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.messages-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rivo-text-gray);
    text-align: center;
}

.messages-placeholder i,
.messages-empty i {
    font-size: 36px;
    margin-bottom: 10px;
}

.messages-empty {
    text-align: center;
    padding: 28px 20px;
}

.chat-panel {
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--rivo-border);
}

.chat-back {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--rivo-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--rivo-black);
    text-decoration: none;
}

.chat-header-meta h2 {
    margin: 0;
    font-size: 16px;
}

.chat-header-meta span {
    color: var(--rivo-text-gray);
    font-size: 12px;
}

.chat-messages {
    overflow-y: auto;
    padding: 14px 16px;
    background: linear-gradient(180deg, #fff 0%, #fff8f8 100%);
}

.chat-product-context {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--rivo-border);
    background: #fff7f7;
}

.chat-product-context img,
.chat-product-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--rivo-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-product-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-product-meta a {
    color: var(--rivo-black);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 360px;
}

.chat-product-meta span {
    color: var(--rivo-text-gray);
    font-size: 12px;
}

.chat-bubble-row {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 12px;
}

.chat-bubble-row.is-own {
    justify-content: flex-end;
}

.chat-bubble {
    max-width: min(540px, 85%);
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--rivo-border);
    background: #ffffff;
}

.chat-bubble-row.is-own .chat-bubble {
    border-color: #ffc4c4;
    background: #fff0f0;
}

.chat-bubble p {
    margin: 0 0 8px;
    white-space: pre-wrap;
    line-height: 1.45;
}

.chat-bubble time {
    display: block;
    text-align: right;
    color: var(--rivo-text-gray);
    font-size: 11px;
}

.chat-product-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--rivo-text-gray);
    margin-bottom: 6px;
}

.chat-compose {
    border-top: 1px solid var(--rivo-border);
    background: #fff;
    padding: 12px 14px;
}

.chat-compose textarea {
    width: 100%;
    min-height: 86px;
    max-height: 170px;
    border: 1px solid var(--rivo-border);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    resize: vertical;
}

.chat-compose textarea:focus {
    outline: none;
    border-color: var(--rivo-red);
}

.chat-compose-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.chat-compose-actions small {
    color: var(--rivo-text-gray);
}

/* Sticky message bubble */
.sticky-message-bubble {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: min(340px, calc(100vw - 32px));
    background: var(--rivo-white);
    border: 1px solid var(--rivo-border);
    border-radius: 14px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.2);
    padding: 12px;
    z-index: 2200;
}

.sticky-message-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: var(--rivo-text-gray);
}

.sticky-message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding-right: 18px;
}

.sticky-message-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--rivo-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticky-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sticky-message-meta strong {
    display: block;
    font-size: 13px;
}

.sticky-message-meta small {
    color: var(--rivo-text-gray);
    font-size: 11px;
}

.sticky-message-product {
    font-size: 11px;
    color: var(--rivo-text-gray);
    margin-bottom: 6px;
}

.sticky-message-text {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.35;
    max-height: 52px;
    overflow: hidden;
}

.sticky-message-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 8px;
}

.sticky-message-form input {
    border: 1px solid var(--rivo-border);
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
    font-size: 13px;
}

.sticky-message-form button {
    border: 0;
    border-radius: 8px;
    background: var(--rivo-red);
    color: #fff;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.sticky-message-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sticky-message-open {
    display: inline-block;
    font-size: 12px;
    color: var(--rivo-link);
    text-decoration: none;
}

.sticky-message-open:hover {
    text-decoration: underline;
}

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

    .messages-sidebar {
        max-height: 320px;
    }

    .messages-conversation-list {
        max-height: 240px;
    }

    .chat-bubble {
        max-width: 92%;
    }

    .chat-product-meta a {
        max-width: 100%;
    }

    .chat-compose-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

.products-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.dynamic-filters-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.products-checkbox-chip {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-text);
}

.products-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.products-search-main-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 290px) minmax(170px, 220px) auto;
    gap: 10px;
    align-items: center;
}

.products-search-autocomplete-wrap {
    position: relative;
    min-width: 0;
}

.products-category-trigger {
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    justify-content: space-between;
    gap: 8px;
}

.products-category-trigger .home-klassic-category-trigger-text {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.products-search-submit-btn {
    height: 42px;
    padding: 0 16px;
    white-space: nowrap;
}

.products-city-filter {
    height: 42px;
    border-radius: 12px;
}

.products-search-secondary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.products-clear-btn {
    height: 34px;
    border-radius: 999px;
    padding: 0 12px;
    font-size: 12px;
}

.products-search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
    z-index: 1200;
    max-height: 320px;
    overflow: auto;
    padding: 6px;
}

.products-search-suggestion-btn {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--app-text);
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
}

.products-search-suggestion-btn:hover,
.products-search-suggestion-btn.is-active {
    background: var(--app-surface-soft);
}

.products-search-suggestion-title {
    font-size: 14px;
    font-weight: 700;
}

.products-search-suggestion-meta {
    font-size: 12px;
    color: var(--app-text-muted);
    text-transform: lowercase;
}

.products-toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.products-filter-toggle-btn {
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
}

.products-filters-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.products-filters-close-btn {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-text-muted);
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.products-filters-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.38);
    z-index: 1180;
}

.products-page .products-search-surface {
    background: var(--app-surface);
    border-color: var(--app-border);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.products-page .products-search-surface .search-input,
.products-page .products-search-surface .form-control,
.products-page .products-search-surface .products-checkbox-chip {
    background: var(--app-surface);
    border-color: var(--app-border);
}

.products-page .products-filters-panel {
    background: var(--app-surface);
}

.products-page .products-filters-panel > .products-filter-grid > div[id="dynamicFiltersWrap"] > div {
    background: var(--app-surface-soft);
    border-color: var(--app-border);
}

.products-results-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.products-results-layout.has-dynamic-sidebar {
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
}

.products-results-main {
    min-width: 0;
}

.products-page .products-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.products-page .products-list-grid > .product-card {
    min-width: 0;
}

.products-page .products-list-grid .product-info {
    min-width: 0;
}

.products-dynamic-sidebar[hidden] {
    display: none !important;
}

.products-dynamic-sidebar {
    position: sticky;
    top: 74px;
}

.products-mobile-filters-open-btn {
    display: none;
}

.products-mobile-filters-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.45);
    z-index: 1280;
}

.products-dynamic-sidebar-card {
    border-radius: 16px;
    padding: 12px;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
}

.products-dynamic-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.products-dynamic-sidebar-head h3 {
    font-size: 15px;
    margin: 0;
}

.products-dynamic-filters-list {
    display: grid;
    gap: 10px;
}

.products-more-filters-wrap {
    display: grid;
    gap: 10px;
    padding-top: 2px;
}

.products-more-filters-wrap[hidden] {
    display: none !important;
}

.products-dynamic-filter-block {
    display: grid;
    gap: 6px;
}

.products-dynamic-filter-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--app-text-muted);
}

.products-dynamic-filter-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.products-dynamic-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--app-text);
}

.products-more-filters-toggle {
    margin-top: 2px;
    width: 100%;
    border-radius: 10px;
    font-size: 13px;
    padding: 8px 10px;
}

.products-breadcrumbs {
    margin: 0 0 12px;
}

.global-breadcrumb-wrap {
    padding-top: 10px;
}

.products-breadcrumbs-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.products-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.products-breadcrumb-sep {
    color: var(--app-text-muted);
    font-size: 12px;
    margin: 0 2px;
}

.products-breadcrumb-link,
.products-breadcrumb-current {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.35;
}

.products-breadcrumb-link {
    color: var(--app-text-muted);
    text-decoration: none;
}

.products-breadcrumb-link:hover {
    color: var(--app-text);
    text-decoration: underline;
}

.products-breadcrumb-current {
    color: var(--app-text);
    font-weight: 700;
}

body.filters-panel-open {
    overflow: hidden;
}

@media (max-width: 992px) {
    .products-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dynamic-filters-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .products-results-layout {
        grid-template-columns: 1fr;
    }

    .products-results-layout.has-dynamic-sidebar {
        grid-template-columns: 1fr;
    }

    .products-mobile-filters-open-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .products-dynamic-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: min(88vw, 360px);
        max-width: 360px;
        background: var(--app-surface);
        z-index: 1290;
        transform: translateX(110%);
        transition: transform 0.22s ease;
        overflow-y: auto;
        padding: 10px;
    }

    .products-dynamic-sidebar.is-open {
        transform: translateX(0);
    }

    .products-dynamic-sidebar-card {
        width: 100%;
        border-radius: 12px;
    }

    .products-mobile-filters-open {
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    .products-search-main-row {
        grid-template-columns: 1fr;
    }

    .products-category-trigger,
    .products-city-filter,
    .products-search-submit-btn {
        width: 100%;
    }

    .products-category-trigger .home-klassic-category-trigger-text {
        max-width: none;
    }

    .products-search-secondary-row {
        justify-content: flex-start;
    }

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

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

@media (max-width: 480px) {
    .products-search-main-row {
        grid-template-columns: 1fr;
    }

    .products-search-row {
        grid-template-columns: 1fr;
    }

    .products-search-row .btn {
        width: 100%;
    }

    .products-filter-grid {
        grid-template-columns: 1fr;
    }

    .dynamic-filters-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .products-filters-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1190;
        border-radius: 18px 18px 0 0 !important;
        border-bottom: 0 !important;
        max-height: 82vh;
        overflow-y: auto;
        background: var(--app-surface);
        transform: translateY(105%);
        transition: transform 0.24s ease;
    }

    .products-filters-panel.is-open {
        transform: translateY(0);
    }
}

@media (min-width: 921px) {
    .products-filters-panel {
        position: relative;
        z-index: 1;
    }

    .products-filters-backdrop {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .products-page .products-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px;
    }

    .products-page .products-list-grid .product-card {
        display: block;
        min-height: 0;
    }

    .products-page .products-list-grid .product-image,
    .products-page .products-list-grid .product-image-empty {
        height: 170px;
    }

    .products-page .products-list-grid .product-info {
        padding: 10px;
        display: block;
    }

    .products-page .products-list-grid .product-title {
        white-space: nowrap;
        display: block;
        -webkit-line-clamp: initial;
        -webkit-box-orient: initial;
    }

    .products-toolbar-row {
        align-items: stretch;
    }

    .products-toolbar-row .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Product New page */
.new-product-page {
    padding: 32px 16px 44px !important;
}

.new-product-shell {
    max-width: 860px;
    margin: 0 auto;
}

.new-product-form {
    border-radius: 12px !important;
}

.new-product-page .new-product-description {
    min-height: 160px;
    line-height: 1.5;
    resize: vertical;
    overflow-y: auto;
}

.new-product-page #dynamicFieldsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.new-form-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.new-form-surface-soft {
    border: 1px solid var(--app-border);
    background: var(--app-surface-soft);
}

.city-input-wrapper {
    position: relative;
}

.city-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1300;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
    padding: 6px;
}

.city-suggestion-group-title {
    padding: 6px 10px 4px;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--app-text-muted);
    font-weight: 700;
}

.city-suggestion-divider {
    height: 1px;
    background: var(--app-border);
    margin: 4px 8px;
}

.city-suggestion-item {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--app-text);
    cursor: pointer;
}

.city-suggestion-item:hover,
.city-suggestion-item.is-active {
    background: var(--app-surface-soft);
}

.new-form-notice-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.new-form-guest-notice {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.category-wizard-trigger-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.category-wizard-trigger-row .btn {
    height: 40px;
    padding: 0 14px;
    white-space: nowrap;
}

.category-wizard-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
}

body.category-wizard-open {
    overflow: hidden;
}

.category-wizard-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.48);
    backdrop-filter: blur(2px);
}

.category-wizard-dialog {
    position: relative;
    width: min(1100px, calc(100vw - 32px));
    margin: 64px auto 24px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    max-height: calc(100vh - 96px);
    overflow: auto;
}

.category-wizard-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--app-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.category-wizard-header h3 {
    margin: 0;
    font-size: 30px;
    font-weight: 600;
    color: var(--app-text);
}

.category-wizard-close-btn {
    border: 0;
    background: transparent;
    color: var(--app-text);
    font-size: 28px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
}

.category-wizard-close-btn:hover {
    background: var(--app-surface-soft);
}

.category-wizard-search-wrap {
    padding: 14px 20px 8px;
}

.category-wizard-suggestions {
    margin: 0 20px 10px;
    padding: 10px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: var(--app-surface-soft);
}

.category-wizard-suggestions-title {
    font-size: 12px;
    color: var(--app-text-muted);
    margin-bottom: 8px;
}

.category-wizard-suggestions-list {
    display: grid;
    gap: 8px;
}

.category-wizard-suggestion-item {
    text-align: left;
    width: 100%;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface);
    color: var(--app-text);
    padding: 8px 10px;
    cursor: pointer;
}

.category-wizard-suggestion-item:hover {
    border-color: #38bdf8;
}

.category-wizard-suggestion-label {
    font-size: 13px;
    font-weight: 700;
}

.category-wizard-columns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 20px 20px;
    max-height: 56vh;
    overflow: hidden;
}

.category-wizard-col {
    min-width: 0;
}

.category-wizard-col-list {
    border: 1px solid var(--app-border);
    border-radius: 12px;
    overflow: auto;
    max-height: calc(56vh - 56px);
    background: var(--app-surface);
}

.category-wizard-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px 2px 4px;
}

.category-wizard-crumb {
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-text);
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    padding: 6px 10px;
    cursor: pointer;
}

.category-wizard-crumb:hover {
    border-color: #14b8a6;
}

.category-wizard-crumb.is-active {
    border-color: #0f766e;
    color: #0f766e;
    background: rgba(20, 184, 166, 0.1);
}

.category-wizard-crumb-sep {
    color: var(--app-text-muted);
    font-size: 12px;
    line-height: 1;
}

.category-wizard-item {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--app-border);
    background: transparent;
    color: var(--app-text);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    text-align: left;
}

.category-wizard-item:last-child {
    border-bottom: 0;
}

.category-wizard-item:hover {
    background: var(--app-surface-soft);
}

.category-wizard-item.is-active {
    background: rgba(14, 165, 233, 0.12);
}

.category-wizard-item-label {
    font-size: 15px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-wizard-root-icon {
    color: #f59e0b;
    font-size: 24px;
}

.category-wizard-sub-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #cbd5e1;
}

/* Auth pages */
.auth-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
}

.auth-title {
    color: var(--app-text);
}

.auth-muted-text {
    color: var(--app-text-muted);
}

.auth-check-label {
    color: var(--app-text);
}

.auth-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* CMS pages */
.cms-page-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
}

.cms-page-title {
    color: var(--app-text);
}

.cms-page-updated {
    color: var(--app-text-muted);
}

.cms-content {
    color: var(--app-text);
}

.cms-content p,
.cms-content li,
.cms-content blockquote,
.cms-content td,
.cms-content th {
    color: var(--app-text);
}

.cms-content h1,
.cms-content h2,
.cms-content h3,
.cms-content h4,
.cms-content h5,
.cms-content h6 {
    color: var(--app-text);
    line-height: 1.3;
    margin: 1em 0 0.55em;
}

.cms-content a {
    color: var(--app-accent, var(--rivo-link));
    text-decoration-color: currentColor;
}

.cms-content hr {
    border: 0;
    border-top: 1px solid var(--app-border);
    margin: 1.2em 0;
}

.cms-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.cms-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1em 0;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface);
}

.cms-table-wrap table {
    margin: 0;
    border: 0;
    min-width: 560px;
}

.cms-content th,
.cms-content td {
    border: 1px solid var(--app-border);
    padding: 8px 10px;
}

.cms-content code {
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: 6px;
    padding: 1px 5px;
}

.cms-content pre {
    background: var(--app-surface-soft);
    border: 1px solid var(--app-border);
    border-radius: 10px;
    padding: 10px 12px;
    overflow: auto;
}

.cms-page--doc .cms-page-card--doc {
    padding: 28px clamp(16px, 3vw, 34px);
    border-radius: 16px;
}

.cms-page--doc .cms-page-header {
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--app-border);
}

.cms-page--doc .cms-page-title {
    font-size: clamp(30px, 3vw, 38px);
    line-height: 1.14;
    letter-spacing: -0.02em;
}

.cms-page--doc .cms-page-updated {
    font-size: 13px;
}

.cms-content--doc {
    max-width: 780px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--app-text);
}

.cms-content--doc p {
    margin: 0 0 14px;
}

.cms-content--doc h2 {
    margin: 34px 0 14px;
    padding-top: 8px;
    font-size: clamp(28px, 2.5vw, 34px);
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.cms-content--doc h3,
.cms-content--doc .cms-auto-subtitle {
    margin: 20px 0 8px;
    font-size: 21px;
    line-height: 1.35;
    color: var(--app-text);
}

.cms-content--doc ul,
.cms-content--doc ol {
    margin: 0 0 16px;
    padding-left: 1.7em;
    list-style-position: outside;
}

.cms-content--doc li {
    margin: 0 0 8px;
    line-height: 1.65;
    padding-left: 2px;
}

.cms-content--doc li:last-child {
    margin-bottom: 0;
}

.cms-content--doc p + ul,
.cms-content--doc p + ol,
.cms-content--doc h3 + ul,
.cms-content--doc h3 + ol,
.cms-content--doc .cms-auto-subtitle + ul,
.cms-content--doc .cms-auto-subtitle + ol {
    margin-top: 8px;
}

.cms-content--doc .cms-lead-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--app-border);
    background: var(--app-surface-soft);
    font-size: 13px;
    line-height: 1.3;
}

.cms-content--doc .faq-accordion {
    display: grid;
    gap: 10px;
    margin: 16px 0 10px;
}

.cms-content--doc details.faq-item {
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: var(--app-surface-soft);
    overflow: hidden;
}

.cms-content--doc details.faq-item > summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    font-weight: 700;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cms-content--doc details.faq-item > summary::-webkit-details-marker {
    display: none;
}

.cms-content--doc details.faq-item > summary::after {
    content: '+';
    font-size: 18px;
    line-height: 1;
    color: var(--app-text-muted);
    flex: 0 0 auto;
}

.cms-content--doc details.faq-item[open] > summary::after {
    content: '−';
}

.cms-content--doc details.faq-item[open] > summary {
    border-bottom: 1px solid var(--app-border);
}

.cms-content--doc .faq-answer {
    padding: 12px 16px 16px;
    color: var(--app-text);
}

.cms-content--doc .faq-answer p:last-child,
.cms-content--doc .faq-answer ul:last-child,
.cms-content--doc .faq-answer ol:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .cms-page--doc .cms-page-card--doc {
        padding: 18px 14px;
    }

    .cms-content--doc {
        font-size: 15px;
        line-height: 1.72;
    }

    .cms-content--doc h2 {
        margin-top: 28px;
        font-size: 26px;
    }

    .cms-content--doc h3,
    .cms-content--doc .cms-auto-subtitle {
        font-size: 19px;
    }

    .cms-table-wrap {
        border-radius: 8px;
    }

    .cms-table-wrap table {
        min-width: 520px;
    }
}

/* Admin CMS editor */
.cms-editor-toolbar.ql-toolbar.ql-snow {
    border: 1px solid var(--app-border);
    border-radius: 10px 10px 0 0;
    background: var(--app-surface-soft);
}

.cms-editor-surface.ql-container.ql-snow {
    min-height: 360px;
    border: 1px solid var(--app-border);
    border-top: 0;
    border-radius: 0 0 10px 10px;
    background: var(--app-surface);
}

.cms-editor-surface .ql-editor {
    font-size: 15px;
    line-height: 1.7;
}

.cms-editor-surface .ql-editor ul,
.cms-editor-surface .ql-editor ol {
    padding-left: 1.5em;
}

html[data-theme="dark"] .cms-editor-toolbar.ql-toolbar.ql-snow,
html[data-theme="dark"] .cms-editor-surface.ql-container.ql-snow {
    border-color: var(--app-border);
}

/* Users pages */
.users-page [style*="background-color: var(--rivo-white)"],
.users-page [style*="background: #fff"],
.users-page [style*="background:#fff"] {
    background: var(--app-surface) !important;
}

.users-page [style*="border: 1px solid var(--rivo-border)"],
.users-page [style*="border:1px solid var(--rivo-border)"] {
    border-color: var(--app-border) !important;
}

.users-page [style*="color: var(--rivo-black)"] {
    color: var(--app-text) !important;
}

.users-page [style*="color: var(--rivo-text-gray)"] {
    color: var(--app-text-muted) !important;
}

/* Products pages */
.products-page [style*="background-color: var(--rivo-white)"],
.products-page [style*="background: #fff"],
.products-page [style*="background:#fff"] {
    background: var(--app-surface) !important;
}

.products-page [style*="border: 1px solid var(--rivo-border)"],
.products-page [style*="border:1px solid var(--rivo-border)"] {
    border-color: var(--app-border) !important;
}

.products-page [style*="color: var(--rivo-black)"] {
    color: var(--app-text) !important;
}

.products-page [style*="color: var(--rivo-text-gray)"] {
    color: var(--app-text-muted) !important;
}

/* Profile page */
.profile-page {
    padding: 30px 16px 44px !important;
}

.profile-layout {
    align-items: start;
}

.profile-card {
    border-radius: 12px !important;
}

/* Messages list page variant */
.messages-layout-compact {
    max-width: 980px !important;
    margin: 28px auto !important;
}

@media (max-width: 992px) {
    .new-product-page {
        padding: 22px 14px 36px !important;
    }

    .new-product-form {
        padding: 20px !important;
    }

    .new-product-page .form-control {
        font-size: 16px;
    }

    .new-product-page .new-product-description {
        min-height: 170px;
    }

    .category-wizard-dialog {
        width: min(100vw - 16px, 980px);
        margin-top: 24px;
    }

    .category-wizard-header h3 {
        font-size: 24px;
    }

    .category-wizard-columns {
        display: flex;
        flex-direction: column;
        max-height: 62vh;
    }

    .new-form-two-cols {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .new-product-page #dynamicFieldsGrid {
        grid-template-columns: 1fr !important;
    }

    .new-form-actions {
        flex-direction: column-reverse;
    }

    .new-form-actions .btn {
        width: 100%;
    }

    .profile-page {
        padding: 22px 14px 36px !important;
    }

    .profile-layout {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .profile-card {
        padding: 16px !important;
    }
}

@media (max-width: 768px) {
    .profile-header-row {
        align-items: flex-start !important;
    }

    .profile-meta-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .messages-layout-compact {
        margin: 12px auto !important;
    }

    .messages-sidebar-header {
        padding: 14px 14px 10px;
    }

    .chat-header {
        padding: 12px;
    }

    .chat-messages {
        padding: 10px 12px;
    }

    .chat-compose {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .new-product-page {
        padding: 18px 10px 28px !important;
    }

    .new-product-form {
        padding: 14px !important;
    }

    .new-product-page .new-product-description {
        min-height: 180px;
    }

    .category-wizard-trigger-row {
        grid-template-columns: 1fr;
    }

    .category-wizard-trigger-row .btn {
        width: 100%;
    }

    .category-wizard-dialog {
        width: calc(100vw - 8px);
        margin: 8px auto;
        border-radius: 10px;
        max-height: calc(100vh - 16px);
    }

    .category-wizard-header {
        padding: 12px 14px;
    }

    .category-wizard-header h3 {
        font-size: 21px;
    }

    .category-wizard-search-wrap {
        padding: 10px 14px 8px;
    }

    .category-wizard-suggestions {
        margin: 0 14px 10px;
    }

    .category-wizard-columns {
        display: flex;
        flex-direction: column;
        padding: 8px 14px 14px;
        max-height: 66vh;
    }

    .profile-page {
        padding: 18px 10px 28px !important;
    }

    .profile-card {
        padding: 12px !important;
    }
}

/* Material 3 Inspired Home */
.md3-surface {
    background:
        radial-gradient(circle at 14% 18%, rgba(186, 230, 253, 0.45), transparent 42%),
        radial-gradient(circle at 86% 14%, rgba(254, 215, 170, 0.4), transparent 40%),
        linear-gradient(180deg, #ffffff 0%, #fdfcff 100%);
    border: 1px solid var(--app-border);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.md3-hero-wrap {
    background: transparent;
}

.md3-hero {
    position: relative;
}

.home-hero-lead,
.home-seller-city {
    color: var(--app-text-muted);
}

.md3-hero-glow {
    position: absolute;
    inset: -60px -80px auto auto;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: transparent;
    pointer-events: none;
}

.md3-chip,
.md3-chip-soft {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.md3-chip {
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1e3a8a;
    padding: 5px 10px;
}

.md3-chip-soft {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
    padding: 3px 8px;
}

.md3-stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
}

.md3-stat-num {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.md3-stat-label {
    margin-top: 4px;
    color: #6b7280;
    font-size: 11px;
}

.md3-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.md3-category-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
}

.md3-category-cover {
    width: 100%;
    height: 148px;
    object-fit: cover;
    background: #f3f4f6;
}

.md3-category-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: #9ca3af;
}

.md3-seller-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.md3-seller-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
}

.md3-seller-avatar {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
}

.md3-seller-avatar-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 20px;
}

.md3-seller-metric {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px;
    text-align: center;
}

.md3-seller-metric strong {
    display: block;
    font-size: 16px;
}

.md3-seller-metric span {
    display: block;
    font-size: 11px;
    color: #6b7280;
}

/* Home categories redesign */
.home-cats-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(360px, 420px);
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 2px 12px;
}

/* Homepage classic layout */
.home-klassic-wrap {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 18px 0 26px;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(224, 242, 254, 0.95) 0%, rgba(248, 250, 252, 0.95) 45%, rgba(255, 255, 255, 1) 100%),
        radial-gradient(90% 90% at 100% 0%, rgba(245, 208, 254, 0.9) 0%, rgba(248, 250, 252, 0.9) 55%, rgba(255, 255, 255, 0) 100%);
}

html[data-theme="dark"] .home-klassic-wrap {
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(59, 130, 246, 0.18) 0%, rgba(30, 41, 59, 0.92) 45%, rgba(2, 6, 23, 1) 100%),
        radial-gradient(90% 90% at 100% 0%, rgba(168, 85, 247, 0.2) 0%, rgba(15, 23, 42, 0.85) 55%, rgba(2, 6, 23, 0) 100%);
}

.home-klassic-shell {
    display: grid;
    gap: 14px;
    padding: 0 20px;
}

.home-klassic-search-card,
.home-main-categories-card,
.home-latest-card {
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: var(--app-surface);
    padding: 12px;
}

.home-klassic-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 300px) minmax(160px, 220px) auto;
    gap: 8px;
    align-items: center;
}

.home-klassic-search-form > * {
    min-width: 0;
}

.home-klassic-search-input {
    height: 44px;
}

.home-klassic-category-trigger {
    height: 44px;
    min-width: 0;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: var(--app-surface-soft);
    color: var(--app-text);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.home-klassic-category-trigger:hover {
    border-color: #38bdf8;
    background: var(--app-surface);
}

.home-klassic-category-trigger-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
}

.home-category-wizard-footer {
    border-top: 1px solid var(--app-border);
    padding: 12px 20px 16px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.home-category-wizard-footer .btn {
    min-height: 40px;
}

.home-klassic-search-btn {
    min-height: 44px;
    padding: 0 16px;
}

.home-klassic-city-select {
    height: 44px;
    border-radius: 12px;
}

.home-saved-searches {
    margin-top: 10px;
}

.home-saved-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.home-saved-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.home-saved-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    color: inherit;
    text-decoration: none;
    background: var(--app-surface-soft);
    max-width: 260px;
}

.home-saved-chip span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-create-btn {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 50px;
    border-radius: 12px;
    background: #0f766e;
    color: #fff;
    text-decoration: none;
    font-size: 17px;
    font-weight: 700;
    border: 1px solid #0f766e;
}

.home-create-btn:hover {
    background: #0d655f;
    color: #fff;
}

.home-main-categories-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.home-main-categories-head h2 {
    margin: 0;
    font-size: 24px;
}

.home-main-categories-list {
    display: grid;
    gap: 0;
}

.home-main-category-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 4px;
    text-decoration: none;
    color: inherit;
    border-top: 1px solid var(--app-border);
}

.home-main-category-row:first-child {
    border-top: 0;
}

.home-main-category-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.home-main-category-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--app-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    background: var(--app-surface-soft);
    flex: 0 0 auto;
}

.home-main-category-text {
    min-width: 0;
}

.home-main-category-text strong {
    display: block;
    font-size: 18px;
    line-height: 1.2;
}

.home-main-category-text small {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--app-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-main-category-count {
    font-size: 17px;
    font-weight: 700;
    color: var(--app-text-muted);
    flex: 0 0 auto;
}

.home-latest-grid {
    padding-top: 6px;
}

.home-latest-grid .product-title,
.home-latest-grid .product-price,
.home-latest-grid .product-location {
    min-width: 0;
    overflow-wrap: anywhere;
}

.products-subcategories-card {
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: var(--app-surface);
    padding: 12px;
    margin-bottom: 12px;
}

.products-subcategories-compact {
    border: 1px solid var(--app-border);
    border-radius: 14px;
    background: var(--app-surface);
    padding: 10px;
    margin-bottom: 12px;
}

.products-subcategories-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.products-subcategories-title-wrap {
    min-width: 0;
}

.products-subcategories-title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--app-text);
}

.products-subcategories-meta {
    font-size: 12px;
    color: var(--app-text-muted);
    margin-top: 2px;
}

.products-subcategories-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.products-subcategories-open-btn,
.products-subcategories-all-btn {
    height: 34px;
    border-radius: 999px;
    padding: 0 12px;
    font-size: 12px;
    white-space: nowrap;
    border-color: var(--app-border);
    color: var(--app-text);
    background: var(--app-surface);
    text-decoration: none;
}

.products-subcategories-open-btn:hover,
.products-subcategories-all-btn:hover {
    border-color: #0f766e;
    color: #0f766e;
    text-decoration: none;
}

.products-subcategories-open-btn:visited,
.products-subcategories-all-btn:visited {
    border-color: var(--app-border);
    color: var(--app-text);
    text-decoration: none;
}

.products-subcategories-chip-rail {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 1px 4px;
    scrollbar-width: thin;
}

.products-subcategories-chip,
.products-subcategory-chip {
    flex: 0 0 auto;
    min-width: 140px;
    max-width: 240px;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    background: var(--app-surface-soft);
    color: var(--app-text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px 7px 12px;
}

.products-subcategories-chip:visited,
.products-subcategory-chip:visited {
    color: var(--app-text);
    text-decoration: none;
}

.products-subcategories-chip:hover,
.products-subcategory-chip:hover {
    border-color: #0f766e;
    color: var(--app-text);
    text-decoration: none;
}

.products-subcategories-chip:focus-visible,
.products-subcategory-chip:focus-visible {
    outline: 2px solid rgba(15, 118, 110, 0.35);
    outline-offset: 1px;
    border-color: #0f766e;
}

.products-subcategories-chip:active,
.products-subcategory-chip:active {
    transform: translateY(1px);
}

.products-subcategory-chip-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
}

.products-subcategory-chip-count {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 800;
    color: #0f766e;
    background: #ccfbf1;
    border-radius: 999px;
    padding: 2px 7px;
}

.products-subcategories-modal-dialog {
    max-width: min(720px, calc(100vw - 32px));
}

.products-subcategories-modal-list {
    max-height: min(62vh, 520px);
    overflow: auto;
    border-top: 1px solid var(--app-border);
}

.products-subcategories-modal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    text-decoration: none;
    color: var(--app-text);
    border-bottom: 1px solid var(--app-border);
    background: var(--app-surface);
}

.products-subcategories-modal-item:visited {
    color: var(--app-text);
    text-decoration: none;
}

.products-subcategories-modal-item:hover {
    background: var(--app-surface-soft);
    color: var(--app-text);
    text-decoration: none;
}

.products-subcategories-modal-item-name {
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
}

.products-subcategories-modal-item-count {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
    color: #0f766e;
}

.products-subcategories-modal-empty {
    padding: 18px 14px;
    font-size: 13px;
    color: var(--app-text-muted);
}

body.products-subcategories-modal-open {
    overflow: hidden;
}

.home-cats-rail::-webkit-scrollbar {
    height: 10px;
}

.home-cats-rail::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.home-cat-spotlight {
    scroll-snap-align: start;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 14px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    min-height: 430px;
}

.home-cat-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.home-cat-head h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

.home-cat-head p {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 12px;
}

.home-cat-head-link {
    text-decoration: none;
    border: 1px solid var(--rivo-border);
    border-radius: 999px;
    padding: 6px 10px;
    color: #0f766e;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.home-cat-body {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 10px;
    min-height: 340px;
}

.home-cat-hero {
    position: relative;
    display: block;
    text-decoration: none;
    border-radius: 14px;
    overflow: hidden;
    height: 100%;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
}

.home-cat-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-cat-hero-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 40px;
}

.home-cat-hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(3, 7, 18, 0.72) 62%);
    color: #fff;
}

.home-cat-hero-overlay strong {
    display: block;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-cat-hero-overlay span {
    display: block;
    font-size: 13px;
    margin-top: 2px;
    color: #d1fae5;
    font-weight: 700;
}

.home-cat-items-col {
    display: grid;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.home-cat-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
    min-height: 98px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-cat-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.home-cat-item img,
.home-cat-item-empty {
    width: 72px;
    height: 72px;
    border-radius: 9px;
    object-fit: cover;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.home-cat-item-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-cat-item-title {
    font-size: 13px;
    color: #111827;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.home-cat-item-price {
    margin-top: 2px;
    font-size: 13px;
    color: #0f766e;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
    .md3-hero > div {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 992px) {
    .home-klassic-shell {
        padding: 0 14px;
    }

    .home-klassic-search-form {
        grid-template-columns: minmax(0, 1fr) minmax(170px, 220px) minmax(150px, 190px) auto;
    }

    .home-cats-rail {
        grid-auto-columns: minmax(320px, 86vw);
    }

    .home-cat-body {
        grid-template-columns: 1fr;
        gap: 9px;
        min-height: auto;
    }

    .home-cat-hero {
        min-height: 200px;
    }

    .home-cat-items-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        grid-auto-rows: 92px;
    }
}

@media (max-width: 576px) {
    .home-klassic-shell {
        padding: 0 10px;
    }

    .home-klassic-search-form {
        grid-template-columns: 1fr;
    }

    .home-klassic-search-btn {
        width: 100%;
    }

    .home-klassic-search-input,
    .home-klassic-category-trigger,
    .home-klassic-city-select,
    .home-klassic-search-btn {
        width: 100%;
        max-width: 100%;
    }

    .home-category-wizard-footer {
        padding: 10px 14px 14px;
    }

    .home-category-wizard-footer .btn {
        width: 100%;
    }

    .home-main-categories-head h2 {
        font-size: 20px;
    }

    .home-main-categories-head {
        flex-wrap: wrap;
    }

    .home-main-categories-head .btn {
        font-size: 12px;
        padding: 8px 10px;
        min-height: 36px;
        white-space: nowrap;
    }

    .home-main-category-row {
        align-items: flex-start;
        gap: 8px;
    }

    .home-main-category-left {
        min-width: 0;
        flex: 1 1 auto;
    }

    .home-main-category-text small {
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
    }

    .home-main-category-text strong {
        font-size: 17px;
    }

    .home-main-category-count {
        font-size: 15px;
        flex: 0 0 auto;
    }

    .products-subcategories-top {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .products-subcategories-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .products-subcategories-open-btn,
    .products-subcategories-all-btn {
        width: 100%;
        justify-content: center;
    }

    .products-subcategory-chip {
        min-width: 132px;
    }

    .home-latest-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 8px 0 2px;
    }

    .home-latest-grid .product-image {
        height: 140px;
    }

    .home-latest-grid .product-info {
        padding: 9px;
    }

    .home-latest-grid .product-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-height: 1.25;
        min-height: 34px;
    }

    .home-cat-spotlight {
        padding: 10px;
        border-radius: 14px;
    }

    .home-cat-head h3 {
        font-size: 16px;
    }

    .home-cats-rail {
        grid-auto-columns: 92vw;
        gap: 12px;
    }

    .home-cat-hero {
        min-height: 170px;
    }

    .home-cat-item {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 8px;
        padding: 7px;
        min-height: 84px;
    }

    .home-cat-item img,
    .home-cat-item-empty {
        width: 54px;
        height: 54px;
    }
}

@media (max-width: 1024px) {
    #productsFilterForm details > div {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    #productsFilterForm details > div {
        grid-template-columns: 1fr !important;
    }
}

html[data-theme="light"] {
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --app-bg: #0b1220;
    --app-surface: #111a2e;
    --app-surface-soft: #182745;
    --app-text: #e5edf8;
    --app-text-muted: #9fb0c9;
    --app-border: #2b3b5d;
    --app-shadow: 0 16px 34px rgba(2, 6, 23, 0.44);
    --app-accent: #22d3ee;
    --app-accent-soft: rgba(34, 211, 238, 0.14);
    --app-success: #34d399;
    --rivo-white: var(--app-surface);
    --rivo-gray: var(--app-surface-soft);
    --rivo-black: var(--app-text);
    --rivo-border: var(--app-border);
    --rivo-text-gray: var(--app-text-muted);
    --rivo-link: #7dd3fc;
}

html[data-theme] body {
    background: var(--app-bg);
    color: var(--app-text);
}

html[data-theme] .navbar,
html[data-theme] .search-container,
html[data-theme] .mobile-search-toggle,
html[data-theme] .user-dropdown-menu,
html[data-theme] .theme-toggle-btn,
html[data-theme] .theme-dropdown-menu {
    background: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
}

html[data-theme] .navbar,
html[data-theme] .search-container {
    border-color: var(--app-border);
}

html[data-theme] .navbar-brand,
html[data-theme] .navbar-brand:hover,
html[data-theme] .nav-link,
html[data-theme] .nav-link:hover,
html[data-theme] .user-dropdown-menu a,
html[data-theme] .form-label,
html[data-theme] .description-content p,
html[data-theme] .description-list li,
html[data-theme] .product-title,
html[data-theme] .home-cat-head h3,
html[data-theme] .home-cat-item-title {
    color: var(--app-text);
}

html[data-theme] .search-input,
html[data-theme] .form-control,
html[data-theme] .suggestion-item,
html[data-theme] .home-cat-item-empty,
html[data-theme] .home-cat-hero-empty {
    background: var(--app-surface-soft);
    border-color: var(--app-border);
    color: var(--app-text);
}

html[data-theme] .search-input::placeholder,
html[data-theme] .form-control::placeholder {
    color: var(--app-text-muted);
}

html[data-theme] .form-control:focus,
html[data-theme] .search-input:focus {
    border-color: var(--app-text);
}

html[data-theme] .product-card,
html[data-theme] .category-card,
html[data-theme] .description-card,
html[data-theme] .product-attribute-item,
html[data-theme] .md3-seller-card,
html[data-theme] .md3-seller-metric,
html[data-theme] .home-cat-spotlight,
html[data-theme] .home-cat-item,
html[data-theme] .profile-card,
html[data-theme] .empty-state,
html[data-theme] [id$="-address-suggestions"],
html[data-theme] #address-suggestions,
html[data-theme] #edit-address-suggestions {
    background: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
}

html[data-theme] .product-location,
html[data-theme] .home-cat-head p,
html[data-theme] .empty-state,
html[data-theme] .product-attribute-label {
    color: var(--app-text-muted);
}

html[data-theme] .user-avatar {
    background: var(--app-surface-soft);
    color: var(--app-text);
}

html[data-theme="dark"] .md3-hero-wrap {
    background: transparent;
}

html[data-theme="dark"] .products-page .products-search-surface {
    background: #12203a;
    border-color: var(--app-border);
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.34);
}

html[data-theme="dark"] .products-page .products-search-surface .search-input,
html[data-theme="dark"] .products-page .products-search-surface .form-control,
html[data-theme="dark"] .products-page .products-search-surface .products-checkbox-chip {
    background: #162744;
    border-color: var(--app-border);
}

html[data-theme="dark"] .products-page .products-filters-panel {
    background: #12203a;
}

html[data-theme="dark"] .products-page .products-filters-panel > .products-filter-grid > div[id="dynamicFiltersWrap"] > div {
    background: #13233d;
    border-color: var(--app-border);
}

html[data-theme="dark"] .md3-surface {
    background:
        radial-gradient(circle at 14% 18%, rgba(34, 211, 238, 0.16), transparent 42%),
        radial-gradient(circle at 86% 14%, rgba(147, 197, 253, 0.16), transparent 40%),
        linear-gradient(180deg, #131f37 0%, #101a2f 100%);
    border-color: var(--app-border);
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.36);
}

html[data-theme="dark"] .md3-hero-glow {
    background: radial-gradient(circle, rgba(34, 211, 238, 0.2) 0%, rgba(34, 211, 238, 0) 70%);
}

html[data-theme="dark"] .home-ai-hero-title {
    color: #f8fafc;
}

html[data-theme="dark"] .home-ai-hero-subtitle {
    color: #cbd5e1;
}

html[data-theme="dark"] .home-ai-hero-highlight {
    text-shadow: 0 0 22px rgba(129, 140, 248, 0.45);
}

html[data-theme="dark"] .home-ai-cta-secondary {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #334155;
}

html[data-theme="dark"] .home-ai-cta-secondary:hover {
    background: #111827;
    color: #f8fafc;
}

html[data-theme="dark"] .home-ai-feature-card {
    background: #111b31;
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.45);
}

html[data-theme="dark"] .home-ai-feature-card h3 {
    color: #f8fafc;
}

html[data-theme="dark"] .home-ai-feature-card p {
    color: #cbd5e1;
}

html[data-theme="dark"] .md3-chip {
    border-color: rgba(34, 211, 238, 0.36);
    background: rgba(34, 211, 238, 0.12);
    color: #cffafe;
}

html[data-theme="dark"] .md3-chip-soft {
    border-color: var(--app-border);
    background: #162744;
    color: #c7d7ee;
}

html[data-theme="dark"] .product-meta-split {
    background: #13233d;
    border-color: #35507a;
}

html[data-theme="dark"] .product-meta-compact-item {
    color: #b8cbe6;
}

html[data-theme="dark"] .product-meta-compact-item i {
    color: #9fb7d8;
}

html[data-theme="dark"] .product-meta-compact-item strong {
    color: #f4f8ff;
}

html[data-theme="dark"] .product-listing-footer-meta {
    border-top-color: #35507a;
}

html[data-theme="dark"] .product-listing-footer-item {
    color: #b8cbe6;
}

html[data-theme="dark"] .product-listing-footer-item strong {
    color: #f4f8ff;
}

html[data-theme="dark"] .md3-stat-card,
html[data-theme="dark"] .md3-category-card,
html[data-theme="dark"] .md3-seller-card,
html[data-theme="dark"] .md3-seller-metric {
    background: #12203a;
    border-color: var(--app-border);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28);
}

html[data-theme="dark"] .md3-stat-label,
html[data-theme="dark"] .md3-seller-metric span {
    color: var(--app-text-muted);
}

html[data-theme="dark"] .md3-category-cover,
html[data-theme="dark"] .md3-seller-avatar-empty,
html[data-theme="dark"] .home-cat-item-empty,
html[data-theme="dark"] .home-cat-hero-empty {
    background: #1a2b4a;
    color: #9fb0c9;
}

html[data-theme="dark"] .home-cat-spotlight {
    background: linear-gradient(180deg, #12203a 0%, #101a2f 100%);
    border-color: var(--app-border);
    box-shadow: 0 16px 32px rgba(2, 6, 23, 0.34);
}

html[data-theme="dark"] .home-cat-head-link {
    border-color: rgba(34, 211, 238, 0.4);
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.08);
}

html[data-theme="dark"] .home-cat-hero {
    border-color: var(--app-border);
    background: #162744;
}

html[data-theme="dark"] .home-cats-rail::-webkit-scrollbar-thumb {
    background: #39517a;
}

html[data-theme="dark"] .home-cat-item {
    border-color: var(--app-border);
    background: #12203a;
}

html[data-theme="dark"] .home-cat-item:hover {
    box-shadow: 0 12px 22px rgba(2, 6, 23, 0.32);
}

html[data-theme] .product-price,
html[data-theme] .home-cat-item-price {
    color: var(--app-accent, #0f766e);
}

html[data-theme] .home-cat-hero-overlay span {
    color: var(--app-success, #d1fae5);
}

html[data-theme="dark"] .product-original-price {
    color: #8fa3c2;
}

@media (max-width: 640px) {
    .product-meta-split {
        gap: 6px 8px;
        padding: 7px 9px;
    }

    .product-meta-split-left,
    .product-meta-split-right {
        width: 100%;
        justify-content: flex-start;
        gap: 6px 10px;
    }

    .product-meta-compact-item {
        font-size: 11.5px;
    }

    .product-listing-footer-item {
        font-size: 11px;
    }

    .nt-location-map,
    .real-estate-detail-map {
        height: 200px;
    }

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

html[data-theme="dark"] .product-attribute-item {
    background: #1a2b4a;
    border-color: #3a4f75;
}

html[data-theme="dark"] .product-gallery-dot {
    background: #3a4f75;
}

html[data-theme="dark"] .product-gallery-nav,
html[data-theme="dark"] .product-gallery-counter,
html[data-theme="dark"] .product-gallery-zoom-btn,
html[data-theme="dark"] .product-gallery-swipe-hint {
    border-color: rgba(148, 163, 184, 0.45);
    background: rgba(2, 6, 23, 0.72);
    color: #e8f2ff;
}

html[data-theme="dark"] .product-gallery-lightbox-card {
    border-color: rgba(148, 163, 184, 0.35);
    background: rgba(2, 6, 23, 0.94);
}

html[data-theme="dark"] .product-location-main i {
    color: #8df2e6;
    border-color: rgba(20, 184, 166, 0.44);
    background: rgba(20, 184, 166, 0.2);
}

html[data-theme="dark"] .product-show-thumb-more-btn {
    border-color: #3a4f75;
    background: linear-gradient(180deg, #1b2d4b, #15243f);
    color: #e8f2ff;
}

html[data-theme="dark"] .re-summary-block,
html[data-theme="dark"] .re-object-info-block {
    border-color: #3a4f75;
    background: #1a2b4a;
}

html[data-theme="dark"] .re-summary-fact {
    border-color: #3a4f75;
    background: #12203a;
}

html[data-theme="dark"] .re-summary-fact span,
html[data-theme="dark"] .re-object-key {
    color: #b8cbe6;
}

html[data-theme="dark"] .re-summary-fact strong,
html[data-theme="dark"] .re-object-val {
    color: #f4f8ff;
}

html[data-theme="dark"] .nt-location-map,
html[data-theme="dark"] .real-estate-detail-map {
    border-color: #3a4f75;
    background: #12203a;
}

html[data-theme="dark"] .description-collapsed::after {
    background: linear-gradient(180deg, rgba(17, 26, 46, 0), var(--app-surface) 78%);
}

html[data-theme="dark"] .product-attribute-label {
    color: #bfd0e8;
    font-weight: 600;
}

html[data-theme="dark"] .product-attribute-value {
    color: #f8fbff;
}

html[data-theme="dark"] .search-container {
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.4);
}

html[data-theme="dark"] .search-input,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .suggestion-item {
    background: #162744;
}

html[data-theme="dark"] .btn-primary {
    background: #06b6d4;
    color: #ecfeff;
}

html[data-theme="dark"] .btn-primary:hover {
    background: #22d3ee;
    color: #ecfeff;
}

html[data-theme="dark"] footer {
    background: #09111f;
    color: #d7e3f5;
}

html[data-theme="dark"] .footer-section a {
    color: #d7e3f5;
    opacity: 0.82;
}

html[data-theme="dark"] .footer-bottom {
    border-top-color: rgba(159, 176, 201, 0.25);
    color: #9fb0c9;
}

html[data-theme="dark"] .btn-outline {
    border-color: #dbeafe;
    color: #dbeafe;
}

html[data-theme="dark"] .btn-outline:hover {
    background: #dbeafe;
    color: #0f172a;
}

html[data-theme="dark"] .btn-outline-danger-soft {
    border-color: rgba(244, 63, 94, 0.5);
    color: #fda4af;
}

html[data-theme="dark"] .btn-outline-danger-soft:hover {
    background: rgba(244, 63, 94, 0.16);
    border-color: rgba(251, 113, 133, 0.65);
    color: #fecdd3;
}

html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background-color:#fff"],
html[data-theme="dark"] [style*="background-color: #fff"] {
    background: var(--app-surface) !important;
    border-color: var(--app-border) !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] .btn-header-upload {
    background: #0f766e;
    border-color: #0f766e;
    color: #ecfdf5;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.28);
}

html[data-theme="dark"] .btn-header-upload:hover {
    background: #0d655f;
    border-color: #0d655f;
    color: #ecfdf5;
}

html[data-theme="dark"] .theme-option-btn {
    background: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
}

html[data-theme="dark"] .theme-option-btn.is-active {
    color: #67e8f9;
    border-color: #22d3ee;
    background: rgba(34, 211, 238, 0.12);
}

html[data-theme="dark"] .products-checkbox-chip {
    border-color: var(--app-border);
    background: #162744;
    color: var(--app-text);
}

html[data-theme="dark"] .products-subcategories-compact {
    background: var(--app-surface);
    border-color: var(--app-border);
}

html[data-theme="dark"] .products-subcategories-open-btn,
html[data-theme="dark"] .products-subcategories-all-btn {
    background: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
}

html[data-theme="dark"] .products-subcategory-chip {
    background: #162744;
    border-color: var(--app-border);
    color: var(--app-text);
}

html[data-theme="dark"] .products-subcategories-chip:visited,
html[data-theme="dark"] .products-subcategory-chip:visited,
html[data-theme="dark"] .products-subcategories-chip:hover,
html[data-theme="dark"] .products-subcategory-chip:hover {
    color: var(--app-text);
    text-decoration: none;
}

html[data-theme="dark"] .products-subcategory-chip:hover {
    border-color: #14b8a6;
}

html[data-theme="dark"] .products-subcategory-chip-count {
    color: #5eead4;
    background: rgba(20, 184, 166, 0.16);
}

html[data-theme="dark"] .products-subcategories-modal-item {
    background: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
}

html[data-theme="dark"] .products-subcategories-modal-item:hover {
    background: #162744;
}

html[data-theme="dark"] .new-form-error {
    background: rgba(190, 24, 93, 0.18);
    border-color: rgba(251, 113, 133, 0.45);
    color: #fecdd3;
}

html[data-theme="dark"] .new-form-notice-warning {
    background: rgba(251, 146, 60, 0.14);
    border-color: rgba(251, 146, 60, 0.4);
    color: #fdba74;
}

html[data-theme="dark"] .new-form-guest-notice {
    background: rgba(251, 146, 60, 0.16);
    border-color: rgba(251, 146, 60, 0.45);
    color: #fdba74;
}

html[data-theme="dark"] .category-wizard-backdrop {
    background: rgba(2, 6, 23, 0.72);
}

html[data-theme="dark"] .category-wizard-item.is-active {
    background: rgba(56, 189, 248, 0.16);
}

html[data-theme="dark"] .category-wizard-root-icon {
    color: #facc15;
}

html[data-theme="dark"] .category-wizard-sub-dot {
    background: #64748b;
}

html[data-theme="dark"] .category-wizard-crumb {
    background: var(--app-surface);
    border-color: var(--app-border);
    color: var(--app-text);
}

html[data-theme="dark"] .category-wizard-crumb.is-active {
    border-color: #22d3ee;
    color: #67e8f9;
    background: rgba(34, 211, 238, 0.12);
}

html[data-theme="dark"] .auth-error {
    background: rgba(190, 24, 93, 0.18);
    border-color: rgba(251, 113, 133, 0.45);
    color: #fecdd3;
}

html[data-theme="dark"] .cms-content a {
    color: #7dd3fc;
}

html[data-theme="dark"] .cms-content code,
html[data-theme="dark"] .cms-content pre {
    background: #162744;
    border-color: var(--app-border);
}

html[data-theme="dark"] .users-page [style*="background-color: var(--rivo-gray)"],
html[data-theme="dark"] .users-page [style*="background:#f3f4f6"],
html[data-theme="dark"] .users-page [style*="background: #f3f4f6"],
html[data-theme="dark"] .users-page [style*="background-color: #f0f0f0"],
html[data-theme="dark"] .users-page [style*="background-color:#f0f0f0"],
html[data-theme="dark"] .users-page [style*="background-color: #f8f9fa"] {
    background: #162744 !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] .users-page [style*="border: 1px solid #e9ecef"],
html[data-theme="dark"] .users-page [style*="border: 1px solid #d1d5db"] {
    border-color: var(--app-border) !important;
}

html[data-theme="dark"] .users-page [style*="color: #6c757d"],
html[data-theme="dark"] .users-page [style*="color:#6c757d"],
html[data-theme="dark"] .users-page [style*="color: #495057"] {
    color: var(--app-text-muted) !important;
}

html[data-theme="dark"] .users-page [style*="background-color: #d1e7dd"],
html[data-theme="dark"] .users-page [style*="background-color: #f8d7da"] {
    border-color: transparent !important;
}

html[data-theme="dark"] .users-page [style*="background: #ecfdf5"] {
    background: rgba(16, 185, 129, 0.14) !important;
    border-color: rgba(52, 211, 153, 0.42) !important;
    color: #86efac !important;
}

html[data-theme="dark"] .users-page [style*="background: #eff6ff"] {
    background: rgba(59, 130, 246, 0.14) !important;
    border-color: rgba(96, 165, 250, 0.42) !important;
    color: #bfdbfe !important;
}

html[data-theme="dark"] .users-page [style*="background: #f5f3ff"] {
    background: rgba(139, 92, 246, 0.14) !important;
    border-color: rgba(167, 139, 250, 0.42) !important;
    color: #ddd6fe !important;
}

html[data-theme="dark"] .users-page [style*="background: #fff7ed"] {
    background: rgba(251, 146, 60, 0.14) !important;
    border-color: rgba(251, 146, 60, 0.42) !important;
    color: #fdba74 !important;
}

html[data-theme="dark"] .products-page [style*="background-color: var(--rivo-gray)"],
html[data-theme="dark"] .products-page [style*="background:#f3f4f6"],
html[data-theme="dark"] .products-page [style*="background: #f3f4f6"],
html[data-theme="dark"] .products-page [style*="background-color:#f0f0f0"],
html[data-theme="dark"] .products-page [style*="background-color: #f0f0f0"],
html[data-theme="dark"] .products-page [style*="background:#f5f5f5"],
html[data-theme="dark"] .products-page [style*="background: #f5f5f5"],
html[data-theme="dark"] .products-page [style*="background:#fafafa"],
html[data-theme="dark"] .products-page [style*="background: #fafafa"] {
    background: #162744 !important;
    color: var(--app-text) !important;
}

html[data-theme="dark"] .products-page [style*="color:#bbb"],
html[data-theme="dark"] .products-page [style*="color: #bbb"],
html[data-theme="dark"] .products-page [style*="color:#ccc"],
html[data-theme="dark"] .products-page [style*="color: #ccc"],
html[data-theme="dark"] .products-page [style*="color:#868686"],
html[data-theme="dark"] .products-page [style*="color: #868686"] {
    color: var(--app-text-muted) !important;
}

html[data-theme="dark"] .product-show-sold-notice {
    background: rgba(251, 146, 60, 0.14);
    border-color: rgba(251, 146, 60, 0.38);
    color: #fdba74;
}

html[data-theme="dark"] .product-show-login-cta {
    border-color: rgba(96, 165, 250, 0.42);
    background: rgba(59, 130, 246, 0.14);
}

html[data-theme="dark"] .product-show-login-cta-title {
    color: #bfdbfe;
}

html[data-theme="dark"] .product-show-login-cta-text {
    color: #93c5fd;
}

html[data-theme="dark"] .product-show-info-note {
    background: #162744;
    border-color: var(--app-border);
    color: #c7d7ee;
}

html[data-theme="dark"] .product-show-sold-chip {
    border-color: rgba(251, 146, 60, 0.4);
    background: rgba(251, 146, 60, 0.14);
    color: #fdba74;
}

html[data-theme="dark"] .product-show-delete-btn {
    color: #fda4af !important;
    border-color: rgba(244, 63, 94, 0.5) !important;
}

html[data-theme="dark"] .product-show-delete-btn:hover {
    background: rgba(244, 63, 94, 0.16) !important;
    border-color: rgba(251, 113, 133, 0.65) !important;
    color: #fecdd3 !important;
}

html[data-theme="dark"] .product-show-seller-badge {
    border-color: rgba(52, 211, 153, 0.34);
    background: rgba(16, 185, 129, 0.12);
}

html[data-theme="dark"] .product-show-seller-badge-title {
    color: #86efac;
}

html[data-theme="dark"] .product-show-seller-badge-text {
    color: #bbf7d0;
}

html[data-theme="dark"] .product-show-success-text {
    color: #6ee7b7;
}

@media (max-width: 768px) {
    .theme-dropdown-menu {
        width: 152px;
    }
}

/* Theme enforcement for header dropdowns, messages and sticky bubble */
html[data-theme] .user-dropdown-menu,
html[data-theme] .theme-dropdown-menu {
    background: var(--app-surface) !important;
    border-color: var(--app-border) !important;
    color: var(--app-text) !important;
}

html[data-theme] .user-dropdown-menu a,
html[data-theme] .theme-option-btn {
    color: var(--app-text) !important;
}

html[data-theme] .user-dropdown-menu a:hover,
html[data-theme] .theme-option-btn:hover {
    background: var(--app-surface-soft) !important;
}

html[data-theme] .messages-sidebar,
html[data-theme] .chat-panel,
html[data-theme] .messages-placeholder {
    background: var(--app-surface) !important;
    border-color: var(--app-border) !important;
    color: var(--app-text) !important;
}

html[data-theme] .messages-sidebar-header,
html[data-theme] .chat-header,
html[data-theme] .chat-product-context,
html[data-theme] .chat-compose {
    border-color: var(--app-border) !important;
}

html[data-theme] .messages-sidebar-header p,
html[data-theme] .messages-row small,
html[data-theme] .messages-snippet,
html[data-theme] .messages-thread-context,
html[data-theme] .messages-empty p,
html[data-theme] .messages-placeholder,
html[data-theme] .chat-header-meta span,
html[data-theme] .chat-product-meta span,
html[data-theme] .chat-bubble time,
html[data-theme] .chat-product-tag,
html[data-theme] .chat-compose-actions small,
html[data-theme] .sticky-message-meta small,
html[data-theme] .sticky-message-product {
    color: var(--app-text-muted) !important;
}

html[data-theme] .messages-conversation-item {
    border-bottom-color: var(--app-border) !important;
    color: var(--app-text) !important;
}

html[data-theme] .messages-conversation-item:hover,
html[data-theme] .messages-conversation-item.is-active {
    background: var(--app-surface-soft) !important;
}

html[data-theme] .messages-avatar,
html[data-theme] .chat-product-placeholder {
    background: var(--app-surface-soft) !important;
    color: var(--app-text-muted) !important;
}

html[data-theme] .chat-messages {
    background: var(--app-surface) !important;
}

html[data-theme] .chat-product-context {
    background: var(--app-surface-soft) !important;
}

html[data-theme] .chat-bubble {
    background: var(--app-surface) !important;
    border-color: var(--app-border) !important;
}

html[data-theme="dark"] .chat-bubble-row.is-own .chat-bubble {
    background: rgba(34, 211, 238, 0.1) !important;
    border-color: rgba(34, 211, 238, 0.35) !important;
}

html[data-theme] .chat-bubble p,
html[data-theme] .chat-product-meta a,
html[data-theme] .messages-row strong,
html[data-theme] .sticky-message-meta strong,
html[data-theme] .sticky-message-text {
    color: var(--app-text) !important;
}

html[data-theme] .chat-back {
    color: var(--app-text) !important;
    border-color: var(--app-border) !important;
}

html[data-theme] .chat-compose textarea,
html[data-theme] .sticky-message-form input {
    background: var(--app-surface) !important;
    border-color: var(--app-border) !important;
    color: var(--app-text) !important;
}

html[data-theme] .sticky-message-bubble {
    background: var(--app-surface) !important;
    border-color: var(--app-border) !important;
    color: var(--app-text) !important;
}

html[data-theme] .sticky-message-avatar {
    background: var(--app-surface-soft) !important;
}

html[data-theme] .sticky-message-close {
    color: var(--app-text-muted) !important;
}

html[data-theme] .sticky-message-open {
    color: var(--app-accent, var(--rivo-link)) !important;
}

.public-profile-layout {
    align-items: start;
}

@media (max-width: 980px) {
    .public-profile-layout {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 760px) {
    .new-images-layout {
        grid-template-columns: 1fr !important;
    }
}
