:root {
    --purple: #5a168e;
    --purple-dark: #351056;
    --purple-bright: #7b2bbd;
    --purple-strip: #d7b7ee;
    --purple-page: #fbf6ff;
    --purple-soft: #efe7f7;
    --lilac: #9b63d1;
    --ink: #20122c;
    --muted: #766983;
    --line: #e7dced;
    --bg: #fffafd;
    --white: #ffffff;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--white);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

.site-header {
    width: 100%;
    background: var(--purple-page);
    border-bottom: 1px solid var(--line);
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 40;
}

.top-strip {
    min-height: 29px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 clamp(18px, 3vw, 38px);
    background: var(--purple-strip);
    color: var(--purple);
    font-size: 13px;
    overflow: hidden;
    transition: min-height 180ms ease, opacity 180ms ease, padding 180ms ease;
}

.top-strip p {
    margin: 0;
}

.header-compact .top-strip {
    min-height: 0;
    height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.header-main {
    width: 100%;
    min-height: 68px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding: 6px clamp(18px, 4vw, 58px);
    position: relative;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    width: min(92px, 28vw);
}

.brand img,
.admin-brand img {
    width: 100%;
    height: auto;
    display: block;
}

.moon-mark {
    width: clamp(34px, 4vw, 46px);
    height: clamp(34px, 4vw, 46px);
    object-fit: contain;
    opacity: 0.96;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(20px, 4vw, 48px);
    flex-wrap: wrap;
}

.header-action {
    appearance: none;
    border: 0;
    background: transparent;
    min-width: 76px;
    min-height: 48px;
    padding: 0;
    color: var(--purple);
    cursor: pointer;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 5px;
    font-size: 13px;
    line-height: 1.1;
    position: relative;
}

.header-action svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-action img {
    width: 23px;
    height: 23px;
    object-fit: contain;
    filter: invert(18%) sepia(70%) saturate(2263%) hue-rotate(260deg) brightness(85%) contrast(93%);
}

.text-link,
.icon-button,
.primary-button,
.ghost-button,
.danger-button {
    min-height: 42px;
    border-radius: 8px;
    border: 1px solid var(--purple);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    font-weight: 700;
}

.text-link,
.icon-button,
.ghost-button {
    background: var(--white);
    color: var(--purple);
}

.primary-button {
    background: var(--purple);
    color: var(--white);
}

.primary-button:disabled {
    border-color: var(--line);
    background: #c9becf;
    cursor: not-allowed;
}

.danger-button {
    background: var(--danger);
    border-color: var(--danger);
    color: var(--white);
}

.cart-count {
    position: absolute;
    top: 2px;
    right: 14px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--purple);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.instagram-link {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--purple);
    border-radius: 8px;
    background: var(--white);
}

.instagram-link img {
    width: 22px;
    height: 22px;
    filter: invert(18%) sepia(70%) saturate(2263%) hue-rotate(260deg) brightness(85%) contrast(93%);
}

.category-nav {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(26px, 5vw, 62px);
    padding: 0 18px;
    color: var(--purple);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1.4px;
}

.nav-menu {
    position: relative;
    padding: 16px 0;
    margin: -16px 0;
}

.nav-menu button {
    border: 0;
    background: transparent;
    color: inherit;
    font-weight: 500;
    letter-spacing: inherit;
    cursor: pointer;
}

.nav-menu button::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    display: inline-block;
    margin-left: 8px;
    transform: translateY(-2px) rotate(45deg);
}

.nav-menu-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: var(--purple-page);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(90, 22, 142, 0.13);
    padding: 8px;
    display: none;
    z-index: 10;
}

.nav-menu:hover .nav-menu-panel,
.nav-menu:focus-within .nav-menu-panel {
    display: grid;
}

.nav-menu-panel a {
    padding: 11px 12px;
    border-radius: 6px;
}

.nav-menu-panel a:hover {
    background: var(--purple-soft);
}

main {
    width: min(80vw, 1500px);
    margin: 0 auto;
}

.video-showcase {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    background: var(--purple-page);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.video-carousel {
    width: 100%;
    height: clamp(340px, 50vw, 680px);
    position: relative;
    overflow: hidden;
    background: var(--purple-soft);
}

.video-carousel video,
.video-carousel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 650ms ease;
    background: var(--purple-soft);
}

.video-carousel video.is-active,
.video-carousel img.is-active {
    opacity: 1;
    z-index: 1;
}

.video-nav {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 1px solid var(--purple);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--purple);
    cursor: pointer;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    line-height: 1;
    z-index: 2;
}

.video-prev {
    left: 24px;
}

.video-next {
    right: 24px;
}

.video-dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.video-dots span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(90, 22, 142, 0.35);
}

.video-dots span.is-active {
    background: var(--purple);
}

.catalog-heading {
    padding: 34px 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.catalog-heading p {
    margin: 0 0 8px;
    color: var(--purple);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.catalog-heading h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    color: var(--purple);
    text-align: left;
}

.catalog-search {
    width: min(430px, 100%);
}

.catalog-search label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.search-box {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--purple);
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr 46px;
    align-items: center;
    background: var(--white);
    overflow: hidden;
}

.search-box input {
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0 16px;
    color: var(--purple);
    background: transparent;
    outline: 0;
}

.search-box input::placeholder {
    color: var(--purple);
    opacity: 0.85;
}

.search-box button {
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--purple);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-box svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-search input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 14px;
    color: var(--ink);
    background: var(--white);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: 30px;
    row-gap: 30px;
    padding-bottom: 70px;
}

.product-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
    text-align: center;
    border-bottom: 1px solid #dcc8e8;
    padding-bottom: 18px;
}

.product-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f3e8fb;
    overflow: hidden;
}

.product-carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.product-carousel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 300ms ease;
}

.product-carousel img.is-active {
    opacity: 1;
}

.carousel-button {
    position: absolute;
    top: 50%;
    width: 32px;
    height: 32px;
    border: 1px solid var(--purple);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--purple);
    cursor: pointer;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    z-index: 2;
}

.carousel-prev {
    left: 8px;
}

.carousel-next {
    right: 8px;
}

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--purple);
    color: var(--white);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 800;
}

.product-info {
    padding: 16px 6px 0;
    display: grid;
    grid-template-rows: 44px 28px 58px 70px 70px 38px;
    gap: 8px;
    justify-items: center;
    align-items: start;
    min-height: 348px;
}

.product-code,
.price {
    margin: 0;
    color: var(--purple);
    font-weight: 800;
}

.product-info h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 800;
    color: var(--purple-dark);
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 13px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.product-info .price {
    font-size: 20px;
    line-height: 1;
    color: var(--purple);
}

.chips,
.choice-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.option-line {
    display: grid;
    gap: 6px;
    justify-items: center;
    align-content: start;
    min-height: 70px;
    width: 100%;
}

.option-line.is-empty {
    visibility: hidden;
}

.option-line strong {
    color: var(--purple-dark);
    font-size: 12px;
}

.chips span,
.choice-pills button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--purple);
    background: var(--white);
    font-size: 12px;
}

.choice-pills button {
    cursor: pointer;
    min-height: 30px;
}

.choice-pills button.is-selected {
    background: var(--purple);
    border-color: var(--purple);
    color: var(--white);
}

.product-card .primary-button {
    height: 38px;
    min-height: 38px;
    width: 100%;
    margin-top: 4px;
    font-size: 13px;
    align-self: end;
    padding: 0 12px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
}

.cart-drawer {
    position: fixed;
    inset: 0;
    background: rgba(32, 18, 44, 0.42);
    display: none;
    justify-content: flex-end;
    z-index: 80;
}

.cart-drawer.is-open {
    display: flex;
}

.floating-cart {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 54px;
    height: 54px;
    border: 1px solid var(--purple);
    border-radius: 999px;
    background: var(--purple);
    color: var(--white);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 50;
    box-shadow: 0 14px 35px rgba(49, 17, 81, 0.22);
}

.floating-cart svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.floating-cart .cart-count {
    top: -4px;
    right: -4px;
    background: var(--white);
    color: var(--purple);
    border: 1px solid var(--purple);
}

.show-floating-cart .floating-cart {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.cart-panel {
    width: min(420px, 100%);
    min-height: 100%;
    background: var(--white);
    padding: 22px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 18px;
}

.cart-head,
.cart-total,
.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.cart-head h2 {
    margin: 0;
}

.cart-items {
    display: grid;
    align-content: start;
    gap: 12px;
    overflow: auto;
}

.cart-item {
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.cart-item strong,
.cart-item span {
    display: block;
}

.cart-item span {
    color: var(--muted);
    font-size: 14px;
    margin-top: 3px;
}

.cart-footer {
    border-top: 1px solid var(--line);
    padding-top: 18px;
    display: grid;
    gap: 14px;
}

.admin-body {
    background: #fbf7ff;
}

.admin-header {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-logout {
    margin-left: auto;
}

.admin-brand {
    width: 130px;
    flex: 0 0 auto;
}

.admin-header h1,
.admin-header p {
    margin: 0;
}

.admin-header p {
    color: var(--muted);
    margin-top: 6px;
}

.admin-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding-bottom: 60px;
}

.admin-section,
.admin-message,
.admin-product {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
}

.admin-message,
.wide {
    grid-column: 1 / -1;
}

.admin-section h2 {
    margin: 0 0 16px;
}

.admin-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.admin-section-head h2 {
    margin: 0;
}

.admin-search {
    width: min(360px, 100%);
    display: grid;
    gap: 7px;
    color: var(--purple-dark);
    font-weight: 700;
}

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

.admin-form label {
    display: grid;
    gap: 7px;
    color: var(--purple-dark);
    font-weight: 700;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.inline-form input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: var(--white);
    color: var(--ink);
}

.admin-form .full,
.admin-choice-group,
.current-images,
.flag-group,
.admin-form button {
    grid-column: 1 / -1;
}

.admin-choice-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, max-content));
    gap: 10px 16px;
    color: var(--purple-dark);
}

.admin-choice-group strong {
    width: 100%;
}

.admin-choice-group label {
    display: flex;
    align-items: center;
    gap: 7px;
}

.current-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--purple-dark);
}

.current-images strong {
    width: 100%;
}

.current-images span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--purple-soft);
    font-size: 12px;
}

.banner-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.banner-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}

.admin-banner-section {
    align-self: start;
}

.banner-preview {
    aspect-ratio: 16 / 9;
    background: var(--purple-soft);
    border-radius: 8px;
    overflow: hidden;
}

.banner-preview img,
.banner-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-row label {
    display: grid;
    gap: 6px;
    color: var(--purple-dark);
    font-weight: 700;
}

.banner-row > span {
    text-transform: capitalize;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.banner-row input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
}

.flag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.flag-group label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-form {
    display: flex;
    gap: 10px;
}

.admin-list,
.admin-products {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.admin-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 16px;
}

.admin-row,
.admin-product summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-product summary {
    cursor: pointer;
    font-weight: 800;
}

.admin-product small,
.admin-product-card small {
    color: var(--muted);
}

.admin-product .product-form {
    margin-top: 18px;
}

.admin-product-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.admin-product-summary {
    display: grid;
    gap: 12px;
}

.admin-product-thumb {
    aspect-ratio: 1 / 1;
    background: var(--purple-soft);
    border-radius: 8px;
    overflow: hidden;
}

.admin-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-product-preview {
    display: grid;
    gap: 6px;
    text-align: center;
}

.admin-product-preview strong {
    color: var(--purple-dark);
}

.admin-product-card .product-form {
    margin-top: 18px;
}

.admin-modal {
    position: fixed;
    inset: 0;
    background: rgba(32, 18, 44, 0.48);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 60;
}

.admin-modal.is-open {
    display: flex;
}

.admin-modal-panel {
    width: min(940px, 100%);
    max-height: min(86vh, 900px);
    overflow: auto;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--line);
    padding: 22px;
    box-shadow: 0 28px 70px rgba(32, 18, 44, 0.25);
}

.admin-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-modal-head h3 {
    margin: 0;
    color: var(--purple-dark);
    font-size: 24px;
}

.login-page {
    min-height: 100vh;
    width: min(420px, calc(100% - 32px));
    display: grid;
    place-items: center;
}

.login-card {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
    display: grid;
    gap: 16px;
    box-shadow: 0 24px 70px rgba(49, 17, 81, 0.12);
}

.login-card img {
    width: 150px;
    justify-self: center;
}

.login-card h1 {
    margin: 0;
    text-align: center;
    color: var(--purple-dark);
}

.login-card label {
    display: grid;
    gap: 7px;
    color: var(--purple-dark);
    font-weight: 700;
}

.login-card input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
}

@media (max-width: 1180px) {
    main {
        width: min(calc(100% - 32px), 980px);
    }

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

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

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

@media (max-width: 760px) {
    .header-main {
        grid-template-columns: auto auto 1fr;
        gap: 10px;
        justify-items: initial;
        text-align: left;
        padding-inline: 12px;
    }

    .header-actions {
        justify-content: flex-end;
        gap: 10px;
    }

    .brand {
        width: 72px;
    }

    .moon-mark {
        width: 30px;
        height: 30px;
    }

    .header-action {
        min-width: auto;
        min-height: 42px;
        font-size: 11px;
    }

    .header-action svg,
    .header-action img {
        width: 20px;
        height: 20px;
    }

    .category-nav {
        flex-wrap: wrap;
    }

    .catalog-heading,
    .admin-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .catalog-search {
        width: 100%;
    }

    .floating-cart {
        right: 14px;
        bottom: 14px;
        width: 46px;
        height: 46px;
    }

    .floating-cart svg {
        width: 21px;
        height: 21px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 16px;
        row-gap: 24px;
    }

    .admin-layout,
    .admin-form,
    .product-form {
        grid-template-columns: 1fr;
    }

    .inline-form,
    .admin-row,
    .banner-row {
        align-items: stretch;
        flex-direction: column;
    }

    .banner-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}
