@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&display=swap");

:root {
    --berry: #861a45;
    --berry-dark: #ddd6d9;
    --berry-soft: #fbe3ee;
    --leaf: #28795d;
    --leaf-soft: #ddf2e7;
    --sun: #ffc94a;
    --paper: #fffaf7;
    --surface: #ffffff;
    --ink: #21151b;
    --muted: #735e67;
    --line: #eadbe2;
    --shadow: 0 18px 48px rgba(59, 10, 34, 0.14);
    --page-pad: clamp(1rem, 6vw, 6rem);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top right, rgba(255, 201, 74, 0.18), transparent 28rem),
        linear-gradient(135deg, #fff7fb 0%, #f2fff8 52%, #fffaf7 100%);
    overflow-x: hidden;
    font-family: "Vazirmatn", "IRANSansX", "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
}

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

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

.site-header,
.admin-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem clamp(1rem, 4vw, 4rem);
    border-bottom: 1px solid rgba(134, 26, 69, 0.12);
    background: rgba(255, 250, 247, 0.88);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: max-content;
}

.brand-mark {
    display: grid;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--berry), var(--leaf));
    font-size: 1.35rem;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(134, 26, 69, 0.24);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 1.08rem;
}

.brand small {
    color: var(--muted);
    font-size: 0.78rem;
}

.main-nav,
.admin-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.main-nav a,
.admin-nav a,
.category-row a {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.55rem 0.9rem;
    color: var(--muted);
    font-weight: 700;
    transition: 160ms ease;
}

.main-nav a:hover,
.admin-nav a:hover,
.category-row a:hover {
    color: var(--berry);
    border-color: rgba(134, 26, 69, 0.16);
    background: rgba(255, 255, 255, 0.7);
}

.nav-admin {
    color: var(--berry) !important;
    background: var(--berry-soft);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    min-height: calc(100vh - 5.1rem);
    padding: clamp(2rem, 7vw, 6rem) var(--page-pad);
}

.hero-content {
    max-width: 45rem;
}

.eyebrow {
    margin: 0 0 0.55rem;
    color: var(--leaf);
    font-weight: 800;
}

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

.hero h1 {
    margin-bottom: 1rem;
    font-size: clamp(3.2rem, 8vw, 7.2rem);
    line-height: 1.1;
}

.hero-copy {
    max-width: 38rem;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.68rem 1.1rem;
    color: var(--ink);
    background: var(--surface);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
    border-color: rgba(134, 26, 69, 0.24);
    box-shadow: 0 10px 24px rgba(59, 10, 34, 0.10);
}

.button.primary {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--berry), #b52c62);
}

.button.ghost {
    color: var(--berry);
    background: rgba(255, 255, 255, 0.65);
}

.button.small {
    min-height: 2.35rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
}

.button.danger {
    color: #b42318;
    background: #fff4f2;
}

.button.wide {
    width: 100%;
}

.hero-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.6rem;
}

.hero-notes span {
    border: 1px solid rgba(40, 121, 93, 0.22);
    border-radius: 8px;
    padding: 0.45rem 0.7rem;
    color: var(--leaf);
    background: rgba(221, 242, 231, 0.68);
    font-weight: 700;
}

.hero-visual {
    position: relative;
    display: grid;
    min-height: 34rem;
    place-items: center;
    isolation: isolate;
}

.hero-visual::before,
.hero-visual::after {
    position: absolute;
    content: "";
    z-index: -1;
    border-radius: 50%;
}

.hero-visual::before {
    width: min(36vw, 25rem);
    height: min(36vw, 25rem);
    background: radial-gradient(circle, rgba(134, 26, 69, 0.22), rgba(134, 26, 69, 0.05) 58%, transparent 70%);
}

.hero-visual::after {
    right: 2rem;
    bottom: 2rem;
    width: 9rem;
    height: 9rem;
    background: radial-gradient(circle, rgba(255, 201, 74, 0.62), rgba(255, 201, 74, 0));
}

.hero-visual img {
    width: min(78vw, 28rem);
    filter: drop-shadow(0 32px 34px rgba(59, 10, 34, 0.24));
}

.hero-product {
    position: absolute;
    right: 0;
    bottom: 3rem;
    width: min(16rem, 72%);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 8px;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-product small,
.hero-product span {
    display: block;
    color: var(--muted);
}

.hero-product strong {
    display: block;
    margin: 0.15rem 0;
    color: var(--berry-dark);
    font-size: 1.1rem;
}

.section-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    border-block: 1px solid var(--line);
    background: var(--line);
}

.section-strip div {
    padding: 1.4rem clamp(1rem, 4vw, 4rem);
    background: rgba(255, 255, 255, 0.72);
}

.section-strip strong,
.section-strip span {
    display: block;
}

.section-strip span {
    color: var(--muted);
}

.content-band,
.about-section,
.visit-section {
    padding: clamp(3rem, 7vw, 6rem) var(--page-pad);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-heading h2,
.about-section h2,
.visit-section h2 {
    margin-bottom: 0.5rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.25;
}

.section-heading p:last-child,
.about-section p,
.visit-section p {
    max-width: 36rem;
    color: var(--muted);
}

.category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.category-row a {
    background: rgba(255, 255, 255, 0.7);
}

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

.menu-group + .menu-group {
    margin-top: 2rem;
}

.menu-group-title {
    margin: 0 0 0.8rem;
    color: var(--berry-dark);
    font-size: 1.35rem;
}

.product-card {
    overflow: hidden;
    border: 1px solid rgba(134, 26, 69, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 30px rgba(59, 10, 34, 0.08);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(59, 10, 34, 0.12);
}

.product-card figure {
    position: relative;
    margin: 0;
    aspect-ratio: 1 / 0.78;
    background: linear-gradient(135deg, var(--berry-soft), var(--leaf-soft));
}

.product-card figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card figcaption {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    border-radius: 8px;
    padding: 0.25rem 0.55rem;
    color: var(--berry-dark);
    background: var(--sun);
    font-size: 0.78rem;
    font-weight: 800;
}

.product-body {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
}

.product-category {
    color: var(--leaf);
    font-size: 0.82rem;
    font-weight: 800;
}

.product-body h3 {
    margin-bottom: 0;
    font-size: 1.25rem;
}

.product-body p {
    min-height: 4.5rem;
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
}

.product-body strong {
    color: var(--berry);
    font-size: 1.05rem;
}

.product-sizes {
    display: grid;
    gap: 0.45rem;
}

.product-sizes span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid rgba(134, 26, 69, 0.12);
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    background: rgba(255, 255, 255, 0.58);
}

.product-sizes b {
    color: var(--berry-dark);
    font-size: 0.88rem;
}

.product-sizes em {
    color: var(--berry);
    font-style: normal;
    font-size: 0.9rem;
    font-weight: 900;
    white-space: nowrap;
}

.about-section {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(18rem, 0.65fr);
    gap: 2rem;
    background: linear-gradient(135deg, rgba(221, 242, 231, 0.68), rgba(251, 227, 238, 0.72));
}

.about-list {
    display: grid;
    gap: 0.8rem;
    align-self: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.about-list li {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.58);
}

.about-list span {
    color: var(--berry);
    font-weight: 900;
}

.visit-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.visit-details {
    display: grid;
    gap: 0.65rem;
    min-width: min(100%, 24rem);
}

.visit-details span {
    border: 1px solid rgba(134, 26, 69, 0.14);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.72);
    font-weight: 800;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem var(--page-pad);
    color: var(--muted);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.65);
}

.empty-state {
    border: 1px dashed rgba(134, 26, 69, 0.24);
    border-radius: 8px;
    padding: 1.2rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.72);
}

.admin-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(40, 121, 93, 0.14), transparent 28rem),
        linear-gradient(135deg, #fff7fb 0%, #f8fffb 100%);
}

.admin-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.admin-shell.narrow {
    width: min(840px, calc(100% - 2rem));
}

.admin-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-title h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.stats-grid div {
    border: 1px solid rgba(134, 26, 69, 0.12);
    border-radius: 8px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.78);
}

.stats-grid span,
.admin-table small {
    display: block;
    color: var(--muted);
}

.stats-grid strong {
    display: block;
    color: var(--berry);
    font-size: 2rem;
}

.admin-table-wrap,
.product-form,
.login-panel {
    border: 1px solid rgba(134, 26, 69, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 36px rgba(59, 10, 34, 0.09);
}

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

.admin-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.9rem;
    text-align: right;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.admin-table th {
    color: var(--berry-dark);
    background: rgba(251, 227, 238, 0.52);
}

.table-thumb {
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 8px;
    object-fit: cover;
    background: var(--berry-soft);
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.table-actions form {
    margin: 0;
}

.status {
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    padding: 0.22rem 0.55rem;
    font-size: 0.82rem;
    font-weight: 800;
}

.status.on {
    color: #176349;
    background: #dff7ea;
}

.status.off {
    color: #8a4b10;
    background: #fff0d1;
}

.status.featured {
    color: #7c2144;
    background: var(--berry-soft);
}

.alert {
    margin-bottom: 1rem;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-weight: 800;
}

.alert.success {
    color: #176349;
    background: #dff7ea;
}

.alert.error {
    color: #b42318;
    background: #fff4f2;
}

.product-form {
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

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

label {
    display: grid;
    gap: 0.35rem;
    color: var(--berry-dark);
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: 3px solid rgba(134, 26, 69, 0.14);
    border-color: rgba(134, 26, 69, 0.38);
}

label small {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 8rem;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
    background: rgba(251, 227, 238, 0.28);
}

.upload-row > div {
    display: grid;
    gap: 0.5rem;
}

.upload-row > div > span,
.field-heading span {
    color: var(--berry-dark);
    font-weight: 800;
}

.upload-row small,
.field-heading small {
    color: var(--muted);
    font-size: 0.85rem;
}

.upload-row img {
    width: 8rem;
    height: 8rem;
    border-radius: 8px;
    object-fit: cover;
    background: var(--berry-soft);
}

.default-image-picker {
    display: grid;
    gap: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
    background: rgba(221, 242, 231, 0.28);
}

.field-heading {
    display: grid;
    gap: 0.25rem;
}

.default-image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.default-image-option {
    position: relative;
    display: grid;
    gap: 0.45rem;
    cursor: pointer;
}

.default-image-option input {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 1;
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--berry);
}

.default-image-option img {
    width: 100%;
    aspect-ratio: 1 / 0.72;
    border: 2px solid transparent;
    border-radius: 8px;
    object-fit: cover;
    background: var(--berry-soft);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.default-image-option span {
    color: var(--berry-dark);
    font-size: 0.88rem;
    font-weight: 800;
}

.default-image-option input:checked + img {
    border-color: var(--berry);
    box-shadow: 0 10px 24px rgba(134, 26, 69, 0.16);
    transform: translateY(-1px);
}

.sizes-editor {
    display: grid;
    gap: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
    background: rgba(255, 249, 232, 0.46);
}

.sizes-list {
    display: grid;
    gap: 0.75rem;
}

.size-row {
    display: grid;
    grid-template-columns: minmax(10rem, 1fr) 9rem 6rem auto auto;
    gap: 0.7rem;
    align-items: end;
    border: 1px solid rgba(134, 26, 69, 0.10);
    border-radius: 8px;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.72);
}

.size-check {
    min-height: 2.8rem;
    align-content: center;
}

.switch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.check {
    display: inline-flex;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.45rem;
}

.check input {
    width: 1.1rem;
    height: 1.1rem;
}

.login-page {
    display: grid;
    place-items: center;
    padding: 1rem;
}

.login-shell {
    width: min(440px, 100%);
}

.login-panel {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
}

.login-panel h1 {
    margin-bottom: 0;
}

.login-panel p {
    color: var(--muted);
}

.form-stack {
    display: grid;
    gap: 0.9rem;
}

.settings-form {
    gap: 1.25rem;
}

.settings-section {
    display: grid;
    gap: 0.9rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.2rem;
}

.settings-section:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
}

.settings-section h2 {
    margin: 0;
    color: var(--berry-dark);
    font-size: 1.25rem;
}

.wide-field {
    grid-column: 1 / -1;
}

.category-add-form,
.category-row-admin {
    display: grid;
    gap: 0.9rem;
    border: 1px solid rgba(134, 26, 69, 0.12);
    border-radius: 8px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 24px rgba(59, 10, 34, 0.08);
}

.category-add-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    margin-bottom: 1rem;
}

.category-list {
    display: grid;
    gap: 0.85rem;
}

.category-row-admin {
    grid-template-columns: minmax(12rem, 1fr) 7rem auto auto;
    align-items: end;
}

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

@media (max-width: 820px) {
    :root {
        --page-pad: clamp(1.05rem, 5vw, 1.5rem);
    }

    .admin-header,
    .section-heading,
    .visit-section,
    .admin-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-header {
        gap: 0.8rem;
        padding: 0.8rem var(--page-pad);
    }

    .admin-nav {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.15rem;
        scrollbar-width: none;
    }

    .admin-nav::-webkit-scrollbar {
        display: none;
    }

    .admin-nav a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .site-header {
        align-items: flex-start;
        gap: 0.7rem;
        padding: 0.75rem var(--page-pad) 0.6rem;
    }

    .brand {
        gap: 0.65rem;
    }

    .brand-mark {
        width: 2.55rem;
        height: 2.55rem;
        font-size: 1.12rem;
    }

    .brand strong {
        font-size: 1rem;
    }

    .brand small {
        font-size: 0.72rem;
    }

    .main-nav {
        width: 100%;
        flex-wrap: nowrap;
        gap: 0.45rem;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        padding-bottom: 0.15rem;
        scrollbar-width: none;
    }

    .main-nav::-webkit-scrollbar,
    .category-row::-webkit-scrollbar,
    .hero-notes::-webkit-scrollbar {
        display: none;
    }

    .main-nav a,
    .category-row a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .hero,
    .about-section {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        gap: 1.4rem;
        padding-top: 1.4rem;
        padding-bottom: 2.2rem;
    }

    .hero h1 {
        max-width: 11ch;
        margin-bottom: 0.7rem;
        font-size: clamp(2.65rem, 14vw, 4.2rem);
        line-height: 1.15;
    }

    .hero-copy {
        max-width: 100%;
        font-size: 1rem;
        line-height: 1.95;
    }

    .hero-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
        margin-top: 1.15rem;
    }

    .hero-actions .button {
        min-height: 3rem;
        padding-inline: 0.6rem;
        text-align: center;
    }

    .hero-notes {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-inline: calc(var(--page-pad) * -1);
        padding: 0.1rem var(--page-pad) 0.2rem;
    }

    .hero-notes span {
        flex: 0 0 auto;
    }

    .hero-visual {
        min-height: 21rem;
    }

    .hero-visual img {
        width: min(72vw, 21rem);
    }

    .hero-visual::before {
        width: 17rem;
        height: 17rem;
    }

    .hero-visual::after {
        right: auto;
        left: 0.5rem;
        bottom: 1.5rem;
        width: 6.5rem;
        height: 6.5rem;
    }

    .hero-product {
        right: var(--page-pad);
        bottom: 1rem;
        width: min(17rem, calc(100% - var(--page-pad) * 2));
        padding: 0.75rem 0.9rem;
    }

    .section-strip div {
        padding: 1rem var(--page-pad);
    }

    .section-heading {
        gap: 0.35rem;
        margin-bottom: 1.1rem;
    }

    .section-heading h2,
    .about-section h2,
    .visit-section h2 {
        font-size: clamp(1.65rem, 9vw, 2.35rem);
    }

    .category-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-inline: calc(var(--page-pad) * -1);
        padding: 0 var(--page-pad) 0.35rem;
    }

    .product-body p {
        min-height: 0;
    }

    .about-list li {
        align-items: flex-start;
    }

    .visit-details {
        width: 100%;
    }

    .section-strip,
    .stats-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .wide-field {
        grid-column: auto;
    }

    .category-add-form,
    .category-row-admin,
    .size-row {
        grid-template-columns: 1fr;
    }

    .admin-shell {
        width: min(100% - 2rem, 1180px);
        padding-top: 1.25rem;
    }

    .admin-table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .admin-table,
    .admin-table thead,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table tr {
        margin-bottom: 0.85rem;
        border: 1px solid rgba(134, 26, 69, 0.12);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.84);
        box-shadow: 0 10px 24px rgba(59, 10, 34, 0.08);
        overflow: hidden;
    }

    .admin-table td {
        display: grid;
        grid-template-columns: 6.5rem minmax(0, 1fr);
        gap: 0.75rem;
        align-items: center;
        padding: 0.75rem 0.9rem;
        border-bottom: 1px solid var(--line);
    }

    .admin-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.85rem;
        font-weight: 800;
    }

    .admin-table td:last-child {
        border-bottom: 0;
    }

    .table-actions {
        justify-content: flex-start;
    }

    .table-actions .button,
    .table-actions form,
    .table-actions form button {
        width: 100%;
    }
}

@media (max-width: 560px) {
    body {
        line-height: 1.9;
    }

    .site-header {
        flex-direction: column;
        gap: 0.55rem;
    }

    .main-nav {
        max-width: 100%;
        padding-top: 0.05rem;
    }

    .hero {
        gap: 1rem;
        padding-top: 1.05rem;
        padding-bottom: 1.65rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .main-nav a,
    .category-row a {
        padding: 0.48rem 0.72rem;
        font-size: 0.92rem;
    }

    .hero-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .hero-actions .button {
        width: 100%;
        min-height: 2.8rem;
        font-size: 0.9rem;
    }

    .hero-visual {
        grid-template-columns: minmax(7rem, 0.85fr) minmax(0, 1fr);
        min-height: auto;
        justify-items: stretch;
        gap: 0.75rem;
        padding-top: 0.35rem;
    }

    .hero-visual img {
        width: min(36vw, 9.5rem);
        justify-self: center;
    }

    .hero-visual::before {
        width: 10.5rem;
        height: 10.5rem;
    }

    .hero-visual::after {
        display: none;
    }

    .hero-product {
        position: static;
        width: 100%;
        align-self: center;
        margin-top: 0;
        box-shadow: 0 10px 24px rgba(59, 10, 34, 0.10);
    }

    .upload-row {
        grid-template-columns: 1fr;
    }

    .upload-row img {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

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

    .site-footer {
        flex-direction: column;
    }
}

@media (max-width: 380px) {
    .hero h1 {
        font-size: 2.45rem;
    }

    .hero-actions {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        grid-template-columns: 1fr;
    }

    .hero-visual img {
        width: min(58vw, 11rem);
    }

    .brand small {
        display: none;
    }

    .product-body {
        padding: 0.9rem;
    }
}
