:root {
    --color-navigation: #25214D;
    --color-background: #EFEFEF;
    --color-text: #16161C;
    --color-primary: #6D4C9A;
    --color-muted: rgba(22, 22, 28, 0.68);
    --color-muted-soft: rgba(22, 22, 28, 0.52);
    --color-muted-medium: rgba(22, 22, 28, 0.58);
    --color-panel: #EFEFEF;
    --color-border: rgba(22, 22, 28, 0.08);
    --color-primary-soft: rgba(109, 76, 154, 0.12);
    --color-purple-light: rgba(109, 76, 154, 0.32);
    --color-shadow: rgba(22, 22, 28, 0.12);
    color-scheme: light;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

[hidden] {
    display: none !important;
}

html {
    background-color: var(--color-background);
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    color: var(--color-text);
    font-family: Inter, Arial, sans-serif;
    line-height: 1.5;
}

main {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    padding: 28px 20px;
}

.navbar {
    width: min(1100px, 90%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 8px 20px;
    box-shadow: 0 12px 30px var(--color-shadow);
    background-color: var(--color-navigation);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mobile-menu-toggle {
    display: none;
}

#navbar-left,
#navbar-right {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 12px;
}

#navbar-left {
    margin-left: 0;
    margin-right: auto;
}

#navbar-right {
    margin-left: 0;
}

#navbar-left li,
#navbar-right li {
    display: flex;
    align-items: center;
}

#navbar-left a,
#navbar-right a {
    color: #EFEFEF;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 999px;
    transition: all 0.25s ease;
}

#navbar-left a:hover,
#navbar-right li:not(.cart) > a:hover {
    background: var(--color-primary);
    color: #EFEFEF;
    box-shadow: 0 8px 20px rgba(22, 22, 28, 0.18);
}

.account-login.is-authenticated {
    position: relative;
}

.account-menu {
    position: relative;
}

.account-menu::after {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 49;
    display: none;
    width: min(320px, 75vw);
    height: 14px;
    content: "";
}

.account-menu:hover::after,
.account-menu:focus-within::after,
.account-menu.is-open::after {
    display: block;
}

.account-welcome-button {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    color: #EFEFEF;
    background: transparent;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.account-welcome-button:hover,
.account-welcome-button:focus-visible,
.account-menu.is-open .account-welcome-button {
    outline: none;
    background: var(--color-primary);
}

.account-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    z-index: 110;
    display: none;
    width: min(320px, 75vw);
    gap: 4px;
    padding: 16px;
    border: 1px solid rgba(239, 239, 239, 0.12);
    border-radius: 20px;
    background: rgba(109, 76, 154, 0.92);
    box-shadow: 0 24px 60px rgba(8, 8, 12, 0.3);
}

.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown,
.account-menu.is-open .account-dropdown {
    display: grid;
}

#navbar-right .account-dropdown a,
.account-dropdown button {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    color: #EFEFEF;
    background: transparent;
    font: inherit;
    font-size: 0.82rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

#navbar-right .account-dropdown a:hover,
#navbar-right .account-dropdown a:focus-visible,
.account-dropdown button:hover,
.account-dropdown button:focus-visible {
    outline: none;
    background: var(--color-primary);
}

.account-logout-button {
    border-top: 1px solid rgba(239, 239, 239, 0.15) !important;
    border-radius: 0 0 10px 10px !important;
    margin-top: 4px;
}

.account-dropdown button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.cart {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #EFEFEF;
    background-color: var(--color-primary);
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-button:hover,
.cart-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(22, 22, 28, 0.18);
}

.cart-button.is-added {
    animation: cart-added 0.45s ease-out;
}

.cart-button img {
    display: block;
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.cart-button.is-added img {
    animation: cart-icon-added 0.45s ease-out;
}

.cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(239, 239, 239, 0.18);
    color: #EFEFEF;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.cart-button.is-added .cart-badge {
    animation: cart-badge-added 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes cart-added {
    35% { transform: scale(1.12); }
    70% { transform: scale(0.96); }
}

@keyframes cart-icon-added {
    35% { transform: translateY(-3px) rotate(-8deg); }
    70% { transform: translateY(1px) rotate(4deg); }
}

@keyframes cart-badge-added {
    35% { transform: scale(1.4); }
    70% { transform: scale(0.9); }
}

.cart-panel {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: min(320px, 75vw);
    background: rgba(109, 76, 154, 0.92);
    border: 1px solid rgba(239, 239, 239, 0.12);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(8, 8, 12, 0.3);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 50;
}

.cart-menu.is-open .cart-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cart-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(239, 239, 239, 0.12);
    color: #EFEFEF;
}

.cart-panel-header strong {
    font-size: 0.96rem;
}

.cart-count {
    font-size: 0.72rem;
    color: rgba(239, 239, 239, 0.7);
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #EFEFEF;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-quantity-button,
.cart-remove-button,
.cart-clear-button {
    border: 0;
    color: #EFEFEF;
    background: rgba(239, 239, 239, 0.12);
    font: inherit;
    cursor: pointer;
}

.cart-quantity-button {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    font-size: 16px;
}

.cart-remove-button {
    padding: 5px 7px;
    border-radius: 999px;
    font-size: 0.68rem;
}

.cart-clear-button {
    width: 100%;
    margin-top: 12px;
    padding: 8px;
    border-radius: 999px;
    font-size: 0.75rem;
}

.cart-quantity-button:hover,
.cart-remove-button:hover,
.cart-clear-button:hover {
    background: rgba(239, 239, 239, 0.22);
}

.cart-item-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #EFEFEF;
}

.cart-item-price {
    font-size: 0.72rem;
    color: rgba(239, 239, 239, 0.7);
}

.cart-item-qty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(109, 76, 154, 0.2);
    color: #EFEFEF;
    font-size: 0.72rem;
    font-weight: 700;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px 0 4px;
    color: rgba(239, 239, 239, 0.8);
}

.cart-empty strong {
    font-size: 0.95rem;
}

.cart-empty small {
    font-size: 0.75rem;
    color: rgba(239, 239, 239, 0.68);
}

.cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(239, 239, 239, 0.12);
    color: #EFEFEF;
    font-weight: 600;
}

.cart-panel-link {
    display: block;
    margin-top: 12px;
    padding: 9px 12px;
    border-radius: 999px;
    color: #EFEFEF;
    background: rgba(239, 239, 239, 0.14);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.cart-panel-link:hover {
    background: rgba(239, 239, 239, 0.24);
}

.cart-page,
.checkout-page {
    flex: 1;
    padding-top: 28px;
    padding-bottom: 72px;
}

#account-orders {
    display: grid;
    gap: 14px;
}

.cart-back-link {
    display: inline-flex;
    margin-bottom: 24px;
}

.cart-page-layout,
.checkout-page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    align-items: start;
    gap: 28px;
}

.cart-page-list,
.cart-page-summary,
.checkout-form-panel,
.checkout-order-panel {
    border: 1px solid var(--color-border);
    border-radius: 22px;
    background: var(--color-panel);
    box-shadow: 0 14px 36px var(--color-shadow);
}

.cart-page-summary,
.checkout-order-panel {
    padding: 22px;
}

.cart-page-summary h2,
.checkout-order-panel h2,
.checkout-form-panel h2 {
    margin-bottom: 18px;
    font-size: 1.12rem;
}

.coupon-hint,
.coupon-status,
.cart-summary-note,
.checkout-demo-label,
.checkout-privacy-note,
.checkout-shipping-note {
    color: var(--color-muted);
    font-size: 0.75rem;
}

.checkout-field-hint {
    color: var(--color-muted);
    font-size: 0.75rem;
    font-weight: 400;
}

.cart-summary-line,
.checkout-summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    font-size: 0.88rem;
}

.cart-summary-total,
.checkout-summary-grand {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    font-size: 1rem;
}

.cart-checkout-button {
    display: flex;
    width: 100%;
    margin-top: 20px;
}

.cart-checkout-button[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.5;
}

.checkout-demo-label {
    margin-top: 10px;
    text-align: center;
}

.demo-notice {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 26px;
    padding: 14px 16px;
    border: 1px solid var(--color-purple-light);
    border-radius: 14px;
    background: var(--color-primary-soft);
    font-size: 0.84rem;
}

.demo-notice span {
    color: var(--color-muted);
    font-size: 0.78rem;
}

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

.checkout-privacy-note {
    margin-top: 18px;
}

.checkout-edit-link {
    display: inline-flex;
    margin-top: 20px;
    font-size: 0.82rem;
}

.checkout-confirmation {
    padding: 20px 0;
    text-align: center;
}

.checkout-confirmation-icon {
    display: inline-grid;
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--color-primary);
    font-size: 1.5rem;
}

.checkout-confirmation p {
    max-width: 480px;
    margin: 0 auto 20px;
    color: var(--color-muted);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    color: #EFEFEF;
    background: rgba(239, 239, 239, 0.1);
    font: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
    border-color: rgba(239, 239, 239, 0.3);
    background: rgba(239, 239, 239, 0.18);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--color-background);
    outline-offset: 3px;
}

.theme-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.theme-icon-sun {
    display: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page-width {
    width: min(1100px, calc(100% - 40px));
    margin-inline: auto;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    color: #EFEFEF;
    background: var(--color-primary);
}

.button-primary:hover {
    background: var(--color-navigation);
}

.text-link {
    color: var(--color-navigation);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.text-link:hover,
.site-footer a:hover {
    color: var(--color-primary);
}

.theme-transition,
.theme-transition * {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] {
    --color-background: #16161C;
    --color-text: #EFEFEF;
    --color-muted: rgba(239, 239, 239, 0.72);
    --color-muted-soft: rgba(239, 239, 239, 0.58);
    --color-muted-medium: rgba(239, 239, 239, 0.64);
    --color-panel: #25214D;
    --color-border: rgba(239, 239, 239, 0.1);
    --color-primary-soft: rgba(109, 76, 154, 0.24);
    --color-purple-light: rgba(109, 76, 154, 0.42);
    --color-shadow: rgba(0, 0, 0, 0.3);
    color-scheme: dark;
}

[data-theme="dark"] .text-link {
    color: #EFEFEF;
}

[data-theme="dark"] .text-link:hover {
    color: #B99BDD;
}

[data-theme="dark"] .site-footer {
    background: #0F0F14;
}

[data-theme="dark"] .theme-icon-moon {
    display: none;
}

[data-theme="dark"] .theme-icon-sun {
    display: block;
}

.theme-toggle-item {
    display: flex;
}

.site-footer {
    padding: 30px 0;
    color: #EFEFEF;
    background: var(--color-text);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand div {
    display: flex;
    flex-direction: column;
}

.footer-brand strong {
    font-size: 12px;
    letter-spacing: 0.12em;
}

.footer-brand span,
.copyright,
.footer-content > p {
    color: rgba(239, 239, 239, 0.68);
    font-size: 11px;
}

.footer-content > p {
    text-align: center;
}

.site-footer a {
    color: rgba(239, 239, 239, 0.82);
    font-weight: 600;
    text-decoration: none;
}

#navbar-right .account-signup[hidden] {
    display: none !important;
}
