/* Шрифт для логотипа — без загрузки файлов, только системные (чтобы не было 404 на Netlify) */
/* Если есть assets/fonts/Streamster.woff2 — раскомментируйте @font-face выше и добавьте font-family: 'Streamster' в .brand-logo-text */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
    padding-bottom: 80px;
    overflow-x: hidden;
}

/* Фирменная шапка */
.brand-banner {
    margin: 12px auto 16px;
    max-width: 600px;
    padding: 0;
    overflow-x: hidden;
}

.brand-banner-inner {
    border: 2px solid #000000;
    border-radius: 0;
    padding: 18px 14px 0;
    position: relative;
    background: #ffffff;
    overflow: hidden;
}

.brand-logo {
    text-align: center;
    margin: 6px 0 12px;
}

.brand-logo-text {
    font-family: 'Segoe Script', 'Brush Script MT', 'Comic Sans MS', cursive;
    font-size: 52px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    text-align: center;
    color: #000000;
    text-shadow:
        0.5px 0 #000,
        -0.5px 0 #000,
        0 0.5px #000,
        0 -0.5px #000;
}
.brand-banner-logo-only .brand-logo-text {
    margin: 0;
    padding: 14px 0;
}
.brand-logo-file {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}
.brand-logo-add {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #666;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 6px;
    padding: 6px 0;
}
.brand-logo-add:hover { color: #000; }
.brand-logo-add.hidden { display: none; }

.brand-logo-img {
    display: block;
    width: 50%;
    max-width: 100%;
    height: auto;
    min-height: 120px;
    margin: 10px auto 0;
    object-fit: contain;
    object-position: top center;
}
.brand-banner-logo-only .brand-banner-inner {
    border: none;
    padding: 12px 14px;
    box-shadow: none;
    outline: none;
}
.brand-logo-wrap {
    width: 100%;
    height: auto;
    min-height: 120px;
    overflow: visible;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 8px;
    box-sizing: border-box;
}
.brand-logo-wrap .brand-logo-img {
    width: 50%;
    max-width: 100%;
    height: auto;
    min-height: 120px;
    margin-top: 10px;
    object-fit: contain;
    object-position: top center;
}
.brand-banner-logo-only .brand-logo-img {
    width: 50%;
    max-width: 100%;
    height: auto;
    min-height: 120px;
    margin-top: 10px;
    object-fit: contain;
    object-position: top center;
}
.brand-logo-img.hidden { display: none; }
.brand-logo-wrap:has(.brand-logo-img.hidden) {
    display: none;
}
.brand-banner-logo-only .brand-logo-wrap {
    min-height: 120px;
}
.brand-banner-logo-only .brand-logo-wrap:has(.brand-logo-img.hidden) {
    display: none;
}

.delivery-tagline {
    text-align: center;
    font-size: 13px;
    line-height: 1.4;
    color: #333;
    margin: 12px 0 0;
    padding: 10px 8px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.aluminum-tagline {
    text-align: center;
    font-size: 12px;
    line-height: 1.4;
    color: #555;
    margin: 6px 0 0;
    padding: 0 8px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.contact-block {
    text-align: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
}

.contact-phone {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #000;
    text-decoration: none;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}
.contact-phone:hover,
.contact-phone:focus {
    text-decoration: underline;
}

.contact-email {
    display: block;
    font-size: 15px;
    color: #000;
    text-decoration: none;
    margin-bottom: 8px;
}
.contact-email:hover,
.contact-email:focus {
    text-decoration: underline;
}

.contact-address {
    font-size: 14px;
    color: #444;
    line-height: 1.4;
    margin: 0 0 4px;
}

.contact-map {
    display: block;
    font-size: 14px;
    color: #0066cc;
    text-decoration: none;
    margin-bottom: 6px;
}
.contact-map:hover {
    text-decoration: underline;
}

.contact-hours {
    font-size: 13px;
    color: #555;
    margin: 0 0 6px;
}

.contact-max {
    font-size: 14px;
    color: #0066ff;
    text-decoration: none;
}
.contact-max:hover {
    text-decoration: underline;
}
.contact-telegram {
    font-size: 14px;
    color: #0088cc;
    text-decoration: none;
}
.contact-telegram:hover {
    text-decoration: underline;
}

.contact-vk {
    font-size: 14px;
    color: #0077ff;
    text-decoration: none;
}
.contact-vk:hover {
    text-decoration: underline;
}

.brand-slogan-center {
    text-align: center;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 18px;
    line-height: 1.15;
    margin: 0 0 12px;
}

.brand-phone {
    display: block;
    text-align: center;
    font-size: 26px;
    font-weight: 900;
    color: #000000;
    text-decoration: none;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

/* “Профиль кровли” снизу (чёрная полоса + белый зубчатый край) */
.roof-strip {
    height: 56px;
    background: #000000;
    position: relative;
}

.roof-strip::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 18px;
    background:
        linear-gradient(135deg, transparent 75%, #fff 75%) 0 0/24px 18px repeat-x,
        linear-gradient(225deg, transparent 75%, #fff 75%) 12px 0/24px 18px repeat-x;
}

/* Плавающие кнопки: Позвонить и WhatsApp (как на Петровиче) */
.float-actions {
    position: fixed;
    bottom: 76px;
    right: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    padding-right: 8px;
}
.float-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    border: 2px solid #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    min-width: 48px;
}
.float-btn-call {
    background: #000;
    font-size: 20px;
    padding: 12px 18px;
}
.float-btn-max {
    background: #0066ff;
    color: #fff;
}
.float-btn-wa {
    background: #25d366;
    color: #fff;
}
.float-btn-tg {
    background: #0088cc;
    color: #fff;
}
.float-btn-vk {
    background: #0077ff;
    color: #fff;
}
.float-btn:hover {
    opacity: 0.9;
}

/* Навигация */
.nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-top: 2px solid #000000;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 1000;
}

.nav-btn {
    background-color: #ffffff;
    border: 2px solid #000000;
    border-radius: 10px;
    color: #000000;
    font-size: 16px;
    padding: 10px 16px;
    margin: 0 4px;
    cursor: pointer;
    flex: 1;
    transition: all 0.15s;
    text-transform: uppercase;
    font-weight: 800;
    box-shadow:
        0 3px 0 #000000,
        inset 0 1px 0 rgba(255,255,255,0.2);
}
.nav-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #000000;
}
.nav-btn.active {
    font-weight: bold;
    background-color: #000000;
    color: #ffffff;
    box-shadow:
        0 3px 0 #1a1a1a,
        inset 0 1px 0 rgba(255,255,255,0.12);
}
.nav-btn.active:active {
    box-shadow: 0 1px 0 #1a1a1a;
}

.nav-badge {
    display: inline-block;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    padding: 0 6px;
    margin-left: 4px;
    font-size: 12px;
    font-weight: 700;
    background: #000;
    color: #fff;
    border-radius: 10px;
    vertical-align: middle;
}
.nav-badge.hidden {
    display: none;
}

/* Экраны */
.screen {
    display: none;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    margin-top: 16px;
    overflow-x: hidden;
}

.screen.active {
    display: block;
}

h1 {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    font-weight: 900;
}

/* Заголовок каталога + кнопка "Назад" */
.catalog-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.catalog-header h1 {
    margin-bottom: 0;
    flex: 1;
}

.catalog-header .btn {
    width: auto;
    margin-top: 0;
    padding: 12px 14px;
    font-size: 16px;
}

.catalog-search-wrap {
    margin-bottom: 14px;
}

.catalog-search {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 2px solid #000000;
    border-radius: 8px;
    background: #ffffff;
    color: #000000;
}
.catalog-search::placeholder {
    color: #666;
}
.catalog-search:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.2);
}

.search-result-card {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid #000000;
    border-radius: 10px;
    padding: 14px 18px;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 3px 0 #000000;
    transition: transform 0.15s, box-shadow 0.15s;
}
.search-result-card:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #000000;
}
.search-result-card-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-result-card-icon .catalog-icon {
    width: 36px;
    height: 36px;
    color: #000000;
}
.search-result-card-body {
    flex: 1;
    min-width: 0;
}
.search-result-card-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}
.search-result-card-section {
    font-size: 13px;
    color: #666;
}

/* Иконки каталога (труба, лист, полоса и т.д.) */
.catalog-icon {
    display: block;
    width: 100%;
    height: 100%;
}

/* Каталог */
.catalog-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.section-card {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 2px solid #000000;
    border-radius: 10px;
    padding: 18px;
    background-color: #ffffff;
    text-align: left;
    cursor: pointer;
    box-shadow:
        0 4px 0 #000000,
        inset 0 1px 0 rgba(255,255,255,0.2);
    transition: transform 0.15s, box-shadow 0.15s;
}
.section-card:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #000000;
}

.section-card-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.section-card-icon .catalog-icon {
    width: 44px;
    height: 44px;
    color: #000000;
}

.section-card-body {
    flex: 1;
    min-width: 0;
}

.section-card-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
}

.section-card-subtitle {
    color: #666666;
    font-size: 14px;
}

.catalog-item {
    border: 2px solid #000000;
    border-radius: 10px;
    padding: 15px;
    background-color: #ffffff;
    box-shadow:
        0 3px 0 #000000,
        inset 0 1px 0 rgba(255,255,255,0.15);
}

.catalog-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.catalog-item-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.catalog-item-icon .catalog-icon {
    width: 36px;
    height: 36px;
    color: #000000;
}

.catalog-item-name {
    flex: 1;
    min-width: 0;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 0;
}

.catalog-item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
}

.catalog-item-price {
    color: #000000;
    font-weight: 900;
    text-transform: uppercase;
}

.catalog-item-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.catalog-item-controls label {
    font-size: 14px;
    margin-right: 0;
}

.catalog-item-controls input {
    width: 80px;
    padding: 10px;
    border: 1px solid #000000;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
}

.catalog-item-controls select {
    width: 140px;
    padding: 10px;
    border: 1px solid #000000;
    border-radius: 4px;
    font-size: 16px;
    background-color: #ffffff;
}

.catalog-item-total {
    font-size: 16px;
    font-weight: bold;
    min-width: 100px;
    text-align: right;
    align-self: flex-end;
}

/* Кнопки — в виде заглушек профильной трубы */
.btn {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid #000000;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow:
        0 4px 0 #000000,
        inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 #000000,
        inset 0 1px 0 rgba(255,255,255,0.1);
}

.btn-primary {
    background-color: #000000;
    color: #ffffff;
    box-shadow:
        0 4px 0 #1a1a1a,
        inset 0 1px 0 rgba(255,255,255,0.12);
}
.btn-primary:active {
    box-shadow:
        0 2px 0 #1a1a1a,
        inset 0 1px 0 rgba(255,255,255,0.08);
}

.btn-danger {
    background-color: #ffffff;
    color: #000000;
}

.btn-danger:active {
    background-color: #f5f5f5;
}

.btn-secondary {
    background-color: #ffffff;
    color: #000000;
}

.btn-secondary:active {
    background-color: #f5f5f5;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 0 #000000;
}

/* Корзина */
.basket-list {
    margin-bottom: 20px;
}

.basket-item {
    border: 2px solid #000000;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #ffffff;
}

.basket-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.basket-item-name {
    font-size: 18px;
    font-weight: bold;
    flex: 1;
}

.basket-item-remove {
    background: none;
    border: none;
    color: #000000;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
}

.basket-item-details {
    font-size: 14px;
    color: #666666;
    margin-bottom: 8px;
}

.basket-item-qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.basket-qty-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #000;
    border-radius: 8px;
    background: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.basket-qty-btn:hover {
    background: #f0f0f0;
}
.basket-qty-value {
    font-size: 15px;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.basket-item-total {
    font-size: 16px;
    font-weight: bold;
    text-align: right;
}

.empty-message {
    text-align: center;
    color: #666666;
    padding: 40px 20px;
    font-size: 16px;
}

.basket-total {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-size: 20px;
    margin-bottom: 20px;
    border: 2px solid #000000;
}

/* Форма заказа */
.order-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 16px;
    font-weight: bold;
}

.form-group input {
    padding: 15px;
    border: 1px solid #000000;
    border-radius: 8px;
    font-size: 16px;
    width: 100%;
}

.form-group input:focus {
    outline: none;
    border-width: 2px;
}

/* Блок доставки в форме заказа */
.delivery-block {
    border: 2px solid #000000;
    border-radius: 10px;
    padding: 14px 16px;
    background: #fafafa;
}

.delivery-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
}

.delivery-checkbox {
    width: 22px;
    height: 22px;
    accent-color: #000;
    cursor: pointer;
}

.delivery-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.delivery-in-city-note {
    font-size: 14px;
    margin: 0 0 12px;
}

.delivery-address-wrap {
    position: relative;
    margin-bottom: 4px;
}

.delivery-address-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 2px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 8px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.delivery-address-suggestions.hidden {
    display: none;
}

.delivery-address-suggestion-item {
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}
.delivery-address-suggestion-item:last-child {
    border-bottom: none;
}
.delivery-address-suggestion-item:hover,
.delivery-address-suggestion-item:focus {
    background: #f0f0f0;
    outline: none;
}

.delivery-details input[type="text"] {
    margin-bottom: 4px;
}

.unloading-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.unloading-hint {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    margin: 0;
}

.delivery-details.hidden {
    display: none;
}

.payment-block {
    border: 2px solid #000000;
    border-radius: 10px;
    padding: 14px 16px;
    background: #fafafa;
}

.payment-block > label,
.payment-block > .payment-block-label {
    display: block;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
}

.payment-option .payment-radio {
    width: 20px;
    height: 20px;
    accent-color: #000;
    cursor: pointer;
}

.payment-qr-block {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #ddd;
    text-align: center;
}
.payment-qr-block.hidden { display: none; }
.payment-qr-caption {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}
.payment-qr-form-img {
    display: block;
    margin: 0 auto;
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.order-summary {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 12px;
    text-align: left;
    font-size: 16px;
    border: 2px solid #000000;
}

.order-summary-goods {
    margin-bottom: 6px;
}

.order-summary-delivery {
    margin-bottom: 6px;
}

.order-summary-total {
    font-size: 18px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #000;
}

.order-success {
    text-align: center;
    padding: 40px 20px;
}

.order-success h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #000000;
}

.order-success p {
    font-size: 18px;
    color: #000000;
}

.order-success-pay-options {
    font-size: 14px;
    color: #333;
    margin-top: 12px;
    line-height: 1.4;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.order-success-qr {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid #000;
    text-align: center;
}
.order-success-qr.hidden { display: none; }
.order-success-qr-caption {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}
.order-success-qr-img {
    display: block;
    margin: 0 auto;
    max-width: 220px;
    max-height: 220px;
    object-fit: contain;
}

.hidden {
    display: none;
}

/* Адаптивность для мобильных */
@media (max-width: 480px) {
    .screen {
        padding: 15px;
    }

    h1 {
        font-size: 22px;
    }

    .brand-logo-text {
        font-size: 44px;
    }

    .brand-phone {
        font-size: 22px;
    }

    .catalog-item-name,
    .basket-item-name {
        font-size: 16px;
    }

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