:root {
    color-scheme: light;
    --md-sys-color-primary: #386a20;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #b8f397;
    --md-sys-color-on-primary-container: #052100;
    --md-sys-color-secondary: #596249;
    --md-sys-color-secondary-container: #dde7c8;
    --md-sys-color-on-secondary-container: #171e0b;
    --md-sys-color-tertiary: #38656a;
    --md-sys-color-tertiary-container: #bcebf0;
    --md-sys-color-on-tertiary-container: #001f23;
    --md-sys-color-accent: #8b4a16;
    --md-sys-color-accent-container: #ffdcc4;
    --md-sys-color-error: #ba1a1a;
    --md-sys-color-on-error: #ffffff;
    --md-sys-color-surface: #fcfdf6;
    --md-sys-color-surface-container-low: #f6f7ef;
    --md-sys-color-surface-container: #f0f1e9;
    --md-sys-color-surface-container-high: #eaebe3;
    --md-sys-color-on-surface: #1a1c18;
    --md-sys-color-on-surface-variant: #44483d;
    --md-sys-color-outline: #74796d;
    --md-sys-color-outline-variant: #c4c8bb;
    --md-sys-elevation-1: 0 1px 2px rgba(26, 28, 24, .14), 0 1px 3px rgba(26, 28, 24, .10);
    --md-sys-elevation-2: 0 2px 6px rgba(26, 28, 24, .16), 0 1px 4px rgba(26, 28, 24, .12);
    --radius-card: 8px;
    --radius-control: 18px;
    --page-max: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: linear-gradient(180deg, #f8fbef 0, var(--md-sys-color-surface) 380px);
}

body {
    margin: 0;
    color: var(--md-sys-color-on-surface);
    background:
        linear-gradient(180deg, rgba(188, 235, 240, .24), transparent 340px),
        var(--md-sys-color-surface);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    letter-spacing: 0;
}

code {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-tertiary);
}

.material-symbols-rounded {
    font-family: "Material Symbols Rounded";
    font-weight: normal;
    font-style: normal;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
}

.top-app-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    min-height: 72px;
    padding: 10px max(18px, calc((100vw - var(--page-max)) / 2));
    background: rgba(252, 253, 246, .92);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    min-width: 0;
    font-weight: 800;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--md-sys-color-on-primary-container);
    background: var(--md-sys-color-primary-container);
}

.nav-tabs {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 22px;
    color: var(--md-sys-color-on-surface-variant);
    white-space: nowrap;
}

.nav-tab b {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    color: var(--md-sys-color-on-primary);
    background: var(--md-sys-color-primary);
    font-size: 12px;
    line-height: 20px;
    text-align: center;
}

.nav-tab.is-active {
    color: var(--md-sys-color-on-secondary-container);
    background: var(--md-sys-color-secondary-container);
}

.account-area {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 190px;
    min-height: 40px;
    padding: 4px 12px 4px 4px;
    border-radius: 22px;
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
}

.user-chip img,
.user-chip > span:first-child {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: var(--md-sys-color-tertiary-container);
    display: inline-grid;
    place-items: center;
}

.user-chip > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-shell {
    width: min(var(--page-max), calc(100% - 36px));
    margin: 0 auto;
    padding: 24px 0 56px;
}

.surface-band,
.page-heading,
.tracking-result,
.checkout-grid,
.payment-shell {
    margin-bottom: 24px;
}

.shop-hero,
.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 132px;
    padding: 24px;
    border-radius: var(--radius-card);
    background:
        linear-gradient(135deg, rgba(184, 243, 151, .5), rgba(188, 235, 240, .45) 58%, rgba(255, 220, 196, .38)),
        var(--md-sys-color-surface-container-low);
    border: 1px solid var(--md-sys-color-outline-variant);
}

.shop-hero {
    position: relative;
    overflow: hidden;
    min-height: 178px;
}

.shop-hero > * {
    position: relative;
    z-index: 1;
}

.hero-copy {
    max-width: 540px;
    margin: 10px 0 0;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.65;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--md-sys-color-tertiary);
    font-size: 13px;
    font-weight: 700;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: 36px;
    line-height: 1.12;
}

h2 {
    font-size: 20px;
    line-height: 1.24;
}

.page-heading p,
.muted {
    margin-bottom: 0;
    color: var(--md-sys-color-on-surface-variant);
}

.hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.hero-metrics span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 20px;
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.feature-rail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: -10px 0 24px;
}

.category-rail {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: -8px 0 22px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 22px;
    white-space: nowrap;
    color: var(--md-sys-color-on-surface-variant);
    background: rgba(255, 255, 255, .62);
    border: 1px solid var(--md-sys-color-outline-variant);
    box-shadow: var(--md-sys-elevation-1);
}

.category-chip b {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 12px;
    color: var(--md-sys-color-on-tertiary-container);
    background: var(--md-sys-color-tertiary-container);
    font-size: 12px;
}

.category-chip.is-active {
    color: var(--md-sys-color-on-primary);
    background: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
}

.category-chip.is-active b {
    color: var(--md-sys-color-on-primary-container);
    background: var(--md-sys-color-primary-container);
}

.feature-rail article {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 4px 10px;
    align-items: center;
    min-height: 76px;
    padding: 14px;
    border-radius: var(--radius-card);
    background: rgba(255, 255, 255, .56);
    border: 1px solid var(--md-sys-color-outline-variant);
    box-shadow: var(--md-sys-elevation-1);
    backdrop-filter: blur(14px);
}

.feature-rail .material-symbols-rounded {
    grid-row: 1 / span 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--md-sys-color-on-primary-container);
    background: var(--md-sys-color-primary-container);
}

.feature-rail small {
    color: var(--md-sys-color-on-surface-variant);
}

.shop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.product-card,
.cart-panel,
.summary-panel,
.form-panel,
.order-card,
.timeline-panel,
.payment-card,
.admin-card {
    border-radius: var(--radius-card);
    background: var(--md-sys-color-surface-container-low);
    border: 1px solid var(--md-sys-color-outline-variant);
    box-shadow: var(--md-sys-elevation-1);
}

.product-card {
    overflow: hidden;
    min-width: 0;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 106, 32, .45);
    box-shadow: 0 10px 26px rgba(26, 28, 24, .13);
}

.product-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--md-sys-color-surface-container);
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .22s ease;
}

.product-card:hover .product-media img {
    transform: scale(1.035);
}

.media-badge,
.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
}

.media-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    color: #201a00;
    background: #f7df8e;
    box-shadow: 0 6px 14px rgba(32, 26, 0, .12);
}

.product-content {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.product-content h2,
.product-content p,
.summary-panel h2,
.form-panel h2 {
    margin-bottom: 0;
}

.product-content h2 {
    overflow-wrap: anywhere;
}

.product-content > div:first-child p,
.product-description {
    color: var(--md-sys-color-on-surface-variant);
}

.product-category {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-right: 8px;
    padding: 0 8px;
    border-radius: 12px;
    color: var(--md-sys-color-on-tertiary-container);
    background: var(--md-sys-color-tertiary-container);
    font-size: 12px;
    font-weight: 800;
}

.product-description {
    min-height: 48px;
    margin-bottom: 0;
    line-height: 1.55;
}

.product-meta,
.total-row,
.order-foot,
.order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.product-meta strong {
    color: var(--md-sys-color-primary);
    font-size: 22px;
}

.product-meta span {
    color: var(--md-sys-color-on-surface-variant);
}

.card-actions,
.qty-update {
    display: flex;
    gap: 10px;
    align-items: center;
}

.qty-field {
    display: grid;
    gap: 4px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 12px;
}

.qty-field input,
.qty-update input {
    width: 76px;
    min-height: 42px;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid var(--md-sys-color-outline);
    background: var(--md-sys-color-surface);
}

.filled-button,
.filled-tonal-button,
.outlined-button,
.text-button,
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    white-space: nowrap;
}

.filled-button {
    padding: 0 18px;
    border-radius: 22px;
    color: var(--md-sys-color-on-primary);
    background: var(--md-sys-color-primary);
    box-shadow: var(--md-sys-elevation-1);
}

.filled-button:hover {
    box-shadow: var(--md-sys-elevation-2);
    transform: translateY(-1px);
}

.filled-button:disabled {
    cursor: not-allowed;
    color: var(--md-sys-color-on-surface-variant);
    background: var(--md-sys-color-surface-container-high);
    box-shadow: none;
}

.filled-tonal-button,
.outlined-button {
    padding: 0 16px;
    border-radius: 22px;
}

.filled-tonal-button {
    color: var(--md-sys-color-on-secondary-container);
    background: var(--md-sys-color-secondary-container);
}

.outlined-button {
    border: 1px solid var(--md-sys-color-outline);
    color: var(--md-sys-color-primary);
    background: transparent;
}

.outlined-button.danger {
    color: #ba1a1a;
    border-color: #ba1a1a;
}

.text-button {
    padding: 0 12px;
    border-radius: 22px;
    color: var(--md-sys-color-primary);
    background: transparent;
}

.icon-button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--md-sys-color-on-surface-variant);
    background: transparent;
}

.icon-button:hover,
.text-button:hover,
.nav-tab:hover {
    background: var(--md-sys-color-surface-container-high);
}

.wide {
    width: 100%;
}

.compact {
    min-height: 38px;
    padding-inline: 14px;
}

.cart-panel,
.summary-panel,
.form-panel,
.timeline-panel,
.payment-card,
.admin-card {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.cart-panel {
    position: sticky;
    top: 96px;
}

.panel-title {
    display: flex;
    gap: 10px;
    align-items: center;
}

.panel-title h2 {
    margin: 0;
}

.mini-cart-list,
.summary-items,
.cart-list,
.order-list,
.admin-grid {
    display: grid;
    gap: 12px;
}

.mini-cart-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.mini-cart-item img {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
}

.mini-cart-item div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.mini-cart-item b,
.mini-cart-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-cart-item span {
    color: var(--md-sys-color-on-surface-variant);
}

.total-row {
    min-height: 34px;
    color: var(--md-sys-color-on-surface-variant);
}

.total-row strong {
    color: var(--md-sys-color-on-surface);
}

.total-row.grand {
    padding-top: 14px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    font-size: 18px;
}

.snackbar {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: var(--radius-card);
    background: var(--md-sys-color-inverse-surface, #2f312c);
    color: #f1f1eb;
    box-shadow: var(--md-sys-elevation-2);
}

.snackbar.success {
    background: #1f5f35;
}

.snackbar.error {
    background: var(--md-sys-color-error);
}

.empty-state {
    display: grid;
    place-items: center;
    gap: 14px;
    min-height: 320px;
    padding: 32px;
    text-align: center;
    border-radius: var(--radius-card);
    background: var(--md-sys-color-surface-container-low);
    border: 1px solid var(--md-sys-color-outline-variant);
}

.empty-state .material-symbols-rounded {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 34px;
    color: var(--md-sys-color-on-tertiary-container, #001f23);
    background: var(--md-sys-color-tertiary-container);
}

.checkout-grid,
.payment-shell,
.tracking-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.cart-row {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) auto auto;
    gap: 16px;
    align-items: center;
    min-height: 132px;
    padding: 14px;
    border-radius: var(--radius-card);
    background: var(--md-sys-color-surface-container-low);
    border: 1px solid var(--md-sys-color-outline-variant);
}

.cart-row img {
    width: 104px;
    height: 104px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-row h2,
.cart-row p {
    margin-bottom: 6px;
}

.cart-row p,
.cart-row span {
    color: var(--md-sys-color-on-surface-variant);
}

.field-grid {
    display: grid;
    gap: 14px;
}

.field-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.text-field,
.select-field {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 13px;
    font-weight: 700;
}

.text-field input,
.text-field textarea,
.select-field select {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--md-sys-color-outline);
    color: var(--md-sys-color-on-surface);
    background: var(--md-sys-color-surface);
}

.text-field textarea {
    min-height: 96px;
    padding-top: 12px;
    resize: vertical;
}

.short {
    max-width: 170px;
}

.payment-shell {
    grid-template-columns: minmax(0, 1fr) 340px;
}

.payment-card {
    place-items: center;
    min-height: 360px;
    text-align: center;
}

.payment-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    color: var(--md-sys-color-on-primary-container);
    background: var(--md-sys-color-primary-container);
    font-size: 38px;
}

.warning-panel,
.success-panel {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-card);
    text-align: left;
}

.warning-panel {
    color: #251a00;
    background: #ffe7a8;
}

.success-panel {
    justify-content: center;
    color: #063d1f;
    background: #c5efcf;
}

.order-card {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.order-head h2,
.order-head p {
    margin-bottom: 4px;
}

.order-head p {
    color: var(--md-sys-color-on-surface-variant);
}

.status-chip.success {
    color: #063d1f;
    background: #c5efcf;
}

.status-chip.warning {
    color: #332600;
    background: #f8df8c;
}

.status-chip.neutral {
    color: var(--md-sys-color-on-surface-variant);
    background: var(--md-sys-color-surface-container-high);
}

.order-items-strip {
    display: flex;
    gap: 8px;
    align-items: center;
}

.order-items-strip img,
.order-items-strip span {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--md-sys-color-surface-container);
}

.order-items-strip span {
    display: inline-grid;
    place-items: center;
    font-weight: 800;
}

.tracking-search form {
    display: flex;
    gap: 14px;
    align-items: end;
    padding: 18px;
    border-radius: var(--radius-card);
    border: 1px solid var(--md-sys-color-outline-variant);
}

.address-block {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding-top: 12px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.address-block p {
    margin-bottom: 0;
    color: var(--md-sys-color-on-surface-variant);
}

.timeline {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 0 0 22px 28px;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--md-sys-color-primary);
}

.timeline li::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 20px;
    bottom: 0;
    width: 2px;
    background: var(--md-sys-color-outline-variant);
}

.timeline li:last-child::after {
    display: none;
}

.timeline time,
.timeline span {
    color: var(--md-sys-color-on-surface-variant);
}

.admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: var(--radius-card);
    background: var(--md-sys-color-surface-container-low);
    border: 1px solid var(--md-sys-color-outline-variant);
    box-shadow: var(--md-sys-elevation-1);
}

.metric-card .material-symbols-rounded {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--md-sys-color-on-tertiary-container);
    background: var(--md-sys-color-tertiary-container);
}

.metric-card b {
    font-size: 28px;
    line-height: 1.1;
    color: var(--md-sys-color-primary);
}

.metric-card p {
    margin-bottom: 0;
    color: var(--md-sys-color-on-surface-variant);
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.inline-admin-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    padding-top: 12px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.setting-copy-list {
    display: grid;
    gap: 12px;
}

.admin-order-detail {
    display: grid;
    gap: 6px;
    color: var(--md-sys-color-on-surface-variant);
}

.warehouse-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.warehouse-tab {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 10px;
    align-items: center;
    min-height: 88px;
    padding: 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--radius-card);
    background: var(--md-sys-color-surface-container-low);
    color: var(--md-sys-color-on-surface);
}

.warehouse-tab .material-symbols-rounded {
    grid-row: span 2;
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: var(--md-sys-color-primary);
    background: var(--md-sys-color-primary-container);
}

.warehouse-tab b {
    font-size: 1.5rem;
    line-height: 1;
}

.warehouse-tab small {
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 700;
}

.warehouse-tab.is-active {
    border-color: var(--md-sys-color-primary);
    background: var(--md-sys-color-secondary-container);
}

.panel-title-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 14px;
}

.panel-title-row p {
    margin: 4px 0 0;
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 700;
}

.panel-title-row > .material-symbols-rounded {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: var(--md-sys-color-on-tertiary-container);
    background: var(--md-sys-color-tertiary-container);
}

.product-admin-list {
    display: grid;
    gap: 10px;
    max-height: 720px;
    overflow: auto;
}

.product-admin-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: var(--radius-card);
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline-variant);
}

.product-admin-item.is-offline {
    background: var(--md-sys-color-surface-container-lowest);
}

.product-admin-item img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--md-sys-color-surface-container);
}

.product-admin-info {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.product-admin-info b,
.product-admin-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-admin-info span {
    color: var(--md-sys-color-on-surface-variant);
}

.product-admin-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.product-admin-actions form {
    margin: 0;
}

.product-admin-actions .filled-tonal-button,
.product-admin-actions .outlined-button {
    min-height: 40px;
}

.empty-state {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 160px;
    padding: 20px;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
    border: 1px dashed var(--md-sys-color-outline);
    border-radius: var(--radius-card);
}

.delivery-card {
    gap: 18px;
}

.delivery-type-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.delivery-block {
    display: grid;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.delivery-block h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 1rem;
}

.delivery-note {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius-card);
    background: var(--md-sys-color-surface-container);
}

.delivery-note pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font: inherit;
}

.toggle-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--md-sys-color-outline);
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    font-weight: 700;
}

.toggle-field input {
    width: 20px;
    height: 20px;
    accent-color: var(--md-sys-color-primary);
}

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

.address-line {
    color: var(--md-sys-color-on-surface-variant);
}

@media (max-width: 1020px) {
    .top-app-bar {
        grid-template-columns: 1fr auto;
    }

    .brand {
        grid-column: 1;
    }

    .nav-tabs {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
    }

    .account-area {
        grid-column: 2;
        grid-row: 1;
    }

    .shop-layout,
    .checkout-grid,
    .payment-shell,
    .tracking-result {
        grid-template-columns: 1fr;
    }

    .cart-panel {
        position: static;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }

    .feature-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inline-admin-form {
        grid-template-columns: 1fr 1fr;
    }

    .inline-admin-form button {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1180px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 721px) and (max-width: 920px) and (orientation: portrait) {
    .page-shell {
        width: min(100% - 32px, var(--page-max));
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-hero {
        min-height: 156px;
    }
}

@media (min-width: 540px) and (max-width: 720px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-actions {
        grid-template-columns: 76px 1fr;
    }
}

@media (max-width: 720px) {
    .page-shell {
        width: min(100% - 24px, var(--page-max));
        padding-top: 16px;
    }

    .top-app-bar {
        padding-inline: 12px;
        gap: 10px;
        padding-bottom: 8px;
    }

    .brand span:last-child,
    .user-chip span:last-child,
    .nav-tab span:last-child {
        display: none;
    }

    .nav-tab {
        width: 44px;
        padding: 0;
    }

    .nav-tabs {
        justify-content: space-between;
        padding: 4px;
        border-radius: 24px;
        background: var(--md-sys-color-surface-container-low);
        box-shadow: var(--md-sys-elevation-1);
    }

    .shop-hero,
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        min-height: 118px;
        padding: 18px;
    }

    h1 {
        font-size: 30px;
    }

    .hero-metrics {
        justify-content: flex-start;
    }

    .product-grid,
    .field-grid.two,
    .field-grid.three {
        grid-template-columns: 1fr;
    }

    .feature-rail {
        grid-template-columns: 1fr;
        margin-top: -4px;
    }

    .category-rail {
        margin-top: -6px;
    }

    .feature-rail article {
        min-height: 66px;
    }

    .card-actions {
        display: grid;
        grid-template-columns: 84px 1fr;
    }

    .cart-row {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .cart-row img {
        width: 84px;
        height: 84px;
    }

    .cart-row .qty-update,
    .cart-row > strong {
        grid-column: 2;
    }

    .tracking-search form {
        display: grid;
    }

    .short {
        max-width: none;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .warehouse-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-admin-item {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .product-admin-actions {
        grid-column: 2;
        justify-self: start;
        justify-content: flex-start;
    }

    .inline-admin-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .page-shell {
        width: min(100% - 16px, var(--page-max));
    }

    .filled-button,
    .filled-tonal-button,
    .outlined-button {
        padding-inline: 12px;
        white-space: normal;
        text-align: center;
    }

    .mini-cart-item {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .warehouse-overview {
        grid-template-columns: 1fr;
    }

    .mini-cart-item > strong {
        grid-column: 2;
        justify-self: start;
    }
}
