/* Clean design skill, adapted to Mehgis's Persian typography and pink identity. */
.home-page {
    --home-ink: #30262b;
    --home-muted: #655660;
    --home-accent: #a92658;
    --home-accent-hover: #8b1e48;
    --home-tint: #fbf1f4;
    --home-paper: #fff;
    --home-line: #e8dce1;
    background: var(--home-paper);
    color: var(--home-ink);
}
.home-page ::selection { background: #f4c9d8; color: #30262b; }
.home-page :is(a, button, input):focus-visible { outline: 3px solid var(--home-accent); outline-offset: 4px; }
.home-page input { caret-color: var(--home-accent); }
.home-page #promo-banner, .home-page #social-proof-toast { display: none; }
.home-page .header-bar { background: var(--home-paper); backdrop-filter: none; box-shadow: none; border-color: var(--home-line); }
.home-page #site-header { transition: none; }
.home-page #site-header nav[aria-label="منوی اصلی"] { display: none; }
.home-page #site-header button[onclick="toggleSearch()"]:not([data-search-toggle]) { display: none; }
.home-page #site-header a[href="/"] .bg-clip-text { background: none; color: var(--home-accent); }
.home-header-browse { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 24px; border-top: 1px solid var(--home-line); padding-inline: 16px; }
.home-header-browse :is(a, button) { min-height: 48px; display: inline-flex; align-items: center; gap: 8px; color: var(--home-ink); font-size: .9375rem; font-weight: 600; text-align: center; }
.home-header-browse :is(a, button):hover { color: var(--home-accent); text-decoration: underline; text-underline-offset: 4px; }
.home-header-browse button svg { flex-shrink: 0; }
.home-page #search-overlay input { font-size: 1rem; }
.home-page #search-overlay input::placeholder { color: var(--home-muted); opacity: 1; }
.home-page #search-overlay button { width: 44px; height: 44px; }
.home-storefront { overflow-wrap: break-word; word-break: normal; }
.home-storefront :is(h1, h2, h3) { text-wrap: balance; }
.home-shell { width: min(100% - 64px, 1280px); margin-inline: auto; }
.home-hero { display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 64px; padding-block: 64px 72px; }
.home-hero h1 { font-size: clamp(2rem, 3.8vw, 3.25rem); font-weight: 800; line-height: 1.5; letter-spacing: normal; }
.home-hero-accent { display: block; color: var(--home-accent); }
.home-hero-description { max-width: 48ch; font-size: 1.125rem; line-height: 2; color: var(--home-muted); margin-block: 16px 24px; }
.home-button { display: inline-flex; justify-content: center; align-items: center; gap: 16px; min-height: 48px; padding: 10px 24px; border-radius: 999px; font-size: 1rem; line-height: 1.8; font-weight: 700; text-align: center; transition: background-color 150ms ease-out; }
.home-button-primary { background: var(--home-accent); color: white; }
.home-button-primary:hover { background: var(--home-accent-hover); }
/* The reference's divided facts row becomes useful shopping guidance. */
.home-hero-services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--home-line); }
.home-storefront .home-hero-services a { display: flex; flex-direction: column; justify-content: start; min-width: 0; min-height: 48px; gap: 4px; }
.home-hero-services strong { font-size: 1rem; font-weight: 700; line-height: 1.8; }
.home-hero-services a > span { color: var(--home-muted); font-size: .875rem; line-height: 1.8; }
.home-hero-services a:hover strong { color: var(--home-accent); text-decoration: underline; text-underline-offset: 4px; }
/* Reference-style panel: decorative frame, real shopping links, no invented metrics. */
.home-hero-visual { min-width: 0; container-type: inline-size; }
.home-banner-panel { position: relative; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); gap: 12px; padding: 16px; border-radius: 12px; background: var(--home-tint); box-shadow: 0 8px 18px -12px rgba(48,38,43,.3); }
.home-banner-shell { position: absolute; inset: 24px; display: grid; grid-template-columns: 12% 1fr; grid-template-rows: 24px 1fr; gap: 28px 12px; direction: ltr; }
.home-banner-shell span { display: block; border: 1px solid var(--home-line); border-radius: 8px; background: rgba(255,255,255,.5); }
.home-banner-shell span:first-child { grid-column: 1 / -1; }
.home-banner-badges { display: none; }
.home-banner-badges a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; background: var(--home-paper); border-radius: 999px; font-size: .875rem; line-height: 1.8; box-shadow: 0 4px 10px -8px rgba(48,38,43,.4); }
.home-banner-badges svg { flex-shrink: 0; }
.home-visual-new, .home-visual-budget { position: relative; min-width: 0; z-index: 1; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; min-height: 80px; border-radius: 8px; background: var(--home-accent); color: var(--home-paper); box-shadow: 0 6px 12px -8px rgba(48,38,43,.4); }

.home-visual-new strong, .home-visual-budget strong { font-size: 1.125rem; line-height: 1.6; }
.home-visual-new > span, .home-visual-budget > span { font-size: .875rem; line-height: 1.8; }
.home-visual-new:hover, .home-visual-budget:hover { background: var(--home-accent-hover); }
.home-banner-categories { position: relative; grid-column: 1 / -1; order: 1; min-width: 0; z-index: 1; padding: 16px; border-radius: 8px; background: var(--home-paper); box-shadow: 0 5px 12px -8px rgba(48,38,43,.35); }
.home-banner-categories > strong { display: block; font-size: 1rem; line-height: 1.8; }
.home-banner-categories > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.home-storefront .home-banner-categories a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 10px; border: 1px solid var(--home-line); border-radius: 999px; color: var(--home-muted); font-size: .875rem; line-height: 1.8; }
.home-banner-badges a:hover, .home-banner-categories a:hover { color: var(--home-accent); text-decoration: underline; text-underline-offset: 4px; }
.home-banner-tagline { margin-top: 12px; color: var(--home-muted); font-size: .875rem; line-height: 1.9; text-align: center; }
.home-discovery-band { background: #faf7f8; }
.home-section { padding-block: 48px; }
.home-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.home-section-heading > * { min-width: 0; max-width: 100%; }
.home-storefront h2 { font-size: clamp(1.375rem, 2.5vw, 1.875rem); font-weight: 750; line-height: 1.65; }
.home-section-heading p { color: var(--home-muted); font-size: 1rem; line-height: 1.9; margin-top: 4px; max-width: 65ch; }
.home-text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--home-accent); font-size: .9375rem; font-weight: 600; text-decoration: underline; text-underline-offset: 5px; line-height: 1.8; }
.home-categories { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }
.home-category { min-width: 0; display: flex; align-items: center; flex-direction: column; gap: 12px; text-align: center; font-size: 1rem; font-weight: 650; line-height: 1.8; }
.home-category img, .home-category-placeholder { display: flex; align-items: center; justify-content: center; width: min(100%, 144px); aspect-ratio: 1; object-fit: cover; border-radius: 50%; background: var(--home-tint); }
.home-category:hover { color: var(--home-accent); text-decoration: underline; text-underline-offset: 5px; }
.home-products-band { background: var(--home-paper); padding-block: 8px; }
.home-collection { padding-block: 40px; scroll-margin-top: 144px; }
.home-product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.home-page .product-card { box-shadow: none; border: 1px solid var(--home-line); border-radius: 12px; transform: none; transition: border-color 150ms ease-out; }
.home-page .product-card:hover { border-color: var(--home-accent); box-shadow: none; transform: none; }
.home-page .product-card .product-img { transform: none; }
.home-page .product-card h3 { line-height: 1.8; min-height: 3.6em; font-size: 1rem; }
.home-page .product-card .tnum { color: var(--home-accent); font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.home-page .product-card :is(.text-gray-400, .text-gray-500) { color: var(--home-muted); }
.home-page .product-card :is(button, .btn) { min-height: 48px; white-space: normal; font-size: .9375rem; line-height: 1.8; border-radius: 8px; padding: 10px 8px; }
.home-page .product-card .btn-primary { background: var(--home-accent); color: white; box-shadow: none; transform: none; }
.home-page .product-card .btn-primary:hover { background: var(--home-accent-hover); }
.home-page .product-card button[onclick] { color: var(--home-accent); border-color: var(--home-line); background: var(--home-paper); }
.home-page .product-card button[onclick]:hover { background: var(--home-tint); }
.home-page .product-card button:disabled { color: var(--home-muted); cursor: not-allowed; }
.home-collection-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--home-line); }
.home-storefront .home-collection-links a { display: block; padding: 24px; min-width: 0; }
.home-collection-links a + a { border-inline-start: 1px solid var(--home-line); }
.home-collection-links a > span { display: block; font-size: 1.25rem; font-weight: 700; line-height: 1.8; }
.home-collection-links a > span + span { color: var(--home-muted); font-size: .9375rem; font-weight: 400; margin-top: 4px; }
.home-collection-links a:hover { background: var(--home-tint); }
.home-preorders { border-top: 1px solid var(--home-line); }
.home-shopping-help { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding: 40px; margin-block: 32px 64px; background: var(--home-tint); border-radius: 16px; }
.home-help-intro p { font-size: 1rem; line-height: 2; color: var(--home-muted); margin-block: 8px 24px; max-width: 45ch; }
.home-help-links a { display: block; padding-block: 16px; min-height: 48px; }
.home-help-links a + a { border-top: 1px solid var(--home-line); }
.home-help-links a > span { display: block; font-size: 1rem; line-height: 1.8; }
.home-help-links a > span + span { margin-top: 4px; color: var(--home-accent); font-size: .9375rem; text-decoration: underline; text-underline-offset: 4px; }
.home-empty { grid-column: 1 / -1; padding: 32px; text-align: center; color: var(--home-muted); font-size: 1rem; line-height: 2; }
@media (min-width: 1024px) {
    .home-page #site-header .header-bar > .max-w-7xl { max-width: 1344px; }
    .home-page #site-header .h-16 { height: 64px; }

    .home-header-browse { position: absolute; top: 0; left: 50%; transform: translateX(-50%); height: 64px; border: 0; gap: 32px; }
}
/* Float only when the panel itself has enough room, including enlarged text. */
@container (min-width: 28rem) {
    .home-banner-panel { display: block; padding: 0; aspect-ratio: 1.45; min-height: 27rem; }
    .home-banner-badges { position: absolute; top: 16px; right: 16px; display: grid; gap: 8px; }
    .home-visual-new, .home-visual-budget, .home-banner-categories { position: absolute; }
    .home-visual-new { left: -8px; top: 34%; max-width: 45%; }
    .home-visual-budget { right: 12px; bottom: 20px; max-width: 46%; }
    .home-banner-categories { left: 12px; bottom: 24px; width: 47%; }
}
@media (max-width: 899px) {
    .home-hero { gap: 24px; padding-block: 32px; }
    .home-hero h1 { font-size: 2rem; }
    .home-product-grid { gap: 16px; }
    .home-categories { gap: 16px; }
    .home-shopping-help { gap: 32px; padding: 24px; }

}
@media (max-width: 599px) {
    .home-shell { width: calc(100% - 32px); }
    .home-header-browse { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; overflow-wrap: break-word; }
    .home-header-browse :is(a, button) { justify-content: center; flex-wrap: wrap; min-width: 0; font-size: .875rem; line-height: 1.8; padding-block: 6px; }
    .home-header-browse button svg { display: none; }
    .home-hero { grid-template-columns: 1fr; gap: 20px; padding-block: 24px 32px; }
    .home-hero h1 { font-size: 1.75rem; line-height: 1.7; text-align: center; }
    .home-hero-description { font-size: 1rem; margin: 12px auto 16px; max-width: 38ch; text-align: center; line-height: 1.9; }
    .home-hero .home-button { display: flex; width: 100%; }
    .home-hero .home-button { min-height: 56px; }
    .home-hero-services { grid-template-columns: 1fr; gap: 0; margin-top: 16px; padding-top: 4px; }
    .home-storefront .home-hero-services a { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; padding-block: 12px; }
    .home-hero-services a + a { border-top: 1px solid var(--home-line); }
    .home-hero-services strong { font-size: 1rem; }
    .home-hero-services a > span { font-size: .9375rem; }
    .home-banner-panel { grid-template-columns: 1fr; }
    .home-section { padding-block: 32px; }
    .home-section-heading { flex-wrap: wrap; align-items: start; gap: 8px; margin-bottom: 16px; }
    .home-section-heading p { font-size: .9375rem; }
    .home-categories { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 12px; }
    .home-category { font-size: .9375rem; gap: 8px; }
    .home-category img, .home-category-placeholder { width: 96px; }
    .home-collection { padding-block: 28px; }
    .home-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .home-page .product-card .p-4 { padding: 12px 10px 8px; }
    .home-page .product-card .px-4 { padding-inline: 10px; }
    .home-page .product-card h3 { font-size: .9375rem; }
    .home-page .product-card .tnum { font-size: 1rem; }
    .home-page .product-card .tnum > span { font-size: .875rem; }
    .home-page .product-card button svg { display: none; }
    .home-collection-links { grid-template-columns: 1fr; }
    .home-collection-links a { padding: 16px 8px; }
    .home-collection-links a + a { border-inline-start: 0; border-top: 1px solid var(--home-line); }
    .home-collection-links a > span { font-size: 1.125rem; }
    .home-shopping-help { grid-template-columns: 1fr; padding: 24px 16px; margin-block: 24px 40px; gap: 16px; }
    .home-shopping-help .home-button { display: flex; }
}
@media (max-width: 359px) {
    .home-page #site-header a[href="/"] { gap: 6px; min-height: 44px; }
    .home-page #site-header a[href="/"] > div:first-child { width: 32px; height: 32px; }
    .home-page #site-header a[href="/"] .text-xl { font-size: 1.125rem; }
}
@media (prefers-reduced-motion: reduce) {
    .home-page *, .home-page *::before, .home-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
