.btn-primary-green {
    display: inline-block;
    background: linear-gradient(180deg, #B8FF47 0%, #7ED321 18%, #39A81E 45%, #1D7718 100%);
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.45),
        inset 0 -2px 6px rgba(0,0,0,.18),
        0 4px 12px rgba(29,119,24,.28);
    cursor: pointer;
}

.btn-primary-green:hover {
    filter: brightness(1.03);
}

.nav-brand-wrap {
    display: flex;
    align-items: center;
}

.nav-brand-wrap.is-catalog {
    margin-left: 8px;
}

.nav-brand-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.nav-brand-logo {
    width: 56px;
    height: 56px;
    display: block;
    border-radius: 50%;
    transform: scale(1.30);
    transform-origin: center center;
}

.nav-company-name {
    margin-left: 14px;
    color: #fff;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.2;
    white-space: nowrap;
}

.catalog-list-card {
    padding: 0;
    overflow: hidden;
}

.catalog-row {
    display: grid;
    grid-template-columns: 110px minmax(320px, 1.9fr) 130px 88px 145px;
    gap: 10px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.catalog-thumb {
    width: 92px;
    height: 92px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: block;
}

.catalog-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.catalog-title a {
    color: var(--text);
    text-decoration: none;
}

.catalog-price {
    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
}

.catalog-qty {
    display: flex;
    justify-content: center;
}

.catalog-qty input {
    width: 88px;
    text-align: center;
}

.catalog-row {
    scroll-margin-top: 96px;
}

.catalog-row:target {
    position: relative;
    box-shadow:
        inset 0 0 0 2px rgba(57,168,30,.75),
        0 0 0 3px rgba(126,211,33,.18);
    border-radius: 12px;
    animation: catalogRowFlash 1.8s ease-out 1;
}

@keyframes catalogRowFlash {
    0% {
        box-shadow:
            inset 0 0 0 2px rgba(57,168,30,.95),
            0 0 0 6px rgba(126,211,33,.28);
    }
    100% {
        box-shadow:
            inset 0 0 0 2px rgba(57,168,30,0),
            0 0 0 0 rgba(126,211,33,0);
    }
}

    100% {
        background: transparent;
        box-shadow: inset 0 0 0 2px rgba(57,168,30,0);
    }
}

.catalog-actions {
    display: flex;
    align-items: center;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.page-head-main h1 {
    margin: 0 0 8px;
}

.page-head-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.page-subtitle {
    color: var(--muted);
}

.landing-shell {
    max-width: 720px;
    margin: 72px auto;
    text-align: center;
    padding: 12px 20px;
}

.landing-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.landing-logo-image {
    max-width: 320px;
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: -14px;
}

.landing-logo-fallback {
    font-size: 28px;
    font-weight: 700;
    color: #1D7718;
}

.landing-action {
    margin: -4px 0 22px;
}

.landing-title {
    margin: 0;
}

.dashboard-cards {
    margin-bottom: 20px;
}

.product-detail-card {
    padding: 24px;
}

.product-detail-layout {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(320px, 420px) 1fr;
}

.product-gallery-main {
    width: 100%;
}

.product-image-main {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.product-thumbs {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.product-thumb-item {
    width: 88px;
    height: 88px;
    object-fit: contain;
    border: 1px solid #d9e1ea;
    border-radius: 10px;
    background: #fff;
}

.product-meta-line {
    color: var(--muted);
}

.product-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.product-price-main {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 12px;
}

.product-buy-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.product-qty-wrap {
    width: 88px;
}

.product-qty-wrap input {
    width: 88px;
    text-align: center;
}

.notice-card {
    background: #f8fafc;
}

@media (max-width: 1200px) {
    .catalog-row {
        grid-template-columns: 96px minmax(240px, 1.8fr) 120px 88px 135px;
    }

    .nav-company-name {
        font-size: 16px;
    }
}

@media (max-width: 960px) {
    .catalog-row {
        grid-template-columns: 96px 1fr;
        gap: 14px;
    }

    .catalog-price,
    .catalog-qty,
    .catalog-actions {
        grid-column: 2;
    }

    .nav-company-name {
        display: none;
    }

    .page-head {
        flex-direction: column;
        align-items: stretch;
    }

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


.form-stack {
    display: grid;
    gap: 14px;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.page-card {
    padding: 24px;
}

.page-card-compact {
    padding: 18px;
}

.notice-muted {
    color: var(--muted);
}

.notice-soft {
    background: #f8fafc;
}

.section-title {
    margin: 0 0 14px;
}

.section-title-tight {
    margin: 0;
}

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

.inline-link-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.table-card {
    padding: 0;
    overflow: hidden;
}

.table-card-inner {
    padding: 18px;
}

.summary-box {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 18px;
}

.summary-box-soft {
    background: #f8fafc;
}

.summary-total {
    font-size: 24px;
    font-weight: 700;
}

.order-repeat-wrap {
    margin-top: 18px;
}

.field-narrow input,
.field-narrow select,
.field-narrow textarea {
    max-width: 320px;
}

.qty-inline input {
    width: 88px;
    text-align: center;
}

.login-shell {
    max-width: 460px;
    margin: 56px auto;
}

.login-card {
    padding: 28px;
}

.login-title {
    margin: 0 0 20px;
}

.login-logo-wrap {
    text-align: center;
    margin-bottom: 18px;
}

.login-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.login-logo-image {
    max-width: 240px;
    width: 100%;
    height: auto;
    display: block;
}

.upload-shell,
.cart-shell,
.checkout-shell,
.order-shell {
    display: grid;
    gap: 20px;
}

.checkout-layout {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 420px);
}

.order-top-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 14px;
}

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

    .login-shell {
        margin: 28px auto;
    }
}


.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.table-title {
    margin: 0;
}

.table-wrap {
    overflow-x: auto;
}

.summary-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 18px;
}

.summary-card.soft {
    background: #f8fafc;
}

.summary-stack {
    display: grid;
    gap: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.summary-label {
    color: var(--muted);
}

.summary-value {
    font-weight: 600;
    text-align: right;
}

.summary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.summary-total-label {
    font-weight: 700;
}

.summary-total-value {
    font-size: 24px;
    font-weight: 700;
}

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

.actions-row.end {
    justify-content: flex-end;
}

.page-stack {
    display: grid;
    gap: 20px;
}

.content-grid-2 {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 420px);
}

.empty-state {
    color: var(--muted);
    padding: 18px;
}

.card-soft {
    background: #f8fafc;
}

.table-card > .table-wrap {
    padding: 18px;
}

@media (max-width: 960px) {
    .content-grid-2 {
        grid-template-columns: 1fr;
    }

    .summary-row,
    .summary-total-row {
        flex-direction: column;
        align-items: stretch;
    }

    .summary-value,
    .summary-total-value {
        text-align: left;
    }
}


.narrow-card {
    max-width: 720px;
    margin: 0 auto;
}

.block-muted {
    color: var(--muted);
    margin-bottom: 18px;
}

.table-summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

.order-meta-grid {
    display: grid;
    gap: 10px;
}

.order-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.order-meta-row:last-child {
    border-bottom: none;
}

.order-meta-label {
    color: var(--muted);
}

.order-meta-value {
    font-weight: 600;
    text-align: right;
}

.status-history {
    margin: 0;
    padding-left: 20px;
}

.status-history li + li {
    margin-top: 8px;
}

.summary-title {
    margin: 0 0 14px;
}

.code-inline {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 2px 8px;
}

@media (max-width: 960px) {
    .table-summary-bar,
    .order-meta-row {
        flex-direction: column;
        align-items: stretch;
    }

    .order-meta-value {
        text-align: left;
    }
}


.form-panel {
    display: grid;
    gap: 16px;
}

.form-grid {
    display: grid;
    gap: 16px;
}

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

.form-field label {
    font-weight: 600;
}

.form-field-help {
    color: var(--muted);
    font-size: 14px;
}

.form-field-errors {
    color: #b42318;
    font-size: 14px;
    display: grid;
    gap: 4px;
}

.form-field-full {
    grid-column: 1 / -1;
}

.page-intro {
    color: var(--muted);
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.data-table-card {
    padding: 0;
    overflow: hidden;
}

.data-table-header {
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.data-table-title {
    margin: 0;
}

.data-table-wrap {
    overflow-x: auto;
}

.data-empty {
    padding: 18px;
    color: var(--muted);
}

.page-note {
    color: var(--muted);
    margin-top: 8px;
}

.summary-panel {
    display: grid;
    gap: 14px;
}

.summary-panel .summary-total-row {
    margin-top: 6px;
}

.stack-lg {
    display: grid;
    gap: 24px;
}

.table-meta-inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.text-right {
    text-align: right;
}

@media (max-width: 960px) {
    .data-table-header {
        align-items: stretch;
    }

    .text-right {
        text-align: left;
    }
}


.narrow-card {
    max-width: 720px;
    margin: 0 auto;
}

.block-muted {
    color: var(--portal-muted, #64748b);
    margin-bottom: 18px;
}

.page-stack {
    display: grid;
    gap: 20px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.page-head-main h1 {
    margin: 0;
}

.page-intro {
    color: var(--portal-muted, #64748b);
    margin: 8px 0 0;
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.data-table-card {
    padding: 0;
    overflow: hidden;
}

.data-table-header {
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.data-table-wrap {
    overflow-x: auto;
}

.data-empty {
    padding: 18px;
    color: var(--portal-muted, #64748b);
}

.form-panel {
    display: grid;
    gap: 16px;
}

.form-grid {
    display: grid;
    gap: 16px;
}

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

.form-field-full {
    grid-column: 1 / -1;
}

.form-field-help {
    color: var(--portal-muted, #64748b);
    font-size: 14px;
}

.form-field-errors {
    color: #b42318;
    font-size: 14px;
    display: grid;
    gap: 4px;
}

.content-grid-2 {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 420px);
}

.summary-card {
    border: 1px solid var(--portal-line, #d9e1ea);
    border-radius: 14px;
    background: #fff;
    padding: 18px;
}

.summary-card.soft {
    background: #f8fafc;
}

.summary-panel {
    display: grid;
    gap: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.summary-label {
    color: var(--portal-muted, #64748b);
}

.summary-value {
    font-weight: 600;
    text-align: right;
}

.summary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding-top: 8px;
    border-top: 1px solid var(--portal-line, #d9e1ea);
    margin-top: 10px;
}

.summary-total-label {
    font-weight: 700;
}

.summary-total-value {
    font-size: 24px;
    font-weight: 700;
}

.order-meta-grid {
    display: grid;
    gap: 10px;
}

.order-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--portal-line, #d9e1ea);
}

.order-meta-row:last-child {
    border-bottom: none;
}

.order-meta-label {
    color: var(--portal-muted, #64748b);
}

.order-meta-value {
    font-weight: 600;
    text-align: right;
}

.code-inline {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background: #f8fafc;
    border: 1px solid var(--portal-line, #d9e1ea);
    border-radius: 8px;
    padding: 2px 8px;
}

.status-history {
    margin: 0;
    padding-left: 20px;
}

.status-history li + li {
    margin-top: 8px;
}

.order-repeat-wrap {
    margin-top: 18px;
}

@media (max-width: 960px) {
    .content-grid-2 {
        grid-template-columns: 1fr;
    }

    .summary-row,
    .summary-total-row,
    .order-meta-row {
        flex-direction: column;
        align-items: stretch;
    }

    .summary-value,
    .order-meta-value {
        text-align: left;
    }
}

@media (max-width: 760px) {
    .sidebar-layout > aside.card {
        padding: 16px;
    }

    .sidebar-layout > aside.card form.grid {
        gap: 12px !important;
    }

    .sidebar-layout > aside.card .row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: stretch;
    }

    .sidebar-layout > aside.card .row > * {
        width: 100%;
        box-sizing: border-box;
    }

    .catalog-row {
        grid-template-columns: 72px 1fr;
        gap: 12px;
        padding: 14px;
        align-items: start;
    }

    .catalog-thumb {
        width: 72px;
        height: 72px;
    }

    .catalog-title {
        font-size: 16px;
        line-height: 1.3;
    }

    .catalog-price {
        grid-column: 2;
        font-size: 20px;
        margin-top: 2px;
    }

    .catalog-qty {
        grid-column: 2;
        justify-content: flex-start;
        margin-top: 2px;
    }

    .catalog-qty input {
        width: 100px;
        max-width: 100%;
    }

    .catalog-actions {
        grid-column: 2;
        margin-top: 2px;
    }

    .catalog-actions .btn-primary-green,
    .catalog-actions .button.secondary {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
}

.catalog-mobile-filter-bar {
    display: none;
    margin-bottom: 14px;
}

.catalog-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #fff;
    color: var(--portal-text, #0f172a);
    border: 1px solid var(--portal-line, #d9e1ea);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(15,23,42,.05);
    cursor: pointer;
}

.catalog-filter-toggle:hover {
    background: #f8fafc;
}

@media (max-width: 760px) {
    .catalog-mobile-filter-bar {
        display: block;
    }

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

    .catalog-filter-panel {
        display: none;
    }

    .catalog-filter-panel.is-open {
        display: block;
    }
}

.catalog-filter-toggle.is-active {
    background: linear-gradient(180deg, #B8FF47 0%, #7ED321 18%, #39A81E 45%, #1D7718 100%);
    color: #fff;
    border-color: #8BEA2A;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.45),
        inset 0 -2px 6px rgba(0,0,0,.18),
        0 4px 12px rgba(29,119,24,.28);
}

.catalog-filter-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 60;
}

.catalog-filter-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--portal-line, #d9e1ea);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15,23,42,.05);
}

.qty-stepper-btn {
    width: 36px;
    height: 40px;
    border: none;
    background: #f8fafc;
    color: var(--portal-text, #0f172a);
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.qty-stepper-btn:hover {
    background: #eef2f7;
}

.qty-stepper input {
    width: 60px !important;
    min-width: 60px;
    text-align: center !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 8px !important;
    background: #fff !important;
}

@media (max-width: 760px) {
    body.catalog-filter-open {
        overflow: hidden;
    }

    .catalog-mobile-filter-bar {
        display: block;
        position: sticky;
        top: 10px;
        z-index: 40;
    }

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

    .catalog-filter-panel {
        display: none;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        z-index: 70;
        max-height: min(72dvh, 640px);
        overflow: auto;
        padding: 16px;
        box-shadow: 0 16px 40px rgba(15,23,42,.20);
    }

    .catalog-filter-panel.is-open {
        display: block;
    }

    .catalog-filter-panel .row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: stretch;
    }

    .catalog-filter-panel .row > * {
        width: 100%;
        box-sizing: border-box;
    }

    .product-buy-form {
        position: sticky;
        bottom: calc(8px + env(safe-area-inset-bottom));
        z-index: 30;
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(8px);
        border: 1px solid var(--portal-line, #d9e1ea);
        border-radius: 16px;
        padding: 10px 12px;
        box-shadow: 0 10px 24px rgba(15,23,42,.12);
    }

    .product-buy-form .btn-primary-green {
        flex: 1 1 auto;
        justify-content: center;
    }

    .cart-shell .data-table-header,
    .checkout-shell .page-actions {
        position: sticky;
        bottom: calc(8px + env(safe-area-inset-bottom));
        z-index: 25;
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(8px);
        border: 1px solid var(--portal-line, #d9e1ea);
        border-radius: 16px;
        padding: 10px 12px;
        box-shadow: 0 10px 24px rgba(15,23,42,.12);
    }

    .cart-shell .data-table-header {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-shell .page-actions,
    .checkout-shell .page-actions {
        width: 100%;
        justify-content: stretch;
    }

    .cart-shell .page-actions > *,
    .checkout-shell .page-actions > * {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }
}


.catalog-results {
    position: relative;
}

.catalog-results.is-loading {
    opacity: .58;
    pointer-events: none;
    transition: opacity .18s ease;
}

.catalog-results.is-loading::after {
    content: "Обновляем каталог…";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.45);
    color: var(--portal-text, #0f172a);
    font-weight: 700;
    backdrop-filter: blur(2px);
    z-index: 5;
}

.media-skeleton {
    position: relative;
    overflow: hidden;
    background: #eef2f7;
}

.media-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    animation: mediaShimmer 1.2s infinite;
}

.media-skeleton.is-loaded::after {
    display: none;
}

@keyframes mediaShimmer {
    100% {
        transform: translateX(100%);
    }
}

.catalog-media-wrap {
    width: 92px;
    height: 92px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.catalog-media-wrap .catalog-thumb {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

.product-media-wrap {
    border: 1px solid var(--portal-line, #d9e1ea);
    border-radius: 14px;
    background: #fff;
}

.product-media-wrap .product-image-main {
    border: none;
    background: transparent;
}

.product-back-link {
    display: none;
}

.product-back-link.is-visible {
    display: inline-flex;
}

@media (prefers-reduced-motion: reduce) {
    .media-skeleton::after,
    .catalog-row:target {
        animation: none !important;
    }
}

@media (max-width: 760px) {
    .catalog-media-wrap {
        width: 72px;
        height: 72px;
    }
}

.catalog-layout,
.catalog-layout > section,
.catalog-list-card,
.catalog-row,
.catalog-row > div {
    min-width: 0;
}

.catalog-layout > section {
    overflow-x: hidden;
}

.catalog-list-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.catalog-row {
    width: 100%;
    box-sizing: border-box;
    grid-template-columns: 110px minmax(0, 1.9fr) 130px 88px 145px;
}

.catalog-title,
.catalog-title a {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.catalog-price,
.catalog-qty,
.catalog-actions {
    min-width: 0;
}

.catalog-actions .btn-primary-green,
.catalog-actions .button.secondary {
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1200px) {
    .catalog-row {
        grid-template-columns: 96px minmax(0, 1.8fr) 120px 88px 135px;
    }
}

@media (max-width: 760px) {
    .catalog-row {
        grid-template-columns: 72px minmax(0, 1fr);
    }
}

.cart-qty-edit {
    width: 96px;
}

.cart-qty-edit input {
    width: 96px;
    max-width: 100%;
    text-align: center;
}

@media (max-width: 760px) {
    .cart-qty-edit {
        width: 100%;
    }

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

.cart-auto-submit-fallback {
    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;
}

.catalog-mobile-actions-bar {
    display: none;
}

.catalog-cart-mobile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: linear-gradient(180deg, #B8FF47 0%, #7ED321 18%, #39A81E 45%, #1D7718 100%);
    color: #fff;
    text-decoration: none;
    border: 1px solid #8BEA2A;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.45),
        inset 0 -2px 6px rgba(0,0,0,.18),
        0 4px 12px rgba(29,119,24,.28);
    box-sizing: border-box;
}

.catalog-cart-mobile-btn:hover {
    text-decoration: none;
    filter: brightness(1.03);
}

@media (max-width: 760px) {
    .catalog-mobile-filter-bar {
        display: none !important;
    }

    .catalog-mobile-actions-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        position: sticky;
        top: 10px;
        z-index: 40;
        margin-bottom: 14px;
    }

    .catalog-mobile-actions-bar > * {
        min-width: 0;
    }
}

.catalog-cart-mobile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.catalog-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.30);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.catalog-cart-mobile-btn.has-items .catalog-cart-badge {
    background: #fff;
    color: #1D7718;
    border-color: rgba(255,255,255,.85);
    box-shadow:
        0 0 0 0 rgba(255,255,255,.0),
        0 2px 10px rgba(255,255,255,.28);
    animation: cartBadgePulse 1.9s ease-in-out infinite;
}

@keyframes cartBadgePulse {
    0%, 100% {
        box-shadow:
            0 0 0 0 rgba(255,255,255,0),
            0 2px 10px rgba(255,255,255,.24);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 0 0 6px rgba(255,255,255,.14),
            0 4px 14px rgba(255,255,255,.34);
        transform: scale(1.06);
    }
}

@media (prefers-reduced-motion: reduce) {
    .catalog-cart-mobile-btn.has-items .catalog-cart-badge {
        animation: none;
    }
}\n\n.table-stack-mobile tbody tr[id],
.data-table-wrap tbody tr[id] {
    scroll-margin-top: 96px;
}\n\n\n    100% {
        background: transparent;
    }
}

    100% {
        outline-color: rgba(57,168,30,0);
        background: rgba(126,211,33,0);
    }
}

    100% {
        box-shadow:
            inset 0 0 0 2px rgba(57,168,30,0),
            0 0 0 0 rgba(126,211,33,0);
    }
}\n

.table-stack-mobile tbody tr[id] {
    scroll-margin-top: 96px;
}

.table-stack-mobile tbody tr.cart-row-highlight td,
.data-table-wrap tbody tr.cart-row-highlight td {
    background: rgba(126,211,33,.10) !important;
    transition: background-color .35s ease;
}

.table-stack-mobile tbody tr.cart-row-highlight td:first-child,
.data-table-wrap tbody tr.cart-row-highlight td:first-child {
    box-shadow: inset 4px 0 0 rgba(57,168,30,.78);
}

@media (max-width: 760px) {
    .table-stack-mobile tbody tr.cart-row-highlight {
        border-color: rgba(57,168,30,.45);
        background: rgba(126,211,33,.08);
    }

    .table-stack-mobile tbody tr.cart-row-highlight td,
    .data-table-wrap tbody tr.cart-row-highlight td {
        background: transparent !important;
    }

    .table-stack-mobile tbody tr.cart-row-highlight td:first-child,
    .data-table-wrap tbody tr.cart-row-highlight td:first-child {
        box-shadow: none;
    }
}
