*,
*::before,
*::after {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--mall-scrollbar-thumb) var(--mall-scrollbar-track);
}

html[data-theme="dark"] {
    --mall-bg: #050505;
    --mall-bg-soft: #0f0f0f;
    --mall-card: rgba(23, 23, 23, 0.92);
    --mall-card-hover: rgba(31, 31, 31, 0.96);
    --mall-card-media: #101010;
    --mall-text: #ffffff;
    --mall-text-secondary: #b3b3b3;
    --mall-text-muted: #737373;
    --mall-border: #2a2a2a;
    --mall-nav-bg: rgba(255, 255, 255, 0.96);
    --mall-nav-text: #1f2937;
    --mall-nav-text-muted: #6b7280;
    --mall-nav-item-hover: rgba(0, 0, 0, 0.04);
    --mall-nav-item-active-bg: #f3f4f6;
    --mall-nav-underline: #111827;
    --mall-page-overlay: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.52) 0%,
        rgba(0, 0, 0, 0.66) 38%,
        rgba(0, 0, 0, 0.84) 100%
    );
    --mall-tag-bg: #262626;
    --mall-tag-text: #d4d4d4;
    --mall-footer-bg: rgba(5, 5, 5, 0.72);
    --mall-highlight-bg: rgba(0, 0, 0, 0.28);
    --mall-empty-bg: rgba(23, 23, 23, 0.92);
    --mall-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    --mall-toggle-bg: rgba(255, 255, 255, 0.08);
    --mall-toggle-border: rgba(255, 255, 255, 0.12);
}

html[data-theme="light"] {
    --mall-bg: #f3f4f6;
    --mall-bg-soft: #ffffff;
    --mall-card: rgba(255, 255, 255, 0.94);
    --mall-card-hover: rgba(255, 255, 255, 0.98);
    --mall-card-media: #f8fafc;
    --mall-text: #111827;
    --mall-text-secondary: #4b5563;
    --mall-text-muted: #6b7280;
    --mall-border: #e5e7eb;
    --mall-nav-bg: rgba(255, 255, 255, 0.98);
    --mall-nav-text: #1f2937;
    --mall-nav-text-muted: #6b7280;
    --mall-nav-item-hover: rgba(0, 0, 0, 0.04);
    --mall-nav-item-active-bg: #f3f4f6;
    --mall-nav-underline: #111827;
    --mall-page-overlay: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.62) 0%,
        rgba(255, 255, 255, 0.74) 40%,
        rgba(243, 244, 246, 0.84) 100%
    );
    --mall-tag-bg: #f3f4f6;
    --mall-tag-text: #374151;
    --mall-footer-bg: rgba(255, 255, 255, 0.82);
    --mall-highlight-bg: rgba(255, 255, 255, 0.72);
    --mall-empty-bg: rgba(255, 255, 255, 0.94);
    --mall-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    --mall-toggle-bg: #ffffff;
    --mall-toggle-border: #e5e7eb;
    --mall-scrollbar-thumb: rgba(15, 23, 42, 0.18);
}

:root {
    --mall-accent: #ef4444;
    --mall-accent-soft: rgba(239, 68, 68, 0.12);
    --mall-radius: 14px;
    --mall-radius-lg: 18px;
    --mall-max-width: 1180px;
    --mall-scrollbar-thumb: rgba(255, 255, 255, 0.22);
    --mall-scrollbar-track: transparent;
}

*::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

*::-webkit-scrollbar-track,
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: var(--mall-scrollbar-track);
}

*::-webkit-scrollbar-thumb,
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: var(--mall-scrollbar-thumb);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover,
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--mall-scrollbar-thumb) 70%, var(--mall-text) 30%);
}

html,
body {
    scrollbar-width: thin;
    scrollbar-color: var(--mall-scrollbar-thumb) var(--mall-scrollbar-track);
}

body {
    margin: 0;
    color: var(--mall-text);
    background: #050505;
    transition: color 0.25s ease;
}

html[data-theme="light"] body {
    background: #f3f4f6;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
}

.mall-page {
    position: relative;
    min-height: 100vh;
}

.mall-page__backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #050505;
}

.mall-page__backdrop-image {
    position: absolute;
    left: 50%;
    top: 50%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    opacity: 0.52;
    transform: translate(-50%, -50%) rotate(-8deg) scale(1.12);
    transform-origin: center center;
}

html[data-theme="light"] .mall-page__backdrop-image {
    opacity: 0.58;
}

.mall-page__overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: var(--mall-page-overlay);
    pointer-events: none;
}

.mall-page__content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
}

.mall-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: var(--mall-nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--mall-nav-text);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.mall-nav__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
    min-height: 56px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

.mall-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: start;
    color: var(--mall-accent);
}

.mall-brand__mark {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mall-brand__mark svg {
    width: 28px;
    height: 28px;
}

.mall-brand__title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.mall-nav__menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    justify-self: center;
}

.mall-nav__item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px 10px;
    border-radius: 10px;
    color: var(--mall-nav-text-muted);
    font-size: 14px;
    line-height: 1;
    transition: color 0.2s ease, background 0.2s ease;
}

.mall-nav__item:hover {
    color: var(--mall-nav-text);
    background: var(--mall-nav-item-hover);
}

.mall-nav__item.is-active {
    color: var(--mall-nav-text);
    background: var(--mall-nav-item-active-bg);
}

.mall-nav__item.is-active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 4px;
    height: 3px;
    border-radius: 999px;
    background: var(--mall-nav-underline);
}

.mall-nav__item-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mall-nav__item-icon svg {
    width: 18px;
    height: 18px;
}

.mall-nav__item-label {
    white-space: nowrap;
}

.mall-nav__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

.mall-theme-toggle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: var(--mall-nav-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.mall-nav__theme:hover {
    transform: scale(1.04);
    border-color: var(--mall-accent);
}

.mall-theme-toggle__icon {
    width: 16px;
    height: 16px;
    display: none;
}

html[data-theme="dark"] .mall-theme-toggle__icon--moon,
html[data-theme="light"] .mall-theme-toggle__icon--sun {
    display: block;
}

.mall-nav__profile,
.mall-nav__profile-menu-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.mall-nav__profile-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px 4px 4px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--mall-nav-text);
    cursor: pointer;
    transition: background 0.2s ease;
}

.mall-nav__profile-trigger:hover,
.mall-nav__profile-menu-wrap.is-open .mall-nav__profile-trigger {
    background: var(--mall-nav-item-hover);
}

.mall-nav__profile-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    color: var(--mall-nav-text-muted);
}

.mall-nav__profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #9ca3af;
    color: #fff;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.mall-nav__profile-avatar.is-logged-in {
    flex-direction: row;
    font-size: 14px;
    font-weight: 700;
    background: #ef4444;
    overflow: hidden;
}

.mall-nav__profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mall-nav__profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 132px;
    padding: 6px 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    z-index: 120;
}

.mall-nav__profile-dropdown::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 18px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(15, 23, 42, 0.04);
}

html[data-theme="dark"] .mall-nav__profile-dropdown {
    background: #262626;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
}

html[data-theme="dark"] .mall-nav__profile-dropdown::before {
    background: #262626;
    box-shadow: none;
}

html[data-theme="dark"] .mall-nav__profile-dropdown-item {
    color: #f5f5f5;
}

html[data-theme="dark"] .mall-nav__profile-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .mall-nav__profile-dropdown-item + .mall-nav__profile-dropdown-item {
    border-top-color: rgba(255, 255, 255, 0.12);
}

.mall-nav__profile-dropdown-item {
    position: relative;
    z-index: 1;
    display: block;
    padding: 10px 18px;
    font-size: 14px;
    line-height: 1.2;
    color: var(--mall-nav-text);
    white-space: nowrap;
    transition: background 0.15s ease;
}

.mall-nav__profile-dropdown-item:hover {
    background: rgba(148, 163, 184, 0.14);
}

.mall-nav__profile-dropdown-item + .mall-nav__profile-dropdown-item {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.mall-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 24px 20px;
}

.mall-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 760px;
}

.mall-hero__title {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.02em;
}

.mall-hero__domain {
    margin: 14px 0 0;
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.mall-hero__subtitle {
    margin: 12px 0 0;
    color: var(--mall-text-secondary);
    font-size: 15px;
}

.mall-main {
    position: relative;
    max-width: var(--mall-max-width);
    margin: 0 auto;
    padding: 0 24px 48px;
}

.mall-desktop__categories {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 40px;
    max-width: var(--mall-max-width);
    margin: 0 auto;
    padding: 0 24px 10px 24px;
    /* border-bottom: 1px solid var(--mall-border); */
}

.mall-desktop__category {
    position: relative;
    border: none;
    background: transparent;
    padding: 14px 4px;
    color: var(--mall-text-secondary);
    font-size: 15px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.mall-desktop__category:hover {
    color: var(--mall-text);
}

.mall-desktop__category.is-active {
    color: #2563eb;
    font-weight: 600;
}

.mall-desktop__category.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: #2563eb;
}

.mall-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.mall-card {
    background: var(--mall-card);
    border-radius: var(--mall-radius-lg);
    overflow: hidden;
    box-shadow: var(--mall-shadow);
    backdrop-filter: blur(10px);
    transition: transform 0.22s ease, background-color 0.22s ease;
}

.mall-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.22);
    background: var(--mall-card-hover);
}

html[data-theme="light"] .mall-card:hover {
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.mall-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--mall-card-media);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mall-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mall-card__media-fallback {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.85), rgba(220, 38, 38, 0.85));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
}

.mall-card__body {
    padding: 10px 20px 10px;
}

.mall-card__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.mall-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.mall-card__tag {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--mall-tag-bg);
    color: var(--mall-tag-text);
    font-size: 12px;
}

.mall-card__desc {
    margin: 14px 0 0;
    min-height: 44px;
    color: var(--mall-text-muted);
    font-size: 13px;
    line-height: 1.65;
}

.mall-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}

.mall-card__price {
    color: var(--mall-accent);
    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
}

.mall-card__price-unit {
    font-size: 13px;
    font-weight: 500;
    margin-left: 2px;
}

.mall-card__price-suffix {
    font-size: 12px;
    font-weight: 500;
    margin-left: 2px;
    color: var(--mall-text-muted);
}

.mall-card__price.is-muted {
    font-size: 14px;
    color: var(--mall-text-muted);
}

.mall-card__title a {
    color: inherit;
}

.mall-card__title a:hover {
    color: var(--mall-accent);
}

.mall-card__buy {
    height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--mall-accent);
    background: transparent;
    color: var(--mall-accent);
    font-size: 13px;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mall-card__buy:hover {
    background: var(--mall-accent);
    color: #fff;
}

.mall-empty {
    padding: 72px 24px;
    text-align: center;
    border: 1px dashed var(--mall-border);
    border-radius: var(--mall-radius-lg);
    background: var(--mall-empty-bg);
}

.mall-empty h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.mall-empty p {
    margin: 0;
    color: var(--mall-text-muted);
    font-size: 14px;
}

.mall-highlights {
    max-width: var(--mall-max-width);
    margin: 48px auto 0;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.mall-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding: 18px 12px;
    border-radius: var(--mall-radius);
    background: var(--mall-highlight-bg);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .mall-highlight {
    border-color: var(--mall-border);
}

.mall-highlight__icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--mall-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mall-text-secondary);
    font-size: 18px;
}

.mall-highlight__title {
    font-size: 15px;
    font-weight: 600;
}

.mall-highlight__desc {
    color: var(--mall-text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.mall-footer {
    margin-top: 56px;
    background: var(--mall-footer-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

html[data-theme="light"] .mall-footer {
    border-top-color: var(--mall-border);
}

.mall-footer__grid {
    max-width: var(--mall-max-width);
    margin: 0 auto;
    padding: 42px 24px 28px;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
}

.mall-footer__title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 700;
}

.mall-footer__text,
.mall-footer__link {
    display: block;
    margin: 0 0 8px;
    color: var(--mall-text-muted);
    font-size: 13px;
    line-height: 1.7;
}

.mall-footer__link:hover {
    color: var(--mall-accent);
}

.mall-footer__bottom {
    max-width: var(--mall-max-width);
    margin: 0 auto;
    padding: 0 24px 28px;
    color: var(--mall-text-muted);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 1080px) {
    .mall-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mall-highlights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mall-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .mall-nav__inner {
        grid-template-columns: auto 1fr auto;
        padding: 0 16px;
    }

    .mall-nav__menu {
        gap: 2px;
    }

    .mall-nav__item {
        padding: 8px 10px 10px;
    }

    .mall-nav__item-label {
        display: none;
    }

    .mall-nav__item.is-active::after {
        left: 8px;
        right: 8px;
    }
}

@media (max-width: 720px) {
    .mall-nav__menu {
        display: none;
    }

    .mall-hero {
        padding-top: 72px;
    }

    .mall-grid,
    .mall-highlights,
    .mall-footer__grid {
        grid-template-columns: 1fr;
    }

    .mall-main {
        margin-top: -20px;
    }
}
