*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f7f7f6;
    color: #141414;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}


/* Основной контейнер страницы */
.page-wrap {
    max-width: 1040px;
    margin: 24px auto 48px;
    padding: 0 16px;
}

/* Шапка */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e6e6e4;
}

.brand-logo {
    text-decoration: none;
    color: #141414;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Системные уведомления */
.sys-alert {
    display: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.sys-alert.show {
    display: block;
}

.sys-alert.alert-ok {
    background: #eef8f1;
    color: #155724;
    border-color: #c3e6cb;
}

.sys-alert.alert-warn {
    background: #fffbeb;
    color: #78350f;
    border-color: #fde68a;
}

/* Двухколоночная сетка товара */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 820px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

.product-info-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Карточки */
.card-box {
    background: #ffffff;
    border: 1px solid #e6e6e4;
    border-radius: 14px;
    padding: 22px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* Галерея фото */
.main-photo-wrap {
    position: relative;
    background: #f2f2f0;
    border: 1px solid #e6e6e4;
    border-radius: 12px;
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #141414;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.04em;
}

.main-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

/* Полноразмерный просмотр (2000) */
.zoom-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(20, 20, 20, 0.92);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.zoom-modal.open {
    display: flex;
}

.zoom-modal-img {
    max-width: 95vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 8px;
    background: #ffffff;
}

.zoom-close-btn {
    position: fixed;
    top: 16px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(20, 20, 20, 0.75);
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.zoom-close-btn:hover {
    background: #ffffff;
    color: #141414;
}

.main-photo-placeholder {
    text-align: center;
    padding: 20px;
}

.photo-tag {
    display: inline-block;
    font-size: 12px;
    color: #666666;
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #e0e0de;
    margin-bottom: 16px;
}

.photo-art {
    font-size: 84px;
    line-height: 1;
    margin-bottom: 16px;
}

.photo-caption {
    font-size: 13px;
    color: #525252;
}

.photo-frame-label {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #a3a3a3;
    margin-bottom: 10px;
}

/* Однострочная листалка с цифрами и стрелками */
.photo-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: nowrap;
}

.pager-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.pager-arrow,
.pager-num {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e0e0de;
    background: #f4f4f2;
    color: #262626;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.pager-arrow {
    font-size: 18px;
    line-height: 1;
}

.pager-arrow:hover,
.pager-num:hover {
    background: #eaeae8;
    border-color: #c7c7c4;
}

.pager-num.active {
    background: #333840;
    color: #ffffff;
    border-color: #333840;
}

/* Мета-информация и заголовок */
.item-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.brand-name {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #525252;
}

.sku-code {
    font-size: 12.5px;
    color: #737373;
    font-variant-numeric: tabular-nums;
}

.product-title {
    font-size: 21px;
    font-weight: 700;
    color: #141414;
    line-height: 1.3;
    margin-bottom: 14px;
}

/* Цены */
.price-block {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #ececea;
}

.price-current {
    font-size: 26px;
    font-weight: 700;
    color: #141414;
    font-variant-numeric: tabular-nums;
}

.price-old {
    font-size: 15px;
    color: #8c8c8c;
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
}

/* Поля выбора цвета и размера */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.size-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-label {
    font-size: 13px;
    font-weight: 500;
    color: #404040;
}

.field-label strong {
    color: #141414;
    font-weight: 600;
}

.stock-status {
    font-size: 12.5px;
    font-weight: 600;
    color: #15803d;
}

.color-pills,
.size-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-pill,
.size-pill {
    min-width: 54px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #d4d4d2;
    border-radius: 10px;
    background: #ffffff;
    font-size: 14px;
    font-weight: 500;
    color: #141414;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.color-pill:hover:not(:disabled),
.size-pill:hover:not(:disabled) {
    border-color: #141414;
}

.color-pill.active,
.size-pill.active {
    background: #333840;
    color: #ffffff;
    border-color: #333840;
    font-weight: 600;
}

.size-pill {
    gap: 2px;
}

.size-pill-qty {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.78;
}

.size-pill:disabled {
    background: #f5f5f4;
    color: #a3a3a3;
    border-color: #e5e5e3;
    cursor: not-allowed;
    text-decoration: line-through;
}

.color-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

/* Плашка наличия в магазине */
.division-box {
    margin-top: 16px;
    background: #f8f8f7;
    border: 1px solid #ececea;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13.5px;
    color: #333333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.division-dot {
    color: #15803d;
    font-size: 11px;
}

/* Кнопки */
.client-actions {
    margin-top: 18px;
}

.btn-dark {
    width: 100%;
    height: 46px;
    background: #333840;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-dark:hover {
    background: #262a30;
}

.btn-quiet {
    text-decoration: none;
    background: #f4f4f2;
    color: #262626;
    border: 1px solid #e0e0de;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-quiet:hover {
    background: #eaeae8;
}

.field-note {
    font-size: 12px;
    color: #737373;
}

/* Блок маркетингового описания и характеристик */
.marketing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #141414;
    margin-bottom: 10px;
}

.empty-desc-box {
    background: #f8f8f7;
    border: 1px dashed #d4d4d2;
    border-radius: 10px;
    padding: 14px;
    font-size: 13.5px;
    color: #525252;
    margin-bottom: 16px;
}

.desc-edit-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.field-input,
.field-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d4d4d2;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    color: #141414;
    background: #ffffff;
}

.field-input:focus,
.field-textarea:focus {
    outline: none;
    border-color: #141414;
}

.field-textarea {
    resize: vertical;
    line-height: 1.45;
}

.desc-form-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 4px;
}

.marketing-lead {
    font-size: 15px;
    font-weight: 600;
    color: #141414;
    margin-bottom: 8px;
}

.marketing-body {
    font-size: 14px;
    color: #404040;
    margin-bottom: 12px;
}

.marketing-bullets {
    padding-left: 18px;
    font-size: 13.5px;
    color: #333333;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 18px;
}

.specs-block {
    padding-top: 16px;
    border-top: 1px solid #ececea;
}

.specs-block.no-top-border {
    padding-top: 0;
    border-top: none;
}

.specs-title {
    font-size: 14px;
    font-weight: 700;
    color: #141414;
    margin-bottom: 10px;
}

.specs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13.5px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px dashed #ececea;
    padding-bottom: 6px;
}

.spec-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.spec-row dt {
    color: #737373;
}

.spec-row dd {
    font-weight: 600;
    color: #141414;
    text-align: right;
}
