:root {
    --hm-brand: #e38257;
    --hm-brand-dark: #c96a47;
    --hm-brand-darker: #9a5238;
    --hm-secondary: #a0a0a0;
    --hm-gold: #c99a2e;
    --hm-gold-soft: #fbf3df;
    --hm-silver: #8b97a3;
    --hm-silver-soft: #f1f3f5;
    --hm-page: #f4f5f6;
    --hm-card: #ffffff;
    --hm-line: #e7e9eb;
    --hm-line-soft: #f0f1f3;
    --hm-text: #17202a;
    --hm-text-muted: #a0a0a0;
    --hm-text-faint: #b5b5b5;
    --hm-danger: #e0393e;
    --hm-success: #14926f;
    --hm-radius: 12px;
    --hm-radius-lg: 16px;
    --hm-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    --hm-header-h: 64px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.hm-body {
    margin: 0;
    background: var(--hm-page);
    color: var(--hm-text);
    font-family: IRANSans, "IRANSansX", Tahoma, sans-serif;
    font-size: 14px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

.hm-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- Header ---------- */
.hm-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--hm-header-h);
    background: var(--hm-card);
    border-bottom: 1px solid var(--hm-line);
}

.hm-header-inner {
    height: var(--hm-header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hm-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.hm-brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 9px;
    background: var(--hm-brand);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 15px;
}

.hm-brand-logo {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    object-fit: contain;
    border-radius: 9px;
}

.hm-brand-title {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hm-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
}

.hm-btn--primary {
    background: var(--hm-brand);
    color: #fff;
}

.hm-btn--primary:hover {
    background: var(--hm-brand-dark);
}

.hm-btn--outline {
    border-color: var(--hm-line);
    color: var(--hm-text);
    background: var(--hm-card);
}

.hm-btn--outline:hover {
    border-color: var(--hm-brand);
    color: var(--hm-brand);
}

.hm-btn--gold {
    background: var(--hm-gold);
    color: #fff;
}

.hm-btn--gold:hover {
    filter: brightness(0.94);
}

.hm-btn--block {
    width: 100%;
}

.hm-btn:disabled {
    background: #d7dade;
    color: #fff;
    cursor: not-allowed;
}

.hm-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid var(--hm-line);
    background: var(--hm-card);
    color: var(--hm-text-muted);
    display: grid;
    place-items: center;
}

.hm-icon-btn:hover {
    border-color: var(--hm-brand);
    color: var(--hm-brand);
}

.hm-icon-btn svg {
    width: 18px;
    height: 18px;
}

/* ---------- Banner slider ---------- */
.hm-banner {
    padding-top: 16px;
}

.hm-slider {
    position: relative;
    border-radius: var(--hm-radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, var(--hm-brand-dark), var(--hm-brand-darker));
}

.hm-slider-track {
    display: flex;
    transition: transform .45s cubic-bezier(.4, 0, .2, 1);
}

.hm-slide {
    flex: 0 0 100%;
    position: relative;
    display: block;
    aspect-ratio: 1180 / 300;
    min-height: 150px;
}

.hm-slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hm-slide--text {
    display: flex;
    align-items: center;
    padding: 24px 32px;
    background: linear-gradient(135deg, var(--hm-brand), var(--hm-brand-darker));
}

.hm-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(4, 30, 27, .75), rgba(4, 30, 27, 0) 65%);
}

.hm-slide-overlay--full {
    background: rgba(4, 30, 27, .45);
}

.hm-slide-overlay--none {
    display: none;
}

.hm-slide-body {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 560px;
    align-self: flex-end;
    padding: 24px 32px;
}

.hm-slide--text .hm-slide-body {
    align-self: center;
}

.hm-slide-title {
    margin: 0;
    font-size: clamp(17px, 2.4vw, 26px);
    font-weight: 800;
}

.hm-slide-desc {
    margin: 6px 0 0;
    font-size: clamp(12px, 1.4vw, 15px);
    opacity: .92;
}

.hm-slide-cta {
    display: inline-flex;
    margin-top: 14px;
    background: rgba(255, 255, 255, .95);
    color: var(--hm-brand-dark);
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
}

.hm-slider-nav {
    position: absolute;
    bottom: 14px;
    left: 16px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

.hm-slider-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .9);
    color: var(--hm-brand-dark);
    display: grid;
    place-items: center;
}

.hm-slider-arrow:hover {
    background: #fff;
}

.hm-slider-arrow svg {
    width: 16px;
    height: 16px;
}

.hm-slider-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 3;
}

.hm-slider-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, .5);
    transition: width .2s, background-color .2s;
}

.hm-slider-dot[aria-current="true"] {
    width: 22px;
    background: #fff;
}

/* ---------- Layout ---------- */
.hm-main {
    padding: 16px 0 32px;
}

.hm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

.hm-card {
    background: var(--hm-card);
    border: 1px solid var(--hm-line);
    border-radius: var(--hm-radius);
    box-shadow: var(--hm-shadow);
    padding: 16px;
}

.hm-card + .hm-card {
    margin-top: 16px;
}

.hm-card-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
}

.hm-dot-live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hm-danger);
    box-shadow: 0 0 0 0 rgba(224, 57, 62, .5);
    animation: hm-pulse 1.8s infinite;
}

@keyframes hm-pulse {
    70% { box-shadow: 0 0 0 7px rgba(224, 57, 62, 0); }
    100% { box-shadow: 0 0 0 0 rgba(224, 57, 62, 0); }
}

/* ---------- Live price row ---------- */
.hm-price-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hm-price-chip {
    flex: 1 1 140px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    background: var(--hm-silver-soft);
    border-radius: 9px;
    padding: 9px 12px;
}

.hm-price-chip--gold {
    background: var(--hm-gold-soft);
}

.hm-price-chip-label {
    font-size: 12px;
    color: var(--hm-text-muted);
    white-space: nowrap;
}

.hm-price-chip-value {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.hm-price-chip-unit {
    font-size: 11px;
    color: var(--hm-text-faint);
    font-weight: 400;
}

/* ---------- Assets (dark) card ---------- */
.hm-assets {
    background: linear-gradient(135deg, var(--hm-brand-dark), var(--hm-brand-darker));
    border-radius: var(--hm-radius);
    padding: 14px 16px;
    color: #fff;
    margin-top: 12px;
}

.hm-assets-head {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 10px;
}

.hm-assets-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, .14);
    font-size: 13px;
}

.hm-assets-row:last-of-type {
    border-bottom: none;
}

.hm-assets-label {
    display: flex;
    align-items: center;
    gap: 7px;
    opacity: .9;
}

.hm-assets-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hm-gold);
}

.hm-assets-icon--silver {
    background: #cfd6dd;
}

.hm-assets-value {
    font-weight: 700;
    letter-spacing: 1px;
}

.hm-assets-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, .14);
    font-size: 12px;
    opacity: .9;
}

.hm-switch {
    position: relative;
    width: 38px;
    height: 20px;
    flex: 0 0 38px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, .28);
    padding: 0;
    transition: background-color .2s;
}

.hm-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s;
}

.hm-switch[aria-checked="true"] {
    background: var(--hm-gold);
}

.hm-switch[aria-checked="true"]::after {
    transform: translateX(-18px);
}

.hm-assets-login {
    display: block;
    margin-top: 10px;
    text-align: center;
    background: rgba(255, 255, 255, .14);
    border-radius: 8px;
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
}

/* ---------- Services ---------- */
.hm-badge-new {
    background: var(--hm-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 5px;
    padding: 1px 6px;
}

.hm-services {
    position: relative;
}

.hm-services-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(50% - 5px);
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.hm-services-track::-webkit-scrollbar {
    display: none;
}

.hm-service {
    scroll-snap-align: start;
    border: 1px solid var(--hm-line);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--hm-card);
    transition: border-color .15s, transform .15s;
}

.hm-service:hover {
    border-color: var(--hm-brand);
    transform: translateY(-2px);
}

.hm-service-thumb {
    width: 100%;
    height: 76px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--hm-silver-soft);
}

.hm-service-thumb--empty {
    display: grid;
    place-items: center;
    color: var(--hm-brand);
    font-size: 22px;
    font-weight: 800;
}

.hm-service-title {
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.hm-service-title svg {
    width: 14px;
    height: 14px;
    color: var(--hm-text-faint);
    flex: 0 0 14px;
}

.hm-service-desc {
    margin: 0;
    font-size: 11px;
    color: var(--hm-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Tabs & pills ---------- */
.hm-tabs {
    display: flex;
    gap: 4px;
    background: var(--hm-silver-soft);
    border-radius: 9px;
    padding: 3px;
}

.hm-tab {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 7px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hm-text-muted);
    transition: background-color .15s, color .15s, box-shadow .15s;
}

.hm-tab[aria-selected="true"] {
    background: var(--hm-card);
    color: var(--hm-text);
    box-shadow: var(--hm-shadow);
}

.hm-tabs--metal .hm-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px 10px;
    font-weight: 700;
}

.hm-tabs--metal .hm-tab[aria-selected="true"] {
    border: 1px solid var(--hm-gold);
    background: var(--hm-gold-soft);
    color: #8a6a12;
}

.hm-metal-bullet {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f2d489, var(--hm-gold));
}

.hm-metal-bullet--silver {
    background: linear-gradient(135deg, #e8ecf0, var(--hm-silver));
}

.hm-pills {
    display: flex;
    gap: 6px;
}

.hm-pill {
    border: 1px solid var(--hm-line);
    background: var(--hm-card);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--hm-text-muted);
}

.hm-pill[aria-selected="true"] {
    background: var(--hm-brand);
    border-color: var(--hm-brand);
    color: #fff;
}

/* ---------- Chart ---------- */
.hm-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0 8px;
}

.hm-chart-caption {
    font-size: 11px;
    color: var(--hm-text-faint);
}

.hm-chart-wrap {
    position: relative;
    height: 190px;
}

.hm-chart-empty {
    display: grid;
    place-items: center;
    height: 100%;
    font-size: 12px;
    color: var(--hm-text-faint);
}

.hm-chart-stats {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    background: var(--hm-silver-soft);
    border-radius: 9px;
    padding: 10px 12px;
}

.hm-chart-stat {
    flex: 1;
    text-align: center;
}

.hm-chart-stat span {
    display: block;
    font-size: 11px;
    color: var(--hm-text-muted);
}

.hm-chart-stat strong {
    font-size: 13px;
}

.hm-change--up {
    color: var(--hm-success);
}

.hm-change--down {
    color: var(--hm-danger);
}

.hm-change--flat {
    color: var(--hm-text-muted);
}

.hm-link-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    border: 1px solid var(--hm-line);
    border-radius: 9px;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--hm-text);
}

.hm-link-row:hover {
    border-color: var(--hm-brand);
    color: var(--hm-brand);
}

/* ---------- Trade form ---------- */
.hm-field {
    margin-top: 12px;
}

.hm-field-label {
    display: block;
    font-size: 12px;
    color: var(--hm-text-muted);
    margin-bottom: 6px;
}

.hm-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--hm-line);
    border-radius: 9px;
    padding: 0 12px;
    transition: border-color .15s, box-shadow .15s;
}

.hm-input-wrap:focus-within {
    border-color: var(--hm-brand);
    box-shadow: 0 0 0 3px rgba(227, 130, 87, .18);
}

.hm-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 11px 0;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--hm-text);
    min-width: 0;
}

.hm-input-suffix {
    font-size: 12px;
    color: var(--hm-text-faint);
    white-space: nowrap;
}

.hm-hint {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 8px 0 0;
    font-size: 11px;
    color: var(--hm-text-muted);
}

.hm-hint svg {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    margin-top: 3px;
}

.hm-summary {
    margin-top: 14px;
    border-top: 1px solid var(--hm-line-soft);
    padding-top: 10px;
}

.hm-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    padding: 4px 0;
}

.hm-summary-row span {
    color: var(--hm-text-muted);
}

.hm-summary-row strong {
    font-weight: 700;
}

.hm-inline-link {
    color: var(--hm-brand);
    font-size: 12px;
    font-weight: 600;
}

.hm-form-note {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
    color: var(--hm-brand);
    font-weight: 600;
}

.hm-quick-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    background: var(--hm-silver-soft);
    border-radius: 9px;
    font-size: 12px;
}

.hm-quick-price strong {
    font-size: 14px;
}

/* ---------- Trust strip ---------- */
.hm-trust {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.hm-trust-item {
    background: var(--hm-card);
    border: 1px solid var(--hm-line);
    border-radius: var(--hm-radius);
    padding: 14px;
    text-align: center;
}

.hm-trust-item svg {
    width: 22px;
    height: 22px;
    color: var(--hm-brand);
}

.hm-trust-item strong {
    display: block;
    font-size: 13px;
    margin-top: 6px;
}

.hm-trust-item span {
    font-size: 11px;
    color: var(--hm-text-muted);
}

/* ---------- Footer ---------- */
.hm-footer-bar {
    background: var(--hm-brand-dark);
    color: #fff;
    padding: 14px 0;
    font-size: 12px;
}

.hm-footer-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.hm-footer-bar .hm-brand-mark {
    background: rgba(255, 255, 255, .16);
}

.hm-footer {
    background: #e9ebed;
    padding: 24px 0;
    font-size: 12px;
    color: #4d5761;
}

.hm-footer-top {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.hm-footer-about {
    flex: 1 1 420px;
    min-width: 0;
}

.hm-footer-about h2 {
    font-size: 14px;
    margin: 0 0 8px;
    color: var(--hm-text);
}

.hm-footer-about p {
    margin: 0;
    line-height: 1.9;
}

.hm-footer-collapse {
    max-height: 78px;
    overflow: hidden;
    transition: max-height .3s ease;
}

.hm-footer-collapse.is-open {
    max-height: 600px;
}

.hm-footer-more {
    margin-top: 8px;
    border: none;
    background: transparent;
    color: var(--hm-brand);
    font-size: 12px;
    font-weight: 700;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hm-footer-more svg {
    width: 13px;
    height: 13px;
    transition: transform .2s;
}

.hm-footer-more[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.hm-footer-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hm-footer-badge {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    background: var(--hm-card);
    border: 1px solid #dcdfe2;
    display: grid;
    place-items: center;
    text-align: center;
    font-size: 10px;
    line-height: 1.4;
    color: var(--hm-text-muted);
    padding: 6px;
}

.hm-footer-badge img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.hm-footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #d8dbde;
}

.hm-footer-links a:hover {
    color: var(--hm-brand);
}

.hm-footer-legal {
    margin: 14px 0 0;
    text-align: center;
    font-size: 11px;
    color: #6b7783;
}

/* ---------- Toast ---------- */
.hm-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, 16px);
    background: var(--hm-text);
    color: #fff;
    border-radius: 9px;
    padding: 10px 18px;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 90;
}

.hm-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hm-grid {
        grid-template-columns: 1fr;
    }

    .hm-trust {
        grid-template-columns: repeat(2, 1fr);
    }

    .hm-slide {
        aspect-ratio: 16 / 9;
    }

    .hm-slide-body {
        padding: 16px 18px;
    }

    .hm-slider-nav {
        display: none;
    }
}

@media (max-width: 520px) {
    .hm-brand-title {
        font-size: 13px;
    }

    .hm-card {
        padding: 13px;
    }

    .hm-price-chip {
        flex: 1 1 100%;
    }

    .hm-footer-badge {
        width: 60px;
        height: 60px;
    }
}
