/* ==============================
   BASE
============================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #111827;
}

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

img {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

/* ==============================
   BUTTONS
============================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-primary {
    background: #1f2937;
    color: #ffffff;
}

.btn-primary:hover {
    background: #111827;
}

.btn-outline {
    background: #ffffff;
    color: #1f2937;
    border-color: #d1d5db;
}

.btn-outline:hover {
    border-color: #1f2937;
}

/* ==============================
   HEADER
============================== */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header__inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
}

.site-nav a {
    color: #4b5563;
    font-size: 15px;
    font-weight: 600;
}

.site-nav a:hover,
.site-nav a.active {
    color: #111827;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==============================
   MAIN
============================== */

.site-main {
    min-height: calc(100vh - 220px);
    padding: 32px 0;
}

.page-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.page-title {
    margin: 0 0 14px;
    font-size: 34px;
    line-height: 1.2;
}

.page-text {
    margin: 0 0 14px;
    color: #4b5563;
    font-size: 16px;
    line-height: 1.7;
}

/* ==============================
   FOOTER
============================== */

.site-footer {
    background: #111827;
    color: #ffffff;
    padding: 34px 0 20px;
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 24px;
}

.site-footer__brand p {
    margin: 8px 0 0;
    color: #d1d5db;
}

.site-footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.site-footer__nav a {
    color: #d1d5db;
}

.site-footer__nav a:hover {
    color: #ffffff;
}

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-top: 16px;
    color: #9ca3af;
    font-size: 14px;
}

/* ==============================
   MOBILE
============================== */

@media (max-width: 900px) {
    .site-header__inner {
        flex-wrap: wrap;
        padding: 14px 0;
    }

    .site-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .site-header__actions {
        margin-left: auto;
    }

    .site-footer__inner {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .site-header__actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .btn {
        width: 100%;
        padding: 10px 12px;
        font-size: 14px;
    }

    .page-card {
        padding: 20px;
        border-radius: 14px;
    }

    .page-title {
        font-size: 26px;
    }

    .site-footer__nav {
        flex-direction: column;
    }
}

/* ==============================
   FORMS / AUTH
============================== */

.auth-card {
    max-width: 520px;
    margin: 0 auto;
}

.form {
    margin-top: 22px;
    display: grid;
    gap: 18px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    font-weight: 700;
    color: #111827;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 44px;
    padding: 11px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
    outline: none;
    transition: 0.2s ease;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.alert {
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ==============================
   ADMIN DASHBOARD
============================== */

.admin-grid {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.admin-card {
    display: grid;
    gap: 8px;
    min-height: 130px;
    padding: 22px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    transition: 0.2s ease;
}

.admin-card strong {
    font-size: 20px;
    color: #111827;
}

.admin-card span {
    color: #6b7280;
    line-height: 1.5;
}

.admin-card:hover {
    transform: translateY(-2px);
    border-color: #111827;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10);
}

@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .admin-card {
        min-height: auto;
        padding: 18px;
    }
}
/* ==============================
   ADMIN FORMS / TABLES
============================== */

.admin-layout {
    margin-top: 26px;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: start;
}

.admin-panel {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 22px;
}

.section-title {
    margin: 0 0 18px;
    font-size: 22px;
    line-height: 1.25;
    color: #111827;
}

.form-group small {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #111827;
    cursor: pointer;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

.admin-table th {
    background: #111827;
    color: #ffffff;
    font-weight: 800;
    white-space: nowrap;
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover {
    background: #f3f4f6;
}

.status {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.status-success {
    background: #dcfce7;
    color: #166534;
}

.status-muted {
    background: #e5e7eb;
    color: #374151;
}

@media (max-width: 980px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .admin-panel {
        padding: 16px;
        border-radius: 14px;
    }

    .admin-table th,
    .admin-table td {
        padding: 11px 12px;
        font-size: 13px;
    }
}
/* ==============================
   ADMIN PRODUCTS
============================== */

.admin-thumb {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.text-muted {
    color: #9ca3af;
}

.status-info {
    margin-top: 6px;
    background: #dbeafe;
    color: #1e40af;
}

.admin-table small {
    color: #6b7280;
    font-size: 12px;
}

input[type="file"] {
    padding: 9px;
    cursor: pointer;
}

@media (max-width: 560px) {
    .admin-thumb {
        width: 48px;
        height: 48px;
    }
}
/* ==============================
   CATALOG / PRODUCT CARDS
============================== */

.catalog-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    transition: 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.10);
}

.product-card__image {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background: #f3f4f6;
    overflow: hidden;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card__placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #9ca3af;
    font-weight: 800;
}

.product-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.product-card__body {
    padding: 18px;
}

.product-card__category {
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.product-card__title {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.25;
}

.product-card__title a:hover {
    color: #374151;
}

.product-card__sku {
    margin-bottom: 10px;
    color: #6b7280;
    font-size: 13px;
}

.product-card__text {
    margin: 0 0 14px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.55;
}

.product-card__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.product-card__price strong {
    font-size: 22px;
    color: #111827;
}

.product-card__price span {
    color: #6b7280;
}

.product-card__price del {
    color: #9ca3af;
    font-size: 14px;
}

.product-card__stock {
    margin-bottom: 16px;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
}

.product-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 980px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 620px) {
    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .product-card__actions {
        grid-template-columns: 1fr;
    }
}
/* ==============================
   PRODUCT PAGE
============================== */

.product-page {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 34px;
    align-items: start;
}

.product-page__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.product-page__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-page__placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #9ca3af;
    font-size: 20px;
    font-weight: 800;
}

.product-page__content {
    min-width: 0;
}

.product-page__category {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 14px;
    font-weight: 800;
}

.product-page__sku {
    margin-bottom: 14px;
    color: #6b7280;
    font-size: 15px;
    font-weight: 700;
}

.product-page__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0 10px;
}

.product-page__price strong {
    font-size: 34px;
    line-height: 1;
    color: #111827;
}

.product-page__price span {
    color: #6b7280;
    font-size: 16px;
}

.product-page__price del {
    color: #9ca3af;
    font-size: 18px;
}

.product-page__stock {
    margin-bottom: 22px;
    color: #374151;
    font-size: 15px;
    font-weight: 800;
}

.product-page__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.product-description {
    margin-top: 34px;
    padding-top: 28px;
    border-top: 1px solid #e5e7eb;
}

/* ==============================
   PRODUCT PAGE MOBILE
============================== */

@media (max-width: 980px) {
    .product-page {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .product-page__image {
        max-width: 620px;
    }
}

@media (max-width: 560px) {
    .product-page {
        gap: 18px;
    }

    .product-page__image {
        border-radius: 14px;
    }

    .product-page__category {
        font-size: 13px;
    }

    .product-page__price strong {
        font-size: 28px;
    }

    .product-page__price del {
        font-size: 15px;
    }

    .product-page__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .product-description {
        margin-top: 24px;
        padding-top: 22px;
    }
}
/* ==============================
   BREADCRUMBS
============================== */

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
}

.breadcrumbs a {
    color: #374151;
    transition: 0.2s ease;
}

.breadcrumbs a:hover {
    color: #111827;
}

.breadcrumbs span {
    color: #9ca3af;
}

.breadcrumbs span:last-child {
    color: #6b7280;
}
/* ==============================
   CATALOG CATEGORIES
============================== */

.catalog-categories {
    margin-top: 26px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.catalog-category-card {
    display: grid;
    gap: 8px;
    min-height: 120px;
    padding: 18px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    transition: 0.2s ease;
}

.catalog-category-card strong {
    color: #111827;
    font-size: 18px;
    line-height: 1.25;
}

.catalog-category-card span {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

.catalog-category-card:hover {
    transform: translateY(-2px);
    border-color: #111827;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

/* ==============================
   CATALOG CATEGORIES MOBILE
============================== */

@media (max-width: 1100px) {
    .catalog-categories {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 780px) {
    .catalog-categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .catalog-categories {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .catalog-category-card {
        min-height: auto;
        padding: 16px;
    }
}

/* ==============================
   SEARCH PAGE
============================== */

.search-form {
    margin-top: 24px;
    margin-bottom: 26px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.search-form input {
    width: 100%;
    min-height: 46px;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
    outline: none;
    transition: 0.2s ease;
}

.search-form input:focus {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.search-result-title {
    margin: 20px 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-size: 15px;
}

.search-result-title strong {
    color: #111827;
}

/* ==============================
   SEARCH PAGE MOBILE
============================== */

@media (max-width: 560px) {
    .search-form {
        grid-template-columns: 1fr;
    }

    .search-form .btn {
        width: 100%;
    }
}

/* ==============================
   CART COUNTER
============================== */

.cart-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: 6px;
    padding: 0 7px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.site-nav a.active .cart-counter,
.site-nav a:hover .cart-counter {
    background: #374151;
}

/* ==============================
   CART PAGE
============================== */

.cart-layout {
    margin-top: 26px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.cart-panel {
    min-width: 0;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.cart-product strong {
    display: block;
    margin-bottom: 4px;
    color: #111827;
}

.cart-product strong a:hover {
    color: #374151;
}

.cart-product small {
    display: block;
    color: #6b7280;
}

.cart-qty-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-qty-form input {
    width: 82px;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    outline: none;
}

.cart-qty-form input:focus {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.cart-summary {
    display: grid;
    gap: 12px;
    padding: 22px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    position: sticky;
    top: 96px;
}

.cart-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.cart-summary__row strong {
    color: #111827;
    font-size: 18px;
}

.cart-summary form {
    margin: 0;
}

.cart-summary .btn {
    width: 100%;
}

/* ==============================
   CART PAGE MOBILE
============================== */

@media (max-width: 980px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 620px) {
    .cart-product {
        min-width: 180px;
    }

    .cart-qty-form {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-qty-form input {
        width: 100%;
    }

    .cart-table th,
    .cart-table td {
        white-space: nowrap;
    }
}

/* ==============================
   QUICK ORDER PAGE
============================== */

.order-layout {
    margin-top: 26px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.order-form-panel {
    padding: 22px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.order-product-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

.order-product-row strong {
    color: #111827;
    white-space: nowrap;
}

.order-product-row:last-of-type {
    border-bottom: 0;
}

/* ==============================
   QUICK ORDER MOBILE
============================== */

@media (max-width: 980px) {
    .order-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .order-form-panel {
        padding: 16px;
        border-radius: 14px;
    }

    .order-product-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* ==============================
   ADMIN ORDER DETAIL
============================== */

.order-detail {
    margin-top: 26px;
    display: grid;
    gap: 24px;
}

.order-detail__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.order-detail-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}

.detail-list {
    display: grid;
    gap: 12px;
}

.detail-list div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.detail-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.detail-list span {
    color: #6b7280;
    font-weight: 700;
}

.detail-list strong {
    color: #111827;
}

.order-comment {
    margin-top: 22px;
    padding: 16px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.order-comment strong {
    display: block;
    margin-bottom: 8px;
    color: #111827;
}

.order-comment p {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
}

.detail-total {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.detail-total span {
    color: #6b7280;
    font-weight: 700;
}

.detail-total strong {
    color: #111827;
    font-size: 22px;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

/* ==============================
   ADMIN ORDER DETAIL MOBILE
============================== */

@media (max-width: 980px) {
    .order-detail__header {
        flex-direction: column;
    }

    .order-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .order-detail__header {
        padding: 16px;
        border-radius: 14px;
    }

    .detail-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .detail-total {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ==============================
   ADMIN LOGS
============================== */

.logs-table td {
    vertical-align: top;
}

.log-action {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.logs-table small {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
}

@media (max-width: 620px) {
    .logs-table th,
    .logs-table td {
        white-space: nowrap;
    }
}

/* ==============================
   FAVORITES COUNTER
============================== */

.favorites-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: 6px;
    padding: 0 7px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.site-nav a.active .favorites-counter,
.site-nav a:hover .favorites-counter {
    background: #374151;
}

/* ==============================
   ACTIVE FAVORITE BUTTON
============================== */

.btn.is-active {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

.btn.is-active:hover {
    background: #374151;
    border-color: #374151;
}

/* ==============================
   COMPARE COUNTER
============================== */

.compare-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: 6px;
    padding: 0 7px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.site-nav a.active .compare-counter,
.site-nav a:hover .compare-counter {
    background: #374151;
}

/* ==============================
   COMPARE PAGE
============================== */

.compare-actions {
    margin-top: 24px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.compare-actions form {
    margin: 0;
}

.compare-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.compare-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
}

.compare-table th,
.compare-table td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    vertical-align: top;
    text-align: left;
}

.compare-table th {
    width: 180px;
    background: #f9fafb;
    color: #111827;
    font-weight: 800;
    position: sticky;
    left: 0;
    z-index: 2;
}

.compare-table td {
    min-width: 220px;
    color: #374151;
}

.compare-table tr:last-child th,
.compare-table tr:last-child td {
    border-bottom: 0;
}

.compare-table td:last-child {
    border-right: 0;
}

.compare-image {
    display: block;
    width: 160px;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.compare-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compare-image span {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #9ca3af;
    font-weight: 800;
}

.compare-cell-actions {
    display: grid;
    gap: 10px;
}

.compare-cell-actions form {
    margin: 0;
}

.compare-cell-actions .btn {
    width: 100%;
}

/* ==============================
   COMPARE PAGE MOBILE
============================== */

@media (max-width: 620px) {
    .compare-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .compare-actions .btn {
        width: 100%;
    }

    .compare-table {
        min-width: 760px;
    }

    .compare-table th,
    .compare-table td {
        padding: 13px;
    }

    .compare-table th {
        width: 150px;
    }

    .compare-image {
        width: 130px;
    }
}
/* ==============================
   DARK BLUE COMPACT THEME
   Добавлено: уменьшение шрифтов + темно-синяя тема
============================== */

:root {
    color-scheme: dark;
    --bg-main: #071426;
    --bg-main-2: #0a1b30;
    --bg-card: #0f223a;
    --bg-card-2: #102841;
    --bg-soft: #132d4a;
    --bg-hover: #18395d;
    --border-soft: rgba(139, 171, 207, 0.22);
    --border-strong: rgba(139, 171, 207, 0.36);
    --text-main: #eaf2ff;
    --text-soft: #b9c8dc;
    --text-muted: #8194ad;
    --accent: #38bdf8;
    --accent-2: #2563eb;
    --accent-hover: #0ea5e9;
    --danger-bg: rgba(127, 29, 29, 0.28);
    --danger-text: #fecaca;
    --success-bg: rgba(20, 83, 45, 0.30);
    --success-text: #bbf7d0;
    --warning-bg: rgba(120, 53, 15, 0.34);
    --warning-text: #fde68a;
    --shadow-dark: 0 18px 45px rgba(0, 0, 0, 0.28);
}

html {
    font-size: 14px;
}

body {
    font-size: 14px;
    line-height: 1.55;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34%),
        linear-gradient(135deg, var(--bg-main), var(--bg-main-2));
    color: var(--text-main);
}

button,
input,
select,
textarea {
    font-size: 0.95rem;
}

.container {
    width: min(1180px, calc(100% - 28px));
}

/* Buttons */
.btn {
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 9px;
    font-size: 13px;
    box-shadow: none;
}

.btn-primary,
.btn.is-active {
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.45);
}

.btn-primary:hover,
.btn.is-active:hover {
    background: linear-gradient(135deg, #1d4ed8, var(--accent-hover));
    border-color: rgba(56, 189, 248, 0.70);
}

.btn-outline {
    background: rgba(15, 34, 58, 0.88);
    color: var(--text-main);
    border-color: var(--border-strong);
}

.btn-outline:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: #ffffff;
}

/* Header */
.site-header {
    background: rgba(7, 20, 38, 0.94);
    border-bottom: 1px solid var(--border-soft);
    backdrop-filter: blur(14px);
}

.site-header__inner {
    min-height: 62px;
    gap: 20px;
}

.site-logo {
    font-size: 19px;
    color: var(--text-main);
}

.site-nav {
    gap: 14px;
}

.site-nav a {
    color: var(--text-soft);
    font-size: 13px;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--accent);
}

/* Main blocks */
.site-main {
    padding: 24px 0;
}

.page-card,
.admin-panel,
.admin-card,
.product-card,
.catalog-category-card,
.cart-summary,
.order-form-panel,
.order-detail__header,
.order-comment,
.compare-wrap {
    background: rgba(15, 34, 58, 0.94);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-dark);
}

.page-card {
    border-radius: 16px;
    padding: 24px;
}

.page-title {
    font-size: 28px;
    color: var(--text-main);
}

.page-text {
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.65;
}

.section-title {
    font-size: 19px;
    color: var(--text-main);
}

/* Footer */
.site-footer {
    background: #06101f;
    color: var(--text-main);
    border-top: 1px solid var(--border-soft);
}

.site-footer__brand p,
.site-footer__nav a {
    color: var(--text-soft);
    font-size: 13px;
}

.site-footer__nav a:hover {
    color: var(--accent);
}

.site-footer__bottom {
    border-top-color: var(--border-soft);
    color: var(--text-muted);
    font-size: 12px;
}

/* Forms */
.form {
    gap: 14px;
}

.form-group label,
.checkbox-row {
    color: var(--text-main);
    font-size: 13px;
}

.form-group small,
.admin-table small,
.logs-table small {
    color: var(--text-muted);
    font-size: 12px;
}

.form-group input,
.form-group select,
.form-group textarea,
.search-form input,
.cart-qty-form input {
    min-height: 40px;
    padding: 9px 12px;
    background: #091a2f;
    color: var(--text-main);
    border-color: var(--border-soft);
    border-radius: 9px;
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.search-form input::placeholder {
    color: #71839b;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.search-form input:focus,
.cart-qty-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.13);
}

.form-group textarea {
    min-height: 108px;
}

/* Alerts */
.alert {
    padding: 12px 14px;
    font-size: 13px;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger-text);
    border-color: rgba(248, 113, 113, 0.35);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: rgba(74, 222, 128, 0.35);
}

.alert-info {
    background: rgba(30, 64, 175, 0.30);
    color: #bfdbfe;
    border-color: rgba(96, 165, 250, 0.35);
}

/* Admin */
.admin-grid,
.admin-layout,
.catalog-grid,
.cart-layout,
.order-layout,
.order-detail,
.order-detail-grid {
    gap: 18px;
}

.admin-card,
.admin-panel,
.order-form-panel,
.cart-summary,
.order-detail__header {
    border-radius: 14px;
    padding: 18px;
}

.admin-card strong {
    font-size: 17px;
    color: var(--text-main);
}

.admin-card span {
    color: var(--text-soft);
    font-size: 13px;
}

.admin-card:hover,
.catalog-category-card:hover,
.product-card:hover {
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.admin-table,
.compare-table {
    background: var(--bg-card);
}

.admin-table th,
.admin-table td,
.compare-table th,
.compare-table td {
    padding: 11px 12px;
    border-color: var(--border-soft);
    font-size: 13px;
}

.admin-table th {
    background: #061a32;
    color: var(--text-main);
}

.admin-table tbody tr:hover {
    background: rgba(56, 189, 248, 0.08);
}

.admin-table td,
.compare-table td {
    color: var(--text-soft);
}

.admin-thumb,
.compare-image,
.product-page__image,
.product-card__image {
    background: var(--bg-soft);
    border-color: var(--border-soft);
}

.text-muted,
.product-card__placeholder,
.product-page__placeholder,
.compare-image span {
    color: var(--text-muted);
}

/* Statuses */
.status {
    padding: 4px 8px;
    font-size: 11px;
}

.status-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.status-muted {
    background: rgba(100, 116, 139, 0.22);
    color: #cbd5e1;
}

.status-info {
    background: rgba(30, 64, 175, 0.32);
    color: #bfdbfe;
}

.status-warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.log-action {
    background: rgba(30, 64, 175, 0.32);
    color: #bfdbfe;
    font-size: 11px;
}

/* Catalog cards */
.catalog-grid {
    margin-top: 22px;
    gap: 18px;
}

.product-card {
    border-radius: 16px;
    overflow: hidden;
}

.product-card__badge,
.cart-counter,
.favorites-counter,
.compare-counter {
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    color: #ffffff;
    font-size: 11px;
}

.site-nav a.active .cart-counter,
.site-nav a:hover .cart-counter,
.site-nav a.active .favorites-counter,
.site-nav a:hover .favorites-counter,
.site-nav a.active .compare-counter,
.site-nav a:hover .compare-counter {
    background: var(--accent-hover);
}

.product-card__body {
    padding: 15px;
}

.product-card__category,
.product-card__sku,
.product-card__text,
.product-card__price span,
.product-card__price del,
.product-card__stock {
    color: var(--text-soft);
}

.product-card__category,
.product-card__sku {
    font-size: 12px;
}

.product-card__title {
    font-size: 17px;
    color: var(--text-main);
}

.product-card__title a:hover {
    color: var(--accent);
}

.product-card__text {
    font-size: 13px;
    line-height: 1.5;
}

.product-card__price strong {
    font-size: 19px;
    color: var(--text-main);
}

.product-card__price del,
.product-card__stock {
    font-size: 13px;
}

.product-card__actions {
    gap: 8px;
}

/* Product page */
.product-page {
    grid-template-columns: 430px 1fr;
    gap: 28px;
}

.product-page__category {
    background: var(--bg-soft);
    color: var(--accent);
    font-size: 12px;
}

.product-page__sku,
.product-page__price span,
.product-page__price del,
.product-page__stock {
    color: var(--text-soft);
    font-size: 13px;
}

.product-page__price strong {
    font-size: 28px;
    color: var(--text-main);
}

.product-description {
    border-top-color: var(--border-soft);
}

/* Breadcrumbs / categories / search */
.breadcrumbs {
    color: var(--text-muted);
    font-size: 12px;
}

.breadcrumbs a {
    color: var(--text-soft);
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs span,
.breadcrumbs span:last-child {
    color: var(--text-muted);
}

.catalog-categories {
    gap: 14px;
}

.catalog-category-card {
    min-height: 108px;
    padding: 15px;
    border-radius: 14px;
}

.catalog-category-card strong {
    color: var(--text-main);
    font-size: 16px;
}

.catalog-category-card span {
    color: var(--text-soft);
    font-size: 13px;
}

.search-form {
    margin-top: 20px;
    margin-bottom: 22px;
}

.search-result-title {
    background: var(--bg-card);
    border-color: var(--border-soft);
    color: var(--text-soft);
    font-size: 13px;
}

.search-result-title strong {
    color: var(--text-main);
}

/* Cart / order / detail */
.cart-product strong,
.cart-summary__row strong,
.order-product-row strong,
.detail-list strong,
.order-comment strong,
.detail-total strong {
    color: var(--text-main);
}

.cart-product strong a:hover {
    color: var(--accent);
}

.cart-product small,
.cart-summary__row,
.order-product-row,
.detail-list span,
.order-comment p,
.detail-total span {
    color: var(--text-soft);
    font-size: 13px;
}

.cart-summary__row,
.order-product-row,
.detail-list div,
.detail-total {
    border-color: var(--border-soft);
}

.detail-total strong {
    font-size: 19px;
}

.order-comment {
    background: rgba(9, 26, 47, 0.78);
}

/* Compare */
.compare-table th {
    background: #061a32;
    color: var(--text-main);
}

.compare-table td {
    color: var(--text-soft);
}

.compare-actions {
    margin-top: 20px;
    margin-bottom: 18px;
}

/* Mobile compact typography */
@media (max-width: 900px) {
    .site-header__inner {
        padding: 12px 0;
    }
}

@media (max-width: 560px) {
    html {
        font-size: 13px;
    }

    .container {
        width: min(100% - 20px, 1180px);
    }

    .page-card {
        padding: 17px;
        border-radius: 13px;
    }

    .page-title {
        font-size: 23px;
    }

    .section-title {
        font-size: 17px;
    }

    .btn {
        min-height: 35px;
        padding: 8px 11px;
        font-size: 12px;
    }

    .product-card__title {
        font-size: 16px;
    }

    .product-page__price strong {
        font-size: 24px;
    }

    .admin-table th,
    .admin-table td,
    .compare-table th,
    .compare-table td {
        padding: 10px;
        font-size: 12px;
    }
}

/* ==============================
   CATALOG FILTER
============================== */

.catalog-filter {
    margin-top: 26px;
    margin-bottom: 22px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(15, 34, 58, 0.94);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-dark);
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr auto;
    gap: 14px;
    align-items: end;
}

.catalog-filter .form-group {
    gap: 7px;
}

.catalog-filter .form-group label {
    font-size: 13px;
    color: var(--text-main);
}

.catalog-filter input,
.catalog-filter select {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 9px;
    background: #091a2f;
    color: var(--text-main);
    outline: none;
    transition: 0.2s ease;
}

.catalog-filter input::placeholder {
    color: #71839b;
}

.catalog-filter input:focus,
.catalog-filter select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.13);
}

.catalog-filter__actions {
    display: flex;
    gap: 10px;
}

.catalog-result-count {
    margin: 0 0 22px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(15, 34, 58, 0.94);
    border: 1px solid var(--border-soft);
    color: var(--text-soft);
    font-size: 13px;
    box-shadow: var(--shadow-dark);
}

.catalog-result-count strong {
    color: var(--text-main);
}

/* ==============================
   CATALOG FILTER MOBILE
============================== */

@media (max-width: 1100px) {
    .catalog-filter {
        grid-template-columns: repeat(2, 1fr);
    }

    .catalog-filter__actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .catalog-filter {
        grid-template-columns: 1fr;
        padding: 16px;
        border-radius: 14px;
    }

    .catalog-filter__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .catalog-filter__actions .btn {
        width: 100%;
    }
}

/* ==============================
   PAGINATION
============================== */

.pagination {
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 10px;
    background: rgba(15, 34, 58, 0.94);
    border: 1px solid var(--border-soft);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 800;
    transition: 0.2s ease;
}

.pagination__link:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: #ffffff;
}

.pagination__link.is-active {
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    border-color: rgba(56, 189, 248, 0.65);
    color: #ffffff;
    pointer-events: none;
}

/* ==============================
   PAGINATION MOBILE
============================== */

@media (max-width: 560px) {
    .pagination {
        justify-content: stretch;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .pagination__link {
        width: 100%;
        min-height: 36px;
        font-size: 12px;
    }
}

/* ==============================
   RESPONSIVE WIDE LAYOUT
   Грамотное растягивание сайта по ширине экрана
============================== */

:root {
    --container-max: 1480px;
    --container-gap: 36px;
}

.container {
    width: min(var(--container-max), calc(100% - var(--container-gap)));
}

/* На очень широких экранах даём сайту больше воздуха */
@media (min-width: 1600px) {
    :root {
        --container-max: 1560px;
        --container-gap: 48px;
    }
}

/* На 2K/широких мониторах каталог можно делать в 4 колонки */
@media (min-width: 1320px) {
    .catalog-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .catalog-categories {
        grid-template-columns: repeat(5, 1fr);
    }

    .admin-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Админские страницы и таблицы получают больше места */
@media (min-width: 1320px) {
    .admin-layout {
        grid-template-columns: 420px 1fr;
    }

    .order-detail-grid {
        grid-template-columns: 1fr 420px;
    }

    .cart-layout {
        grid-template-columns: 1fr 360px;
    }

    .order-layout {
        grid-template-columns: 1fr 380px;
    }
}

/* Страница товара на широком экране выглядит солиднее */
@media (min-width: 1320px) {
    .product-page {
        grid-template-columns: 520px 1fr;
    }
}

/* Чтобы карточки не становились слишком узкими/ломаными */
.product-card {
    min-width: 0;
}

.product-card__title,
.product-card__text,
.product-card__sku,
.product-card__stock {
    overflow-wrap: anywhere;
}

/* На средних экранах оставляем аккуратную ширину */
@media (max-width: 1200px) {
    :root {
        --container-max: 1180px;
        --container-gap: 28px;
    }
}

/* На телефонах не раздуваем отступы */
@media (max-width: 560px) {
    :root {
        --container-gap: 20px;
    }

    .container {
        width: min(100% - var(--container-gap), var(--container-max));
    }
}

/* ==============================
   ERROR PAGE
============================== */

.error-page {
    max-width: 760px;
    min-height: 360px;
    margin: 56px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-page .error-code {
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 42px;
    line-height: 1;
    font-weight: 900;
}

.error-page .page-title {
    margin-bottom: 16px;
}

.error-page .page-text {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.error-actions {
    margin-top: 22px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==============================
   ERROR PAGE MOBILE
============================== */

@media (max-width: 560px) {
    .error-page {
        min-height: 320px;
        margin: 28px auto;
        padding: 24px 18px;
    }

    .error-page .error-code {
        font-size: 34px;
    }

    .error-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .error-actions .btn {
        width: 100%;
    }
}

/* ==============================
   PRODUCT SPECS EDITOR
============================== */

.specs-editor {
    display: grid;
    gap: 10px;
}

.specs-editor__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.specs-editor__row input {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 9px;
    background: #091a2f;
    color: var(--text-main);
    outline: none;
    transition: 0.2s ease;
}

.specs-editor__row input::placeholder {
    color: #71839b;
}

.specs-editor__row input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.13);
}

/* ==============================
   PRODUCT SPECS EDITOR MOBILE
============================== */

@media (max-width: 620px) {
    .specs-editor__row {
        grid-template-columns: 1fr;
    }
}

/* ==============================
   PRODUCT SPECS PUBLIC
============================== */

.product-specs {
    display: grid;
    gap: 0;
    max-width: 760px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(9, 26, 47, 0.72);
}

.product-specs__row {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-soft);
}

.product-specs__row:last-child {
    border-bottom: 0;
}

.product-specs__row span {
    color: var(--text-soft);
    font-weight: 700;
}

.product-specs__row strong {
    color: var(--text-main);
    font-weight: 800;
}

/* ==============================
   PRODUCT SPECS PUBLIC MOBILE
============================== */

@media (max-width: 620px) {
    .product-specs__row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 12px 14px;
    }
}