.sgr-page {
    background: linear-gradient(180deg, #fbfcfa 0, #fff 26%);
}

.sgr-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr);
    gap: 48px;
    align-items: center;
}

.sgr-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--tertiary-font-color);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sgr-intro h1 {
    max-width: 820px;
    margin: 14px 0 18px;
    color: var(--heading-font-color);
    font-size: clamp(36px, 5vw, 66px);
    line-height: 1.04;
    letter-spacing: -.04em;
}

.sgr-intro p {
    max-width: 720px;
    margin: 0;
    color: var(--body-font-color);
    font-size: 17px;
    line-height: 1.75;
}

.sgr-routine-key {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.sgr-routine-key > div {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 24px 14px;
    border: 1px solid rgba(var(--border-color), .35);
    border-radius: 22px;
    background: rgba(255, 255, 255, .75);
    text-align: center;
}

.sgr-routine-key strong { color: var(--heading-font-color); font-size: 16px; }
.sgr-routine-key small { color: var(--body-font-color); font-size: 12px; }

.sgr-sun,
.sgr-moon {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    font-size: 20px;
}

.sgr-sun { color: #9a6b00; background: #fff4cf; }
.sgr-moon { color: #536195; background: #edf0ff; }

.sgr-builder {
    position: relative;
    padding: 0 0 130px;
    border: 1px solid rgba(var(--border-color), .3);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(34, 56, 36, .08);
    overflow: hidden;
}

.sgr-progress-shell {
    position: sticky;
    top: 0;
    z-index: 9;
    padding: 24px 30px 18px;
    border-bottom: 1px solid rgba(var(--border-color), .25);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(14px);
}

.sgr-progress-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 19px;
}

.sgr-progress-heading > div { display: flex; align-items: baseline; gap: 10px; }
.sgr-progress-heading span { color: var(--body-font-color); font-size: 13px; }
.sgr-progress-heading strong { color: var(--heading-font-color); font-size: 17px; }

.sgr-text-button,
.sgr-skip-button {
    padding: 0;
    border: 0;
    color: var(--tertiary-font-color);
    background: transparent;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.sgr-progress {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.sgr-progress-step {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border: 0;
    color: #989898;
    background: transparent;
    text-align: left;
}

.sgr-progress-step::before {
    position: absolute;
    top: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    border-radius: 5px;
    background: #edf0eb;
    content: '';
}

.sgr-progress-step span {
    display: grid;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid #ddd;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.sgr-progress-step small { overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.sgr-progress-step.is-active { color: var(--tertiary-font-color); }
.sgr-progress-step.is-active::before,
.sgr-progress-step.is-complete::before { background: var(--primary-font-color); }
.sgr-progress-step.is-active span { color: #fff; border-color: var(--primary-font-color); background: var(--primary-font-color); }
.sgr-progress-step.is-complete span { color: var(--tertiary-font-color); border-color: var(--primary-font-color); background: var(--extra-bgcolor); }

.sgr-selection-tray {
    margin-top: 16px;
    padding-top: 13px;
    border-top: 1px solid rgba(var(--border-color), .22);
}

.sgr-selection-tray-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.sgr-selection-tray-heading strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--heading-font-color);
    font-size: 12px;
}

.sgr-selection-tray-heading strong i { color: var(--primary-font-color); font-size: 16px; }
.sgr-selection-tray-heading > span { color: var(--body-font-color); font-size: 11px; }

.sgr-selection-list {
    display: flex;
    gap: 9px;
    padding: 2px 2px 4px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.sgr-selection-list > p {
    margin: 0;
    padding: 8px 0;
    color: var(--body-font-color);
    font-size: 11px;
}

.sgr-selection-chip {
    display: grid;
    flex: 0 0 220px;
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 9px;
    align-items: center;
    padding: 7px 9px;
    border: 1px solid rgba(var(--border-color), .35);
    border-radius: 11px;
    color: inherit;
    background: #fff;
    text-align: left;
    transition: border-color .2s, background .2s;
}

.sgr-selection-chip:hover { border-color: var(--primary-font-color); background: #fafbf9; }
.sgr-selection-chip img,
.sgr-selection-chip-icon { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; }
.sgr-selection-chip-icon { display: grid; place-items: center; color: var(--body-font-color); background: #f1f1f1; }
.sgr-selection-chip > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.sgr-selection-chip small { color: var(--body-font-color); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.sgr-selection-chip strong { overflow: hidden; color: var(--heading-font-color); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sgr-selection-chip.is-skipped { background: #fafafa; }
.sgr-selection-edit { color: var(--primary-font-color); }

.sgr-message {
    margin: 24px 30px 0;
    padding: 13px 16px;
    border: 1px solid #f1d89b;
    border-radius: 12px;
    color: #72530d;
    background: #fff9e9;
}

.sgr-message.is-success { color: #276c37; border-color: #b9ddc1; background: #eef8f0; }

.sgr-step,
.sgr-summary { padding: 42px 30px 8px; }

.sgr-step[hidden],
.sgr-summary[hidden] { display: none !important; }

.sgr-step-header {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    max-width: 850px;
    margin-bottom: 34px;
}

.sgr-step-number {
    color: rgba(var(--border-color), .65);
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.sgr-step-header h2,
.sgr-summary h2 {
    margin: 9px 0 8px;
    color: var(--heading-font-color);
    font-size: clamp(27px, 3vw, 38px);
}

.sgr-step-header p,
.sgr-summary-hero p { margin: 0; color: var(--body-font-color); font-size: 15px; line-height: 1.65; }

.sgr-search-wrap {
    max-width: 620px;
    margin: -8px 0 28px 98px;
}

.sgr-search-wrap > label {
    display: block;
    margin-bottom: 7px;
    color: var(--heading-font-color);
    font-size: 12px;
    font-weight: 800;
}

.sgr-search-control {
    position: relative;
    display: flex;
    min-height: 50px;
    align-items: center;
    border: 1px solid rgba(var(--border-color), .5);
    border-radius: 12px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.sgr-search-control:focus-within {
    border-color: var(--primary-font-color);
    box-shadow: 0 0 0 3px rgba(var(--border-color), .14);
}

.sgr-search-control > i {
    margin-left: 16px;
    color: var(--primary-font-color);
    font-size: 18px;
}

.sgr-search-control input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 44px 0 11px;
    border: 0;
    outline: 0;
    color: var(--heading-font-color);
    background: transparent;
}

.sgr-search-control input::placeholder { color: #9b9b9b; }

.sgr-search-control button {
    position: absolute;
    right: 7px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--heading-font-color);
    background: var(--extra-bgcolor);
}

.sgr-search-control button[hidden] { display: none !important; }

.sgr-search-status {
    display: block;
    min-height: 17px;
    margin-top: 6px;
    color: var(--body-font-color);
    font-size: 11px;
}

.sgr-search-empty {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    color: #72530d;
    background: #fff9e9;
    font-size: 12px;
}

.sgr-search-empty[hidden] { display: none !important; }

.sgr-time-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.sgr-time-pill.am { color: #8a6508; background: #fff4cf; }
.sgr-time-pill.pm { color: #536195; background: #edf0ff; }
.sgr-time-pill.both { color: var(--tertiary-font-color); background: var(--extra-bgcolor); }

.sgr-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 250px));
    gap: 18px;
    justify-content: start;
}

.sgr-product-card {
    position: relative;
    display: flex;
    min-width: 0;
    border: 1px solid rgba(var(--border-color), .32);
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.sgr-product-card:hover { transform: translateY(-3px); border-color: var(--primary-font-color); box-shadow: 0 14px 32px rgba(42, 65, 40, .1); }
.sgr-product-card.is-selected { border-color: var(--tertiary-font-color); box-shadow: 0 0 0 2px var(--tertiary-font-color), 0 15px 34px rgba(42, 65, 40, .12); }
.sgr-product-card[hidden] { display: none !important; }
.sgr-product-card.is-out-of-stock { opacity: .68; }
.sgr-product-card.is-out-of-stock:hover { transform: none; border-color: rgba(var(--border-color), .32); box-shadow: none; }
.sgr-product-card.is-out-of-stock .sgr-product-select { cursor: not-allowed; }

.sgr-product-select {
    display: flex;
    width: 100%;
    padding: 0 0 44px;
    border: 0;
    color: inherit;
    background: transparent;
    text-align: left;
    flex-direction: column;
}

.sgr-product-image-wrap {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f7f8f5;
    overflow: hidden;
}

.sgr-product-image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.sgr-product-card:hover img { transform: scale(1.035); }

.sgr-product-info { display: grid; gap: 8px; padding: 16px 15px 0; }
.sgr-product-info strong { color: var(--heading-font-color); font-size: 13px; line-height: 1.35; text-transform: uppercase; }
.sgr-product-price { color: var(--primary-font-color); font-weight: 800; }
.sgr-product-copy { color: var(--body-font-color); font-size: 12px; line-height: 1.5; }

.sgr-product-link {
    position: absolute;
    right: 15px;
    bottom: 14px;
    left: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--tertiary-font-color);
    font-size: 12px;
    font-weight: 700;
}

.sgr-selected-mark {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: none;
    align-items: center;
    gap: 4px;
    padding: 7px 9px;
    border-radius: 30px;
    color: #fff;
    background: var(--tertiary-font-color);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.sgr-product-card.is-selected .sgr-selected-mark { display: inline-flex; }

.sgr-stock-label {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 7px 9px;
    border-radius: 30px;
    color: #fff;
    background: #7b2725;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.sgr-empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 24px;
    border: 1px dashed rgba(var(--border-color), .7);
    border-radius: 16px;
    color: var(--body-font-color);
    background: #fafbf9;
}

.sgr-empty > i { color: var(--primary-font-color); font-size: 28px; }
.sgr-empty strong { display: block; margin-bottom: 4px; color: var(--heading-font-color); }
.sgr-empty p { margin: 0; line-height: 1.6; }

.sgr-serum-group + .sgr-serum-group { margin-top: 48px; padding-top: 42px; border-top: 1px solid rgba(var(--border-color), .3); }
.sgr-subheading,
.sgr-summary-title { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.sgr-subheading h3,
.sgr-summary-title h3 { margin: 0 0 3px; color: var(--heading-font-color); font-size: 20px; }
.sgr-subheading p,
.sgr-summary-title p { margin: 0; color: var(--body-font-color); font-size: 12px; }

.sgr-navigation {
    position: fixed;
    right: 0;
    bottom: 18px;
    left: 50%;
    z-index: 40;
    display: grid;
    width: min(1160px, calc(100vw - 30px));
    grid-template-columns: minmax(150px, 1fr) auto minmax(280px, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid rgba(var(--border-color), .42);
    border-radius: 16px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 14px 46px rgba(31, 52, 30, .2);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 18px);
    transition: opacity .2s ease, transform .2s ease;
    backdrop-filter: blur(14px);
}

.sgr-builder.is-in-view .sgr-navigation { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.sgr-navigation[hidden] { display: none !important; }

.sgr-navigation-copy { display: grid; justify-items: center; gap: 4px; }
.sgr-navigation-copy small { color: var(--body-font-color); font-size: 10px; }

.sgr-primary-button,
.sgr-secondary-button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 22px;
    border: 1px solid var(--tertiary-font-color);
    border-radius: 9px;
    font-weight: 800;
    transition: opacity .2s, transform .2s, background .2s;
}

.sgr-primary-button { justify-self: end; color: #fff; background: var(--tertiary-font-color); }
.sgr-secondary-button { justify-self: start; color: var(--tertiary-font-color); background: #fff; }
.sgr-primary-button:hover,
.sgr-secondary-button:hover { transform: translateY(-1px); }
.sgr-primary-button:disabled,
.sgr-secondary-button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.sgr-next-button { min-width: 270px; box-shadow: 0 9px 22px rgba(60, 94, 57, .2); }
.sgr-next-button.is-ready { background: var(--primary-font-color); animation: sgr-ready-pulse .45s ease; }

@keyframes sgr-ready-pulse {
    0% { transform: scale(.98); }
    100% { transform: scale(1); }
}

.sgr-summary-hero { max-width: 760px; margin-bottom: 34px; }
.sgr-summary-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.sgr-summary-column { padding: 24px; border: 1px solid rgba(var(--border-color), .3); border-radius: 20px; background: #fbfcfa; }

.sgr-summary-item {
    display: grid;
    grid-template-columns: 32px 54px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid rgba(var(--border-color), .23);
}

.sgr-summary-item:first-child { border-top: 0; }
.sgr-summary-order { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: var(--tertiary-font-color); background: var(--extra-bgcolor); font-size: 11px; font-weight: 800; }
.sgr-summary-item img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; }
.sgr-summary-item a { display: block; color: var(--heading-font-color); font-size: 12px; font-weight: 800; line-height: 1.35; }
.sgr-summary-item small { display: block; margin-top: 4px; color: var(--body-font-color); }
.sgr-summary-empty { margin: 0; padding: 18px 0 8px; color: var(--body-font-color); font-size: 13px; }

.sgr-summary-footer {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 30px;
    align-items: center;
    margin-top: 24px;
    padding: 22px 24px;
    border-radius: 18px;
    background: var(--extra-bgcolor);
}

.sgr-summary-footer > div { display: grid; gap: 3px; }
.sgr-summary-footer > div span { color: var(--body-font-color); font-size: 11px; text-transform: uppercase; }
.sgr-summary-footer > div strong { color: var(--heading-font-color); font-size: 18px; }
.sgr-summary-footer .sgr-primary-button { justify-self: end; }

.sgr-summary-footer [data-add-routine] {
    min-width: 300px;
    color: #fff !important;
    border-color: #243b23 !important;
    background: #243b23 !important;
    box-shadow: 0 12px 26px rgba(36, 59, 35, .28);
}

.sgr-summary-footer [data-add-routine]:hover:not(:disabled) {
    border-color: #587454 !important;
    background: #587454 !important;
}

.sgr-summary-footer [data-add-routine] i { font-size: 19px; }

.sgr-cart-feedback {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #b9ddc1;
    border-radius: 11px;
    color: #276c37;
    background: #eef8f0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.sgr-cart-feedback.is-error { color: #8d2824; border-color: #efc3c0; background: #fff1f0; }
.sgr-cart-feedback[hidden] { display: none !important; }

.sgr-care-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; color: var(--body-font-color); }
.sgr-care-note i { color: var(--primary-font-color); font-size: 18px; }
.sgr-care-note p { margin: 0; font-size: 12px; line-height: 1.6; }

@media (max-width: 1199px) {
    .sgr-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sgr-progress-step { justify-content: center; }
    .sgr-progress-step small { display: none; }
}

@media (max-width: 767px) {
    .sgr-intro-grid { grid-template-columns: 1fr; gap: 28px; }
    .sgr-intro { padding-top: 45px !important; padding-bottom: 45px !important; }
    .sgr-routine-key { max-width: 400px; }
    .sgr-builder { margin-right: -3px; margin-left: -3px; padding-bottom: 190px; border-radius: 20px; }
    .sgr-progress-shell { padding: 18px 16px 12px; }
    .sgr-progress-heading > div { display: grid; gap: 2px; }
    .sgr-progress { gap: 2px; }
    .sgr-progress-step { padding: 5px 2px; }
    .sgr-progress-step span { width: 26px; height: 26px; }
    .sgr-selection-tray-heading { align-items: flex-start; }
    .sgr-selection-tray-heading > span { max-width: 90px; text-align: right; }
    .sgr-selection-chip { flex-basis: 185px; }
    .sgr-step,
    .sgr-summary { padding: 30px 16px 4px; }
    .sgr-step-header { grid-template-columns: 1fr; gap: 6px; margin-bottom: 25px; }
    .sgr-step-number { font-size: 28px; }
    .sgr-search-wrap { max-width: none; margin: 0 0 22px; }
    .sgr-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
    .sgr-product-info { padding: 13px 11px 0; }
    .sgr-product-link { right: 11px; left: 11px; }
    .sgr-navigation { bottom: 72px; width: calc(100vw - 16px); grid-template-columns: 82px minmax(0, 1fr); gap: 8px; padding: 9px; border-radius: 13px; }
    .sgr-navigation-copy { display: flex; grid-column: 1 / -1; grid-row: 1; width: 100%; align-items: center; justify-content: space-between; padding: 0 3px; }
    .sgr-navigation-copy small { font-size: 9px; }
    .sgr-secondary-button { grid-column: 1; grid-row: 2; width: 100%; min-height: 46px; padding: 10px 8px; font-size: 0; }
    .sgr-secondary-button i { font-size: 18px; }
    .sgr-primary-button { grid-column: 2; grid-row: 2; width: 100%; min-height: 46px; padding: 10px 12px; }
    .sgr-next-button { min-width: 0; }
    .sgr-summary-columns { grid-template-columns: 1fr; }
    .sgr-summary-column { padding: 18px 15px; }
    .sgr-summary-footer { grid-template-columns: 1fr 1fr; gap: 18px; }
    .sgr-summary-footer .sgr-primary-button { grid-column: 1 / -1; width: 100%; }
    .sgr-summary-footer [data-add-routine] { min-width: 0; }
}

@media (max-width: 420px) {
    .sgr-product-grid { grid-template-columns: 1fr; }
    .sgr-product-card { display: grid; grid-template-columns: 110px minmax(0, 1fr); }
    .sgr-product-select { display: contents; }
    .sgr-product-image-wrap { grid-row: 1 / 3; aspect-ratio: auto; height: 100%; min-height: 158px; }
    .sgr-product-info { padding: 15px 12px 45px; }
    .sgr-product-link { left: 122px; }
}
