.page {
    padding: 80px 0 96px;
}

@media (max-width: 768px) {
    .page {
        padding: 48px 0 64px;
    }
}

.page-head {
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
}

.page-head h1 {
    font-size: clamp(34px, 4.6vw, 54px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-weight: 800;
    margin: 16px 0 14px;
}

.page-head p {
    color: var(--text-soft);
    font-size: 17px;
}

.prose {
    max-width: 760px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 28px;
    padding: 48px 48px;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 640px) {
    .prose {
        padding: 32px 24px;
        border-radius: 20px;
    }
}

.prose h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 36px 0 12px;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose p,
.prose li {
    color: var(--text-soft);
    font-size: 16px;
    line-height: 1.7;
}

.prose p + p {
    margin-top: 14px;
}

.prose ul {
    margin: 14px 0 0;
    padding-left: 20px;
    list-style: disc;
}

.prose ul li::marker {
    color: var(--green);
}

.prose strong {
    color: var(--text);
    font-weight: 600;
}

.prose a {
    color: var(--green-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contacts {
    max-width: 760px;
    margin: 24px auto 0;
    font-size: 14px;
    color: var(--text-mute);
    text-align: center;
}



/* products */

.products-empty {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 56px 32px;
    box-shadow: var(--shadow-sm);
}

.products-empty svg {
    color: var(--green-dark);
    margin: 0 auto 18px;
    display: block;
}

.products-empty h2 {
    font-size: 26px;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.products-empty p {
    color: var(--text-soft);
    margin-bottom: 28px;
    line-height: 1.55;
}

.products-empty-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .products-empty {
        padding: 40px 22px;
    }
}

.products-controls {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
}

.products-search {
    width: 100%;
    max-width: 420px;
    height: 52px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface);
}

.products-search:focus {
    outline: none;
    border-color: var(--green);
}

.products-cats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.products-cat {
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    background: var(--bg-soft);
    color: var(--text-soft);
    font-weight: 500;
}

.products-cat.is-active {
    background: var(--accent);
    color: #fff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    min-height: 140px;
}

.product-card {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.product-card:hover,
.product-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,0.1));
    border-color: var(--green);
    outline: none;
}

.product-card.is-out {
    opacity: 0.6;
}

.product-card__thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg, #f3f0e8);
}

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

.product-card__weight {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-mute);
}

.product-card__cat {
    font-size: 12px;
    font-weight: 600;
    color: var(--green-dark);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.product-card__name {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
}

.product-card__bottom {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-card__price {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.product-card__price small {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-mute);
}

.product-card__stock {
    font-size: 13px;
    color: var(--green-dark);
    font-weight: 500;
}

.product-card__stock--out {
    color: var(--text-mute);
}

.products-updated {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-mute);
}

body.pm-open {
    overflow: hidden;
}

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-modal[hidden] {
    display: none;
}

.product-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 25, 40, 0.55);
    backdrop-filter: blur(2px);
}

.product-modal__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.product-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-modal__close:hover {
    background: #fff;
}

.product-modal__media {
    background: var(--bg, #f3f0e8);
    aspect-ratio: 1 / 1;
}

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

.product-modal__noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-mute);
    font-size: 14px;
}

.product-modal__info {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-modal__cat {
    font-size: 12px;
    font-weight: 600;
    color: var(--green-dark);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.product-modal__name {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.product-modal__weight {
    font-size: 14px;
    color: var(--text-mute);
    font-weight: 500;
}

.product-modal__price {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.product-modal__price small {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-mute);
}

.product-modal__stock {
    font-size: 14px;
    color: var(--green-dark);
    font-weight: 500;
}

.product-modal__stock--out {
    color: var(--text-mute);
}

.product-modal__section {
    margin-top: 6px;
}

.product-modal__section h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-mute);
    margin: 0 0 4px;
}

.product-modal__section p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 600px) {
    .product-modal__card {
        grid-template-columns: 1fr;
        max-height: 92vh;
    }

    .product-modal__media {
        aspect-ratio: 16 / 10;
    }
}
