/* Tonghao product catalog. All rules stay within the catalog and detail components. */
.th-catalog,.th-product{--th-ink:#342516;--th-muted:#6b5b4f;--th-accent:#76583c;--th-line:#e3dbd2;--th-paper:#fff;--th-wash:#f8f5f0;color:var(--th-ink);font-family:Arial,sans-serif;line-height:1.6;box-sizing:border-box;width:100%;min-width:0}
.th-catalog *,.th-product *{box-sizing:border-box}
.th-catalog a,.th-product a{color:inherit}
.th-catalog img,.th-product img{max-width:100%}
.th-catalog button,.th-product button{font:inherit}
.th-catalog a:focus-visible,.th-catalog button:focus-visible,.th-product a:focus-visible,.th-product button:focus-visible{outline:3px solid #b9956c;outline-offset:4px}
.th-catalog{scroll-margin-top:125px}
/* Join the Products introduction and catalog without stacking section padding. */
body.th-page-products .elementor .elementor-element.elementor-element-ddb49a3>.e-con-inner{padding-bottom:0!important}
body.th-page-products .elementor .elementor-element.elementor-element-thcat00>.e-con-inner{padding-top:24px!important;padding-inline:12px!important}
@media(max-width:767px){body.th-page-products .elementor .elementor-element.elementor-element-thcat00>.e-con-inner{padding-top:16px!important;padding-inline:10px!important}body.th-page-home .elementor .elementor-element.elementor-element-8208836>.e-con-inner{padding-inline:12px!important}}
/* Home hero: a modest white frame and compact, vertically stacked labels. */
body.th-page-home .elementor .elementor-element.elementor-element-94d4460{position:relative;justify-self:end;align-self:center;width:100%;max-width:460px;padding:10px!important;gap:0!important;overflow:hidden}
body.th-page-home .elementor .tonghao-hero-carousel .elementor-image-carousel-wrapper{padding-bottom:0!important}
body.th-page-home .elementor .tonghao-hero-carousel .swiper-slide-image{display:block;width:100%;height:auto;aspect-ratio:3/4;object-fit:contain}
/* Keep the approved desktop height while using some of the photos' vertical background. */
@media(min-width:768px){body.th-page-home .elementor .tonghao-hero-carousel .swiper-slide-image{aspect-ratio:440/507;object-fit:cover;object-position:center}}
body.th-page-home .elementor .tonghao-hero-carousel .elementor-image-carousel-caption{height:auto;margin:8px 0 0;padding:0;font:600 13px/20px Arial,sans-serif;white-space:nowrap;text-align:center}
body.th-page-home .elementor .elementor-element.elementor-element-e5c0567{position:static;width:100%;margin:0;padding:0;text-align:center}
body.th-page-home .elementor .elementor-element.elementor-element-e5c0567 p{margin:0;font:600 12px/18px Arial,sans-serif}
body.th-page-home .elementor .tonghao-hero-carousel .swiper-pagination{position:static;inset:auto!important;transform:none;width:100%;height:24px;display:flex;align-items:center;justify-content:center;gap:0;margin:0;padding:0}
body.th-page-home .elementor .tonghao-hero-carousel .swiper-pagination-bullet{display:flex;align-items:center;justify-content:center;width:24px;height:24px;margin:0!important;background:transparent;opacity:1}
body.th-page-home .elementor .tonghao-hero-carousel .swiper-pagination-bullet:before{content:"";width:7px;height:7px;border-radius:50%;background:#705036;opacity:.25}
body.th-page-home .elementor .tonghao-hero-carousel .swiper-pagination-bullet-active:before{opacity:1}
body.th-page-home .elementor .tonghao-hero-carousel .elementor-swiper-button{top:calc((100% - 52px)/2)}
@media(max-width:767px){body.th-page-home .elementor .elementor-element.elementor-element-94d4460{justify-self:center;max-width:400px;padding:8px!important}}
.th-catalog-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 16px;align-items:stretch}
.th-product-card{display:flex;flex-direction:column;min-width:0;margin:0!important;background:var(--th-paper);border:1px solid var(--th-line);border-radius:12px;overflow:hidden;box-shadow:0 3px 15px rgba(52,37,22,.025);text-align:left!important;transition:box-shadow .2s ease,transform .2s ease}
.th-product-card:hover{box-shadow:0 8px 26px rgba(52,37,22,.08);transform:translateY(-2px)}
/* A portrait frame fills the common 3:4 photos without cropping square images. */
.th-catalog .th-card-image{display:block;position:relative;aspect-ratio:3/4;overflow:hidden;background:#fff;text-decoration:none;padding:6px}
.th-catalog .th-card-image img{display:block;width:100%;height:100%;aspect-ratio:auto;object-fit:contain;object-position:center;transition:transform .3s ease}
.th-product-card:hover .th-card-image img{transform:scale(1.025)}
.th-card-body{display:flex;flex:1;flex-direction:column;align-items:flex-start;gap:5px;padding:12px;min-width:0;text-align:left}
/* The image frame supplies the small gap above the model on both catalog views. */
.th-catalog .th-card-body{padding-top:0}
.th-catalog .th-model,.th-product .th-model{display:block;margin:0!important;color:var(--th-accent);font-size:12px;font-weight:700;letter-spacing:1.3px;line-height:1.5;text-transform:uppercase}
/* Theme headings use balanced wrapping; card titles should fill each line naturally. */
.th-catalog .th-card-body .th-card-title{width:100%;min-width:0;margin:0!important;color:var(--th-ink);font:400 18px/1.35 Montserrat,Arial,sans-serif;white-space:normal;text-wrap:wrap;word-break:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden}
.th-catalog .th-card-title a{text-decoration:none;font:inherit;color:inherit;white-space:normal;text-wrap:wrap}
.th-card-body p{margin:0!important;color:var(--th-muted);font-size:15px;line-height:1.65}
.th-catalog .th-button,.th-product .th-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:12px 22px;border:1px solid var(--th-accent);border-radius:6px;background:var(--th-accent);color:#fff;text-decoration:none;font:600 15px/1.35 Arial,sans-serif;cursor:pointer;transition:background .2s ease,border-color .2s ease;max-width:100%;text-align:center}
.th-catalog .th-button:hover,.th-product .th-button:hover{background:#503821;border-color:#503821;color:#fff}
.th-product .th-button-secondary,.th-catalog .th-button-secondary{background:transparent;color:var(--th-accent)}
.th-product .th-button-secondary:hover,.th-catalog .th-button-secondary:hover{background:#eee6dd;color:#503821}
.th-catalog-viewport{min-width:0;padding:3px 0;height:auto;max-height:none;overflow:visible}
.th-catalog-sentinel{height:1px;pointer-events:none}
.th-catalog-load-state{max-width:380px;margin:18px auto;padding:18px 20px;border:1px solid var(--th-line);border-radius:10px;background:var(--th-wash);text-align:center;color:var(--th-ink);font-size:15px;line-height:1.5}
.th-catalog .th-catalog-load-state[hidden],.th-catalog .th-catalog-load-state [hidden]{display:none!important}
.th-catalog-load-state p{display:flex;align-items:center;justify-content:center;gap:12px;margin:0 0 8px}
.th-catalog-load-state.th-is-loading p:before{content:"";display:block;flex:0 0 24px;width:24px;height:24px;border:3px solid var(--th-line);border-top-color:var(--th-accent);border-radius:50%;animation:th-catalog-spin .8s linear infinite}
@keyframes th-catalog-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.th-catalog-load-state.th-is-loading p:before{animation:none}}
.th-catalog-load-state p:last-child{margin-bottom:0}
.th-catalog-load-state [data-th-retry]{min-height:44px;padding:10px 18px}
.th-catalog-status{color:var(--th-muted);font-size:14px;line-height:1.5}
/* All catalog cards stay in document flow; only the browser page scrolls. */
.th-catalog-footer{text-align:center;margin-top:28px}
.th-catalog-empty{padding:28px;border:1px solid var(--th-line);border-radius:10px;background:var(--th-paper);text-align:center}
.th-product{max-width:1200px;margin:0 auto;padding:32px 12px 44px}
.th-product-top{display:grid;grid-template-columns:minmax(0,min(48%,460px)) minmax(0,1fr);gap:28px;align-items:start}
.th-gallery{min-width:0}
/* Cap tall photos and let the frame hug their natural proportions instead of adding side bars. */
/* Keep the caption in the same narrow column as its photo, not the full gallery. */
.th-gallery-visual{width:fit-content;max-width:calc(100% - 6px);margin-inline:3px 0}
.th-gallery-stage{position:relative;width:fit-content;max-width:100%;border:1px solid var(--th-line);border-radius:12px;background:var(--th-paper);overflow:hidden}
.th-gallery [data-th-main-link]{display:block;width:auto;height:auto;padding:10px 8px;cursor:zoom-in;text-decoration:none}
.th-gallery [data-th-main-image]{display:block;width:auto;height:auto;max-height:min(65vh,560px);max-height:min(65svh,560px);aspect-ratio:auto;object-fit:contain;object-position:center}
.th-gallery [data-th-gallery-prev],.th-gallery [data-th-gallery-next]{position:absolute;z-index:1;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:1px solid #dfd6cd;border-radius:50%;background:rgba(255,255,255,.94);color:var(--th-ink);box-shadow:0 2px 8px rgba(52,37,22,.05);font-size:22px;line-height:1;cursor:pointer}
.th-gallery [data-th-gallery-prev]{left:12px}.th-gallery [data-th-gallery-next]{right:12px}
.th-gallery [data-th-gallery-prev]:hover,.th-gallery [data-th-gallery-next]:hover{background:#eee6dd}
.th-gallery [data-th-gallery-prev]:disabled,.th-gallery [data-th-gallery-next]:disabled{display:none}
.th-gallery-thumbs{display:flex;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#c4b19f #f1ece7;margin-top:10px;padding:4px 3px 8px;max-width:100%}
.th-gallery-thumbs button[data-th-src]{display:flex;flex-direction:column;flex:0 0 80px;width:80px;height:102px;position:relative;margin:0;padding:5px;border:1px solid #d8cec4;border-radius:7px;background:var(--th-paper);overflow:hidden;cursor:pointer}
.th-gallery-thumbs button[data-th-src][aria-pressed=true]{border:2px solid var(--th-accent);padding:4px;box-shadow:0 0 0 1px var(--th-accent)}
.th-gallery-thumbs button[data-th-src]:hover{border-color:var(--th-accent)}
.th-gallery-thumbs img{display:block;width:100%;height:68px;object-fit:contain;object-position:center}
.th-gallery-thumbs button span{display:block;width:100%;font-size:12px;line-height:20px;color:var(--th-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.th-gallery-status{min-height:22px;color:var(--th-muted);font-size:13px;line-height:1.5;text-align:center;margin:2px 0 0}
.th-product-copy{display:flex;flex-direction:column;padding-top:16px;min-width:0;min-height:0}
.th-product-copy>.th-model{flex-shrink:0}
.th-product-text{min-width:0;min-height:0;flex:0 1 auto;overflow-wrap:anywhere}
.th-product .th-product-copy .th-product-title{color:var(--th-ink);font:600 28px/1.3 Montserrat,Arial,sans-serif;margin:0 0 18px;overflow-wrap:anywhere}
.th-product .th-product-description{color:var(--th-muted);font-size:17px;line-height:1.75;margin:0}
.th-product .th-actions{display:flex;align-items:stretch;flex-wrap:wrap;flex-shrink:0;gap:12px;margin-top:24px}
.th-product .th-actions .th-button{padding:15px 22px}
/* Keep inquiry buttons inside the main image height; only the full text scrolls. */
@media(min-width:768px){.th-product-copy{max-height:var(--th-gallery-height,none)}.th-product-text{margin-top:14px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#b7a28f #eee6dd}.th-product-text[tabindex="0"]{padding-right:12px}.th-product-text:focus-visible{outline:2px solid var(--th-accent);outline-offset:-2px}}
.th-specs{margin-top:48px;padding-top:36px;border-top:1px solid var(--th-line)}
.th-product .th-specs h2{color:var(--th-ink);font:600 28px/1.25 Arial,sans-serif;margin:0 0 22px}
.th-product .th-specs table{width:100%;max-width:100%;margin:0;border-collapse:separate;border-spacing:0;border:1px solid var(--th-line);border-radius:9px;overflow:hidden;font:16px/1.6 Arial,sans-serif;background:var(--th-paper)}
.th-product .th-specs th,.th-product .th-specs td{padding:16px 22px;border:0;border-bottom:1px solid var(--th-line);vertical-align:top;text-align:left;overflow-wrap:anywhere}
.th-product .th-specs th{width:30%;font-weight:600;color:var(--th-ink);background:#f3eee8}
.th-product .th-specs td{color:var(--th-muted)}
.th-product .th-specs tr:last-child th,.th-product .th-specs tr:last-child td{border-bottom:0}
.th-product .th-spec-note{font-size:13px;color:var(--th-muted);margin:14px 0 0}
.th-product .th-back-link{display:inline-block;margin-bottom:16px;color:var(--th-accent);font-size:14px;text-decoration:underline;text-underline-offset:3px}
.th-product dialog[data-th-zoom]{position:fixed;width:min(94vw,1100px);max-width:94vw;height:min(90vh,1000px);max-height:90vh;padding:40px 14px 14px;border:0;border-radius:10px;background:#fff;overflow:hidden;box-shadow:0 20px 80px rgba(0,0,0,.3)}
.th-product dialog[data-th-zoom]::backdrop{background:rgba(25,19,13,.84)}
.th-product dialog[data-th-zoom] img{display:block;width:100%;height:100%;object-fit:contain}
.th-product dialog[data-th-zoom] button[data-th-zoom-close]{position:absolute;right:10px;top:4px;width:38px;height:36px;display:flex;justify-content:center;align-items:center;border:0;border-radius:5px;background:#f2ede7;color:#342516;font:28px/1 Arial,sans-serif;cursor:pointer}
.th-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(max-width:1023px){.th-catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.th-product-top{gap:28px}.th-product-copy{padding-top:8px}}
@media(max-width:767px){.th-product{padding:22px 10px 36px}.th-product-top{grid-template-columns:minmax(0,1fr);gap:22px}.th-product-copy{padding-top:0}.th-product-text{margin-top:12px}.th-product .th-product-copy .th-product-title{font-size:26px;margin:0 0 16px}.th-product .th-product-description{font-size:16px}.th-product .th-actions{margin-top:22px}.th-product .th-actions .th-button{flex:1 1 220px}.th-specs{margin-top:30px;padding-top:24px}.th-product .th-specs h2{font-size:25px}.th-product .th-specs th,.th-product .th-specs td{padding:14px 15px;font-size:15px}.th-product .th-specs th{width:38%}.th-gallery-thumbs button[data-th-src]{flex-basis:72px;width:72px;height:96px}.th-gallery-thumbs img{height:62px}}
@media(max-width:767px){.th-catalog .th-card-body .th-card-title{font-size:14px;line-height:1.4}}
/* Phone photos use the available width; auto margins center short thumbnail rows without hiding overflow. */
@media(max-width:767px){.th-gallery-visual{width:100%;max-width:100%;margin-inline:auto}.th-gallery-stage{width:100%;margin-inline:auto}.th-gallery [data-th-main-image]{width:100%;height:auto;max-height:none}.th-gallery-thumbs button[data-th-src]:first-child{margin-inline-start:auto}.th-gallery-thumbs button[data-th-src]:last-child{margin-inline-end:auto}}
@media(max-width:599px){.th-catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 10px}.th-catalog .th-card-image{padding:4px}.th-catalog .th-card-body{padding:0 8px 8px;gap:3px}.th-catalog .th-model{font-size:11px;letter-spacing:.6px}.th-gallery [data-th-main-link]{padding:8px 6px}.th-gallery [data-th-gallery-prev]{left:6px}.th-gallery [data-th-gallery-next]{right:6px}.th-product dialog[data-th-zoom]{width:96vw;max-width:96vw;height:82vh;max-height:82vh}}
@media(prefers-reduced-motion:reduce){.th-catalog *,.th-product *{scroll-behavior:auto!important;transition:none!important;animation:none!important}.th-product-card:hover,.th-product-card:hover .th-card-image img{transform:none}}

