/* Public user profile — modern warm theme */
body.site-profile {
    --up-bg: #faf8f5;
    --up-surface: #ffffff;
    --up-primary: #d4835a;
    --up-primary-dark: #c56a3a;
    --up-accent: #e8a87c;
    --up-muted-bg: #f5ece6;
    --up-border: #ebe3dc;
    --up-text: #333333;
    --up-text-muted: #777777;
    --up-radius: 14px;
    --up-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    background: var(--up-bg);
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

body.site-profile #container {
    max-width: min(100%, 1100px) !important;
    width: 100% !important;
    margin-inline: auto !important;
    padding: 20px 16px 48px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.site-profile .profile-layout,
body.site-profile #column-right {
    display: none !important;
}

body.site-profile .up-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header */
.up-header {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
    padding: 28px;
    background: var(--up-surface);
    border: 1px solid var(--up-border);
    border-radius: var(--up-radius);
    box-shadow: var(--up-shadow);
}

.up-header__avatar-wrap {
    position: relative;
    flex: 0 0 auto;
}

.up-header__avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--up-muted-bg);
    box-shadow: var(--up-shadow);
}

.up-header__verified {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.up-header__body { flex: 1 1 260px; min-width: 0; }

.up-header__name {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 800;
    color: var(--up-text);
    line-height: 1.4;
}

.up-header__username {
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--up-text-muted);
}

.up-header__since {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--up-text-muted);
}

.up-header__badges {
    margin-bottom: 16px;
}

.up-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.up-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.up-btn--primary {
    background: linear-gradient(135deg, var(--up-accent), var(--up-primary));
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(212, 131, 90, 0.35);
}

.up-btn--ghost {
    background: var(--up-muted-bg);
    color: var(--up-text) !important;
    border: 1px solid var(--up-border);
}

.up-btn:hover { transform: translateY(-1px); }

/* Stats */
.up-stats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.up-stat-card {
    background: var(--up-surface);
    border: 1px solid var(--up-border);
    border-radius: var(--up-radius);
    padding: 18px 14px;
    text-align: center;
    box-shadow: var(--up-shadow);
}

.up-stat-card__icon {
    display: block;
    font-size: 22px;
    margin-bottom: 6px;
}

.up-stat-card__value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--up-primary-dark);
    line-height: 1.2;
}

.up-stat-card__label {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--up-text-muted);
    font-weight: 600;
}

/* Sections */
.up-section {
    background: var(--up-surface);
    border: 1px solid var(--up-border);
    border-radius: var(--up-radius);
    padding: 24px;
    box-shadow: var(--up-shadow);
}

.up-section__title {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 800;
    color: var(--up-text);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--up-muted-bg);
}

.up-section__foot {
    margin: 18px 0 0;
    text-align: center;
}

.up-empty {
    margin: 0;
    color: var(--up-text-muted);
    font-size: 14px;
}

.up-about__body {
    line-height: 1.85;
    color: var(--up-text);
    font-size: 14px;
}

.up-link {
    color: var(--up-primary-dark);
    font-weight: 700;
    text-decoration: none;
}

/* Achievements */
.up-achievements {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.up-achievement-card {
    background: var(--up-muted-bg);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--up-border);
}

.up-achievement-card__title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--up-text);
}

.up-achievement-card__empty {
    margin: 0;
    font-size: 13px;
    color: var(--up-text-muted);
}

.up-progress {
    height: 8px;
    background: #e8dfd8;
    border-radius: 99px;
    overflow: hidden;
    margin: 8px 0 4px;
}

.up-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, #86efac, #16a34a);
    border-radius: 99px;
    transition: width 0.35s ease;
}

.up-progress--sm {
    height: 6px;
    margin-top: 6px;
}

.up-progress__pct {
    font-size: 12px;
    font-weight: 700;
    color: #15803d;
}

.up-achievement-card__link {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

.up-achievement-card__link:hover {
    text-decoration: underline;
}

.up-achievement-card__foot {
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px dashed var(--up-border);
}

/* Promotions box */
.up-promotions-section {
    margin-top: 0;
}

.up-promotions-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-radius: var(--up-radius);
    padding: 16px 20px;
    box-shadow: var(--up-shadow);
}

.up-promotions-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.up-promotions-item {
    font-size: 14px;
    line-height: 1.7;
    color: #78350f;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(217, 119, 6, 0.25);
}

.up-promotions-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.up-promotions-item__user {
    color: #b45309;
    font-weight: 800;
    text-decoration: none;
}

.up-promotions-item__user:hover {
    text-decoration: underline;
}

.up-promotions-item__icon {
    font-size: 1.05em;
}

/* Ranks requirements page */
.gr-page-header {
    background: var(--up-surface);
    border: 1px solid var(--up-border);
    border-radius: var(--up-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--up-shadow);
}

.gr-page-header__title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    color: var(--up-text);
}

.gr-page-header__sub {
    margin: 0 0 14px;
    color: var(--up-text-muted);
    font-size: 14px;
}

.gr-page-header__back {
    font-size: 14px;
}

.gr-role-section {
    scroll-margin-top: 80px;
}

.gr-role-status {
    background: var(--up-muted-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 18px;
    border: 1px solid var(--up-border);
}

.gr-role-status__label {
    font-weight: 700;
    color: var(--up-text-muted);
    font-size: 13px;
}

.gr-role-status__current,
.gr-role-status__next {
    margin-bottom: 12px;
}

.gr-role-status__next:last-child {
    margin-bottom: 0;
}

.gr-role-status__empty {
    margin: 0;
    color: var(--up-text-muted);
    font-size: 14px;
}

.gr-ranks-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gr-rank-card {
    background: var(--up-surface);
    border: 1px solid var(--up-border);
    border-radius: 12px;
    padding: 16px 18px;
}

.gr-rank-card--current {
    border-color: #86efac;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.12);
}

.gr-rank-card--next {
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.gr-rank-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.gr-rank-card__icon {
    font-size: 1.25rem;
}

.gr-rank-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--up-text);
}

.gr-rank-card__tag {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
}

.gr-rank-card__tag--current {
    background: #dcfce7;
    color: #166534;
}

.gr-rank-card__tag--next {
    background: #dbeafe;
    color: #1d4ed8;
}

.gr-rank-card__note {
    margin: 0;
    font-size: 13px;
    color: var(--up-text-muted);
}

.gr-conditions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gr-condition {
    background: var(--up-muted-bg);
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid var(--up-border);
}

.gr-condition--met {
    border-color: #86efac;
    background: #f0fdf4;
}

.gr-condition__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.gr-condition__title {
    font-weight: 700;
    font-size: 14px;
    color: var(--up-text);
}

.gr-condition__status {
    font-weight: 800;
    color: #16a34a;
}

.gr-condition:not(.gr-condition--met) .gr-condition__status {
    color: #94a3b8;
}

.gr-condition__values {
    font-size: 13px;
    color: var(--up-text-muted);
    margin-bottom: 4px;
}

/* Product cards */
.up-card-grid,
body.site-profile #carousel_ul.prflist {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
    float: none !important;
    width: 100% !important;
}

.up-product-card,
body.site-profile .product_box2 {
    display: flex;
    flex-direction: column;
    background: var(--up-surface);
    border: 1px solid var(--up-border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--up-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
}

.up-product-card:hover,
body.site-profile .product_box2:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.up-product-card__img,
body.site-profile .product_box_image img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.up-product-card__body,
body.site-profile .product_box2 h6 {
    padding: 12px;
}

.up-product-card__title,
body.site-profile .product_box2 h6 a {
    font-size: 13px;
    font-weight: 700;
    color: var(--up-text);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.up-product-card__price {
    font-size: 13px;
    font-weight: 700;
    color: var(--up-primary-dark);
}

.up-product-card__sales {
    font-size: 11px;
    color: var(--up-text-muted);
}

/* Reviews */
.up-reviews__list {
    display: grid;
    gap: 14px;
}

.up-review-card {
    background: var(--up-muted-bg);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--up-border);
}

.up-review-card__stars {
    color: #f59e0b;
    font-size: 14px;
    margin-bottom: 6px;
}

.up-review-card__product {
    margin: 0 0 8px;
    font-size: 14px;
}

.up-review-card__product a {
    color: var(--up-primary-dark);
    text-decoration: none;
    font-weight: 700;
}

.up-review-card__text {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.75;
    color: var(--up-text);
}

.up-review-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--up-text-muted);
}

/* Shops */
.up-shops__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.up-shop-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--up-muted-bg);
    border: 1px solid var(--up-border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s;
}

.up-shop-card:hover { border-color: var(--up-accent); }

.up-shop-card__logo {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    background: #fff;
}

.up-shop-card__body h3 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
}

.up-shop-card__body p {
    margin: 0;
    font-size: 12px;
    color: var(--up-text-muted);
}

/* Contact */
.up-contact__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.up-contact__list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: var(--up-muted-bg);
    border-radius: 10px;
    font-size: 14px;
}

.up-contact__list span { color: var(--up-text-muted); }

/* Products section legacy cleanup */
body.site-profile .product_title h1 span,
body.site-profile .product_title h3 span {
    border: none;
    background: none;
    font-size: 18px;
    font-weight: 800;
}

body.site-profile .product_options .purchase {
    background: var(--up-primary);
    border-radius: 8px;
}

body.site-profile .pager {
    margin-top: 20px;
}

@media (max-width: 640px) {
    .up-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .up-header__actions {
        justify-content: center;
        width: 100%;
    }

    .up-stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
