/*
 * KODGRABER — небольшие дополнения для динамических страниц.
 * Основной дизайн полностью обеспечивается CSS Woodmart из /wp-content/.
 * Файл не подключается на статических страницах-эталоне.
 */

/* Галерея товара без Owl Carousel: один активный слайд. */
.woocommerce-product-gallery .wd-owl {
    display: block;
    overflow: hidden;
}
.woocommerce-product-gallery .wd-owl > .product-image-wrap {
    display: none;
    width: 100%;
}
.woocommerce-product-gallery .wd-owl > .product-image-wrap.is-active {
    display: block;
}
.woocommerce-product-gallery .thumbnails {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
}
.woocommerce-product-gallery .thumbnails > .product-image-thumbnail {
    flex: 0 0 calc(25% - 3px);
    padding-inline: 0;
}
.woocommerce-product-gallery .thumbnails > .product-image-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: var(--wd-brd-radius, 5px);
}
.woocommerce-product-gallery .thumbnails > .product-image-thumbnail:first-child {
    opacity: 1;
}
.woocommerce-product-gallery .thumbnails > .product-image-thumbnail.active-thumb {
    opacity: .5;
}

/* Вкладки: активная панель одна. */
.woocommerce-tabs .wd-accordion-item > .wc-tab {
    display: none;
}
.woocommerce-tabs .wd-accordion-item > .wc-tab.wd-active {
    display: block;
}
.woocommerce-tabs .wd-accordion-title {
    cursor: pointer;
}

/* Пустой блок вариации не занимает место. */
.single_variation:empty {
    display: none !important;
}

/* Кнопки количества. */
.quantity .minus,
.quantity .plus {
    cursor: pointer;
    user-select: none;
}

/* Мобильное меню. */
body.wd-scroll-disabled {
    overflow: hidden;
}

/* Сообщения динамических страниц. */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error {
    margin-bottom: 20px;
}
.woocommerce-notices-wrapper .woocommerce-info {
    list-style: none;
}

/* Лайтбокс галереи. */
.kg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(0, 0, 0, .85);
}
.kg-lightbox[hidden] {
    display: none;
}
.kg-lightbox img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 4px;
}
.kg-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}
.kg-lightbox-close:hover {
    background: rgba(255, 255, 255, .25);
}

/* Небольшая поправка для динамической сетки каталога. */
.products.elements-grid > .product-grid-item {
    margin-bottom: 20px;
}

/* ---------------- Корзина и оформление заказа ---------------- */
.kg-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.woocommerce form .form-row {
    margin-bottom: 18px;
}
.woocommerce form .form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    width: 100%;
    box-sizing: border-box;
}
.woocommerce form .form-row textarea {
    min-height: 110px;
    resize: vertical;
}
.kg-field-error {
    display: block;
    margin-top: 6px;
    color: #d9534f;
    font-size: 13px;
    line-height: 1.4;
}
.woocommerce-invalid input.input-text,
.woocommerce-invalid textarea,
.woocommerce-invalid select {
    border-color: #d9534f !important;
}

.woocommerce-cart-form .product-thumbnail img {
    width: 80px;
    max-width: 80px;
    height: auto;
}
.woocommerce-cart-form .quantity .qty {
    width: 84px;
    text-align: center;
}
.woocommerce-cart-form .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
}
.woocommerce-cart-form .actions .coupon {
    margin: 0;
}
.woocommerce-cart-form .actions .button {
    min-width: 180px;
    text-align: center;
}
.cart-collaterals {
    display: flex;
    justify-content: flex-end;
    margin-top: 32px;
}
.cart_totals {
    width: 100%;
    max-width: 500px;
}
.cart_totals h2 {
    margin-bottom: 14px;
}
.cart_totals .shop_table td {
    text-align: right;
}
.wc-proceed-to-checkout {
    margin-top: 18px;
}
.wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.kg-checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr);
    gap: 40px;
    align-items: start;
}
.kg-checkout-main {
    min-width: 0;
}
.kg-checkout-side {
    position: sticky;
    top: 20px;
    min-width: 0;
}
.kg-checkout-side #order_review_heading {
    margin-top: 0;
}
.woocommerce-checkout .col2-set {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
    flex: 1 1 300px;
    width: auto;
    max-width: none;
    float: none;
    min-width: 0;
}
.woocommerce-checkout h3 {
    margin: 0 0 18px;
}
.woocommerce-checkout-review-order-table .product-quantity {
    display: inline-block;
    margin-left: 6px;
    font-weight: 400;
    color: #777;
}
.woocommerce-checkout-payment {
    margin-top: 26px;
}
#payment .payment_methods {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}
#payment .payment_methods li {
    margin-bottom: 12px;
}
#payment .payment_box {
    margin-top: 10px;
    padding: 14px 18px;
    background: #f7f7f7;
    border-radius: 4px;
}
#payment .payment_box p {
    margin: 0;
}
.woocommerce-form__label-for-checkbox {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 18px;
}
.woocommerce-form__label-for-checkbox input {
    margin-top: 4px;
    flex: 0 0 auto;
}
.place-order .button {
    min-width: 220px;
}

.woocommerce-order-overview {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 18px 36px;
}
.woocommerce-order-overview li {
    margin: 0;
}
.woocommerce-message .button.wc-forward {
    margin-left: 14px;
}
.single_add_to_cart_button.loading {
    opacity: .6;
    pointer-events: none;
}

@media (max-width: 1100px) {
    .kg-checkout-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .kg-checkout-side {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-collaterals {
        justify-content: stretch;
    }
    .cart_totals {
        max-width: none;
    }
    .woocommerce-cart-form .actions {
        justify-content: stretch;
    }
    .woocommerce-cart-form .actions .button {
        width: 100%;
    }
    .woocommerce-checkout .col2-set {
        gap: 20px;
    }
}

/* ---------------- Личный кабинет покупателя ---------------- */
.kg-header-account .wd-tools-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.kg-header-account svg {
    display: block;
    width: 20px;
    height: 20px;
}

.kg-account-page {
    padding-bottom: 64px;
}
.kg-account-page .container {
    min-width: 0;
}
.kg-account-breadcrumbs {
    margin: 8px 0 18px;
}
.kg-account-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}
.kg-account-head h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.15;
}
.kg-account-eyebrow {
    margin: 0 0 6px;
    color: #5aa521;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.kg-lead {
    margin: 0;
    color: #6b7686;
    font-size: 15px;
    line-height: 1.55;
}
.kg-account-total {
    color: #6b7686;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}
.kg-muted {
    color: #6b7686;
    font-size: 14px;
    line-height: 1.55;
}
.kg-nowrap {
    white-space: nowrap;
}
.kg-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.kg-panel {
    min-width: 0;
    padding: 26px;
    border: 1px solid #e5e9ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(18, 32, 51, .05);
}
.kg-panel h2 {
    margin: 0 0 16px;
    font-size: 21px;
    line-height: 1.3;
}
.kg-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.kg-panel-head h2 {
    margin: 0;
}
.kg-panel-head a {
    color: #4b8f1e;
    font-size: 14px;
    font-weight: 600;
}

.kg-account-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 24px;
    padding: 8px;
    border: 1px solid #e5e9ee;
    border-radius: 10px;
    background: #f7f9fa;
}
.kg-account-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.kg-account-tab {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 8px;
    color: #37424f;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.kg-account-tab:hover {
    background: #eef2f5;
    color: #25303e;
}
.kg-account-tab.is-active {
    background: #6fbf32;
    color: #fff;
}
.kg-account-logout button {
    padding: 9px 14px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #b23a3a;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.kg-account-logout button:hover {
    background: #fdecec;
}

.kg-flash {
    margin-bottom: 18px;
    padding: 14px 18px;
    border-left: 4px solid #9aa7b8;
    border-radius: 8px;
    background: #f3f6f9;
    color: #25303e;
    font-size: 14px;
    line-height: 1.5;
}
.kg-flash--success {
    border-color: #6fbf32;
    background: #eff9e8;
    color: #2d6a10;
}
.kg-flash--error {
    border-color: #d9534f;
    background: #fdeeee;
    color: #8f2622;
}
.kg-flash--info {
    border-color: #3b82c4;
    background: #eef5fc;
    color: #1f527f;
}

.kg-account-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.kg-stat-card {
    min-width: 0;
    padding: 18px 20px;
    border: 1px solid #e5e9ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(18, 32, 51, .04);
}
.kg-stat-label {
    display: block;
    margin-bottom: 8px;
    color: #76839a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.kg-stat-value {
    display: block;
    color: #18212c;
    font-size: 26px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.kg-stat-value--small {
    font-size: 15px;
    line-height: 1.4;
}

.kg-account-columns,
.kg-profile-layout,
.kg-order-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.kg-profile-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.kg-order-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
}
.kg-order-side {
    display: grid;
    gap: 24px;
    min-width: 0;
}

.kg-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.kg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.kg-table th {
    padding: 0 10px 10px;
    border-bottom: 1px solid #e5e9ee;
    color: #76839a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}
.kg-table td {
    padding: 13px 10px;
    border-bottom: 1px solid #eef1f4;
    color: #25303e;
    vertical-align: middle;
}
.kg-table tbody tr:last-child td {
    border-bottom: 0;
}
.kg-table tfoot th,
.kg-table tfoot td {
    padding: 12px 10px;
    border-bottom: 0;
    background: #f8fafb;
    text-align: right;
    white-space: nowrap;
}
.kg-table tfoot th:first-child {
    text-align: left;
}
.kg-table tfoot tr:first-child th,
.kg-table tfoot tr:first-child td {
    border-radius: 8px 8px 0 0;
}
.kg-table tfoot tr:last-child th,
.kg-table tfoot tr:last-child td {
    border-radius: 0 0 8px 8px;
}
.kg-table .kg-order-total th,
.kg-table .kg-order-total td {
    font-size: 17px;
    font-weight: 700;
}
.kg-orders-table {
    min-width: 720px;
}
.kg-order-items-table {
    min-width: 560px;
}

.kg-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef1f4;
    color: #4a5666;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}
.kg-badge--ok {
    background: #e8f6dc;
    color: #2d6a10;
}
.kg-badge--info {
    background: #e8f1fb;
    color: #1f527f;
}
.kg-badge--warn {
    background: #fff4d6;
    color: #8a6100;
}
.kg-badge--danger {
    background: #fdeaea;
    color: #a32f2b;
}
.kg-badge--muted {
    background: #eef1f4;
    color: #5c6878;
}

.kg-link {
    color: #4b8f1e;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}
.kg-link:hover {
    color: #356b12;
}

.kg-empty {
    padding: 38px 20px;
    text-align: center;
}
.kg-empty p {
    margin: 0 0 18px;
    color: #6b7686;
    font-size: 15px;
}

.kg-details {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 0;
    font-size: 14px;
}
.kg-details dt {
    color: #76839a;
}
.kg-details dd {
    margin: 0;
    color: #25303e;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.kg-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.kg-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid #dfe5eb;
    border-radius: 999px;
    background: #fff;
    color: #37424f;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.kg-filter-tab:hover {
    border-color: #b9d99f;
    color: #356b12;
}
.kg-filter-tab.is-active {
    border-color: #6fbf32;
    background: #6fbf32;
    color: #fff;
}
.kg-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #eef1f4;
    color: #4a5666;
    font-size: 11px;
}
.kg-filter-tab.is-active .kg-filter-count {
    background: rgba(255, 255, 255, .25);
    color: #fff;
}

.kg-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    font-size: 14px;
}
.kg-page-link {
    color: #4b8f1e;
    font-weight: 600;
}
.kg-page-status {
    color: #6b7686;
}

.kg-auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 28px;
    align-items: stretch;
    max-width: 1080px;
    margin: 0 auto;
}
.kg-auth-form {
    padding: 36px;
}
.kg-auth-form h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1.15;
}
.kg-auth-switch {
    margin: 22px 0 0;
    color: #6b7686;
    font-size: 14px;
    text-align: center;
}
.kg-auth-switch a {
    color: #4b8f1e;
    font-weight: 700;
}
.kg-auth-aside {
    padding: 36px;
    border-radius: 12px;
    background: linear-gradient(145deg, #173b24, #2c6a35);
    color: #eaf7e4;
    box-shadow: 0 14px 34px rgba(18, 55, 28, .18);
}
.kg-auth-aside h2 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 23px;
}
.kg-auth-aside ul {
    margin: 0;
    padding-left: 20px;
}
.kg-auth-aside li {
    margin-bottom: 13px;
    line-height: 1.6;
}
.kg-auth-aside-note {
    margin: 24px 0 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .2);
    color: #cfe6c7;
    font-size: 13px;
    line-height: 1.6;
}

.kg-form {
    margin-top: 22px;
}
.kg-form-row {
    margin-bottom: 16px;
}
.kg-form-row label {
    display: block;
    margin-bottom: 6px;
    color: #25303e;
    font-size: 14px;
    font-weight: 600;
}
.kg-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #cfd7e0;
    border-radius: 8px;
    background: #fff;
    color: #18212c;
    font: inherit;
    font-size: 15px;
    line-height: 1.4;
}
.kg-input:focus {
    outline: none;
    border-color: #6fbf32;
    box-shadow: 0 0 0 3px rgba(111, 191, 50, .18);
}
.kg-input:disabled {
    background: #f3f5f7;
    color: #6b7686;
    cursor: not-allowed;
}
.kg-form-row.has-error .kg-input {
    border-color: #d9534f;
}
.kg-form-row.has-error .kg-input:focus {
    box-shadow: 0 0 0 3px rgba(217, 83, 79, .16);
}
.kg-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.kg-field-error {
    display: block;
    margin-top: 6px;
    color: #b23a3a;
    font-size: 13px;
    line-height: 1.4;
}
.kg-form-hint {
    margin: -6px 0 16px;
    color: #76839a;
    font-size: 12px;
}
.kg-required {
    color: #b23a3a;
}
.kg-checkbox {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 4px 0 18px;
    color: #37424f;
    font-size: 14px;
    line-height: 1.5;
}
.kg-checkbox input {
    flex: 0 0 auto;
    margin-top: 3px;
}
.kg-checkbox.has-error {
    color: #b23a3a;
}

.kg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid #d3dae2;
    border-radius: 8px;
    background: #fff;
    color: #25303e;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.kg-btn:hover {
    border-color: #6fbf32;
    color: #356b12;
}
.kg-btn--primary {
    border-color: #6fbf32;
    background: #6fbf32;
    color: #fff;
}
.kg-btn--primary:hover {
    border-color: #5aa521;
    background: #5aa521;
    color: #fff;
}
.kg-btn--block {
    width: 100%;
}

.kg-order-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.kg-order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.kg-order-item img {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border: 1px solid #e5e9ee;
    border-radius: 6px;
    object-fit: cover;
}
.kg-order-item-name {
    display: block;
    color: #25303e;
    font-weight: 600;
    line-height: 1.4;
}
a.kg-order-item-name:hover {
    color: #4b8f1e;
}
.kg-order-item-meta {
    display: block;
    margin-top: 2px;
    color: #76839a;
    font-size: 12px;
    line-height: 1.4;
}
.kg-order-note {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #eef1f4;
}
.kg-order-note h3 {
    margin: 0 0 8px;
    font-size: 15px;
}
.kg-order-note p {
    margin: 0;
    color: #4a5666;
    font-size: 14px;
    line-height: 1.6;
}
.kg-address {
    margin: 0 0 12px;
    color: #37424f;
    font-style: normal;
    line-height: 1.8;
}
.kg-payment-note p {
    margin: 0;
    color: #4a5666;
    font-size: 14px;
    line-height: 1.6;
}
.kg-timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}
.kg-timeline li {
    position: relative;
    margin-left: 6px;
    padding: 0 0 18px 20px;
    border-left: 2px solid #e3e8ee;
}
.kg-timeline li:last-child {
    padding-bottom: 0;
    border-left-color: transparent;
}
.kg-timeline li::before {
    content: "";
    position: absolute;
    top: 4px;
    left: -7px;
    width: 12px;
    height: 12px;
    border: 2px solid #6fbf32;
    border-radius: 50%;
    background: #fff;
}
.kg-timeline strong {
    display: block;
    font-size: 14px;
    line-height: 1.45;
}
.kg-timeline-date {
    display: block;
    margin-top: 3px;
    color: #76839a;
    font-size: 12px;
}
.kg-account-created {
    margin: 22px 0 0;
    padding-top: 16px;
    border-top: 1px solid #eef1f4;
    color: #76839a;
    font-size: 13px;
}

@media (max-width: 1100px) {
    .kg-account-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .kg-account-columns,
    .kg-profile-layout,
    .kg-order-layout {
        grid-template-columns: 1fr;
    }
    .kg-auth-layout {
        grid-template-columns: 1fr;
        max-width: 720px;
    }
    .kg-auth-aside {
        order: 2;
    }
}

@media (max-width: 768px) {
    .kg-account-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .kg-account-head .kg-btn {
        width: 100%;
    }
    .kg-account-topbar {
        flex-direction: column;
        align-items: stretch;
    }
    .kg-account-nav {
        justify-content: center;
    }
    .kg-account-tab {
        flex: 1 1 auto;
        justify-content: center;
        padding: 10px 12px;
    }
    .kg-account-logout button {
        width: 100%;
    }
    .kg-panel,
    .kg-auth-form,
    .kg-auth-aside {
        padding: 20px;
    }
    .kg-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .kg-details {
        grid-template-columns: 92px minmax(0, 1fr);
    }
    .kg-filter-tab {
        padding: 8px 12px;
        font-size: 13px;
    }
    .kg-order-item img {
        width: 52px;
        height: 52px;
    }
    .kg-table tfoot th,
    .kg-table tfoot td {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .kg-account-stats {
        grid-template-columns: 1fr;
    }
    .kg-account-nav {
        width: 100%;
    }
    .kg-account-tab {
        flex: 1 1 100%;
    }
}

.kg-checkout-account {
    margin: 0 0 22px;
    padding: 13px 18px;
    border: 1px solid #dcebcf;
    border-radius: 8px;
    background: #f3faed;
    color: #3c5230;
    font-size: 14px;
    line-height: 1.5;
}
.kg-checkout-account a {
    color: #4b8f1e;
    font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Динамические страницы галереи и категорий                          */
/* ------------------------------------------------------------------ */
.kg-page-breadcrumbs {
    padding: 18px 0 0;
    margin-bottom: 6px;
}
.kg-page-head {
    padding: 10px 0 26px;
    text-align: center;
}
.kg-page-head h1 {
    margin: 0 0 8px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.1;
    letter-spacing: .04em;
    color: #193d0d;
}
.kg-categories-page .main-page-wrapper {
    background-color: rgba(67, 216, 79, .13);
}
.kg-categories-page .kg-page-head {
    padding: 10px 0 10px;
}
.kg-categories-page .kg-page-head h1 {
    margin: 0;
    font-family: Montserrat, Arial, Helvetica, sans-serif;
    font-size: 30px;
    font-weight: 600;
    line-height: 42px;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #242424;
}
.kg-page-subtitle {
    margin: 0;
    color: #6b7a63;
    font-size: 15px;
}
.kg-empty-state {
    padding: 60px 20px;
    border: 1px dashed #d5dfcc;
    border-radius: 10px;
    background: #fafcf8;
    text-align: center;
    color: #6b7a63;
}
.kg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding-bottom: 60px;
}
.kg-gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    background: #eef3ea;
    box-shadow: 0 2px 10px rgba(25, 61, 13, .08);
    aspect-ratio: 4 / 3;
}
.kg-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.kg-gallery-item:hover img {
    transform: scale(1.04);
}
.kg-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    max-width: 1000px;
    margin: 0 auto 73px;
    padding: 10px 0;
}
.kg-category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 10px;
    overflow: visible;
    color: #242424;
    text-decoration: none;
    box-sizing: border-box;
}
.kg-category-card-media {
    position: relative;
    display: block;
    width: 100%;
    height: 240px;
    box-sizing: border-box;
    overflow: hidden;
    border: 5px solid #61ce70;
    border-radius: 5px;
    background: #f2f2f2;
}
.kg-category-card-media::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--kg-category-image, none);
    background-position: center;
    background-size: cover;
    transition: transform .4s ease;
}
.kg-category-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .09);
    transition: background .3s ease;
    pointer-events: none;
}
.kg-category-card:hover .kg-category-card-media::before {
    transform: scale(1.04);
}
.kg-category-card:hover .kg-category-card-media::after {
    background: rgba(0, 0, 0, 0);
}
.kg-category-card:focus-visible {
    outline: none;
}
.kg-category-card:focus-visible .kg-category-card-media {
    outline: 3px solid #2f5d1d;
    outline-offset: 3px;
}
.kg-category-card-label {
    position: relative;
    z-index: 1;
    display: block;
    width: calc(100% - 50px);
    height: 42px;
    margin: 20px 0 0;
    padding: 0;
    transform: translateY(-42px);
    border-radius: 10px;
    background: #61ce70;
    color: #2e2e2e;
    font-family: Lato, Arial, Helvetica, sans-serif;
    font-size: 30px;
    font-weight: 600;
    line-height: 42px;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
    box-sizing: border-box;
}
.kg-live-tabs .wd-tabs-header {
    margin-bottom: 32px;
}
.kg-live-tabs .wd-nav-tabs {
    gap: 30px;
}
.kg-live-tabs .wd-nav-tabs .wd-nav-link {
    padding: 10px 0;
    font-size: 30px;
    line-height: 38px;
}
.kg-live-tabs .wd-products-with-bg,
.kg-live-tabs .wd-products-with-bg .product-grid-item {
    --wd-prod-bg: #e7ffea;
    --wd-bordered-bg: #e7ffea;
}
.kg-live-tabs .product-element-top {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}
.kg-live-tabs .product-element-top .product-image-link {
    display: block;
    height: 100%;
}
.kg-live-tabs .product-element-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.kg-live-tabs {
    padding-bottom: 50px;
}
@media (max-width: 900px) {
    .kg-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .kg-category-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
        padding: 10px;
    }
}
@media (max-width: 767px) {
    .kg-categories-page .kg-page-head h1 {
        font-size: 23px;
        line-height: 32px;
    }
    .kg-category-card-label {
        height: 35px;
        font-size: 25px;
        line-height: 35px;
        transform: translateY(-42px);
    }
    .kg-live-tabs .wd-nav-tabs .wd-nav-link {
        font-size: 23px;
        line-height: 30px;
    }
}
@media (max-width: 560px) {
    .kg-gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
