#RecipeModule-0,
.nc-recipes {
    --nc-bg: #ffffff;
    --nc-text: #24272d;
    --nc-muted: #8b8d93;
    --nc-line: #e1e2e5;
    --nc-soft: #f4f4f5;
    --nc-dark: #202020;
    --nc-wine: #552222;
    --nc-red: #9f261d;
    --nc-yellow: #ffdf45;
    --nc-radius: 14px;
    --nc-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
    --nc-page-offset: 150px;
    --nc-detail-offset: 101px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--nc-page-offset));
    color: var(--nc-text);
    font-family: "Segoe UI", Arial, sans-serif;
}

.nc-recipes * {
    box-sizing: border-box;
}

.nc-recipe-list {
    flex: 1 0 auto;
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 80px;
}

.nc-recipe-list h1,
.nc-title-row h1 {
    margin: 0;
    color: var(--nc-text);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
}

.nc-recipe-list h1 {
    text-align: center;
}

.nc-recipe-search {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 22px 0 0;
}

.nc-recipe-search input,
.nc-recipe-search button {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--nc-line);
    border-radius: 999px;
    background: #fff;
    color: var(--nc-text);
    font-size: 14px;
    outline: none;
}

.nc-recipe-search input[type="search"] {
    width: min(320px, 100%);
}

.nc-recipe-search input[type="number"] {
    width: 122px;
}

.nc-recipe-search button {
    cursor: pointer;
    font-weight: 800;
}

.nc-recipe-search input:focus {
    border-color: #2d2f33;
    box-shadow: 0 0 0 3px rgba(45, 47, 51, 0.08);
}

.nc-filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0 40px;
    width: 100%;
}

.nc-filter,
.nc-card-link,
.nc-back {
    text-decoration: none;
}

.nc-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 22px;
    border: 1px solid var(--nc-line);
    border-radius: 999px;
    background: #fff;
    color: #5d6067;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
}

.nc-recipes .nc-filter,
.nc-recipes .nc-filter:link,
.nc-recipes .nc-filter:visited,
.nc-recipes .nc-filter:hover,
.nc-recipes .nc-filter:focus {
    color: #5d6067;
    text-decoration: none;
}

.nc-recipes .nc-filter.is-active,
.nc-recipes .nc-filter.is-active:link,
.nc-recipes .nc-filter.is-active:visited,
.nc-recipes .nc-filter.is-active:hover,
.nc-recipes .nc-filter.is-active:focus {
    background: #2d2f33;
    border-color: #2d2f33;
    color: #fff;
    text-decoration: none;
}

.nc-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px;
}

.nc-search-empty {
    display: none;
    margin-top: 24px;
}

.nc-recipe-card {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid var(--nc-line);
    border-radius: var(--nc-radius);
    background: #fff;
    box-shadow: var(--nc-shadow);
    color: var(--nc-text);
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.nc-recipe-card:link,
.nc-recipe-card:visited,
.nc-recipe-card:hover,
.nc-recipe-card:focus {
    color: var(--nc-text);
    text-decoration: none;
}

.nc-recipe-card:hover,
.nc-recipe-card:focus {
    border-color: rgba(45, 47, 51, 0.32);
    box-shadow: 0 18px 34px rgba(18, 18, 18, 0.1);
    transform: translateY(-1px);
}

.nc-recipe-card:focus-visible {
    outline: 3px solid rgba(255, 223, 69, 0.75);
    outline-offset: 3px;
}

.nc-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.nc-card-head h2 {
    max-width: 140px;
    margin: 0;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 800;
}

.nc-kcal {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 8px;
    background: var(--nc-red);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.nc-meta-row {
    display: flex;
    gap: 14px;
    margin: 20px 0 14px;
    color: var(--nc-muted);
    font-size: 12px;
}

.nc-meta-row span::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border: 1px solid currentColor;
    border-radius: 50%;
}

.nc-card-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--nc-line);
    color: var(--nc-text);
    font-size: 13px;
    font-weight: 800;
}

.nc-recipes .nc-card-link,
.nc-recipes .nc-card-link:link,
.nc-recipes .nc-card-link:visited,
.nc-recipes .nc-card-link:hover,
.nc-recipes .nc-card-link:focus,
.nc-recipes .nc-back,
.nc-recipes .nc-back:link,
.nc-recipes .nc-back:visited,
.nc-recipes .nc-back:hover,
.nc-recipes .nc-back:focus {
    color: var(--nc-text);
    text-decoration: none;
}

.nc-empty {
    width: min(520px, 100%);
    margin: 0 auto;
    padding: 24px;
    border-radius: var(--nc-radius);
    background: var(--nc-soft);
    color: var(--nc-muted);
    text-align: center;
}

.nc-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    min-height: max(820px, calc(100vh - var(--nc-detail-offset)));
    margin: -1px 0 0;
    background: #fff;
}

.nc-detail-main {
    padding: 44px 46px 80px;
}

.nc-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.nc-title-row .nc-kcal {
    margin-left: auto;
}

.nc-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--nc-soft);
    color: var(--nc-text);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.nc-detail-meta {
    display: flex;
    gap: 22px;
    margin-bottom: 24px;
    color: #757982;
    font-size: 13px;
}

.nc-detail-meta span::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 7px;
    border: 1px solid currentColor;
    border-radius: 50%;
}

.nc-description {
    margin: 0 0 24px;
    padding: 22px 24px;
    border-radius: 12px;
    background: var(--nc-soft);
    color: #686b72;
    font-size: 14px;
    line-height: 1.7;
}

.nc-serving-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
    padding: 18px 22px;
    border: 1px solid var(--nc-line);
    border-radius: 12px;
}

.nc-add-all {
    min-width: 150px;
    min-height: 38px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: var(--nc-yellow);
    color: #171717;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.nc-serving-box span {
    display: block;
    margin-bottom: 6px;
    color: var(--nc-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.nc-stepper,
.nc-line-stepper {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.nc-stepper button,
.nc-line-stepper button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--nc-line);
    border-radius: 8px;
    background: #fff;
    color: var(--nc-text);
    font-size: 18px;
    cursor: pointer;
}

.nc-ingredients {
    overflow-x: auto;
    border: 1px solid var(--nc-line);
    border-radius: 12px;
}

.nc-ingredients table {
    width: 100%;
    border-collapse: collapse;
}

.nc-ingredients th {
    padding: 14px 18px;
    color: var(--nc-muted);
    font-size: 11px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.nc-ingredients th:last-child,
.nc-ingredients td:last-child {
    text-align: center;
}

.nc-ingredients td {
    padding: 20px 18px;
    border-top: 1px solid #ececef;
    color: #666a72;
    font-size: 14px;
}

.nc-ingredients td:first-child {
    color: var(--nc-text);
    font-weight: 800;
}

.nc-ingredients td:nth-child(3) strong {
    color: var(--nc-red);
}

.nc-ingredients tbody tr:nth-child(odd) {
    background: #fafafa;
}

.nc-cart-icon {
    min-width: 94px;
    height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: var(--nc-yellow);
    color: #111;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.nc-cart-icon::before {
    content: "+ ";
    font-size: 14px;
}

.nc-no-cart {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    color: var(--nc-muted);
    font-size: 12px;
    font-weight: 800;
}

.nc-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--nc-red);
}

.nc-recipe-total {
    margin-top: 18px;
    color: var(--nc-muted);
    font-size: 13px;
    text-align: right;
}

.nc-recipe-total strong {
    color: var(--nc-red);
    font-size: 16px;
}

.nc-steps {
    margin-top: 32px;
    color: #444850;
}

.nc-steps h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.nc-steps li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.nc-cart-panel {
    display: flex;
    flex-direction: column;
    min-height: inherit;
    padding: 44px 28px 34px;
    background: var(--nc-dark);
    color: #fff;
}

.nc-cart-panel h2 {
    margin: 0 0 14px;
    color: #b8b8b8;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nc-total-card {
    display: grid;
    justify-items: start;
    gap: 7px;
    margin-bottom: 26px;
    padding: 24px;
    border-radius: 10px;
    background: var(--nc-wine);
}

.nc-total-card strong {
    color: #fff;
    font-size: 34px;
    line-height: 1;
}

.nc-total-card span {
    color: #d7b6b6;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.nc-total-card em {
    color: #fff;
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
}

.nc-total-card small {
    color: #b98d8d;
    font-size: 12px;
}

.nc-cart-preview {
    overflow: hidden;
    border-radius: 10px;
    background: var(--nc-wine);
    padding: 12px;
}

.nc-cart-empty {
    padding: 28px;
    color: #bc9191;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.nc-empty-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #b98d8d;
    font-size: 22px;
    font-weight: 900;
}

.nc-cart-line {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "name remove"
        "stepper summary";
    gap: 12px 18px;
    padding: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.nc-cart-line + .nc-cart-line {
    margin-top: 10px;
}

.nc-line-name {
    grid-area: name;
    min-width: 0;
    color: #fff;
    font-size: 14px;
}

.nc-line-pkg {
    font-weight: 400;
    font-size: 11px;
    color: #b09090;
    margin-left: 6px;
}

.nc-line-remove {
    grid-area: remove;
    width: 20px;
    height: 20px;
    border: 0;
    background: transparent;
    color: #a88484;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}

.nc-line-summary {
    grid-area: summary;
    align-self: end;
    text-align: right;
}

.nc-line-summary span,
.nc-line-summary strong {
    display: block;
}

.nc-line-summary span {
    color: #fff;
    font-size: 12px;
}

.nc-line-summary strong {
    margin-top: 4px;
    color: var(--nc-yellow);
    font-size: 14px;
}

.nc-line-stepper button {
    width: 26px;
    height: 26px;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 14px;
}

.nc-line-stepper {
    grid-area: stepper;
    align-self: end;
}

.nc-line-stepper strong {
    color: #fff;
}

.nc-cart-total {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top: 28px;
    color: #c4c4c4;
    font-size: 13px;
}

.nc-cart-total strong {
    color: var(--nc-yellow);
    font-size: 16px;
}

.nc-add-cart {
    position: relative;
    width: 100%;
    min-height: 54px;
    margin-top: 26px;
    border: 0;
    border-radius: 10px;
    background: var(--nc-yellow);
    color: #151515;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.03em;
    cursor: pointer;
}

.nc-add-cart:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.nc-add-cart.is-loading {
    opacity: 0.68;
    color: rgba(21, 21, 21, 0.62);
}

.nc-add-cart.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 22px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(21, 21, 21, 0.28);
    border-top-color: #151515;
    border-radius: 50%;
    animation: nc-spin 0.75s linear infinite;
}

.nc-cart-message {
    display: none;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}

.nc-cart-message.is-loading,
.nc-cart-message.is-success,
.nc-cart-message.is-info,
.nc-cart-message.is-error {
    display: block;
}

.nc-cart-message.is-loading {
    border-color: rgba(255, 223, 69, 0.38);
    background: rgba(255, 223, 69, 0.12);
    color: #ffe578;
}

.nc-cart-message.is-success {
    border-color: rgba(111, 214, 151, 0.42);
    background: rgba(111, 214, 151, 0.13);
    color: #bdf2cf;
}

.nc-cart-message.is-info {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #e6e6e6;
}

.nc-cart-message.is-error {
    border-color: rgba(255, 117, 117, 0.48);
    background: rgba(255, 117, 117, 0.13);
    color: #ffc4c4;
}

@keyframes nc-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1180px) {
    .nc-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .nc-detail {
        grid-template-columns: 1fr;
    }

    .nc-cart-panel {
        min-height: auto;
    }
}

@media (max-width: 820px) {
    .nc-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nc-detail-main {
        padding: 28px 18px 42px;
    }

    .nc-title-row,
    .nc-serving-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .nc-title-row .nc-kcal {
        margin-left: 0;
    }
}

@media (max-width: 560px) {
    .nc-recipe-search {
        align-items: stretch;
        flex-direction: column;
    }

    .nc-recipe-search input,
    .nc-recipe-search input[type="search"],
    .nc-recipe-search input[type="number"],
    .nc-recipe-search button {
        width: 100%;
    }

    .nc-card-grid {
        grid-template-columns: 1fr;
    }

    .nc-recipe-card {
        min-height: 0;
    }
}
