/* Keep content readable even before it reaches the viewport. */
.js .reveal { opacity: 1; transform: translateY(14px); }
.js .reveal.is-visible { transform: none; }
.logo small, .hero-bottom, .spaces-image > span { font-size: 11px; }
.section-label, .steps span { color: #696763; }
@media (prefers-reduced-motion: reduce) { .js .reveal { transform: none; } }

/* Centered brand and navigation, following CasaMorah's existing identity. */
html { scroll-padding-top: 142px; }
.header { height: auto; min-height: 140px; padding: 13px 5% 12px; flex-direction: column; justify-content: center; gap: 13px; }
.header-tagline { width: 100%; text-align: center; color: #55534f; font-size: 12px; letter-spacing: .08em; line-height: 1.4; }
.logo { display: block; width: 180px; height: 45px; }
.logo img { width: 100%; height: 100%; object-fit: contain; }
.logo, .footer-brand-logo { display: flex; align-items: center; }
.logo { justify-content: center; }
.casamorah-wordmark { font: 400 23px/1 Jost, Arial, sans-serif; letter-spacing: .045em; white-space: nowrap; }
.footer-brand-logo .casamorah-wordmark { font-size: 29px; }
.header nav { justify-content: center; gap: clamp(24px, 3vw, 45px); }
.nav-contact { padding: 9px 15px; }
.nav-pending { color: #686762; cursor: default; }
.products-toggle { display: flex; align-items: center; gap: 7px; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.products-toggle svg { width: 10px; height: 7px; transition: transform .2s; }
.products-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.products-panel[hidden] { display: none; }
.products-panel { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-top: 1px solid #e8e7e4; box-shadow: 0 15px 25px #00000014; }
.products-panel-inner { max-width: 1400px; margin: 0 auto; padding: 32px 5% 38px; display: grid; grid-template-columns: .8fr repeat(3, 1fr); gap: 30px; }
.products-intro p, .products-group h3 { margin: 0 0 20px; color: #77736e; font-size: 11px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; }
.products-intro h2 { font-size: 28px; line-height: 1.2; margin: 0 0 22px; }
.products-intro a { display: inline-block; border-bottom: 1px solid #272725; padding-bottom: 5px; font-size: 12px; }
.products-intro a span { margin-left: 15px; }
.products-group ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
.products-group li { padding: 0; font-size: 15px; line-height: 1.35; }
.products-group li::before { content: ''; display: block; width: min(100%, 105px); aspect-ratio: 1; margin-bottom: 9px; border-radius: 50%; background-image: url('assets/optimized-site/category-preview.optimized.webp'); background-size: 400% 300%; background-repeat: no-repeat; }
.products-group:nth-child(2) li:nth-child(1)::before { background-position: 0 0; }
.products-group:nth-child(2) li:nth-child(2)::before { background-position: 33.333% 0; }
.products-group:nth-child(2) li:nth-child(3)::before { background-position: 66.667% 0; }
.products-group:nth-child(3) li:nth-child(1)::before { background-position: 100% 0; }
.products-group:nth-child(3) li:nth-child(2)::before { background-position: 0 50%; }
.products-group:nth-child(3) li:nth-child(3)::before { background-position: 33.333% 50%; }
.products-group:nth-child(3) li:nth-child(4)::before { background-position: 66.667% 50%; }
.products-group:nth-child(4) li:nth-child(1)::before { background-position: 100% 50%; }
.products-group:nth-child(4) li.modern-chinese-category::before { background-image: url('assets/current-product-preview/4a277d4b1d85b9316fe4.jpg'); background-size: cover; background-position: center; }
.products-group:nth-child(4) li:nth-child(3)::before { background-position: 0 100%; }
.products-group:nth-child(4) li:nth-child(4)::before { background-position: 33.333% 100%; }
.products-group:nth-child(4) li:nth-child(5)::before { background-position: 66.667% 100%; }
/* Stable category imagery when unavailable menu entries are removed. */
.products-group li.category-tiles:nth-child(n)::before { background-position: 0 0; }
.products-group li.category-kitchen:nth-child(n)::before { background-position: 100% 0; }
.products-group li.category-indoor:nth-child(n)::before { background-position: 100% 50%; }
.products-group li.category-outdoor:nth-child(n)::before { background-position: 0 100%; }
.services-toggle { display: flex; align-items: center; gap: 7px; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.services-toggle svg { width: 10px; height: 7px; transition: transform .2s; }
.services-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.services-panel[hidden] { display: none; }
.services-panel { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-top: 1px solid #e8e7e4; box-shadow: 0 15px 25px #00000014; }
.services-panel-inner { max-width: 1400px; margin: 0 auto; padding: 32px 5% 38px; display: grid; grid-template-columns: .8fr 3fr; gap: 30px; }
.services-intro p { margin: 0 0 20px; color: #77736e; font-size: 11px; letter-spacing: .12em; }
.services-intro h2 { font-size: 28px; line-height: 1.2; margin: 0 0 22px; }
.services-intro a { display: inline-block; border-bottom: 1px solid #272725; padding-bottom: 5px; font-size: 12px; }
.services-intro a span { margin-left: 15px; }
.services-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 25px; }
.service-item { display: flex; align-items: center; gap: 16px; font-size: 15px; line-height: 1.4; }
.service-copy strong { display: block; font-size: 15px; font-weight: 500; }
.service-copy p { margin: 5px 0 0; color: #65645f; font-size: 12px; line-height: 1.45; }
.service-photo { display: block; flex: 0 0 95px; width: 95px; height: 95px; border-radius: 50%; background-image: url('assets/optimized-site/services-preview.optimized.webp'); background-size: 300% 200%; background-repeat: no-repeat; }
.service-photo-1 { background-position: 0 0; }.service-photo-2 { background-position: 50% 0; }.service-photo-3 { background-position: 100% 0; }
.service-photo-4 { background-position: 0 100%; }.service-photo-5 { background-position: 50% 100%; }.service-photo-6 { background-position: 100% 100%; }
.sourcing-stages { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 800px) { .sourcing-stages { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .sourcing-stages { grid-template-columns: 1fr; } }
.whatsapp-float { position: fixed; right: 24px; bottom: 24px; z-index: 30; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: #198c4b; color: #fff; box-shadow: 0 4px 16px #0003; transition: transform .2s, background .2s; }
.whatsapp-float:hover { transform: translateY(-3px); background: #14723d; }
.whatsapp-float svg { width: 32px; height: 32px; }
.site-footer { border-top: 1px solid #e5e5e2; background: linear-gradient(90deg, rgba(247,247,245,.971) 0%, rgba(247,247,245,.899) 45%, rgba(247,247,245,.669) 100%), url('assets/optimized-site/footer-interior-preview.optimized.webp') center center / cover no-repeat; }
.footer-inner { padding-top: 50px; padding-bottom: 22px; }
.footer-main { display: grid; grid-template-columns: 1.55fr repeat(4, 1fr); gap: 38px; }
.footer-brand-logo { display: flex; align-items: center; width: 225px; max-width: 100%; height: 58px; }
.footer-brand-logo img { object-fit: contain; }
.footer-brand p { max-width: 255px; color: #686762; line-height: 1.7; margin: 18px 0 22px; }
.footer-brand > a:not(.footer-brand-logo) { display: block; width: fit-content; margin: 12px 0; font-size: 14px; }
.footer-brand > a.footer-social { display: flex; align-items: center; gap: 9px; }
.footer-social svg { width: 22px; height: 22px; flex: none; }
.footer-social[href*="wa.me"] svg { color: #25d366; }
.contact-email { display: inline-block; margin-top: 8px; font-size: 14px; border-bottom: 1px solid #222; padding-bottom: 5px; }
.footer-column h2, .footer-registration h2 { margin: 0 0 20px; font: 500 14px Jost, sans-serif; letter-spacing: .03em; }
.footer-column a, .footer-column span { display: block; margin: 0 0 6px; color: #686762; font-size: 14px; line-height: 1.4; }
.footer-column a:hover, .footer-brand a:hover, .footer-bottom a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-registration { border-top: 1px solid #deded9; margin-top: 30px; padding-top: 20px; }
.footer-registration h2 { margin-bottom: 10px; }
.footer-registration p { margin: 5px 0; color: #686762; font-size: 13px; line-height: 1.6; }
.footer-bottom { border-top: 1px solid #deded9; margin-top: 20px; padding: 14px 80px 0 0; display: flex; justify-content: space-between; color: #686762; font-size: 12px; }
.footer-legal { display: flex; gap: 26px; }
@media (max-width: 900px) { .footer-main { grid-template-columns: repeat(2, 1fr); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-inner { padding-top: 40px; } .footer-main { gap: 24px; } }
.hero { height: min(790px, calc(100svh - 140px)); }
@media (max-width: 800px) {
  html { scroll-padding-top: 110px; }
  .header { min-height: 110px; padding: 10px 5% 12px; gap: 7px; }
  .logo { width: 150px; height: 38px; }
  .menu-toggle { min-height: 36px; }
  .header nav { top: 100%; }
  .header nav.open { max-height: calc(100svh - 110px); overflow-y: auto; }
  .header nav.open { max-height: calc(100svh - 140px); }
  .products-toggle { width: 100%; justify-content: space-between; min-height: 50px; border-bottom: 1px solid #eee; }
  .services-toggle { width: 100%; justify-content: space-between; min-height: 50px; border-bottom: 1px solid #eee; }
  .services-panel { position: static; border: 0; box-shadow: none; }
  .services-panel-inner { padding: 18px 12px 24px; grid-template-columns: 1fr; gap: 20px; }
  .services-intro h2 { display: none; }
  .services-intro p { margin-bottom: 8px; }
  .header nav .services-intro a { display: inline-block; padding: 5px 0; border-bottom: 1px solid #272725; }
  .services-items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
  .service-item { display: block; font-size: 15px; }
  .service-photo { width: 80px; height: 80px; margin-bottom: 9px; }
  .products-panel { position: static; border: 0; box-shadow: none; }
  .products-panel-inner { padding: 18px 12px 24px; grid-template-columns: 1fr; gap: 22px; }
  .products-intro h2 { display: none; }
  .products-intro p { margin-bottom: 8px; }
  .products-group h3 { margin-bottom: 6px; }
  .products-group ul { gap: 16px; }
  .products-group li { padding: 0; font-size: 15px; }
  .products-group li::before { width: 80px; }
  .header nav .products-intro a { display: inline-block; padding: 5px 0; border-bottom: 1px solid #272725; }
  .header nav .nav-pending { padding: 15px 0; border-bottom: 1px solid #eee; }
  .hero { height: calc(100svh - 110px); }
  .whatsapp-float { right: 16px; bottom: 16px; }
}

/* Improve reading sizes while keeping the existing visual hierarchy. */
.header nav, .menu-toggle { font-size: 16px; }
.header-tagline, .section-label, .hero-label, .hero-bottom, .spaces-image > span { font-size: 13px; }
.button, .hero-link, .text-link, .contact-note, .contact-email { font-size: 15px; }
.products-intro p, .products-group h3, .services-intro p { font-size: 13px; }
.products-intro a, .services-intro a { font-size: 15px; }
.products-group li { font-size: 16px; }
.service-copy strong { font-size: 17px; }
.service-copy p { font-size: 14.5px; }
.category p { font-size: 15px; }
.category span, .steps span { font-size: 13px; }
.footer-brand > a:not(.footer-brand-logo), .footer-column a, .footer-column span { font-size: 16px; }
.footer-column h2, .footer-registration h2 { font-size: 16px; }
.footer-registration p, .footer-bottom { font-size: 14px; }
.contact-action p { font-size: 15px !important; }
@media (max-width: 800px) {
  .products-group li, .service-item { font-size: 16px; }
  .header nav.open { max-height: calc(100svh - 140px); }
}

/* Arrange the five available categories evenly in the product menu. */
.products-panel-inner {
  grid-template-columns: 1.25fr repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: 28px;
}
.products-group, .products-group ul { display: contents; }
.products-group h3 { display: none; }
@media (max-width: 800px) {
  .products-panel-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  .products-intro { grid-column: 1 / -1; }
}

.products-group > ul > li { position: relative; }
.category-submenu { display: none; position: absolute; z-index: 2; top: 100%; left: 0; min-width: 190px; max-height: min(340px, 55vh); overflow-y: auto; padding: 8px 0; background: #fff; border: 1px solid #ecebe7; box-shadow: 0 12px 28px #00000016; }
.products-group > ul > li:last-child .category-submenu { left: auto; right: 0; }
.header nav .category-submenu a { display: block; padding: 9px 16px; color: #56544f; font-size: 14px; line-height: 1.35; white-space: nowrap; }
.header nav .category-submenu a::after { display: none; }
.header nav .category-submenu a:hover, .header nav .category-submenu a:focus-visible { color: #20201e; background: #f7f6f3; }
.category-submenu-toggle[aria-expanded="true"] + .category-submenu { display: block; }
@media (min-width: 801px) { .products-group > ul > li:focus-within .category-submenu { display: block; } }
@media (hover: hover) { .products-group > ul > li:hover .category-submenu { display: block; } }
.category-submenu-toggle { display: none; border: 0; background: transparent; padding: 0 5px; font-size: 20px; cursor: pointer; }
@media (max-width: 800px) {
  .category-submenu-toggle { display: inline-block; }
  .category-submenu { position: static; min-width: 0; max-height: none; margin-top: 8px; box-shadow: none; }
  .header nav .category-submenu a { padding: 8px 10px; border: 0; white-space: normal; }
}

/* Category names form a vertical rail; the selected category opens to its right. */
.products-panel-inner { max-width: 1400px; padding: 28px 5% 32px; grid-template-columns: minmax(240px, 315px) minmax(0, 1fr); gap: 0; }
.products-panel-inner > .products-intro { display: none; }
.products-group.category-list { display: block; padding-right: 30px; border-right: 1px solid #e9e8e4; }
.category-list-heading, .category-detail-kicker { margin: 0 0 15px; color: #77736e; font: 13px Jost, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.products-group.category-list ul { display: flex; flex-direction: column; gap: 0; }
.products-group.category-list li { display: grid; grid-template-columns: minmax(0, 1fr) 46px 20px; align-items: center; column-gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0efec; }
.products-group.category-list li::before { grid-column: 2; grid-row: 1; width: 46px; height: 46px; margin: 0; }
.products-group.category-list li.modern-chinese-category::before { background-image: url('assets/current-product-preview/4a277d4b1d85b9316fe4.jpg'); background-size: cover; background-position: center; }
.header nav .category-list li > a { grid-column: 1; grid-row: 1; font-size: 15px; line-height: 1.35; }
.header nav .category-list li > a::after, .header nav .category-detail a::after { display: none; }
.category-list li.is-active > a, .category-list li:hover > a { color: #9a754e; }
.category-detail-toggle { grid-column: 3; grid-row: 1; border: 0; background: transparent; color: #77736e; padding: 4px; font-size: 22px; cursor: pointer; }
.category-list li.is-active .category-detail-toggle { color: #9a754e; }
.category-detail { display: block; min-width: 0; padding: 0 0 8px clamp(32px, 5vw, 74px); }
.category-detail h2 { margin: 0 0 25px; font-size: 30px; line-height: 1.2; }
.category-detail-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 30px; }
.header nav .category-detail-links a { display: block; padding: 13px 0; border-bottom: 1px solid #efeeeb; font-size: 15px; line-height: 1.4; }
.header nav .category-detail-links a:hover, .header nav .category-detail-links a:focus-visible { color: #9a754e; }
.header nav .category-detail-all { display: inline-block; margin-top: 24px; padding-bottom: 5px; border-bottom: 1px solid #292825; font-size: 14px; }
.category-detail-all span { margin-left: 12px; }
@media (max-width: 800px) {
  .products-panel-inner { grid-template-columns: 1fr; gap: 22px; padding: 18px 12px 26px; }
  .products-group.category-list { padding: 0; border-right: 0; }
  .products-group.category-list li { grid-template-columns: minmax(0, 1fr) 38px 20px; padding: 6px 0; }
  .products-group.category-list li::before { width: 38px; height: 38px; }
  .header nav .category-list li > a { padding: 6px 0; border: 0; }
  .category-detail { padding: 20px 0 0; border-top: 1px solid #e9e8e4; }
  .category-detail h2 { margin-bottom: 14px; font-size: 24px; }
  .category-detail-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
  .header nav .category-detail-links a { padding: 10px 0; }
  .header nav .category-detail-all { padding: 0 0 5px; margin-top: 18px; }
}

/* Use spacing, rather than visible rules and arrows, to separate categories. */
.products-group.category-list { border-right: 0; }
.products-group.category-list li { grid-template-columns: minmax(0, 1fr) 56px; padding: 5px 0; border-bottom: 0; }
.products-group.category-list li::before { width: 56px; height: 56px; }
.category-detail-toggle { position: absolute; right: 0; width: 56px; height: 56px; font-size: 0; }
.header nav .category-detail-links a, .header nav .category-detail-all { border-bottom: 0; }
.category-detail-all span { display: none; }
@media (max-width: 800px) {
  .products-group.category-list li { grid-template-columns: minmax(0, 1fr) 46px; padding: 4px 0; }
  .products-group.category-list li::before { width: 46px; height: 46px; }
  .category-detail-toggle { width: 46px; height: 46px; }
  .category-detail { border-top: 0; }
}

/* Keep the shared footer compact while retaining readable text. */
.footer-inner { padding-top: 34px; padding-bottom: 16px; }
.footer-main { gap: 30px; }
.footer-brand-logo { height: 48px; }
.footer-brand p { margin: 12px 0 16px; line-height: 1.55; }
.footer-brand > a:not(.footer-brand-logo) { margin: 8px 0; }
.footer-column h2, .footer-registration h2 { margin-bottom: 12px; }
.footer-column a, .footer-column span { margin-bottom: 3px; line-height: 1.35; }
.footer-registration { margin-top: 22px; padding-top: 14px; }
.footer-registration p { margin: 3px 0; line-height: 1.5; }
.footer-bottom { margin-top: 14px; padding-top: 10px; }
@media (min-width: 901px) {
  .footer-main { grid-template-columns: 1.55fr repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .footer-inner { padding-top: 28px; }
  .footer-main { gap: 20px; }
}

.header nav a.service-photo { padding: 0; border: 0; }
.header nav a.service-photo::after { content: none; }
