/* =========================
   БАЗА
========================= */
:root {
    --bg: #f0f2f5;
    --bg-soft: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #23384e;
    --text-soft: #607080;
    --text-muted: #6c7a89;
    --primary: #27ae60;
    --primary-hover: #219150;
    --dark: #1a1a1a;
    --dark-blue: #23384e;
    --dark-blue-2: #1d2b39;
    --line: #e2e8f0;
    --line-soft: #e7edf3;
    --shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 14px 36px rgba(20, 30, 40, 0.10);
    --radius: 12px;
    --radius-lg: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, "Segoe UI", Roboto, sans-serif;
}

a {
    color: inherit;
}

/* =========================
   ШАПКА
========================= */
.header {
    background: var(--dark);
    color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-inner {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    margin: 0;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
}

.header-auth {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-user,
.header-link {
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}

.header-link {
    text-decoration: none;
}

.header-link:hover {
    text-decoration: underline;
}

.header-link-button,
.subscription-logout-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.subscription-logout-button {
    color: var(--dark-blue);
    font-weight: 600;
}

.subscription-logout-button:hover {
    text-decoration: underline;
}

.logout-form {
    margin: 0;
}

.header-center .header-inner {
    width: 100%;
    max-width: none;
    padding: 0;
    justify-content: center;
}

.header-center h1 {
    width: 100%;
    text-align: center;
}

/* =========================
   КОНТЕЙНЕРЫ
========================= */
.container,
.landing-container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container {
    margin: 30px auto;
}

.auth-wrapper {
    max-width: 500px;
    margin: 60px auto;
    padding: 0 20px;
}

.auth-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.auth-title {
    margin: 0 0 8px;
    font-size: 32px;
    color: var(--text);
}

.auth-subtitle {
    margin: 0 0 24px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

.auth-footer {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 15px;
}

.auth-footer a {
    color: var(--dark-blue);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-footer-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* =========================
   ФОРМЫ АВТОРИЗАЦИИ
========================= */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-field label {
    font-weight: 600;
    color: var(--text);
}

.auth-field input {
    padding: 12px 14px;
    border: 1px solid #d9dee5;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: 0.2s ease;
}

.auth-field input:focus {
    border-color: #2f4a64;
    box-shadow: 0 0 0 3px rgba(47, 74, 100, 0.12);
}

.auth-button {
    margin-top: 6px;
    padding: 12px 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.auth-button:hover {
    background: var(--primary-hover);
}

.auth-error {
    margin-bottom: 18px;
    padding: 12px 14px;
    background: #fdeaea;
    color: #b42318;
    border: 1px solid #f3c7c7;
    border-radius: 8px;
    font-size: 14px;
}

.auth-help,
.field-error {
    font-size: 14px;
    line-height: 1.5;
}

.auth-help {
    color: var(--text-muted);
}

.field-error {
    margin-top: 6px;
    color: #c0392b;
}

.auth-help ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

.auth-help-box {
    margin-top: 6px;
    padding: 10px 12px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.auth-help-box strong {
    display: block;
    margin-bottom: 6px;
    color: #334155;
}

.auth-back-wrap {
    max-width: 500px;
    margin: 24px auto 0;
    padding: 0 20px;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2f4a64;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: 0.2s ease;
}

.auth-back-link:hover {
    color: #1d3245;
    text-decoration: underline;
}

/* =========================
   БАННЕР ТРИАЛА
========================= */
.trial-banner {
    width: 95%;
    max-width: 1200px;
    margin: 18px auto 0;
    padding: 14px 18px;
    background: #fff3cd;
    color: #856404;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
}

.trial-upgrade-link {
    color: #5b2bbf;
    font-weight: 800;
    text-decoration: underline;
    margin-left: 10px;
}

/* =========================
   ФИЛЬТРЫ
========================= */
.filters-wrapper {
    background: var(--surface);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-title {
    min-width: 110px;
    font-weight: 700;
    color: #34495e;
    font-size: 1rem;
    text-transform: uppercase;
}

.filter-link {
    text-decoration: none;
    background: #e9ecef;
    color: #495057;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.filter-link:hover {
    background: #dee2e6;
}

.filter-link.active {
    background: #34495e;
    color: #fff;
}

/* =========================
   ПОИСК
========================= */
.search-box {
    margin-bottom: 35px;
    width: 100%;
}

.search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    min-height: 48px;
}

.sort-select {
    padding: 12px;
    min-height: 48px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background: #fff;
}

.search-button {
    padding: 10px 25px;
    min-height: 48px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s;
}

.search-button:hover {
    background: var(--primary-hover);
}

/* =========================
   ТАБЛИЦА
========================= */
.metal-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.metal-table th {
    background: #34495e;
    color: #fff;
    padding: 15px;
    text-align: left;
}

.metal-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.metal-table tr:hover {
    background: #f8f9fa;
}

td a {
    color: #0a66c2;
    text-decoration: none;
}

td a:hover {
    text-decoration: underline;
}

.product-link {
    color: inherit;
    text-decoration: none;
}

.product-link:hover {
    text-decoration: underline;
}

.product-link-disabled {
    color: inherit;
    text-decoration: none;
    cursor: default;
}

.price-cell {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.unit {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: normal;
}

.vendor-tag {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #495057;
}

.price-change {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
}

.price-change.down {
    color: #1e9e55;
}

.price-change.up {
    color: #d64545;
}

.price-change.new {
    color: #2b6cb0;
}

.deal-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    background: #fff3cd;
    color: #856404;
}

.favorite-cell {
    white-space: nowrap;
}

.favorite-btn {
    padding: 8px 14px;
    background: #34495e;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.favorite-btn:hover {
    background: #2c3e50;
}

.favorite-btn-remove {
    background: #c0392b;
}

.favorite-btn-remove:hover {
    background: #a93226;
}

.favorite-btn-disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* =========================
   ПАГИНАЦИЯ
========================= */
.pagination-wrapper {
    text-align: center;
    margin: 40px 0;
    padding-bottom: 50px;
}

.btn-more {
    display: inline-block;
    padding: 14px 60px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

.btn-more:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-more:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* =========================
   БЛОКИ ПОДПИСКИ / ОПЛАТЫ
========================= */
.subscription-box {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
}

.subscription-text {
    margin: 0 0 12px;
    font-size: 15px;
    color: #334155;
    line-height: 1.6;
}

.subscription-email {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 700;
}

.subscription-email a {
    color: #2563eb;
    text-decoration: none;
}

.subscription-email a:hover {
    text-decoration: underline;
}

.subscription-features {
    margin-top: 16px;
    color: #334155;
}

.subscription-features ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.subscription-features li {
    margin-bottom: 8px;
}

.pay-btn {
    display: inline-block;
    background: #28a745;
    color: #fff;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 700;
    transition: 0.2s ease;
    border: none;
    cursor: pointer;
}

.pay-btn:hover {
    background: #218838;
}

/* =========================
   LANDING / HERO
========================= */
.landing-hero {
    padding: 60px 0 30px;
    background: linear-gradient(180deg, #f5f7fb 0%, #eef2f7 100%);
}

.landing-hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 32px;
    align-items: center;
}

.landing-badge {
    display: inline-block;
    margin-bottom: 18px;
    padding: 8px 14px;
    background: #eaf8ef;
    color: #1f9d55;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.landing-title {
    margin: 0 0 18px;
    font-size: 52px;
    line-height: 1.08;
    color: #1f2d3d;
}

.landing-subtitle {
    margin: 0 0 28px;
    font-size: 18px;
    line-height: 1.7;
    color: #5d6b79;
    max-width: 760px;
}

.landing-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.landing-actions-center {
    justify-content: center;
}

.landing-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.2s ease;
}

.landing-btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 18px rgba(39, 174, 96, 0.22);
}

.landing-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.landing-btn-secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid #d9e1ea;
}

.landing-btn-secondary:hover {
    background: #f8fafc;
}

.landing-btn-light {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.landing-btn-light:hover {
    background: rgba(255, 255, 255, 0.18);
}

.landing-hero-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-lg);
    border: 1px solid #e8edf3;
}

.landing-hero-card-top {
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 700;
    color: #748395;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.landing-mini-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.landing-mini-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.landing-mini-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 7px;
    flex-shrink: 0;
}

.landing-mini-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 16px;
}

.landing-mini-item p {
    margin: 0;
    color: #667586;
    line-height: 1.55;
    font-size: 14px;
}

.landing-price-box {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #ebf0f5;
}

.landing-price-label {
    margin-bottom: 8px;
    font-size: 13px;
    color: #7a8898;
    font-weight: 700;
    text-transform: uppercase;
}

.landing-price-main {
    font-size: 38px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.landing-price-main span {
    font-size: 16px;
    color: #708091;
    font-weight: 600;
}

/* =========================
   LANDING FEATURES
========================= */
.landing-features {
    padding: 24px 0 60px;
    background: #f5f7fb;
}

.landing-section-head {
    margin-bottom: 26px;
}

.landing-section-head h3 {
    margin: 0 0 10px;
    font-size: 34px;
    color: var(--text);
}

.landing-section-head p {
    margin: 0;
    color: #657586;
    font-size: 17px;
}

.landing-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.landing-feature-card {
    background: #fff;
    border-radius: 16px;
    padding: 26px;
    box-shadow: 0 6px 22px rgba(20, 30, 40, 0.06);
    border: 1px solid var(--line-soft);
}

.landing-feature-card h4 {
    margin: 0 0 12px;
    font-size: 22px;
    color: var(--text);
}

.landing-feature-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.7;
}

/* =========================
   CTA
========================= */
.cta-section {
    margin: 28px 0 48px;
}

.cta-card {
    background: linear-gradient(135deg, #13263d 0%, #1f3b5a 55%, #234567 100%);
    color: #fff;
    border-radius: 28px;
    padding: 48px 36px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(15, 35, 60, 0.18);
}

.cta-badge {
    display: inline-block;
    margin-bottom: 18px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
}

.cta-title {
    margin: 0 0 18px;
    font-size: 64px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.cta-text {
    max-width: 900px;
    margin: 0 auto 30px;
    font-size: 24px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 260px;
    min-height: 58px;
    padding: 0 28px;
    border-radius: 16px;
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cta-btn-primary {
    background: #fff;
    color: #17314d;
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.12);
}

.cta-btn-primary:hover {
    background: #f3f6f9;
    transform: translateY(-1px);
}

.cta-btn-secondary {
    background: #2bb24c;
    color: #fff;
    box-shadow: 0 10px 25px rgba(43, 178, 76, 0.24);
}

.cta-btn-secondary:hover {
    background: #249640;
    transform: translateY(-1px);
}

/* =========================
   ФУТЕР
========================= */
.site-footer {
    margin-top: 56px;
    background: linear-gradient(90deg, #0f1d2c 0%, #10273f 50%, #0d1d2e 100%);
    color: #fff;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 44px 32px 28px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.footer-col {
    min-width: 0;
}

.footer-col h3,
.footer-col h4 {
    margin: 0 0 18px;
    color: #fff;
}

.footer-col h3 {
    font-size: 34px;
    font-weight: 800;
}

.footer-col h4 {
    font-size: 22px;
    font-weight: 800;
}

.footer-brand p {
    margin: 0;
    max-width: 430px;
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.86);
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 14px;
    font-size: 18px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.86);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.94);
    text-decoration: none;
    transition: 0.2s ease;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom,
.site-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    padding: 18px 20px 22px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.72);
}

/* =========================
   ЧЕКБОКСЫ / ОПЛАТА
========================= */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #334155;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    transform: scale(1.1);
    flex-shrink: 0;
}

.checkbox-label a {
    color: #2563eb;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.payment-form {
    margin-top: 20px;
}

.payment-checkbox {
    margin-bottom: 16px;
}

/* =========================
   АДАПТИВ
========================= */
@media (max-width: 1200px) {
    .cta-title {
        font-size: 54px;
    }

    .cta-text {
        font-size: 22px;
    }
}

@media (max-width: 1100px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1000px) {
    .landing-hero-grid,
    .landing-features-grid {
        grid-template-columns: 1fr;
    }

    .landing-title {
        font-size: 42px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .cta-title {
        font-size: 44px;
    }

    .cta-text {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-auth {
        gap: 12px;
        flex-wrap: wrap;
    }

    .search-form {
        flex-direction: column;
    }

    .search-input,
    .sort-select,
    .search-button {
        width: 100%;
    }

    .metal-table {
        font-size: 14px;
    }

    .metal-table th,
    .metal-table td {
        padding: 10px;
    }

    .landing-hero {
        padding-top: 40px;
    }

    .landing-title {
        font-size: 32px;
    }

    .landing-subtitle {
        font-size: 16px;
    }

    .landing-section-head h3 {
        font-size: 28px;
    }

    .cta-card {
        padding: 34px 20px;
        border-radius: 20px;
    }

    .cta-title {
        font-size: 34px;
    }

    .cta-text {
        font-size: 18px;
    }

    .cta-btn {
        width: 100%;
        min-width: 0;
        font-size: 18px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-col h3 {
        font-size: 28px;
    }

    .footer-col h4 {
        font-size: 20px;
    }
}