@import url('scrollbars.css');

*,
*::before,
*::after {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Material Design 3 — Home page (جیبی تست) */
:root {
    --md-sys-color-primary: #006494;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #c8e6ff;
    --md-sys-color-on-primary-container: #001e30;
    --md-sys-color-secondary: #50606e;
    --md-sys-color-secondary-container: #d3e5f5;
    --md-sys-color-surface: #f8f9ff;
    --md-sys-color-surface-container: #ffffff;
    --md-sys-color-surface-container-high: #eef1f8;
    --md-sys-color-outline: #70787d;
    --md-sys-color-outline-variant: #c0c8cc;
    --md-sys-color-error: #ba1a1a;
    --md-sys-color-tertiary: #0d7a5f;
    --md-sys-color-tertiary-container: #b8f2df;
    --md-elevation-1: 0 1px 2px rgba(0, 30, 50, 0.12), 0 1px 3px rgba(0, 30, 50, 0.08);
    --md-elevation-2: 0 2px 6px rgba(0, 30, 50, 0.14), 0 4px 12px rgba(0, 30, 50, 0.08);
    --md-elevation-3: 0 8px 24px rgba(0, 30, 50, 0.16);
    --md-motion-easing: cubic-bezier(0.2, 0, 0, 1);
    --md-motion-duration-short: 200ms;
    --md-motion-duration-medium: 350ms;
    --home-top-bar-height: 64px;
    --home-bottom-nav-bar-height: 46px;
    --home-bottom-nav-edge-gap: 8px;
    --home-bottom-nav-footer-gap: -30px;
    --home-bottom-nav-safe: env(safe-area-inset-bottom, 0px);
    --home-bottom-nav-total: calc(var(--home-bottom-nav-bar-height) + var(--home-bottom-nav-edge-gap) + var(--home-bottom-nav-safe));
    --home-bottom-nav-height: var(--home-bottom-nav-total);
    --font-size-root: 14px;
    --font-size-xs: 0.714rem;
    --font-size-sm: 0.857rem;
    --font-size-md: 0.929rem;
    --font-size-lg: 1rem;
    --font-size-xl: 1.143rem;
    --font-size-2xl: 1.286rem;
    --font-size-3xl: 1.571rem;
    --icon-size-md: 20px;
    --icon-size-lg: 1.429rem;
    --home-footer-fg: var(--md-sys-color-on-primary-container);
    --home-footer-fg-muted: color-mix(in srgb, var(--md-sys-color-on-primary-container) 72%, transparent);
    --home-footer-fg-subtle: color-mix(in srgb, var(--md-sys-color-secondary) 100%, transparent);
    --home-footer-heading: var(--md-sys-color-on-primary-container);
    --home-footer-link: color-mix(in srgb, var(--md-sys-color-on-primary-container) 78%, transparent);
    --home-footer-link-hover: var(--md-sys-color-primary);
    --home-footer-border: color-mix(in srgb, var(--md-sys-color-outline-variant) 90%, transparent);
    --home-footer-card-bg: color-mix(in srgb, var(--md-sys-color-surface-container) 88%, transparent);
    --home-footer-card-bg-hover: var(--md-sys-color-surface-container);
    --home-footer-card-border: color-mix(in srgb, var(--md-sys-color-outline-variant) 70%, transparent);
    --home-footer-chip-bg: var(--md-sys-color-primary-container);
    --home-footer-chip-fg: var(--md-sys-color-primary);
    --home-footer-social-bg: var(--md-sys-color-surface-container);
    --home-footer-social-border: var(--md-sys-color-outline-variant);
    --home-footer-social-fg: var(--md-sys-color-primary);
    --home-footer-social-hover-bg: var(--md-sys-color-primary-container);
    --home-footer-social-hover-border: color-mix(in srgb, var(--md-sys-color-primary) 35%, var(--md-sys-color-outline-variant));
    --home-footer-trust-icon-bg: linear-gradient(135deg, var(--md-sys-color-primary), var(--md-sys-color-tertiary));
    --home-footer-trust-icon-fg: var(--md-sys-color-on-primary);
    --home-footer-trust-muted: var(--home-footer-fg-subtle);
    --home-footer-legal: color-mix(in srgb, var(--md-sys-color-primary) 80%, var(--md-sys-color-secondary));
    --home-footer-legal-hover: var(--md-sys-color-primary);
    --home-footer-dot: var(--md-sys-color-outline-variant);
    --home-footer-bg-gradient:
        radial-gradient(ellipse 80% 60% at 10% 0%, color-mix(in srgb, var(--md-sys-color-primary) 16%, transparent), transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 20%, color-mix(in srgb, var(--md-sys-color-tertiary) 12%, transparent), transparent 50%),
        linear-gradient(180deg, var(--md-sys-color-primary-container) 0%, var(--md-sys-color-surface-container-high) 50%, var(--md-sys-color-surface) 100%);
    --home-footer-glow: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--md-sys-color-primary) 10%, transparent), transparent 40%);
    --home-footer-img-shadow: 0 4px 14px color-mix(in srgb, var(--md-sys-color-primary) 22%, transparent);
    --home-bottom-nav-shadow:
        0 6px 20px color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent),
        0 1px 4px rgba(0, 30, 50, 0.08);
    --jb-scroll-size: 8px;
    --jb-scroll-radius: 999px;
    --jb-scroll-track: color-mix(in srgb, var(--md-sys-color-outline-variant) 35%, transparent);
    --jb-scroll-thumb: color-mix(in srgb, var(--md-sys-color-primary) 52%, var(--md-sys-color-outline-variant));
    --jb-scroll-thumb-hover: var(--md-sys-color-primary);
    --jb-scroll-thumb-active: color-mix(in srgb, var(--md-sys-color-primary) 78%, #001e30);
}

html[data-theme='dark'] {
    color-scheme: dark;
    --md-sys-color-primary: #90ccff;
    --md-sys-color-on-primary: #003350;
    --md-sys-color-primary-container: #004a73;
    --md-sys-color-on-primary-container: #c8e6ff;
    --md-sys-color-secondary: #b8c8d4;
    --md-sys-color-secondary-container: #394958;
    --md-sys-color-surface: #0f1419;
    --md-sys-color-surface-container: #1a2128;
    --md-sys-color-surface-container-high: #252e38;
    --md-sys-color-outline: #8a9298;
    --md-sys-color-outline-variant: #40484e;
    --md-sys-color-error: #ffb4ab;
    --md-sys-color-tertiary: #6dd9b8;
    --md-sys-color-tertiary-container: #005140;
    --md-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.25);
    --md-elevation-2: 0 2px 6px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.28);
    --md-elevation-3: 0 8px 24px rgba(0, 0, 0, 0.45);
    --home-footer-fg: #dce8f2;
    --home-footer-fg-muted: rgba(220, 232, 242, 0.72);
    --home-footer-fg-subtle: rgba(220, 232, 242, 0.55);
    --home-footer-heading: #ffffff;
    --home-footer-link: rgba(220, 232, 242, 0.78);
    --home-footer-link-hover: #ffffff;
    --home-footer-border: rgba(255, 255, 255, 0.08);
    --home-footer-card-bg: rgba(255, 255, 255, 0.04);
    --home-footer-card-bg-hover: rgba(255, 255, 255, 0.07);
    --home-footer-card-border: rgba(200, 230, 255, 0.08);
    --home-footer-chip-bg: rgba(200, 230, 255, 0.1);
    --home-footer-chip-fg: #7ec8ff;
    --home-footer-social-bg: rgba(255, 255, 255, 0.05);
    --home-footer-social-border: rgba(200, 230, 255, 0.18);
    --home-footer-social-fg: #c8e6ff;
    --home-footer-social-hover-bg: rgba(200, 230, 255, 0.14);
    --home-footer-social-hover-border: rgba(200, 230, 255, 0.35);
    --home-footer-trust-icon-bg: linear-gradient(135deg, rgba(0, 100, 148, 0.5), rgba(13, 122, 95, 0.4));
    --home-footer-trust-icon-fg: #ffffff;
    --home-footer-trust-muted: rgba(220, 232, 242, 0.62);
    --home-footer-legal: rgba(200, 230, 255, 0.75);
    --home-footer-legal-hover: #ffffff;
    --home-footer-dot: rgba(200, 230, 255, 0.35);
    --home-footer-bg-gradient:
        radial-gradient(ellipse 80% 60% at 10% 0%, rgba(0, 100, 148, 0.35), transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 20%, rgba(13, 122, 95, 0.22), transparent 50%),
        linear-gradient(180deg, #001524 0%, #002a42 45%, #001e30 100%);
    --home-footer-glow: radial-gradient(circle at 50% 0%, rgba(200, 230, 255, 0.08), transparent 40%);
    --home-footer-img-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    --home-bottom-nav-shadow:
        0 6px 24px rgba(0, 0, 0, 0.42),
        0 1px 4px rgba(0, 0, 0, 0.2);
    --jb-scroll-track: color-mix(in srgb, var(--md-sys-color-outline-variant) 45%, transparent);
    --jb-scroll-thumb: color-mix(in srgb, var(--md-sys-color-primary) 58%, var(--md-sys-color-outline-variant));
    --jb-scroll-thumb-hover: var(--md-sys-color-primary);
    --jb-scroll-thumb-active: color-mix(in srgb, var(--md-sys-color-primary) 72%, #001524);
}

html[data-theme='light'] {
    color-scheme: light;
}

@font-face {
    font-family: 'iranSans';
    src: url('../fonts/iranSans.ttf');
}

@font-face {
    font-family: 'Material Symbols Rounded';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/MaterialSymbolsRounded.ttf') format('truetype');
}

@font-face {
    font-family: 'Consola';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/consola.ttf') format('truetype');
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-root);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.home-body {
    margin: 0;
    font-family: 'iranSans', system-ui, sans-serif;
    font-size: var(--font-size-md);
    line-height: 1.65;
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-primary-container);
    direction: rtl;
    padding-bottom: var(--home-bottom-nav-height);
}

@media (min-width: 1024px) {
    body.home-body {
        padding-bottom: 0;
    }
}

.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: var(--icon-size-md);
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
    vertical-align: middle;
    -webkit-font-smoothing: antialiased;
}

/* Top app bar */
.home-top-bar {
    position: fixed;
    top: 12px;
    left: 16px;
    right: 16px;
    z-index: 50;
    border-radius: 20px;
    background: color-mix(in srgb, var(--md-sys-color-surface-container) 82%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 50%, transparent);
    box-shadow: var(--md-elevation-1);
    transition: box-shadow var(--md-motion-duration-medium) var(--md-motion-easing),
        transform var(--md-motion-duration-short) var(--md-motion-easing);
}

.home-top-bar[data-scrolled='true'] {
    box-shadow: var(--md-elevation-3);
    transform: translateY(-2px);
}

.home-top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
    min-height: var(--home-top-bar-height);
}

.home-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.home-brand img {
    border-radius: 14px;
    box-shadow: var(--md-elevation-1);
}

.home-brand-title {
    display: block;
    font-weight: 700;
    font-size: var(--font-size-lg);
}

.home-brand-sub {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--md-sys-color-secondary);
}

@media (max-width: 640px) {
    .home-brand-text {
        display: none;
    }
}

.home-nav-desktop {
    display: none;
    align-items: center;
    gap: 4px;
}

@media (min-width: 1024px) {
    .home-nav-desktop {
        display: flex;
    }
}

.home-nav-link {
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--md-sys-color-secondary);
    font-size: var(--font-size-sm);
    transition: background var(--md-motion-duration-short) var(--md-motion-easing),
        color var(--md-motion-duration-short) var(--md-motion-easing);
}

.home-nav-link:hover,
.home-nav-link.is-active {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-primary);
}

.home-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 14px;
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-primary);
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--md-motion-duration-short) var(--md-motion-easing),
        background var(--md-motion-duration-short) var(--md-motion-easing);
}

.home-icon-btn:active {
    transform: scale(0.94);
}

.home-cart-btn {
    position: relative;
    width: auto;
    min-width: 44px;
    height: 44px;
    padding-inline: 6px 8px;
    gap: 6px;
}

.home-cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
}

.home-cart-icon .material-symbols-rounded {
    font-size: 1.35rem;
}

.home-cart-badge {
    --cart-badge-ring: transparent;
    position: static;
    flex-shrink: 0;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(160deg, #d32f2f 0%, var(--md-sys-color-error) 55%, #9a0007 100%);
    color: #fff;
    font-size: 0.714rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(154, 0, 7, 0.28);
    pointer-events: none;
    transition:
        background var(--md-motion-duration-short) var(--md-motion-easing),
        color var(--md-motion-duration-short) var(--md-motion-easing),
        box-shadow var(--md-motion-duration-short) var(--md-motion-easing),
        transform var(--md-motion-duration-short) var(--md-motion-easing);
}

.home-cart-badge.is-empty {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-primary);
    box-shadow: var(--md-elevation-1);
    font-weight: 600;
}

.home-cart-badge.is-pulse {
    animation: home-cart-badge-pop 0.4s var(--md-motion-easing);
}

@keyframes home-cart-badge-pop {
    0% {
        transform: scale(1);
    }
    45% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

html[data-theme='dark'] .home-cart-badge {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

html[data-theme='dark'] .home-cart-badge.is-empty {
    background: color-mix(in srgb, var(--md-sys-color-primary-container) 85%, var(--md-sys-color-surface-container));
    color: var(--md-sys-color-primary);
}

.home-login-btn {
    display: inline-flex;
}

.home-user-menu {
    position: relative;
    display: inline-flex;
}

.home-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    width: 190px;
    padding: 8px;
    border-radius: 16px;
    background: var(--md-sys-color-surface-container);
    border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 55%, transparent);
    box-shadow: var(--md-elevation-2);
    z-index: 80;
    display: none;
}

.home-user-menu.is-open .home-user-dropdown {
    display: block;
}

.home-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    font-size: 0.9rem;
    transition: background var(--md-motion-duration-short) var(--md-motion-easing);
}

.home-user-dropdown-item:hover {
    background: var(--md-sys-color-surface-container-high);
}

.home-user-dropdown-item .material-symbols-rounded {
    color: var(--md-sys-color-primary);
    font-size: 1.2rem;
}

.home-user-dropdown-item.is-danger {
    color: var(--md-sys-color-error);
}

.home-user-dropdown-item.is-danger .material-symbols-rounded {
    color: var(--md-sys-color-error);
}

/* Drawer */
.home-drawer {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--md-motion-duration-medium) var(--md-motion-easing);
}

.home-drawer.is-open {
    pointer-events: auto;
    opacity: 1;
}

.home-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 20, 40, 0.45);
}

.home-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(320px, 88vw);
    height: 100%;
    background: var(--md-sys-color-surface-container);
    box-shadow: var(--md-elevation-3);
    transform: translateX(100%);
    transition: transform var(--md-motion-duration-medium) var(--md-motion-easing);
    padding: 20px;
}

.home-drawer.is-open .home-drawer-panel {
    transform: translateX(0);
}

.home-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.home-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-drawer-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: background var(--md-motion-duration-short) var(--md-motion-easing);
}

.home-drawer-nav a:hover {
    background: var(--md-sys-color-primary-container);
}

.home-drawer-theme {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 8px;
    padding: 12px 14px;
    border: none;
    border-radius: 12px;
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-primary-container);
    font-family: inherit;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: background var(--md-motion-duration-short) var(--md-motion-easing);
}

.home-drawer-theme:hover {
    background: var(--md-sys-color-primary-container);
}

/* Buttons */
.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    font-family: inherit;
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--md-motion-duration-short) var(--md-motion-easing),
        box-shadow var(--md-motion-duration-short) var(--md-motion-easing),
        background var(--md-motion-duration-short) var(--md-motion-easing);
}

.home-btn:active {
    transform: scale(0.97);
}

.home-btn-filled {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    box-shadow: var(--md-elevation-1);
}

.home-btn-filled:hover {
    box-shadow: var(--md-elevation-2);
}

.home-btn-tonal {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-primary-container);
}

.home-btn-outlined {
    background: transparent;
    color: var(--md-sys-color-primary);
    border: 1px solid var(--md-sys-color-outline-variant);
}

.home-hero .home-btn-outlined {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.55);
}

.home-hero .home-btn-outlined:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.85);
}

.home-btn-lg {
    padding: 10px 20px;
    font-size: var(--font-size-md);
}

/* Page layout */
.home-page {
    padding-top: calc(var(--home-top-bar-height) + 36px);
    max-width: 1280px;
    margin: 0 auto;
    padding-inline: 16px;
}

/* Hero */
.home-hero {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #006494 0%, #0d7a5f 55%, #004a73 100%);
    color: #fff;
    box-shadow: var(--md-elevation-3);
}

.home-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.18), transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(0, 0, 0, 0.15), transparent 50%);
    animation: home-hero-pulse 8s ease-in-out infinite alternate;
}

@keyframes home-hero-pulse {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

.home-hero-content {
    position: relative;
    padding: 32px 24px 28px;
}

.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.home-hero h1 {
    font-size: clamp(1.286rem, 3.5vw, 1.714rem);
    line-height: 1.5;
    margin: 0 0 12px;
}

.home-hero p {
    margin: 0 0 20px;
    opacity: 0.92;
    line-height: 1.8;
    max-width: 640px;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.home-hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.home-stat-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.home-stat-card strong {
    font-size: 1.05rem;
}

.home-stat-card span:last-child {
    font-size: 0.8rem;
    opacity: 0.85;
}

/* Trust strip */
.home-trust-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .home-trust-strip {
        grid-template-columns: repeat(4, 1fr);
    }
}

.home-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: var(--md-sys-color-surface-container);
    border-radius: 16px;
    box-shadow: var(--md-elevation-1);
    font-size: 0.85rem;
    color: var(--md-sys-color-secondary);
}

.home-trust-item .material-symbols-rounded {
    color: var(--md-sys-color-tertiary);
}

/* Sections */
.home-section {
    margin-bottom: 40px;
}

.home-section-header {
    margin-bottom: 20px;
}

.home-section-header h2 {
    margin: 0 0 6px;
    font-size: var(--font-size-xl);
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-section-header h2 .material-symbols-rounded {
    color: var(--md-sys-color-primary);
}

.home-section-header p {
    margin: 0;
    color: var(--md-sys-color-secondary);
    font-size: 0.9rem;
}

.home-section-header-inline {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

/* Features */
.home-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.home-feature-card {
    background: var(--md-sys-color-surface-container);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--md-elevation-1);
    transition: transform var(--md-motion-duration-medium) var(--md-motion-easing),
        box-shadow var(--md-motion-duration-medium) var(--md-motion-easing);
}

.home-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--md-elevation-2);
}

.home-feature-card .material-symbols-rounded {
    font-size: var(--icon-size-lg);
    color: var(--md-sys-color-primary);
    margin-bottom: 10px;
}

.home-feature-card h3 {
    margin: 0 0 8px;
    font-size: var(--font-size-md);
}

.home-feature-card p {
    margin: 0;
    color: var(--md-sys-color-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
}

/* Filter */
.home-filter-form {
    background: var(--md-sys-color-surface-container);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--md-elevation-1);
}

.home-filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 12px;
}

.home-filter-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 640px) {
    .home-filter-row {
        flex-direction: row;
    }
}

.home-select {
    flex: 1;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-container-high);
    font-family: inherit;
    font-size: var(--font-size-sm);
    color: inherit;
}

.home-select:focus {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

/* Product grid */
.home-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.home-product-card {
    display: flex;
    flex-direction: column;
    background: var(--md-sys-color-surface-container);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--md-elevation-1);
    transition: transform var(--md-motion-duration-medium) var(--md-motion-easing),
        box-shadow var(--md-motion-duration-medium) var(--md-motion-easing);
    cursor: pointer;
}

.home-product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--md-elevation-3);
}

.home-product-media {
    position: relative;
    aspect-ratio: 16 / 11;
    background: var(--md-sys-color-surface-container-high);
    overflow: hidden;
    border-radius: 18px;
    margin: 12px 12px 0;
}

@media (max-width: 640px) {
    .home-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .home-product-media {
        aspect-ratio: 16 / 12;
    }

    .home-product-body {
        padding: 12px;
    }
}

.home-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--md-motion-duration-medium) var(--md-motion-easing);
    border-radius: 18px;
}

.home-product-card:hover .home-product-image {
    transform: scale(1.04);
}

.home-product-image-link {
    display: block;
    height: 100%;
}

.home-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.home-product-badges {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

#shop-products[data-view='list'] .home-product-badges {
    margin-bottom: 6px;
}

.home-badge-sale {
    background: var(--md-sys-color-error);
    color: #fff;
}

.home-badge-free {
    background: var(--md-sys-color-tertiary);
    color: #fff;
}

.home-product-info-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: color-mix(in srgb, var(--md-sys-color-surface-container) 90%, transparent);
    backdrop-filter: blur(8px);
    color: var(--md-sys-color-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--md-elevation-1);
}

.home-product-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px;
}

.home-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.home-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--md-sys-color-surface-container-high);
    font-size: 0.78rem;
    color: var(--md-sys-color-secondary);
}

.home-chip-tonal {
    background: var(--md-sys-color-tertiary-container);
    color: var(--md-sys-color-tertiary);
}

.home-product-pricing {
    margin-bottom: 14px;
}

.home-price {
    margin: 0;
    font-size: var(--font-size-md);
    font-weight: 700;
    color: var(--md-sys-color-primary);
}

.home-price-old {
    margin: 0 0 4px;
    font-size: 0.85rem;
    text-decoration: line-through;
    color: var(--md-sys-color-error);
}

.home-price-free {
    color: var(--md-sys-color-tertiary);
}

.home-product-actions {
    display: grid;
    grid-template-rows: auto auto;
    gap: 8px;
    margin-top: auto;
}

.home-product-actions .home-btn-tonal {
    grid-row: 1;
}

.home-product-actions .home-btn-filled {
    grid-row: 2;
}

.home-product-actions:not(:has(.home-btn-tonal))::before {
    content: '\00a0';
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1;
    visibility: hidden;
    pointer-events: none;
    width: 100%;
    box-sizing: border-box;
    min-height: 20px;
}

.home-product-actions .home-btn {
    width: 100%;
}

.home-no-free {
    font-size: 0.8rem;
    color: var(--md-sys-color-error);
    text-align: center;
}

.home-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    color: var(--md-sys-color-secondary);
    background: var(--md-sys-color-surface-container-high);
    border-radius: 20px;
}

.home-empty-state p {
    margin: 0;
}

.home-empty-state .home-btn {
    margin-top: 20px;
}

.home-empty-state .material-symbols-rounded {
    font-size: 2.286rem;
    opacity: 0.5;
    display: block;
    margin-bottom: 8px;
}

/* Steps */
.home-steps-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.home-steps-list li {
    background: var(--md-sys-color-surface-container);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--md-elevation-1);
}

.home-steps-list li span:first-child {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-primary);
    font-weight: 700;
    margin-bottom: 10px;
}

.home-steps-list h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.home-steps-list p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--md-sys-color-secondary);
}

/* Intro video + text */
.home-intro-split {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
}

.home-intro-video {
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    overflow: hidden;
    background: var(--md-sys-color-surface-container-high);
    box-shadow: var(--md-elevation-2);
}

.home-intro-video video,
.home-intro-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    object-fit: cover;
}

.home-intro-text h2 {
    margin: 0 0 12px;
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.home-intro-text > p {
    margin: 0 0 16px;
    color: var(--md-sys-color-secondary);
    line-height: 1.8;
}

.home-intro-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-intro-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-md);
    color: var(--md-sys-color-on-primary-container);
}

.home-intro-list .material-symbols-rounded {
    color: var(--md-sys-color-tertiary);
    font-size: var(--icon-size-lg);
}

@media (max-width: 768px) {
    .home-intro-split {
        grid-template-columns: 1fr;
    }
}

/* Blog */
.home-section-cta {
    margin-top: 24px;
    text-align: center;
}

/* CTA */
.home-cta {
    margin-bottom: 48px;
}

.home-cta-inner {
    text-align: center;
    padding: 36px 24px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--md-sys-color-primary-container), var(--md-sys-color-tertiary-container));
    box-shadow: var(--md-elevation-2);
}

.home-cta-inner h2 {
    margin: 0 0 8px;
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.home-cta-inner p {
    margin: 0 0 20px;
    color: var(--md-sys-color-secondary);
}

/* Footer */
.home-footer {
    position: relative;
    margin-top: 48px;
    padding: 0 16px calc(var(--home-bottom-nav-total) + var(--home-bottom-nav-footer-gap));
    color: var(--home-footer-fg);
    overflow: hidden;
    background: var(--home-footer-bg-gradient);
    transition: background var(--md-motion-duration-medium) var(--md-motion-easing),
        color var(--md-motion-duration-medium) var(--md-motion-easing);
}

@media (min-width: 1024px) {
    .home-footer {
        padding-bottom: 48px;
    }
}

.home-footer-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: var(--home-footer-glow);
    transition: background var(--md-motion-duration-medium) var(--md-motion-easing);
}

.home-footer-container {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 40px;
}

.home-footer-main {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 32px 28px;
    padding-bottom: 36px;
}

@media (max-width: 960px) {
    .home-footer-main {
        grid-template-columns: 1fr 1fr;
    }

    .home-footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .home-footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 24px 16px;
    }

    .home-footer-brand,
    .home-footer-contact {
        grid-column: 1 / -1;
    }
}

.home-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    text-decoration: none;
    color: inherit;
}

.home-footer-logo img {
    border-radius: 14px;
    box-shadow: var(--home-footer-img-shadow);
}

.home-footer-logo strong {
    display: block;
    font-size: var(--font-size-lg);
    color: var(--home-footer-heading);
}

.home-footer-logo span {
    display: block;
    margin-top: 2px;
    font-size: var(--font-size-xs);
    color: var(--home-footer-fg-subtle);
}

.home-footer-tagline {
    margin: 0 0 18px;
    max-width: 340px;
    font-size: var(--font-size-sm);
    line-height: 1.85;
    color: var(--home-footer-fg-muted);
}

.home-footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.home-footer-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--home-footer-social-border);
    border-radius: 12px;
    background: var(--home-footer-social-bg);
    color: var(--home-footer-social-fg);
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--md-motion-duration-short) var(--md-motion-easing),
        border-color var(--md-motion-duration-short) var(--md-motion-easing),
        color var(--md-motion-duration-short) var(--md-motion-easing),
        transform var(--md-motion-duration-short) var(--md-motion-easing);
}

.home-footer-social-btn:hover {
    background: var(--home-footer-social-hover-bg);
    border-color: var(--home-footer-social-hover-border);
    transform: translateY(-2px);
}

.home-footer-heading {
    margin: 0 0 16px;
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--home-footer-heading);
    letter-spacing: 0.02em;
}

.home-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.home-footer-links li {
    margin-bottom: 4px;
}

.home-footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 6px 0;
    color: var(--home-footer-link);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color var(--md-motion-duration-short) var(--md-motion-easing),
        transform var(--md-motion-duration-short) var(--md-motion-easing);
}

.home-footer-links a .material-symbols-rounded {
    font-size: 16px;
    opacity: 0;
    transform: translateX(4px);
    transition: opacity var(--md-motion-duration-short) var(--md-motion-easing),
        transform var(--md-motion-duration-short) var(--md-motion-easing);
}

.home-footer-links a:hover {
    color: var(--home-footer-link-hover);
    transform: translateX(-3px);
}

.home-footer-links a:hover .material-symbols-rounded {
    opacity: 1;
    transform: translateX(0);
}

.home-footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.home-footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.home-footer-contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--home-footer-chip-bg);
    color: var(--home-footer-chip-fg);
}

.home-footer-contact-label {
    display: block;
    margin-bottom: 2px;
    font-size: var(--font-size-xs);
    color: var(--home-footer-fg-subtle);
}

.home-footer-contact-list a,
.home-footer-contact-list span:last-child {
    font-size: var(--font-size-sm);
    color: var(--home-footer-fg);
    text-decoration: none;
}

.home-footer-contact-list a:hover {
    color: var(--home-footer-link-hover);
}

.home-footer-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 20px 0 28px;
    border-top: 1px solid var(--home-footer-border);
    border-bottom: 1px solid var(--home-footer-border);
}

@media (max-width: 768px) {
    .home-footer-trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .home-footer-trust-grid {
        grid-template-columns: 1fr;
    }
}

.home-footer-trust-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--home-footer-card-bg);
    border: 1px solid var(--home-footer-card-border);
    transition: background var(--md-motion-duration-short) var(--md-motion-easing),
        border-color var(--md-motion-duration-short) var(--md-motion-easing);
}

.home-footer-trust-card:hover {
    background: var(--home-footer-card-bg-hover);
    border-color: var(--home-footer-social-hover-border);
}

.home-footer-trust-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--home-footer-trust-icon-bg);
    color: var(--home-footer-trust-icon-fg);
}

.home-footer-trust-icon .material-symbols-rounded {
    color: inherit;
    font-size: 1.286rem;
}

.home-footer-trust-card strong {
    display: block;
    margin-bottom: 2px;
    font-size: var(--font-size-sm);
    color: var(--home-footer-heading);
}

.home-footer-trust-card > div > span {
    font-size: var(--font-size-xs);
    color: var(--home-footer-trust-muted);
}

.home-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 22px;
}

.home-footer-copy {
    margin: 0;
    font-size: var(--font-size-xs);
    color: var(--home-footer-fg-subtle);
}

.home-footer-seals {
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-footer-enamad {
    display: inline-flex;
    line-height: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px color-mix(in srgb, var(--md-sys-color-shadow) 12%, transparent);
    transition: transform var(--md-motion-duration-short) var(--md-motion-easing), box-shadow var(--md-motion-duration-short) var(--md-motion-easing);
}

.home-footer-enamad:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--md-sys-color-shadow) 18%, transparent);
}

.home-footer-enamad img {
    display: block;
    width: 80px;
    height: auto;
    cursor: pointer;
}

.home-footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.home-footer-legal a {
    color: var(--home-footer-legal);
    text-decoration: none;
    font-size: var(--font-size-xs);
    transition: color var(--md-motion-duration-short) var(--md-motion-easing);
}

.home-footer-legal a:hover {
    color: var(--home-footer-legal-hover);
}

.home-footer-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--home-footer-dot);
}

/* Bottom navigation */
.home-bottom-nav {
    position: fixed;
    bottom: calc(var(--home-bottom-nav-edge-gap) + var(--home-bottom-nav-safe));
    left: 14px;
    right: 14px;
    z-index: 40;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2px;
    height: var(--home-bottom-nav-bar-height);
    padding: 0 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--md-sys-color-surface-container) 96%, transparent);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 55%, transparent);
    box-shadow: var(--home-bottom-nav-shadow);
    transition: background var(--md-motion-duration-medium) var(--md-motion-easing),
        border-color var(--md-motion-duration-medium) var(--md-motion-easing),
        box-shadow var(--md-motion-duration-medium) var(--md-motion-easing);
}

.home-bottom-nav-item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 0;
    min-height: 38px;
    padding: 5px 2px 4px;
    text-decoration: none;
    color: var(--md-sys-color-secondary);
    font-size: 0.571rem;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: 0.01em;
    border-radius: 999px;
    transition: color var(--md-motion-duration-short) var(--md-motion-easing),
        background var(--md-motion-duration-short) var(--md-motion-easing),
        transform var(--md-motion-duration-short) var(--md-motion-easing);
}

.home-bottom-nav-item:active {
    transform: scale(0.96);
}

.home-bottom-nav-item.is-active {
    color: var(--md-sys-color-primary);
    background: color-mix(in srgb, var(--md-sys-color-primary-container) 90%, transparent);
}

.home-bottom-nav-item .material-symbols-rounded {
    font-size: 1.6rem;
    font-variation-settings: 'FILL' 0, 'wght' 350, 'GRAD' 0, 'opsz' 28;
}

.home-bottom-nav-item.is-active .material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 28;
}

/* Dialog */
.home-dialog {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--md-motion-duration-medium) var(--md-motion-easing);
}

.home-dialog[aria-hidden='false'] {
    pointer-events: auto;
    opacity: 1;
}

@media (min-width: 640px) {
    .home-dialog {
        align-items: center;
    }
}

.home-dialog-scrim {
    position: absolute;
    inset: 0;
    background: rgba(0, 20, 40, 0.5);
}

.home-dialog-surface {
    position: relative;
    width: min(560px, 100%);
    max-height: 85vh;
    background: var(--md-sys-color-surface-container);
    border-radius: 28px 28px 20px 20px;
    box-shadow: var(--md-elevation-3);
    overflow: hidden;
    transform: translateY(24px);
    transition: transform var(--md-motion-duration-medium) var(--md-motion-easing);
}

.home-dialog[aria-hidden='false'] .home-dialog-surface {
    transform: translateY(0);
}

@media (min-width: 640px) {
    .home-dialog-surface {
        border-radius: 28px;
    }
}

.home-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.home-dialog-title {
    margin: 0;
    font-size: 1.1rem;
}

.home-dialog-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(85vh - 72px);
    line-height: 1.8;
    font-size: 0.95rem;
}

.home-dialog-lead {
    font-weight: 700;
    color: var(--md-sys-color-primary);
}

.home-dialog-subtitle {
    font-weight: 600;
    margin-top: 16px;
}

.home-dialog-list {
    padding-right: 20px;
    margin: 8px 0;
}

.home-contact-list {
    list-style: none;
    padding: 0;
}

.home-contact-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.home-link {
    color: var(--md-sys-color-primary);
    font-weight: 600;
}

.home-dialog-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--md-sys-color-secondary);
}

.home-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--md-sys-color-outline-variant);
    border-top-color: var(--md-sys-color-primary);
    border-radius: 50%;
    animation: home-spin 0.8s linear infinite;
}

@keyframes home-spin {
    to { transform: rotate(360deg); }
}

/* Reveal animation */
.home-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--md-motion-duration-medium) var(--md-motion-easing),
        transform var(--md-motion-duration-medium) var(--md-motion-easing);
}

.home-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .home-reveal {
        opacity: 1;
        transform: none;
    }
}

/* Toast notifications */
.site-toast {
    position: fixed;
    bottom: calc(var(--home-bottom-nav-height) + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--md-sys-color-on-primary-container);
    color: #fff;
    box-shadow: var(--md-elevation-3);
    font-size: var(--font-size-sm);
    max-width: min(420px, calc(100vw - 32px));
    opacity: 0;
    transition: transform 0.3s var(--md-motion-easing), opacity 0.3s var(--md-motion-easing);
}

@media (max-width: 1023px) {
    .site-toast {
        max-width: calc(100vw - 24px);
        font-size: 0.95rem;
        padding: 12px 20px;
    }

    .site-toast-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (min-width: 1024px) {
    .site-toast {
        bottom: 24px;
    }
}

.site-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.site-toast-success { background: #0d7a5f; }
.site-toast-error { background: var(--md-sys-color-error); }
.site-toast-warning { background: #b45309; }
.site-toast-info { background: var(--md-sys-color-primary); }

.site-toast-icon { font-size: 1.25rem; flex-shrink: 0; }

/* Product title in cards */
.home-product-title {
    margin: 0 0 8px;
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

.home-product-title a {
    color: inherit;
    text-decoration: none;
}

.home-product-title a:hover {
    color: var(--md-sys-color-primary);
}

/* Shop page */
.shop-hero {
    margin-bottom: 24px;
    padding: 28px 24px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--md-sys-color-primary-container), var(--md-sys-color-surface-container));
    box-shadow: var(--md-elevation-1);
}

.shop-hero h1 {
    margin: 0 0 8px;
    font-size: var(--font-size-2xl);
}

.shop-hero p {
    margin: 0;
    color: var(--md-sys-color-secondary);
    font-size: 0.9rem;
}

.shop-toolbar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

@media (min-width: 1024px) {
    .shop-toolbar {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

@media (max-width: 1023px) {
    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .shop-filter-form {
        width: 100%;
    }

    .shop-filter-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .shop-filter-field {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        min-width: 0;
        gap: 0;
    }

    .shop-filter-field .material-symbols-rounded {
        display: none;
    }

    .shop-filter-field .home-select {
        width: 100%;
        box-sizing: border-box;
        flex: none;
    }

    .shop-toolbar-actions {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
}

.shop-filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 1024px) {
    .shop-filter-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.shop-filter-field {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.shop-filter-field .home-select {
    flex: 1;
    min-width: 0;
}

.shop-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.shop-count {
    font-size: 0.875rem;
    color: var(--md-sys-color-secondary);
}

.shop-view-toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: var(--md-sys-color-surface-container-high);
}

.shop-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--md-sys-color-secondary);
    cursor: pointer;
}

.shop-view-btn.is-active {
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-primary);
    box-shadow: var(--md-elevation-1);
}

#shop-products[data-view='list'] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#shop-products[data-view='list'] .home-product-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    align-items: center;
    column-gap: 16px;
}

#shop-products[data-view='list'] .home-product-media {
    aspect-ratio: 1;
    height: 112px;
    align-self: center;
}

#shop-products[data-view='list'] .home-product-image-link,
#shop-products[data-view='list'] .home-product-image {
    height: 100%;
}

.shop-group-separator {
    grid-column: 1 / -1;
    height: 0;
    margin: 0;
    padding: 0;
}

#shop-products[data-view='list'] .home-product-body {
    padding: 12px 14px;
    padding-inline-start: 18px;
}

@media (max-width: 960px) {
    #shop-products[data-view='list'] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    #shop-products[data-view='list'] {
        grid-template-columns: 1fr;
    }

    #shop-products[data-view='list'] .home-product-card {
        grid-template-columns: 76px 1fr;
        align-items: center;
    }

    #shop-products[data-view='list'] .home-product-media {
        aspect-ratio: 1;
        height: 76px;
    }

    #shop-products[data-view='list'] .home-product-body {
        padding: 10px 12px;
    }
}

@media (max-width: 1023px) {
    .shop-page .shop-hero {
        margin-bottom: 24px;
        padding: 28px 24px;
        border-radius: 24px;
    }

    .shop-page .shop-hero-inner {
        min-width: 0;
    }

    .shop-page .shop-hero h1 {
        margin: 0 0 8px;
        font-size: var(--font-size-2xl);
        line-height: inherit;
    }

    .shop-page .shop-hero p {
        display: block;
        margin: 0;
        font-size: 0.9rem;
        line-height: 1.65;
        color: var(--md-sys-color-secondary);
        overflow: visible;
        -webkit-line-clamp: unset;
    }
}

/* Shop products grid is very tall; IntersectionObserver threshold never fires at scroll 0 on mobile */
@media (max-width: 767px) {
    .shop-page .home-section:has(#shop-products).home-reveal {
        opacity: 1;
        transform: none;
    }
}

/* Categories on home */
.home-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.home-category-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    border-radius: 20px;
    background: var(--md-sys-color-surface-container);
    box-shadow: var(--md-elevation-1);
    text-decoration: none;
    color: inherit;
    transition: transform var(--md-motion-duration-medium) var(--md-motion-easing);
}

.home-category-card:hover {
    transform: translateY(-4px);
}

.home-category-card .material-symbols-rounded {
    font-size: var(--icon-size-lg);
    color: var(--md-sys-color-primary);
}

.home-category-card h3 {
    margin: 0;
    font-size: 1rem;
}

.home-category-link {
    font-size: 0.8rem;
    color: var(--md-sys-color-primary);
}

.product-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--md-sys-color-secondary);
}

.product-breadcrumb a {
    color: var(--md-sys-color-primary);
    text-decoration: none;
}

.product-breadcrumb .material-symbols-rounded {
    font-size: 1rem;
}

.product-page {
    padding-bottom: 48px;
}

/* —— Product hero card —— */
.product-hero {
    --product-hero-radius: 24px;
    --product-hero-purchase-radius: 18px;
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "info"
        "gallery"
        "purchase";
    gap: 14px;
    align-items: start;
    margin-bottom: 28px;
    padding: 16px;
    border-radius: var(--product-hero-radius);
    border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 14%, var(--md-sys-color-outline-variant));
    background:
        linear-gradient(
            145deg,
            color-mix(in srgb, var(--md-sys-color-primary-container) 22%, var(--md-sys-color-surface-container)) 0%,
            var(--md-sys-color-surface-container) 42%,
            color-mix(in srgb, var(--md-sys-color-tertiary-container) 12%, var(--md-sys-color-surface-container)) 100%
        );
    box-shadow:
        var(--md-elevation-2),
        inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent);
    overflow: hidden;
}

.product-hero::before,
.product-hero::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.product-hero::before {
    inset: -40% auto auto -20%;
    width: 55%;
    height: 70%;
    background: radial-gradient(
        ellipse at center,
        color-mix(in srgb, var(--md-sys-color-primary) 16%, transparent),
        transparent 68%
    );
}

.product-hero::after {
    inset: auto -15% -35% auto;
    width: 45%;
    height: 55%;
    background: radial-gradient(
        ellipse at center,
        color-mix(in srgb, var(--md-sys-color-tertiary) 12%, transparent),
        transparent 70%
    );
}

.product-hero > * {
    position: relative;
    z-index: 1;
}

.product-gallery {
    grid-area: gallery;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    justify-self: center;
    width: min(100%, 168px);
}

.product-gallery-frame {
    width: 100%;
    padding: 10px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(
        160deg,
        color-mix(in srgb, var(--md-sys-color-surface-container-high) 90%, #fff),
        var(--md-sys-color-surface-container-high)
    );
    border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 55%, transparent);
    box-shadow:
        var(--md-elevation-2),
        inset 0 1px 0 color-mix(in srgb, #fff 50%, transparent);
    transition: transform var(--md-motion-duration-medium) var(--md-motion-easing),
        box-shadow var(--md-motion-duration-medium) var(--md-motion-easing);
}

.product-gallery-frame:hover {
    transform: translateY(-2px);
    box-shadow: var(--md-elevation-3);
}

.product-main-image {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    max-height: 118px;
    object-fit: contain;
    object-position: center;
    border-radius: 12px;
    filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--md-sys-color-primary) 12%, transparent));
}

.product-summary {
    display: contents;
}

.product-summary-info {
    grid-area: info;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.product-summary-purchase {
    position: relative;
    grid-area: purchase;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 18px;
    padding: 14px 16px;
    border-radius: var(--product-hero-purchase-radius);
    border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 20%, var(--md-sys-color-outline-variant));
    background: linear-gradient(
        165deg,
        color-mix(in srgb, var(--md-sys-color-primary-container) 42%, var(--md-sys-color-surface-container-high)),
        color-mix(in srgb, var(--md-sys-color-surface-container-high) 96%, var(--md-sys-color-surface-container))
    );
    box-shadow: var(--md-elevation-1);
    overflow: hidden;
}

.product-summary-purchase::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--md-sys-color-primary),
        color-mix(in srgb, var(--md-sys-color-primary) 60%, var(--md-sys-color-tertiary))
    );
    border-radius: var(--product-hero-purchase-radius) var(--product-hero-purchase-radius) 0 0;
}

@media (min-width: 600px) and (max-width: 767px) {
    .product-hero {
        grid-template-columns: minmax(140px, 34%) 1fr;
        grid-template-areas:
            "info info"
            "gallery purchase";
        gap: 16px 20px;
        padding: 18px 20px;
    }

    .product-gallery {
        justify-self: stretch;
        width: auto;
    }

    .product-main-image {
        max-height: 136px;
    }

    .product-gallery-frame {
        padding: 12px;
    }
}

@media (min-width: 600px) {
    .product-hero {
        padding: 18px 20px;
    }
}

@media (min-width: 768px) {
    .product-hero {
        grid-template-columns: minmax(168px, 21%) 1fr;
        grid-template-areas: "gallery summary";
        gap: 24px 28px;
        padding: 22px 24px;
    }

    .product-main-image {
        max-height: 176px;
    }

    .product-summary {
        display: grid;
        grid-area: summary;
        grid-template-columns: 1fr minmax(220px, 30%);
        align-items: stretch;
        gap: 16px 24px;
        min-width: 0;
    }

    .product-summary-info {
        grid-area: auto;
        grid-column: 1;
        gap: 12px;
        padding-inline-end: 8px;
        border-inline-end: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 45%, transparent);
    }

    .product-summary-purchase {
        grid-column: 2;
        grid-row: 1;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        align-self: stretch;
        gap: 16px;
        padding: 20px 18px 18px;
    }

    .product-summary-purchase::before {
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: 3px;
        height: auto;
        border-radius: 0 var(--product-hero-purchase-radius) var(--product-hero-purchase-radius) 0;
        background: linear-gradient(
            180deg,
            var(--md-sys-color-primary),
            color-mix(in srgb, var(--md-sys-color-primary) 50%, var(--md-sys-color-tertiary))
        );
    }

    .product-actions {
        margin-top: auto;
    }
}

@media (min-width: 1024px) {
    .product-hero {
        grid-template-columns: minmax(200px, 23%) 1fr;
        padding: 24px 28px;
    }

    .product-main-image {
        max-height: 210px;
    }

    .product-summary {
        grid-template-columns: 1fr minmax(272px, 27%);
        gap: 20px 32px;
    }

    .product-summary-purchase {
        padding: 22px 20px 20px;
    }
}

.product-summary-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
}

.product-level-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin: 0;
    color: var(--md-sys-color-primary);
    background: color-mix(in srgb, var(--md-sys-color-primary-container) 75%, var(--md-sys-color-surface-container));
    border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 22%, transparent);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent);
}

.product-level-chip .material-symbols-rounded {
    font-size: 1rem;
}

.product-rating-summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--md-sys-color-on-primary-container);
    font-size: 0.8rem;
    font-weight: 500;
    background: color-mix(in srgb, var(--md-sys-color-tertiary-container) 55%, var(--md-sys-color-surface-container));
    border: 1px solid color-mix(in srgb, var(--md-sys-color-tertiary) 18%, transparent);
    transition: background var(--md-motion-duration-short) var(--md-motion-easing),
        transform var(--md-motion-duration-short) var(--md-motion-easing);
}

.product-rating-summary:hover {
    color: var(--md-sys-color-primary);
    background: var(--md-sys-color-primary-container);
    transform: translateY(-1px);
}

.product-rating-count {
    color: var(--md-sys-color-secondary);
    font-size: 0.75rem;
}

.product-summary h1 {
    margin: 0;
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--md-sys-color-on-primary-container);
}

.product-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.product-stats-row .home-chip {
    padding: 7px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 70%, transparent);
    background: color-mix(in srgb, var(--md-sys-color-surface-container-high) 80%, var(--md-sys-color-surface-container));
    box-shadow: 0 1px 2px color-mix(in srgb, var(--md-sys-color-primary) 6%, transparent);
}

.product-stats-row .home-chip-tonal {
    border-color: color-mix(in srgb, var(--md-sys-color-tertiary) 25%, transparent);
    background: color-mix(in srgb, var(--md-sys-color-tertiary-container) 70%, var(--md-sys-color-surface-container));
}

.product-pricing-badges {
    margin-bottom: 6px;
}

.product-discount-badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 4px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--md-sys-color-error) 35%, transparent);
}

.product-pricing-box {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.product-price-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--md-sys-color-secondary);
}

.product-price {
    margin: 0;
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--md-sys-color-primary);
    word-break: break-word;
}

.product-price-old {
    margin: 0 0 4px;
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    color: color-mix(in srgb, var(--md-sys-color-error) 85%, var(--md-sys-color-secondary));
    font-size: 0.8rem;
    line-height: 1.3;
    opacity: 0.9;
}

.product-price-free {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--md-sys-color-tertiary);
}

.product-price-free .material-symbols-rounded {
    font-size: 1.35rem;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 180px;
    min-width: min(100%, 200px);
}

.product-actions .home-btn {
    width: 100%;
    justify-content: center;
    border-radius: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform var(--md-motion-duration-short) var(--md-motion-easing),
        box-shadow var(--md-motion-duration-medium) var(--md-motion-easing);
}

.product-actions .home-btn-filled {
    background: linear-gradient(
        135deg,
        var(--md-sys-color-primary),
        color-mix(in srgb, var(--md-sys-color-primary) 72%, var(--md-sys-color-tertiary))
    );
    border: none;
    box-shadow:
        0 4px 14px color-mix(in srgb, var(--md-sys-color-primary) 32%, transparent),
        var(--md-elevation-1);
}

.product-actions .home-btn-filled:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 22px color-mix(in srgb, var(--md-sys-color-primary) 38%, transparent),
        var(--md-elevation-2);
}

.product-actions .home-btn-outlined {
    border-width: 1.5px;
    border-color: color-mix(in srgb, var(--md-sys-color-primary) 35%, var(--md-sys-color-outline-variant));
    background: color-mix(in srgb, var(--md-sys-color-surface-container) 70%, transparent);
}

.product-actions .home-btn-outlined:hover {
    background: var(--md-sys-color-primary-container);
    border-color: var(--md-sys-color-primary);
}

@media (max-width: 599px) {
    .product-summary-purchase {
        flex-direction: column;
        align-items: stretch;
    }

    .product-actions {
        flex: 1 1 auto;
        min-width: 0;
    }
}

@media (min-width: 600px) and (max-width: 767px) {
    .product-summary-purchase {
        flex-direction: row;
        align-items: center;
    }
}

@media (min-width: 768px) {
    .product-actions {
        flex: 1 1 auto;
        min-width: 0;
    }
}

html[data-theme='dark'] .product-hero {
    box-shadow:
        var(--md-elevation-2),
        inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent);
}

html[data-theme='dark'] .product-gallery-frame {
    background: linear-gradient(
        160deg,
        var(--md-sys-color-surface-container-high),
        color-mix(in srgb, var(--md-sys-color-surface-container) 90%, #000)
    );
    box-shadow: var(--md-elevation-2);
}

html[data-theme='dark'] .product-summary h1 {
    color: var(--md-sys-color-on-primary-container);
}

html[data-theme='dark'] .product-stats-row .home-chip {
    background: color-mix(in srgb, var(--md-sys-color-surface-container-high) 90%, #000);
}

.product-section {
    margin-bottom: 40px;
}

.product-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 1.15rem;
}

.product-section-title .material-symbols-rounded {
    color: var(--md-sys-color-primary);
    font-size: 1.35rem;
}

.product-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.product-section-head .product-section-title {
    margin-bottom: 0;
}

.product-reviews-summary-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--md-sys-color-surface-container);
    box-shadow: var(--md-elevation-1);
    font-size: 0.875rem;
}

.product-reviews-summary-card strong {
    color: var(--md-sys-color-primary);
    font-size: 1rem;
}

.product-description {
    padding: 24px;
    border-radius: 20px;
    background: var(--md-sys-color-surface-container);
    line-height: 1.9;
    font-size: 0.95rem;
    overflow-x: auto;
}

.product-description img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.product-description table,
.product-description .jb-product-table {
    display: table;
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    border: 1px solid var(--md-sys-color-outline-variant);
}

.product-description thead {
    background: var(--md-sys-color-surface-container-high);
}

.product-description th,
.product-description td {
    display: table-cell;
    border: 1px solid var(--md-sys-color-outline-variant);
    padding: 10px 14px;
    text-align: center;
    vertical-align: middle;
    min-width: 48px;
}

.product-description tr {
    display: table-row;
}

.product-description tbody,
.product-description thead,
.product-description tfoot {
    display: table-row-group;
}

.product-reviews-empty {
    text-align: center;
    padding: 40px 20px;
    border-radius: 20px;
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-secondary);
}

.product-reviews-empty .material-symbols-rounded {
    font-size: 2.286rem;
    opacity: 0.4;
    display: block;
    margin-bottom: 8px;
}

.product-my-reviews {
    margin-bottom: 20px;
}

.product-my-reviews-title {
    margin: 0 0 14px;
    font-size: 1rem;
}

.product-my-review {
    padding: 18px;
    border-radius: 18px;
    margin-bottom: 20px;
    background: var(--md-sys-color-surface-container);
    box-shadow: var(--md-elevation-1);
    border: 1px solid var(--md-sys-color-outline-variant);
}

.product-my-review-pending {
    border-color: color-mix(in srgb, #b45309 40%, var(--md-sys-color-outline-variant));
    background: color-mix(in srgb, #b45309 8%, var(--md-sys-color-surface-container));
}

.product-my-review-rejected {
    border-color: color-mix(in srgb, var(--md-sys-color-error) 35%, var(--md-sys-color-outline-variant));
    background: color-mix(in srgb, var(--md-sys-color-error) 6%, var(--md-sys-color-surface-container));
}

.product-my-review-approved {
    border-color: color-mix(in srgb, var(--md-sys-color-tertiary) 35%, var(--md-sys-color-outline-variant));
}

.product-my-review-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.product-my-review-head h3 {
    margin: 0;
    font-size: 1rem;
}

.product-my-review-rating {
    margin-bottom: 10px;
}

.product-my-review-body {
    margin: 0 0 10px;
    line-height: 1.75;
    font-size: 0.9rem;
}

.product-my-review-hint {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: var(--md-sys-color-secondary);
}

.product-review-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.product-review-status .material-symbols-rounded {
    font-size: 1rem;
}

.product-review-status-pending {
    background: color-mix(in srgb, #b45309 18%, transparent);
    color: #b45309;
}

.product-review-status-approved {
    background: color-mix(in srgb, var(--md-sys-color-tertiary) 18%, transparent);
    color: var(--md-sys-color-tertiary);
}

.product-review-status-rejected {
    background: color-mix(in srgb, var(--md-sys-color-error) 14%, transparent);
    color: var(--md-sys-color-error);
}

/* Stars */
.product-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.product-stars .material-symbols-rounded {
    font-size: 1rem;
}

.product-stars .product-star-filled {
    color: #f5a623;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

.product-stars .product-star-empty {
    color: var(--md-sys-color-outline-variant);
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

.product-stars-lg .material-symbols-rounded {
    font-size: 1.15rem;
}

.product-rating-input {
    display: flex;
    flex-direction: row;
    direction: rtl;
    justify-content: flex-start;
    gap: 4px;
    margin-bottom: 12px;
}

.product-rating-star {
    cursor: pointer;
    display: inline-flex;
}

.product-rating-star input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.product-rating-star .material-symbols-rounded {
    font-size: 1.75rem;
    color: var(--md-sys-color-outline-variant);
    transition: color var(--md-motion-duration-short) var(--md-motion-easing);
}

.product-rating-star.is-active .material-symbols-rounded {
    color: #f5a623;
}

/* Reviews */
.product-reviews-section {
    scroll-margin-top: calc(var(--home-top-bar-height) + 24px);
}

.product-review-compose,
.product-review-guest {
    padding: 20px;
    border-radius: 20px;
    background: var(--md-sys-color-surface-container);
    box-shadow: var(--md-elevation-1);
    margin-bottom: 20px;
}

.product-review-compose h3 {
    margin: 0 0 14px;
    font-size: 1rem;
}

.product-review-form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.product-review-form textarea {
    width: 100%;
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-container-high);
    font-family: inherit;
    font-size: var(--font-size-sm);
    line-height: 1.75;
    --textarea-padding-block: 24px;
    resize: none;
    overflow-y: auto;
}

.product-review-form textarea:focus {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

.product-review-guest p {
    margin: 0 0 12px;
    color: var(--md-sys-color-secondary);
    font-size: 0.9rem;
}

.product-review-note {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-primary);
    font-size: 0.875rem;
}

.product-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.product-review {
    padding: 16px;
    border-radius: 18px;
    background: var(--md-sys-color-surface-container);
    box-shadow: var(--md-elevation-1);
}

.product-review-reply {
    margin-top: 0;
    background: var(--md-sys-color-surface-container-high);
    box-shadow: none;
}

.product-review-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.product-review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.product-review-meta {
    flex: 1;
    min-width: 0;
}

.product-review-author {
    display: block;
    font-size: 0.9rem;
}

.product-review-date {
    display: block;
    font-size: 0.75rem;
    color: var(--md-sys-color-secondary);
    margin-top: 2px;
}

.product-review-rating {
    margin-inline-start: auto;
}

.product-review-body {
    margin: 0 0 10px;
    line-height: 1.75;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.product-review-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    background: transparent;
    color: var(--md-sys-color-primary);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
}

.product-review-reply-btn:hover {
    background: var(--md-sys-color-primary-container);
}

.product-reply-form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.product-reply-form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-container);
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.75;
    --textarea-padding-block: 20px;
    resize: none;
    overflow-y: auto;
    margin-bottom: 10px;
}

.product-reply-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.product-review-replies {
    margin-top: 12px;
    padding-inline-start: 12px;
    border-inline-start: 2px solid var(--md-sys-color-outline-variant);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Cart page */
.home-page.cart-page {
    padding-top: calc(var(--home-top-bar-height) + 48px);
    padding-bottom: 48px;
    max-width: 1280px;
    overflow-x: hidden;
}

.cart-page + .home-footer {
    margin-top: 0;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

@media (min-width: 900px) {
    .cart-layout {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
        gap: 24px 28px;
    }
}

.cart-items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 12px;
    column-gap: 12px;
    align-items: start;
    grid-auto-rows: auto;
    grid-auto-flow: row;
    align-content: start;
    width: 100%;
    max-width: 100%;
}

.cart-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    align-self: start;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 12px;
    background: var(--md-sys-color-surface-container);
    box-shadow: var(--md-elevation-1);
    min-height: 0;
    max-width: 100%;
    cursor: pointer;
}

.cart-item a,
.home-product-card a {
    cursor: pointer;
}

.cart-item-image {
    flex-shrink: 0;
    display: block;
    line-height: 0;
}

a.cart-item-image {
    text-decoration: none;
}

.cart-item-image img {
    display: block;
    width: 75px;
    height: 75px;
    aspect-ratio: 13 / 10;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-info {
    min-width: 0;
    text-align: start;
}

.cart-item-footer {
    display: flex;
    align-items: center;
}

.cart-item-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
    margin-bottom: 2px;
    font-size: 0.857rem;
    line-height: 1.4;
}

/* Card is clickable; don't change title color on hover */
.cart-item-title:hover {
    color: inherit;
}

a.cart-item-title {
    color: inherit;
    text-decoration: none;
}

a.cart-item-title:hover {
    color: var(--md-sys-color-primary);
}

.cart-item-level {
    font-size: 0.75rem;
    color: var(--md-sys-color-secondary);
}

.cart-item-price {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--md-sys-color-primary);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.857rem;
}

.cart-item-remove {
    flex-shrink: 0;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-inline-start: 2px;
    border-radius: 8px;
    color: var(--md-sys-color-error);
    text-decoration: none;
    transition: background var(--md-motion-duration-short) var(--md-motion-easing);
}

.cart-item-remove .material-symbols-rounded {
    font-size: 1.25rem;
}

.cart-item-remove:hover {
    background: rgba(186, 26, 26, 0.1);
}

.cart-item-add {
    flex-shrink: 0;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-inline-start: 2px;
    border-radius: 8px;
    color: var(--md-sys-color-primary);
    text-decoration: none;
    transition: background var(--md-motion-duration-short) var(--md-motion-easing);
}

.cart-item-add .material-symbols-rounded {
    font-size: 1.25rem;
}

.cart-item-add:hover {
    background: rgba(20, 90, 200, 0.1);
}

.home-blog-item .cart-item-level {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.cart-layout:has(.cart-empty) {
    display: block;
}

.cart-layout:has(.cart-empty) .cart-items {
    display: block;
    width: 100%;
    max-width: none;
    grid-template-columns: unset;
}

.cart-page .cart-empty.home-empty-state {
    width: 100%;
    padding: 56px 28px;
    border-radius: 24px;
}

.cart-page .cart-empty.home-empty-state .material-symbols-rounded {
    font-size: 2.857rem;
    opacity: 0.5;
    margin-bottom: 12px;
}

.cart-summary {
    padding: 24px;
    border-radius: 20px;
    background: var(--md-sys-color-surface-container);
    box-shadow: var(--md-elevation-2);
    position: sticky;
    top: calc(var(--home-top-bar-height) + 24px);
}

.cart-summary h2 {
    margin: 0 0 16px;
    font-size: 1.1rem;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.cart-coupon-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.cart-coupon-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.cart-coupon-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.cart-coupon-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 12px;
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    font: inherit;
}

.cart-coupon-input:focus {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 1px;
}

.cart-coupon-input[readonly] {
    opacity: 0.85;
}

.cart-coupon-apply,
.cart-coupon-remove {
    flex-shrink: 0;
    white-space: nowrap;
}

.cart-coupon-guest-note {
    margin: 0;
    font-size: 0.85rem;
    color: var(--md-sys-color-secondary);
}

.coupon-message {
    margin: 8px 0 0;
    font-size: 0.8125rem;
}

.coupon-message.is-error {
    color: var(--md-sys-color-error);
}

.coupon-message.is-success {
    color: #1b7f4a;
}

.cart-summary-coupon-row strong {
    color: var(--md-sys-color-error);
}

.cart-summary-total-row {
    font-weight: 600;
    padding-top: 4px;
    border-top: 1px dashed var(--md-sys-color-outline-variant);
}

.coupon-code-field {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.coupon-code-field input {
    flex: 1;
    min-width: 0;
}

.coupon-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.coupon-status-active {
    background: rgba(27, 127, 74, 0.12);
    color: #1b7f4a;
}

.coupon-status-pending {
    background: rgba(227, 160, 8, 0.15);
    color: #9a6700;
}

.coupon-status-expired,
.coupon-status-inactive {
    background: rgba(186, 26, 26, 0.1);
    color: var(--md-sys-color-error);
}

html[data-theme='dark'] .coupon-status-active {
    background: rgba(76, 175, 125, 0.18);
    color: #8fd6a8;
}

html[data-theme='dark'] .coupon-status-pending {
    background: rgba(227, 160, 8, 0.2);
    color: #f0c14b;
}

html[data-theme='dark'] .coupon-status-expired,
html[data-theme='dark'] .coupon-status-inactive {
    background: rgba(255, 138, 128, 0.15);
    color: #ff8a80;
}

.cart-checkout-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 0;
}

.cart-payment-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.cart-guest-note {
    font-size: 0.875rem;
    color: var(--md-sys-color-secondary);
    margin: 0 0 12px;
}

.cart-summary-buttons {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
    margin-top: 16px;
}

.cart-summary-buttons .home-btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
}

.cart-back-shop {
    margin-top: 0;
}

@media (max-width: 1255px) {
    .cart-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .cart-page .cart-summary {
        position: static;
        top: auto;
    }
}

@media (max-width: 640px) {
    .cart-summary-buttons {
        flex-direction: column;
    }

    .cart-items {
        grid-template-columns: 1fr;
    }

    .cart-page .cart-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .cart-page .cart-item {
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        gap: 6px;
    }

    .cart-page .cart-item-image img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .cart-page .cart-item-footer {
        width: 100%;
    }

    .cart-page .cart-item-remove {
        position: absolute;
        top: 6px;
        inset-inline-start: 6px;
        margin: 0;
        background: color-mix(in srgb, var(--md-sys-color-surface) 88%, transparent);
    }

    .cart-page .cart-item {
        position: relative;
        overflow: hidden;
    }

    .cart-item-price {
        max-width: 100%;
    }

    .cart-item {
        overflow: hidden;
    }
}

.cart-errors {
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(186, 26, 26, 0.1);
    color: var(--md-sys-color-error);
    margin-bottom: 16px;
    font-size: 0.875rem;
}

/* Auth pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--home-top-bar-height) - var(--home-bottom-nav-height) - 48px);
}

.auth-card {
    width: min(420px, 100%);
    padding: 32px 24px;
    border-radius: 24px;
    background: var(--md-sys-color-surface-container);
    box-shadow: var(--md-elevation-2);
}

.auth-card-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-card-header img {
    border-radius: 16px;
    margin-bottom: 12px;
}

.auth-card-header h1 {
    margin: 0 0 8px;
    font-size: var(--font-size-xl);
}

.auth-card-header p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--md-sys-color-secondary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 16px;
    border-radius: 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-container-high);
}

.auth-field .material-symbols-rounded {
    color: var(--md-sys-color-primary);
}

.auth-field input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-family: inherit;
    font-size: var(--font-size-md);
    outline: none;
}

/* Placeholder راست؛ هنگام تایپ/فوکوس متن از چپ (مناسب شماره، رمز، کد) */
.auth-field input[type='tel'],
.auth-field input[type='password'],
.auth-field input[inputmode='numeric'] {
    direction: rtl;
    text-align: right;
}

.auth-field input[type='tel']:focus,
.auth-field input[type='password']:focus,
.auth-field input[inputmode='numeric']:focus,
.auth-field input[type='tel']:not(:placeholder-shown),
.auth-field input[type='password']:not(:placeholder-shown),
.auth-field input[inputmode='numeric']:not(:placeholder-shown) {
    direction: ltr;
    text-align: left;
}

.auth-field input[type='tel']:focus::placeholder,
.auth-field input[type='password']:focus::placeholder,
.auth-field input[inputmode='numeric']:focus::placeholder {
    direction: rtl;
    text-align: right;
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
}

.auth-links a {
    color: var(--md-sys-color-primary);
    text-decoration: none;
}

.auth-error {
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(186, 26, 26, 0.1);
    color: var(--md-sys-color-error);
    font-size: 0.85rem;
}

/* Textarea: fixed 10 rows, no resize, scroll when content overflows */
.home-body textarea:not(.note-codable) {
    --textarea-rows: 10;
    --textarea-line-height: 1.75;
    --textarea-padding-block: 0px;
    resize: none;
    overflow-y: auto;
    line-height: var(--textarea-line-height);
    box-sizing: border-box;
    height: calc(var(--textarea-line-height) * 1em * var(--textarea-rows) + var(--textarea-padding-block));
    min-height: calc(var(--textarea-line-height) * 1em * var(--textarea-rows) + var(--textarea-padding-block));
    max-height: calc(var(--textarea-line-height) * 1em * var(--textarea-rows) + var(--textarea-padding-block));
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    color: var(--md-sys-color-secondary);
    text-decoration: none;
    font-size: 0.875rem;
}

.home-menu-btn,
.home-drawer {
    display: none !important;
}

.home-bottom-nav {
    display: flex;
}

@media (min-width: 1024px) {
    .home-bottom-nav {
        display: none;
    }
}

/* User panel */
.panel-page {
    max-width: 1280px;
}

.panel-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.panel-mobile-bar {
    display: none;
}

.panel-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 14px;
    background: var(--md-sys-color-surface-container);
    box-shadow: var(--md-elevation-1);
    color: inherit;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background var(--md-motion-duration-short) var(--md-motion-easing),
        border-color var(--md-motion-duration-short) var(--md-motion-easing);
}

.panel-menu-toggle:hover {
    background: var(--md-sys-color-primary-container);
    border-color: color-mix(in srgb, var(--md-sys-color-primary) 35%, var(--md-sys-color-outline-variant));
    color: var(--md-sys-color-primary);
}

.panel-menu-toggle .material-symbols-rounded {
    font-size: 1.35rem;
}

.panel-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 54;
    background: rgba(0, 20, 40, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--md-motion-duration-medium) var(--md-motion-easing);
}

.panel-sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.panel-sidebar {
    padding: 20px;
    border-radius: 20px;
    background: var(--md-sys-color-surface-container);
    box-shadow: var(--md-elevation-1);
    height: fit-content;
}

@media (min-width: 1024px) {
    .panel-layout {
        grid-template-columns: 240px 1fr;
    }

    .panel-mobile-bar,
    .panel-sidebar-backdrop,
    .panel-sidebar-close {
        display: none !important;
    }

    .panel-sidebar {
        position: sticky;
        top: calc(var(--home-top-bar-height) + 16px);
    }
}

@media (max-width: 1023px) {
    .panel-mobile-bar {
        display: block;
        grid-column: 1 / -1;
    }

    .panel-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 55;
        width: min(300px, 88vw);
        height: 100%;
        max-height: 100dvh;
        margin: 0;
        border-radius: 0;
        overflow-y: auto;
        transform: translateX(100%);
        visibility: hidden;
        transition:
            transform var(--md-motion-duration-medium) var(--md-motion-easing),
            visibility var(--md-motion-duration-medium) var(--md-motion-easing);
    }

    .panel-sidebar.is-open {
        transform: translateX(0);
        visibility: visible;
    }
}

.panel-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.panel-sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: var(--md-sys-color-surface-container-high);
    color: inherit;
    cursor: pointer;
    transition: background var(--md-motion-duration-short) var(--md-motion-easing);
}

.panel-sidebar-close:hover {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-primary);
}

.panel-sidebar-title {
    margin: 0;
    font-size: 1rem;
    color: var(--md-sys-color-primary);
}

.panel-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.panel-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    font-size: 0.9rem;
    transition: background var(--md-motion-duration-short) var(--md-motion-easing);
}

.panel-nav-link:hover,
.panel-nav-link.is-active {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-primary);
}

.panel-nav-logout {
    margin-top: 8px;
    color: var(--md-sys-color-error);
}

.panel-content {
    min-width: 0;
}

.panel-page-title {
    margin: 0 0 20px;
    font-size: var(--font-size-xl);
}

.panel-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.panel-page-head .panel-page-title {
    margin: 0;
    flex: 1;
    min-width: 0;
}

.panel-page-head .home-btn {
    flex-shrink: 0;
}

.panel-page-head-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.panel-content-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.panel-content-form > .panel-page-title,
.panel-content-form > .panel-page-head,
.panel-content-form > .panel-form-card {
    width: 100%;
    margin-inline: auto;
}

.panel-content-form > .panel-page-title,
.panel-content-form > .panel-page-head {
    text-align: start;
}

.panel-content-form-sm > .panel-page-title,
.panel-content-form-sm > .panel-page-head,
.panel-content-form-sm > .panel-form-card {
    max-width: 480px;
}

.panel-content-form-md > .panel-page-title,
.panel-content-form-md > .panel-page-head,
.panel-content-form-md > .panel-form-card {
    max-width: 520px;
}

.panel-content-form-lg > .panel-page-title,
.panel-content-form-lg > .panel-page-head,
.panel-content-form-lg > .panel-form-card {
    max-width: 560px;
}

.panel-form-card {
    margin-bottom: 16px;
}

.form-image-preview {
    margin-top: 8px;
}

.form-image-preview-img {
    display: block;
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    object-fit: contain;
}

.panel-admin-form .form-image-preview-img {
    max-width: min(100%, 320px);
    max-height: 220px;
}

.panel-card {
    padding: 20px;
    border-radius: 20px;
    background: var(--md-sys-color-surface-container);
    box-shadow: var(--md-elevation-1);
    margin-bottom: 16px;
    overflow-x: auto;
}

.panel-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.panel-stat {
    padding: 16px;
    border-radius: 16px;
    background: var(--md-sys-color-surface-container-high);
}

.panel-stat strong {
    display: block;
    font-size: var(--font-size-lg);
    color: var(--md-sys-color-primary);
    margin-bottom: 4px;
}

.panel-stat span {
    font-size: 0.8rem;
    color: var(--md-sys-color-secondary);
}

.panel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.panel-table th,
.panel-table td {
    padding: 12px 14px;
    text-align: center;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    white-space: nowrap;
    vertical-align: middle;
}

.panel-table th {
    font-weight: 600;
    color: var(--md-sys-color-secondary);
    font-size: 0.8rem;
}

.panel-table img {
    display: block;
    margin-inline: auto;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
}

/* Test runner */
.test-runner-card {
    max-width: 900px;
    margin: 0 auto;
}

.test-resume-card {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.test-resume-icon {
    font-size: 2.5rem;
    color: var(--md-sys-color-primary);
    margin-bottom: 8px;
}

.test-resume-card p {
    margin: 0 0 12px;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.7;
}

.test-resume-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.test-resume-actions form,
.test-resume-actions > .home-btn {
    flex: 1 1 180px;
    max-width: 220px;
}

.test-resume-actions .home-btn {
    width: 100%;
    justify-content: center;
}

.test-runner-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.test-runner-header-end {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.test-bookmark-btn,
.bookmark-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 22px;
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-outline);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.test-bookmark-btn:hover,
.bookmark-remove-btn:hover {
    transform: scale(1.03);
}

.test-bookmark-btn.is-active,
.bookmark-remove-btn {
    color: var(--md-sys-color-primary);
    background: color-mix(in srgb, var(--md-sys-color-primary) 12%, var(--md-sys-color-surface-container));
}

.test-bookmark-btn .material-symbols-rounded,
.bookmark-remove-btn .material-symbols-rounded {
    font-size: 1.5rem;
}

.bookmarks-empty {
    text-align: center;
    padding: 24px 12px;
    color: var(--md-sys-color-on-surface-variant);
}

.bookmarks-empty .material-symbols-rounded {
    font-size: 3rem;
    color: var(--md-sys-color-outline);
    margin-bottom: 8px;
}

.bookmarks-list {
    display: grid;
    gap: 16px;
}

.bookmark-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 16px;
    background: var(--md-sys-color-surface);
}

.bookmark-item-link {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.bookmark-item-image {
    border-radius: 12px;
    overflow: hidden;
    background: var(--md-sys-color-surface-container);
    aspect-ratio: 4 / 3;
}

.bookmark-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.bookmark-item-title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
}

.bookmark-item-sub,
.bookmark-item-date {
    margin: 0;
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface-variant);
}

.bookmark-item-date {
    margin-top: 6px;
}

@media (max-width: 640px) {
    .bookmark-item-link {
        grid-template-columns: 1fr;
    }

    .bookmark-item-image {
        max-height: 180px;
    }
}

.test-status-bulb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 14px 0 12px;
    border-radius: 22px;
    background: var(--md-sys-color-surface-container);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.test-status-bulb:hover {
    transform: scale(1.03);
}

.test-status-bulb .material-symbols-rounded {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.test-status-bulb-label {
    font-family: 'iranSans', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.test-status-bulb.is-wrong {
    color: #c0392b;
    background: #fadbd8;
    border: 2px solid #e74c3c;
}

.test-status-bulb.is-correct {
    color: #1e8449;
    background: #d5f5e3;
    border: 2px solid #27ae60;
}

.test-status-bulb.is-neutral {
    color: var(--md-sys-color-outline);
    border: 2px solid transparent;
}

.test-progress {
    font-size: 1rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 520px) {
    .test-runner-header {
        gap: 6px 8px;
    }

    .test-status-bulb-label {
        display: none;
    }

    .test-status-bulb {
        width: 44px;
        min-width: 44px;
        padding: 0;
    }

    .test-progress {
        font-size: 0.875rem;
    }

    .test-bookmark-btn {
        width: 40px;
        height: 40px;
    }
}

.test-timer-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--md-sys-color-on-surface);
}

#test-timer {
    font-family: 'Consola', ui-monospace, monospace;
    font-size: 1rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    direction: ltr;
    unicode-bidi: isolate;
}

.test-pause-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
    cursor: pointer;
    transition: background 0.2s;
}

.test-pause-btn[data-paused="true"] {
    background: var(--md-sys-color-tertiary-container);
    color: var(--md-sys-color-on-tertiary-container);
}

.test-pause-btn .material-symbols-rounded {
    font-size: 1.35rem;
}

.test-question-image {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.test-question-image img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, 100%);
    max-height: min(55vh, 360px);
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

@media (min-width: 600px) {
    .test-question-image img {
        max-width: min(100%, 560px);
        max-height: min(60vh, 440px);
    }
}

@media (min-width: 900px) {
    .test-question-image img {
        max-width: min(100%, 720px);
        max-height: min(65vh, 520px);
    }
}

.test-options-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.test-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--md-sys-color-primary);
    text-decoration: none;
    transition: background 0.2s;
}

.test-nav-btn:hover {
    background: var(--md-sys-color-primary-container);
}

.test-nav-btn.is-disabled {
    color: var(--md-sys-color-outline);
    pointer-events: none;
}

.test-nav-btn .material-symbols-rounded {
    font-size: 1.75rem;
}

.test-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--md-sys-color-on-surface);
    background: var(--md-sys-color-surface-container-high);
    border: 2px solid transparent;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.test-option:hover:not(.is-disabled) {
    transform: scale(1.08);
    border-color: var(--md-sys-color-primary);
}

.test-option.is-correct {
    background: #d5f5e3;
    border-color: #27ae60;
    color: #1e8449;
}

.test-option.is-wrong {
    background: #fadbd8;
    border-color: #e74c3c;
    color: #c0392b;
}

.test-option.is-disabled {
    pointer-events: none;
    opacity: 0.85;
}

.test-answer-card {
    max-width: 900px;
    margin: 20px auto 0;
}

.test-answer-card.is-hidden {
    display: none;
}

.test-answer-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
}

.test-answer-head .material-symbols-rounded {
    color: var(--md-sys-color-primary);
}

.test-answer-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.test-answer-image img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, 100%);
    max-height: min(55vh, 360px);
    object-fit: contain;
    border-radius: 12px;
}

@media (min-width: 600px) {
    .test-answer-image img {
        max-width: min(100%, 560px);
        max-height: min(60vh, 440px);
    }
}

@media (min-width: 900px) {
    .test-answer-image img {
        max-width: min(100%, 720px);
        max-height: min(65vh, 520px);
    }
}

@media (max-width: 599px) {
    .test-options-row {
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .test-nav-btn {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .test-nav-btn .material-symbols-rounded {
        font-size: 1.35rem;
    }

    .test-option {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        flex-shrink: 0;
    }
}

/* Admin panel */
.panel-list-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 16px;
}

.panel-list-filter.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.panel-list-filter-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 220px;
    min-width: 180px;
    padding: 8px 12px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 12px;
    background: var(--md-sys-color-surface-container-low);
}

.panel-list-filter-icon {
    color: var(--md-sys-color-secondary);
    font-size: 1.25rem;
}

.panel-list-filter-search {
    flex: 1;
    border: none;
    background: transparent;
    font: inherit;
    color: var(--md-sys-color-on-surface);
    outline: none;
    min-width: 0;
}

.panel-list-filter-field-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 0 1 auto;
}

.panel-list-filter-label {
    font-size: 0.75rem;
    color: var(--md-sys-color-secondary);
}

.panel-list-filter-field {
    padding: 8px 12px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 12px;
    background: var(--md-sys-color-surface-container-low);
    font: inherit;
    color: var(--md-sys-color-on-surface);
    min-width: 140px;
}

.panel-table-wrap {
    overflow-x: auto;
}

.home-page table th,
.home-page table td,
.panel-page table th,
.panel-page table td,
.jb-product-table th,
.jb-product-table td {
    text-align: center;
    vertical-align: middle;
}

.panel-section-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
}

.panel-review-expand {
    margin-right: 6px;
    padding: 0;
    border: none;
    background: none;
    color: var(--md-sys-color-primary);
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.panel-review-expand:hover {
    opacity: 0.85;
}

.panel-review-link {
    color: inherit;
    text-decoration: none;
}

.panel-review-link:hover {
    text-decoration: underline;
}

.panel-review-dialog-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-review-dialog-form textarea {
    width: 100%;
    min-height: 160px;
    padding: 12px 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
}

.panel-review-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.panel-rich-editor-wrap {
    overflow: visible;
}

.panel-rich-editor-wrap .note-editor {
    border-radius: 12px;
    border-color: var(--md-sys-color-outline-variant);
    overflow: visible;
}

.panel-rich-editor-wrap .note-dropdown-menu,
.panel-rich-editor-wrap .note-modal,
.panel-page .note-modal.open,
.panel-page .note-popover {
    z-index: 1200;
    font-family: inherit;
}

.panel-rich-editor-wrap .note-modal .modal-title,
.panel-rich-editor-wrap .note-modal label,
.panel-rich-editor-wrap .note-modal .form-control,
.panel-rich-editor-wrap .note-dropdown-menu,
.panel-rich-editor-wrap .note-btn {
    font-family: inherit;
}

.panel-rich-editor-wrap .note-toolbar {
    border-radius: 12px 12px 0 0;
    background: var(--md-sys-color-surface-container);
}

.panel-rich-editor-wrap .note-table .dropdown-menu,
.panel-admin-form .note-table .dropdown-menu,
.panel-rich-editor-wrap .note-table .note-dropdown-menu,
.panel-admin-form .note-table .note-dropdown-menu {
    overflow: hidden;
    padding: 8px 10px;
}

.panel-rich-editor-wrap .note-dimension-picker,
.panel-admin-form .note-dimension-picker {
    position: relative;
    width: 10em;
    height: 10em;
    overflow: hidden;
    font-size: 18px;
    margin-inline: auto;
}

.panel-rich-editor-wrap .note-dimension-picker-mousecatcher,
.panel-rich-editor-wrap .note-dimension-picker-highlighted,
.panel-rich-editor-wrap .note-dimension-picker-unhighlighted,
.panel-admin-form .note-dimension-picker-mousecatcher,
.panel-admin-form .note-dimension-picker-highlighted,
.panel-admin-form .note-dimension-picker-unhighlighted {
    position: absolute !important;
    left: auto !important;
    right: 0 !important;
    top: 0 !important;
    margin: 0 !important;
}

.panel-rich-editor-wrap .note-dimension-picker-unhighlighted,
.panel-admin-form .note-dimension-picker-unhighlighted {
    width: 5em;
    height: 5em;
    z-index: 1;
}

.panel-rich-editor-wrap .note-dimension-picker-highlighted,
.panel-admin-form .note-dimension-picker-highlighted {
    z-index: 2;
}

.panel-rich-editor-wrap .note-dimension-picker-mousecatcher,
.panel-admin-form .note-dimension-picker-mousecatcher {
    width: 10em !important;
    height: 10em !important;
    z-index: 3;
}

.panel-rich-editor-wrap .note-dimension-display,
.panel-admin-form .note-dimension-display {
    direction: rtl;
    text-align: center;
}

.panel-rich-editor-wrap .note-editing-area,
.panel-rich-editor-wrap .note-editable {
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
}

.panel-rich-editor-wrap .note-editable table,
.panel-rich-editor-wrap .note-editable .jb-product-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    border: 1px solid var(--md-sys-color-outline-variant);
}

.panel-rich-editor-wrap .note-editable th,
.panel-rich-editor-wrap .note-editable td,
.panel-admin-form .note-editable th,
.panel-admin-form .note-editable td {
    display: table-cell;
    border: 1px solid var(--md-sys-color-outline-variant);
    padding: 8px 10px;
    min-width: 40px;
    text-align: center;
    vertical-align: middle;
}

.note-popover.note-table-popover,
.note-popover:has(.note-add) {
    z-index: 1300 !important;
    pointer-events: auto;
    display: block;
    max-width: none;
    opacity: 1 !important;
    visibility: visible !important;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 12px;
    background: var(--md-sys-color-surface);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.note-table-popover .popover-body,
.note-table-popover .note-popover-content,
.note-popover:has(.note-add) .popover-body,
.note-popover:has(.note-add) .note-popover-content {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    pointer-events: auto;
}

.note-popover .note-add,
.note-popover .note-delete,
.note-table-popover .note-btn-group {
    display: inline-flex;
    gap: 4px;
}

.note-popover .note-add .note-btn,
.note-popover .note-delete .note-btn,
.note-table-popover .note-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 6px;
    pointer-events: auto;
    font-family: inherit;
    color: var(--md-sys-color-on-surface);
    border-color: var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-container-high);
}

.note-popover .note-add .note-btn:hover,
.note-popover .note-delete .note-btn:hover,
.note-table-popover .note-btn:hover {
    color: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
    background: var(--md-sys-color-primary-container);
}

.jb-table-popover-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.jb-table-popover-icon {
    font-size: 20px;
    color: inherit;
}

.panel-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: var(--md-sys-color-primary);
    text-decoration: none;
    transition: background 0.15s ease;
}

.panel-action-link:hover {
    background: var(--md-sys-color-surface-container-high);
}

.panel-action-link.is-success {
    color: #2e7d32;
}

.panel-action-link.is-danger {
    color: var(--md-sys-color-error);
}

.panel-text-success {
    color: #2e7d32;
}

.panel-text-warning {
    color: #ed6c02;
}

.panel-text-danger {
    color: var(--md-sys-color-error);
}

.panel-card + .panel-card {
    margin-top: 16px;
}

.panel-admin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-admin-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.panel-admin-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
}

.panel-admin-form label .material-symbols-rounded {
    color: var(--md-sys-color-primary);
    font-size: 1.25rem;
}

.panel-admin-form input[type='text'],
.panel-admin-form input[type='password'],
.panel-admin-form input[type='file'],
.panel-admin-form select,
.panel-admin-form textarea,
.panel-admin-form .choices__inner {
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px !important;
    border: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-container-high) !important;
    background-color: var(--md-sys-color-surface-container-high) !important;
    font-family: inherit;
    font-size: var(--font-size-md);
    color: var(--md-sys-color-on-surface);
    box-sizing: border-box;
}

.panel-admin-form textarea {
    --textarea-padding-block: 24px;
}

.panel-admin-form input:focus,
.panel-admin-form select:focus,
.panel-admin-form textarea:focus,
.panel-admin-form .choices.is-focused .choices__inner,
.panel-admin-form .choices.is-open .choices__inner {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 1px;
}

.panel-admin-form .submit-btn,
.panel-admin-form .home-btn {
    align-self: flex-start;
}

.panel-admin-form .note-editor {
    border-radius: 14px;
    overflow: visible;
    border-color: var(--md-sys-color-outline-variant) !important;
}

.panel-admin-form .note-editing-area {
    height: 300px;
    min-height: 300px;
    max-height: 300px;
    overflow: hidden;
    border-radius: 0 0 14px 14px;
}

.panel-admin-form .note-editable {
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    resize: none !important;
}

.panel-admin-form .note-statusbar {
    display: none !important;
}

.panel-admin-form .choices {
    margin-bottom: 0;
    font-size: var(--font-size-md);
    overflow: hidden;
    border-radius: 14px;
}

.panel-admin-form .choices.is-open {
    overflow: visible;
}

.panel-admin-form .choices__inner {
    min-height: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    border-radius: 14px !important;
    background: var(--md-sys-color-surface-container-high) !important;
    background-color: var(--md-sys-color-surface-container-high) !important;
}

.panel-admin-form .choices.is-focused .choices__inner,
.panel-admin-form .choices.is-open .choices__inner {
    background: var(--md-sys-color-surface-container-high) !important;
    background-color: var(--md-sys-color-surface-container-high) !important;
}

.panel-admin-form .choices.is-open .choices__inner,
.panel-admin-form .choices.is-open.is-flipped .choices__inner {
    border-radius: 14px !important;
}

.panel-admin-form .choices__list--multiple {
    display: contents;
}

.panel-admin-form .choices__input,
.panel-admin-form .choices__input--cloned,
.panel-admin-form .choices input[type='search'] {
    flex: 1 1 100%;
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    font-family: inherit;
    font-size: var(--font-size-md);
    color: var(--md-sys-color-on-surface);
    line-height: inherit;
}

.panel-admin-form .choices__input::placeholder,
.panel-admin-form .choices__input--cloned::placeholder {
    color: var(--md-sys-color-secondary);
    opacity: 0.85;
}

.panel-admin-form .choices__list--multiple .choices__item {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    border: 0;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.875rem;
}

.panel-admin-form .choices__list--dropdown {
    border-radius: 14px;
    border-color: var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface);
    z-index: 1100;
}

.panel-admin-form .choices__list--dropdown .choices__item {
    font-size: var(--font-size-md);
    color: var(--md-sys-color-on-surface);
}

.panel-admin-form .choices__list--dropdown .choices__item--selectable.is-highlighted {
    background: var(--md-sys-color-surface-container-high);
}

.panel-admin-form .form-select {
    width: 100%;
    padding: 12px 16px;
    padding-left: 2.25rem;
    border-radius: 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    background-color: var(--md-sys-color-surface-container-high);
    font-family: inherit;
    font-size: var(--font-size-md);
    color: var(--md-sys-color-on-surface);
}

.panel-admin-form .form-select:focus {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 1px;
    box-shadow: none;
}

.ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-message {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-container-low);
}

.ticket-message-admin {
    background: var(--md-sys-color-primary-container);
    border-color: transparent;
}

.ticket-message-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.8125rem;
    color: var(--md-sys-color-secondary);
}

.ticket-message-head strong {
    color: var(--md-sys-color-on-surface);
}

.ticket-message-body {
    line-height: 1.7;
    white-space: normal;
    word-break: break-word;
}

.ticket-message-attachment {
    margin-top: 10px;
    font-size: 0.875rem;
}

.ticket-attachment-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface);
    color: inherit;
    text-decoration: none;
    transition:
        background var(--md-motion-duration-short) var(--md-motion-easing),
        border-color var(--md-motion-duration-short) var(--md-motion-easing),
        box-shadow var(--md-motion-duration-short) var(--md-motion-easing);
}

.ticket-attachment-chip:hover {
    background: var(--md-sys-color-surface-container-high);
    border-color: var(--md-sys-color-primary);
    box-shadow: var(--md-elevation-1);
}

.ticket-attachment-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-primary);
    flex-shrink: 0;
}

.ticket-attachment-chip-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.ticket-attachment-chip-body strong {
    font-size: 0.8125rem;
    color: var(--md-sys-color-secondary);
    font-weight: 600;
}

.ticket-attachment-chip-body span:last-child {
    font-size: 0.875rem;
    color: var(--md-sys-color-on-surface);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-attachment-chip-action {
    color: var(--md-sys-color-primary);
    flex-shrink: 0;
}

.ticket-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1.2;
    border: 1px solid transparent;
}

.ticket-status-closed {
    background: #eceff1;
    color: #546e7a;
    border-color: #cfd8dc;
}

.ticket-status-review {
    background: #fff8e1;
    color: #f57f17;
    border-color: #ffe082;
}

.ticket-status-answered {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #a5d6a7;
}

.ticket-status-waiting {
    background: #e3f2fd;
    color: #1565c0;
    border-color: #90caf9;
}

html[data-theme='dark'] .ticket-status-closed {
    background: #394958;
    color: #b8c8d4;
    border-color: #4f5d6b;
}

html[data-theme='dark'] .ticket-status-review {
    background: rgba(245, 127, 23, 0.2);
    color: #ffb74d;
    border-color: rgba(255, 183, 77, 0.35);
}

html[data-theme='dark'] .ticket-status-answered {
    background: rgba(46, 125, 50, 0.22);
    color: #81c784;
    border-color: rgba(129, 199, 132, 0.35);
}

html[data-theme='dark'] .ticket-status-waiting {
    background: rgba(21, 101, 192, 0.24);
    color: #64b5f6;
    border-color: rgba(100, 181, 246, 0.35);
}

.ticket-form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.ticket-form-label .material-symbols-rounded {
    font-size: 1.125rem;
}

.ticket-form textarea {
    width: 100%;
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-container-high);
    font-family: inherit;
    font-size: var(--font-size-sm);
    line-height: 1.75;
    --textarea-padding-block: 24px;
    resize: none;
    overflow-y: auto;
}

.ticket-form textarea:focus {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

.ticket-form-note {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-primary);
    font-size: 0.875rem;
}

.ticket-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.home-file-field {
    margin-bottom: 16px;
}

.home-file-field-label {
    margin-bottom: 8px;
}

.home-file-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px dashed var(--md-sys-color-outline);
    background: var(--md-sys-color-surface-container-high);
}

.home-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.home-file-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-primary);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--md-motion-duration-short) var(--md-motion-easing);
}

.home-file-trigger:hover {
    background: var(--md-sys-color-primary-container);
}

.home-file-name {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    color: var(--md-sys-color-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-file-name.is-selected {
    color: var(--md-sys-color-on-surface);
    font-weight: 600;
}

.home-file-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--md-sys-color-secondary);
    cursor: pointer;
}

.home-file-clear:hover {
    background: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-error);
}

.home-file-hint {
    margin: 8px 0 0;
    font-size: 0.8125rem;
    color: var(--md-sys-color-secondary);
}
