:root {
    --green: #1f7a4d;
    --green-dark: #155b39;
    --green-soft: #e8f4ee;
    --gray: #f5f7f6;
    --text: #1d2b24;
    --muted: #66746d;
    --border: #dbe5df;
    --white: #fff;
    --shadow: 0 14px 35px rgba(20, 63, 42, .08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--text); background: var(--white); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--border); backdrop-filter: blur(10px); }
.nav-wrap { min-height: 74px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--green-dark); white-space: nowrap; }
.brand-mark { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: var(--green); color: #fff; }
.nav-links { display: flex; gap: 18px; margin-left: auto; align-items: center; }
.nav-links a { color: #385044; font-weight: 700; font-size: 15px; }
.nav-links a.active, .nav-links a:hover { color: var(--green); }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-parent { display: inline-flex; align-items: center; gap: 4px; }
.nav-parent:after { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .65; margin-top: 2px; }
.nav-dropdown { position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(10px); min-width: 250px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 18px 40px rgba(20,63,42,.12); opacity: 0; visibility: hidden; pointer-events: none; transition: .18s ease; z-index: 50; }
.nav-dropdown:before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.nav-dropdown a { display: block; padding: 10px 12px; border-radius: 8px; color: #385044; white-space: nowrap; }
.nav-dropdown a:hover { background: var(--green-soft); color: var(--green-dark); }
.has-dropdown:hover .nav-dropdown, .has-dropdown:focus-within .nav-dropdown { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.language-select { height: 40px; min-width: 178px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); padding: 0 10px; font-weight: 700; }
.whatsapp-link, .btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; padding: 10px 16px; font-weight: 800; border: 1px solid transparent; cursor: pointer; }
.whatsapp-link { background: var(--green-soft); color: var(--green-dark); }
.btn.primary { background: var(--green); color: #fff; }
.btn.secondary { background: #fff; color: var(--green-dark); border-color: var(--green); }
.btn.ghost { background: transparent; color: var(--green-dark); border-color: var(--border); }
.btn.small { min-height: 38px; padding: 8px 12px; background: var(--green); color: #fff; font-size: 14px; }
.nav-toggle { display: none; border: 1px solid var(--border); background: #fff; border-radius: 8px; width: 42px; height: 42px; font-size: 22px; }
.hero { background: linear-gradient(135deg, #eef8f2, #ffffff 50%, #e5f3ec); padding: 82px 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 42px; align-items: center; }
.eyebrow { color: var(--green); font-weight: 800; letter-spacing: 0; text-transform: uppercase; font-size: 13px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 14px; }
h1 { font-size: 48px; max-width: 850px; }
h2 { font-size: 32px; }
h3 { font-size: 20px; }
.hero-subtitle, .lead { font-size: 18px; color: var(--muted); }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-panel { display: grid; gap: 16px; }
.supply-card { min-height: 126px; border-radius: 8px; background: #fff; box-shadow: var(--shadow); padding: 24px; display: flex; align-items: center; gap: 18px; border: 1px solid var(--border); }
.supply-card strong { font-size: 36px; color: var(--green); min-width: 84px; }
.section { padding: 72px 0; }
.section.muted, .muted { background: var(--gray); }
.section-head { margin-bottom: 28px; max-width: 760px; }
.section-head p { color: var(--muted); margin: 0; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.category-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 20px; min-height: 128px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.category-card span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; color: #fff; background: var(--green); font-weight: 800; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; width: 100%; }
.product-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.product-card img, .image-placeholder { height: 220px; width: 100%; object-fit: cover; background: linear-gradient(135deg, #d9eee4, #f8fbf9); display: grid; place-items: center; color: var(--green); font-size: 42px; font-weight: 900; }
.image-placeholder.large { height: 440px; border-radius: 8px; border: 1px solid var(--border); }
.product-card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-category { color: var(--green); font-weight: 800; margin: 0; font-size: 13px; }
.product-card p { margin: 0; color: var(--muted); }
.product-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: #30483b; }
.product-meta span { background: var(--green-soft); border-radius: 8px; padding: 5px 8px; }
.feature-grid, .factory-grid, .about-grid, .contact-panel, .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.check-list { display: grid; gap: 12px; }
.check-list p { margin: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-weight: 700; }
.check-list p:before { content: "✓"; color: var(--green); margin-right: 8px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.steps span { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 14px; text-align: center; font-weight: 800; color: var(--green-dark); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.metric-grid div { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 24px; text-align: center; }
.metric-grid strong { display: block; font-size: 38px; color: var(--green); }
.page-hero { background: var(--green-soft); padding: 58px 0; }
.page-hero p { color: var(--muted); max-width: 780px; }
.section-head-left { max-width: none; }
.products-category-section { padding-top: 36px; padding-bottom: 24px; }
.products-filter-top { display: flex; justify-content: flex-start; margin-bottom: 16px; }
.products-filter-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: #395145; font-weight: 800; transition: .18s ease; }
.products-filter-chip:hover, .products-filter-chip.active { background: var(--green-soft); border-color: #b7d5c6; color: var(--green-dark); }
.products-category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 24px; }
.products-category-card { background: #fff; border: 1px solid #d3e2d9; border-radius: 16px; min-height: 236px; padding: 24px 22px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.products-category-card:hover { border-color: #b8d2c5; box-shadow: 0 12px 28px rgba(20,63,42,.06); transform: translateY(-1px); }
.products-category-card.active { border-color: #9ec1b0; box-shadow: 0 10px 24px rgba(20,63,42,.08); background: #fbfdfc; }
.products-category-icon { width: 126px; height: 108px; display: grid; place-items: center; }
.products-category-icon img { width: auto; max-width: 112px; max-height: 92px; height: auto; object-fit: contain; }
.products-category-card strong { display: block; max-width: 270px; min-height: 72px; color: #0b241f; font-size: 22px; font-weight: 900; line-height: 1.28; text-align: center; }
.products-list-section { padding-top: 16px; }
.products-list-head { margin-bottom: 22px; }
.detail-list { display: grid; gap: 10px; margin-top: 20px; }
.detail-list p { margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.product-gallery { position: relative; display: grid; gap: 14px; }
.gallery-main-link { position: relative; display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow); cursor: zoom-in; }
.gallery-main { width: 100%; height: 500px; object-fit: contain; background: #fff; }
.gallery-zoom { position: absolute; right: 14px; bottom: 14px; border-radius: 8px; padding: 8px 12px; background: rgba(21,91,57,.9); color: #fff; font-size: 13px; font-weight: 800; opacity: 0; transform: translateY(4px); transition: .2s ease; }
.gallery-main-link:hover .gallery-zoom { opacity: 1; transform: translateY(0); }
.gallery-btn { position: absolute; top: 230px; z-index: 2; width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--border); background: rgba(255,255,255,.94); color: var(--green-dark); font-size: 22px; font-weight: 900; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.gallery-btn.prev { left: 12px; }
.gallery-btn.next { right: 12px; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.gallery-thumbs button { border: 2px solid var(--border); border-radius: 8px; padding: 3px; background: #fff; cursor: pointer; overflow: hidden; transition: .18s ease; }
.gallery-thumbs button:hover { border-color: #8fc9aa; transform: translateY(-1px); }
.gallery-thumbs button.active { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,122,77,.12); }
.gallery-thumbs img { width: 100%; height: 86px; object-fit: contain; background: #fff; border-radius: 6px; }
.image-lightbox { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 28px; background: rgba(10, 25, 18, .84); }
.image-lightbox.open { display: flex; }
.image-lightbox img { max-width: min(1100px, 96vw); max-height: 90vh; object-fit: contain; background: #fff; border-radius: 8px; }
.lightbox-close { position: fixed; top: 18px; right: 18px; width: 44px; height: 44px; border: 0; border-radius: 8px; background: #fff; color: var(--green-dark); font-size: 30px; line-height: 1; cursor: pointer; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.service-card { border: 1px solid var(--border); border-radius: 8px; padding: 22px; background: #fff; box-shadow: var(--shadow); min-height: 130px; }
.service-card span { color: var(--green); font-weight: 900; }
.inquiry-form { display: grid; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 22px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 800; color: #354b40; }
input, textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; min-height: 44px; padding: 10px 12px; font: inherit; }
textarea { resize: vertical; }
.success { color: var(--green-dark); background: var(--green-soft); border-radius: 8px; padding: 12px; font-weight: 800; }
.site-footer { background: #173b29; color: #eaf4ee; padding-top: 44px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; }
.site-footer p { color: #cfe1d7; margin: 7px 0; }
.site-map-section { padding: 60px 0 64px; background: #fff; }
.site-map-wrap { position: relative; width: min(1520px, calc(100% - 128px)); margin: 0 auto; height: 450px; overflow: hidden; }
.site-map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; background: #e8f4ee; }
.site-map-open { position: absolute; top: 12px; left: 12px; z-index: 2; display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 3px; background: #fff; color: #1a73e8; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.copyright { border-top: 1px solid rgba(255,255,255,.12); text-align: center; padding: 18px; margin-top: 28px; color: #cfe1d7; }

.admin-body { background: #f3f5f4; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.admin-sidebar { background: #173b29; color: #fff; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.admin-sidebar a { padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.08); }
.admin-main { padding: 30px; }
.admin-card, .admin-table, .admin-form { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.admin-table { width: 100%; border-collapse: collapse; display: table; padding: 0; overflow: hidden; }
.admin-table th, .admin-table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.admin-table th { background: var(--green-soft); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-image-list { display: grid; grid-template-columns: repeat(5, minmax(92px, 1fr)); gap: 10px; margin-top: 10px; max-width: 760px; }
.admin-image-item { border: 1px solid var(--border); border-radius: 8px; padding: 6px; background: #fff; min-width: 0; }
.admin-thumb-preview { width: 100%; height: 82px; border: 0; border-radius: 8px; padding: 0; background: #f7faf8; cursor: zoom-in; overflow: hidden; }
.admin-thumb-preview img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.admin-keep-image { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; font-weight: 700; font-size: 13px; }
.admin-keep-image input { width: auto; min-height: auto; }
.danger { color: #b3261e; font-weight: 800; }
.login-page { min-height: 100vh; display: grid; place-items: center; background: var(--green-soft); }
.login-box { width: min(420px, calc(100% - 32px)); background: #fff; border-radius: 8px; padding: 28px; box-shadow: var(--shadow); }

.admin-category-icon { width: 58px; height: 58px; object-fit: contain; background: #f7faf8; border: 1px solid var(--border); border-radius: 8px; padding: 6px; }
.inline-category-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto; gap: 10px; align-items: center; }
.inline-category-form input { min-height: 40px; }
.compact-admin-form { max-width: 760px; }
.as-link { border: 0; background: transparent; padding: 0; cursor: pointer; font: inherit; }
.category-admin-table td { vertical-align: middle; }


.social-links { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.social-link { position: relative; width: 46px; height: 46px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: #fff; color: var(--green-dark); box-shadow: 0 10px 24px rgba(20, 63, 42, .08); transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease; }
.social-link svg { width: 22px; height: 22px; display: block; }
.social-link span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.social-link:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(20, 63, 42, .16); background: var(--green); color: #fff; }
.hero-social { margin-top: 28px; }
.footer-social { margin-top: 22px; }
.site-footer .social-link { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #eaf4ee; box-shadow: none; }
.site-footer .social-link:hover { background: #eaf4ee; color: var(--green-dark); }

@media (max-width: 920px) {
    .nav-wrap { flex-wrap: wrap; padding: 12px 0; }
    .nav-toggle { display: inline-grid; place-items: center; margin-left: auto; }
    .nav-links { order: 3; display: none; width: 100%; margin-left: 0; flex-direction: column; align-items: stretch; gap: 4px; }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 10px 0; }
    .nav-item { display: block; }
    .nav-parent { width: 100%; padding: 10px 0; }
    .nav-dropdown { position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto; min-width: 0; width: 100%; box-shadow: none; border: 0; border-left: 2px solid var(--green-soft); border-radius: 0; padding: 2px 0 2px 14px; margin: 0 0 4px; }
    .nav-dropdown:before { display: none; }
    .has-dropdown:hover .nav-dropdown, .has-dropdown:focus-within .nav-dropdown { transform: none; }
    .nav-actions { order: 2; margin-left: 0; }
    .hero-grid, .feature-grid, .factory-grid, .about-grid, .contact-panel, .detail-grid { grid-template-columns: 1fr; }
    h1 { font-size: 36px; }
    .category-grid, .product-grid, .service-grid { grid-template-columns: repeat(2, 1fr); }
    .products-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .products-category-card { min-height: 220px; }
    .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .container { width: min(100% - 24px, 1180px); }
    .brand span:last-child { max-width: 190px; white-space: normal; line-height: 1.15; }
    .nav-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
    .language-select, .whatsapp-link { width: 100%; min-height: 46px; }
    .hero { padding: 50px 0; }
    h1 { font-size: 30px; }
    h2 { font-size: 26px; }
    .hero-buttons, .form-row, .footer-grid, .metric-grid, .category-grid, .product-grid, .service-grid, .steps { grid-template-columns: 1fr; display: grid; }
    .btn { width: 100%; }
    .section { padding: 52px 0; }
    .site-map-section { padding: 36px 0 40px; }
    .site-map-wrap { width: min(100% - 24px, 1180px); height: 300px; }
    .gallery-main { height: 330px; }
    .gallery-btn { top: 145px; }
    .gallery-thumbs { grid-template-columns: repeat(3, 1fr); }
    .admin-image-list { grid-template-columns: repeat(5, minmax(58px, 1fr)); gap: 6px; }
    .admin-thumb-preview { height: 64px; }
    .admin-keep-image { font-size: 12px; }
    .gallery-thumbs img { height: 78px; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; }
    .admin-main { padding: 18px; overflow-x: auto; }
}

/* Three-level Products menu */
.nav-dropdown-item { position: relative; }
.nav-category-link { display: flex !important; align-items: center; justify-content: space-between; gap: 18px; }
.nav-dropdown-item.has-submenu > .nav-category-link:after { content: "›"; font-size: 18px; font-weight: 900; color: var(--green); line-height: 1; }
.nav-subdropdown { position: absolute; top: -10px; left: calc(100% + 8px); min-width: 260px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 18px 40px rgba(20,63,42,.12); opacity: 0; visibility: hidden; pointer-events: none; transform: translateX(8px); transition: .18s ease; z-index: 60; }
.nav-subdropdown:before { content: ""; position: absolute; top: 0; bottom: 0; left: -12px; width: 12px; }
.nav-dropdown-item:hover > .nav-subdropdown, .nav-dropdown-item:focus-within > .nav-subdropdown { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(0); }
.subcategory-filter-panel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.products-filter-top { gap: 10px; flex-wrap: wrap; }
.products-filter-chip.current-filter { background: #fbfdfc; border-style: dashed; color: var(--muted); cursor: default; }
.empty-tip { padding: 18px; border: 1px dashed var(--border); border-radius: 12px; background: #fbfdfc; color: var(--muted); font-weight: 700; }

/* Admin category hierarchy */
.admin-help { color: var(--muted); font-weight: 600; line-height: 1.45; }
.admin-product-category-row .language-select { width: 100%; }
.category-parent-row td { background: #fff; }
.category-child-row td { background: #fbfdfc; }
.inline-subcategory-form { display: grid; grid-template-columns: 82px minmax(180px, 1fr) auto; gap: 10px; align-items: center; padding-left: 18px; }
.subcategory-prefix { color: var(--green-dark); font-weight: 900; white-space: nowrap; }
.inline-subcategory-form input { min-height: 40px; }

@media (max-width: 920px) {
    .nav-category-link { padding: 9px 0; }
    .nav-dropdown-item.has-submenu > .nav-category-link:after { content: ""; }
    .nav-subdropdown { position: static; opacity: 1; visibility: visible; pointer-events: auto; transform: none; min-width: 0; width: 100%; box-shadow: none; border: 0; border-left: 2px solid var(--green-soft); border-radius: 0; padding: 2px 0 2px 14px; margin: 0 0 4px; }
    .nav-subdropdown:before { display: none; }
    .nav-subdropdown a { padding: 8px 12px; font-size: 14px; }
}

@media (max-width: 600px) {
    .inline-category-form, .inline-subcategory-form { grid-template-columns: 1fr; padding-left: 0; }
    .subcategory-filter-panel { padding: 12px; }
}


@media (max-width: 720px) {
    .social-links { display: flex; gap: 10px; }
    .social-link { width: 42px; height: 42px; }
}


/* Custom language picker with CSS flag icons.
   Native select boxes cannot reliably render emoji flags on Windows/Edge/Chrome;
   this custom menu uses drawn flag icons so users see real icons instead of country-code abbreviations. */
.language-picker { position: relative; width: 190px; flex: 0 0 auto; }
.language-select-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -9999px; }
.language-current { width: 100%; min-height: 40px; display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); padding: 0 10px; font-weight: 800; cursor: pointer; }
.language-current:hover, .language-picker.open .language-current { border-color: var(--green); box-shadow: 0 8px 20px rgba(20, 63, 42, .08); }
.language-current [data-language-current-label] { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.language-caret { font-size: 12px; color: var(--muted); transition: transform .18s ease; }
.language-picker.open .language-caret { transform: rotate(180deg); }
.language-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 80; width: 230px; max-height: 320px; overflow: auto; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 20px 45px rgba(20, 63, 42, .16); display: none; }
.language-picker.open .language-menu { display: grid; gap: 4px; }
.language-option { width: 100%; min-height: 36px; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 8px; background: transparent; color: var(--text); padding: 7px 9px; font-weight: 700; text-align: left; cursor: pointer; }
.language-option:hover, .language-option.active { background: var(--green-soft); color: var(--green-dark); }
.flag { position: relative; display: inline-block; width: 24px; height: 16px; flex: 0 0 24px; border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); background: #eee; }
.flag-us { background: repeating-linear-gradient(to bottom, #b22234 0 1.2px, #fff 1.2px 2.4px); }
.flag-us:before { content: ""; position: absolute; left: 0; top: 0; width: 10px; height: 8px; background: #3c3b6e; }
.flag-cn { background: #de2910; }
.flag-cn:after { content: "★"; position: absolute; left: 2px; top: -1px; color: #ffde00; font-size: 9px; line-height: 1; }
.flag-sa { background: #006c35; }
.flag-sa:before { content: ""; position: absolute; left: 4px; right: 4px; top: 7px; height: 2px; background: #fff; opacity: .95; }
.flag-fr { background: linear-gradient(to right, #0055a4 0 33.33%, #fff 33.33% 66.66%, #ef4135 66.66%); }
.flag-de { background: linear-gradient(to bottom, #000 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66%); }
.flag-in { background: linear-gradient(to bottom, #ff9933 0 33.33%, #fff 33.33% 66.66%, #138808 66.66%); }
.flag-in:after { content: ""; position: absolute; width: 4px; height: 4px; left: 10px; top: 6px; border-radius: 50%; background: #000080; }
.flag-id { background: linear-gradient(to bottom, #ce1126 0 50%, #fff 50%); }
.flag-it { background: linear-gradient(to right, #009246 0 33.33%, #fff 33.33% 66.66%, #ce2b37 66.66%); }
.flag-jp { background: #fff; }
.flag-jp:after { content: ""; position: absolute; width: 8px; height: 8px; left: 8px; top: 4px; border-radius: 50%; background: #bc002d; }
.flag-kr { background: #fff; }
.flag-kr:before { content: ""; position: absolute; width: 8px; height: 8px; left: 8px; top: 4px; border-radius: 50%; background: linear-gradient(to bottom, #c60c30 0 50%, #003478 50%); transform: rotate(24deg); }
.flag-pt { background: linear-gradient(to right, #006600 0 40%, #ff0000 40%); }
.flag-pt:after { content: ""; position: absolute; left: 8px; top: 5px; width: 5px; height: 5px; border-radius: 50%; background: #ffcc00; }
.flag-ru { background: linear-gradient(to bottom, #fff 0 33.33%, #0039a6 33.33% 66.66%, #d52b1e 66.66%); }
.flag-es { background: linear-gradient(to bottom, #aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75%); }
.flag-th { background: linear-gradient(to bottom, #a51931 0 16%, #fff 16% 32%, #2d2a4a 32% 68%, #fff 68% 84%, #a51931 84%); }
.flag-tr { background: #e30a17; }
.flag-tr:before { content: ""; position: absolute; left: 5px; top: 4px; width: 8px; height: 8px; border-radius: 50%; box-shadow: -2px 0 0 0 #fff; }
.flag-tr:after { content: "★"; position: absolute; left: 13px; top: 4px; color: #fff; font-size: 5px; line-height: 1; }
.flag-vn { background: #da251d; }
.flag-vn:after { content: "★"; position: absolute; left: 7px; top: 1px; color: #ffff00; font-size: 11px; line-height: 1; }
@media (max-width: 900px) {
    .language-picker { width: 100%; }
    .language-menu { left: 0; right: auto; width: min(100%, 260px); }
}

/* Product 360 panorama cover and admin upload progress */
.gallery-main-link.is-panorama { cursor: zoom-in; }
.gallery-360-badge { position: absolute; left: 14px; top: 14px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; min-width: 58px; height: 34px; padding: 0 12px; border-radius: 999px; background: rgba(31,122,77,.94); color: #fff; font-weight: 900; box-shadow: 0 10px 24px rgba(20,63,42,.18); }
.gallery-thumbs button.is-panorama { position: relative; border-color: var(--green); }
.gallery-thumbs button.is-panorama:after { content: "360°"; position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 999px; background: rgba(31,122,77,.92); color: #fff; font-size: 12px; font-weight: 900; }
.admin-media-section { display: grid; gap: 10px; padding: 14px; border: 1px dashed #bfd4c9; border-radius: 10px; background: #fbfdfc; margin: 14px 0; }
.admin-media-section .admin-help { color: var(--muted); font-weight: 600; }
.admin-panorama-list { grid-template-columns: minmax(140px, 220px); }
.admin-panorama-item { position: relative; }
.admin-image-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 2px 9px; margin-bottom: 6px; border-radius: 999px; background: var(--green); color: #fff; font-size: 12px; font-weight: 900; }
.admin-image-item > img { width: 100%; height: 82px; object-fit: contain; background: #f7faf8; border-radius: 8px; }
.upload-progress { margin: 14px 0; padding: 14px; border-radius: 10px; border: 1px solid #bfd4c9; background: var(--green-soft); }
.upload-progress.error { border-color: #e5b7b2; background: #fff4f2; }
.upload-progress-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 10px; color: var(--green-dark); font-weight: 800; }
.upload-progress-track { height: 12px; overflow: hidden; border-radius: 999px; background: #d4e7dc; }
.upload-progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .18s ease; }

/* Draggable 360° product viewer */
.gallery-main-wrap { position: relative; }
.spin-viewer { position: relative; display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow); cursor: grab; touch-action: pan-y; user-select: none; }
.spin-viewer.dragging { cursor: grabbing; }
.spin-viewer .gallery-main { pointer-events: none; }
.spin-hint { position: absolute; left: 14px; bottom: 14px; z-index: 2; border-radius: 999px; padding: 8px 12px; background: rgba(255,255,255,.92); color: var(--green-dark); font-size: 13px; font-weight: 900; box-shadow: 0 8px 20px rgba(20,63,42,.12); }
.spin-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(31,122,77,.12); }
.spin-progress span { display: block; width: 0; height: 100%; background: var(--green); transition: width .08s linear; }
.gallery-thumbs button.is-panorama:after { content: "360°拖动"; }
.admin-spin-list { grid-template-columns: repeat(6, minmax(88px, 1fr)); max-width: 900px; }
.admin-spin-item .admin-image-badge { background: #155b39; }
.admin-spin-section input[type="file"] { border-color: #bfd4c9; }
@media (max-width: 900px) {
    .admin-spin-list { grid-template-columns: repeat(3, minmax(78px, 1fr)); }
    .spin-hint { font-size: 12px; padding: 6px 10px; }
}

/* Real 3D model viewer */
.model-viewer-wrap { position: relative; display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow); }
.product-model-viewer { display: block; width: 100%; height: 500px; background: #fff; --poster-color: #fff; }
.model-viewer-fallback { width: 100%; height: 100%; display: grid; place-items: center; background: #fff; color: var(--green-dark); font-weight: 900; }
.model-viewer-fallback img { width: 100%; height: 100%; object-fit: contain; display: block; }
.model-badge { background: rgba(21, 91, 57, .94); }
.model-hint { left: auto; right: 14px; }
.gallery-thumbs button.is-model { position: relative; border-color: #1c6b44; }
.gallery-thumbs button.is-model:after { content: "3D模型"; position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 999px; background: rgba(21,91,57,.95); color: #fff; font-size: 12px; font-weight: 900; }
.model-thumb-icon { width: 100%; height: 86px; display: grid; place-items: center; border-radius: 6px; background: var(--green-soft); color: var(--green-dark); font-weight: 900; }
.admin-3d-section { border-color: #b9d7ca; background: #f7fbf9; }
.admin-model-current { display: grid; gap: 10px; }
.admin-model-cover { max-width: 220px; }
.admin-model-cover img { width: 100%; height: 96px; object-fit: contain; background: #fff; border-radius: 8px; }
.admin-keep-model { display: block; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-weight: 700; }
.admin-keep-model code { color: var(--green-dark); word-break: break-all; }
@media (max-width: 900px) {
  .product-model-viewer { height: 330px; }
  .model-hint { left: 14px; right: auto; bottom: 48px; }
  .model-thumb-icon { height: 78px; }
}

/* Home VR digital showroom inserted between banner and product categories */
.vr-showroom-section { padding: 54px 0 64px; background: linear-gradient(180deg, #fff 0%, #f8fbf9 100%); }
.vr-showroom-container { width: min(1680px, calc(100% - 56px)); }
.vr-showroom-card { position: relative; overflow: hidden; border: 1px solid #cfe0d6; border-radius: 24px; padding: 30px; background: radial-gradient(circle at 10% 0%, rgba(31,122,77,.12), transparent 34%), #fff; box-shadow: 0 22px 60px rgba(20,63,42,.10); }
.vr-showroom-card-wide { min-height: 720px; }
.vr-showroom-card:before { content: "VR"; position: absolute; right: 34px; top: -46px; color: rgba(31,122,77,.06); font-size: 170px; line-height: 1; font-weight: 900; pointer-events: none; }
.vr-showroom-head { position: relative; max-width: 940px; margin-bottom: 22px; }
.vr-showroom-panorama-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 22px; align-items: stretch; }
.vr-pano-viewer { position: relative; min-height: 620px; overflow: hidden; border-radius: 20px; border: 1px solid #bfd8cb; background: #e6f0eb; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), 0 18px 44px rgba(20,63,42,.10); cursor: grab; touch-action: none; user-select: none; }
.vr-pano-viewer.dragging { cursor: grabbing; }
.vr-pano-viewer:after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(8,50,35,.10)); pointer-events: none; }
.vr-pano-viewer.no-panorama { display: grid; place-items: center; }
.vr-pano-sphere { position: absolute; inset: 0; z-index: 1; background: #e6f0eb; }
.vr-pano-canvas { display: block; width: 100%; height: 100%; }
.vr-pano-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--green-dark); font-weight: 900; letter-spacing: .02em; background: radial-gradient(circle at center, rgba(255,255,255,.92), rgba(230,240,235,.72)); z-index: 1; }
.vr-pano-sphere.loaded .vr-pano-loading { display: none; }
.vr-pano-fallback-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; pointer-events: none; }
.vr-pano-viewer.vr-pano-fallback:before { content: "当前浏览器未加载3D全景，已切换为平面预览"; position: absolute; left: 18px; top: 18px; z-index: 6; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--green-dark); box-shadow: 0 10px 24px rgba(20,63,42,.14); font-size: 12px; font-weight: 900; }
.vr-pano-products { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.vr-pano-product { position: absolute; z-index: 5; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 6px; min-width: 96px; min-height: 80px; padding: 0; border: 0; background: transparent; cursor: pointer; pointer-events: auto; transition: filter .18s ease, opacity .18s ease, transform .18s ease; will-change: left, top, opacity; }
.vr-pano-product img { width: auto; max-width: 160px; max-height: 142px; object-fit: contain; filter: drop-shadow(0 18px 18px rgba(6,40,25,.26)); transform-origin: center bottom; transition: transform .18s ease, filter .18s ease; }
.vr-pano-product:hover img, .vr-pano-product.active img { transform: scale(1.08); filter: drop-shadow(0 22px 22px rgba(6,40,25,.34)); }
.vr-pano-product.out-of-view { opacity: 0; pointer-events: none; }
.vr-product-marker { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 999px; background: var(--green); color: #fff; font-weight: 900; box-shadow: 0 12px 26px rgba(20,63,42,.24); }
.vr-pano-product-label { display: inline-flex; align-items: center; gap: 8px; max-width: 210px; min-height: 34px; padding: 5px 10px 5px 5px; border: 1px solid rgba(255,255,255,.9); border-radius: 999px; background: rgba(255,255,255,.92); color: var(--green-dark); box-shadow: 0 10px 24px rgba(20,63,42,.18); font-size: 12px; font-weight: 900; backdrop-filter: blur(8px); }
.vr-pano-product-label em { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-style: normal; }
.vr-pano-product-label strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vr-pano-product:hover .vr-pano-product-label, .vr-pano-product.active .vr-pano-product-label { background: var(--green); color: #fff; }
.vr-pano-product:hover .vr-pano-product-label em, .vr-pano-product.active .vr-pano-product-label em { background: #fff; color: var(--green-dark); }
.vr-pano-drag-tip { display: none; }
.vr-room-placeholder { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; align-content: center; text-align: center; color: var(--green-dark); padding: 28px; }
.vr-room-placeholder strong { font-size: 34px; font-weight: 900; }
.vr-room-placeholder span { color: var(--muted); font-weight: 800; }
.vr-product-panel { display: flex; flex-direction: column; min-height: 620px; border: 1px solid #d3e4da; border-radius: 20px; padding: 20px; background: rgba(255,255,255,.97); box-shadow: var(--shadow); }
.vr-panel-badge { align-self: flex-start; margin: 0 0 12px; padding: 5px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: 12px; font-weight: 900; }
.vr-product-panel h3 { font-size: 24px; margin-bottom: 8px; }
.vr-product-panel p[data-vr-note] { color: var(--muted); margin: 0 0 16px; }
.vr-model-slot { position: relative; flex: 1; min-height: 340px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.vr-product-model { display: block; width: 100%; height: 430px; background: #fff; --poster-color: #fff; }
.vr-product-model img[slot="poster"] { width: 100%; height: 100%; object-fit: contain; }
.vr-product-cover { width: 100%; height: 430px; object-fit: contain; padding: 12px; background: #fff; }
.vr-empty-model { width: 100%; height: 360px; display: grid; place-items: center; align-content: center; gap: 6px; color: var(--green-dark); background: linear-gradient(135deg, #e8f4ee, #fff); }
.vr-empty-model strong { font-size: 56px; line-height: 1; }
.vr-empty-model span { font-weight: 900; color: var(--muted); }
.vr-model-tip { position: absolute; left: 12px; bottom: 12px; z-index: 2; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--green-dark); box-shadow: 0 8px 20px rgba(20,63,42,.12); font-size: 12px; font-weight: 900; }
.vr-panel-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.vr-panel-actions .btn.secondary { min-height: 38px; padding: 8px 12px; }
.admin-checkline { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.admin-checkline input { width: auto; min-height: auto; }
.admin-vr-hotspot-list { display: grid; gap: 16px; }
.admin-vr-hotspot-card { padding: 16px; border: 1px solid #d4e5db; border-radius: 14px; background: #fbfdfc; }
.admin-vr-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.admin-vr-card-head strong { color: var(--green-dark); font-size: 18px; }
.admin-vr-current-media { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0; }
.admin-vr-bg-section { border-color: #b9d7ca; background: #f7fbf9; }
.admin-vr-upload-row { align-items: end; }
@media (max-width: 1180px) {
    .vr-showroom-container { width: min(100% - 32px, 1180px); }
    .vr-showroom-panorama-layout { grid-template-columns: 1fr; }
    .vr-product-panel { min-height: auto; }
    .vr-model-slot { min-height: 280px; }
    .vr-product-model, .vr-product-cover { height: 340px; }
}
@media (max-width: 760px) {
    .vr-showroom-section { padding: 34px 0 42px; }
    .vr-showroom-card { padding: 18px; border-radius: 18px; }
    .vr-showroom-card-wide { min-height: auto; }
    .vr-pano-viewer { min-height: 420px; border-radius: 16px; }
    .vr-pano-product img { max-width: 118px; max-height: 106px; }
    .vr-pano-product-label { max-width: 150px; }
    .vr-pano-product-label strong { display: none; }
    .vr-pano-drag-tip { left: 12px; right: 12px; bottom: 12px; white-space: normal; border-radius: 14px; text-align: center; }
    .vr-product-panel { min-height: auto; }
    .vr-product-model, .vr-product-cover { height: 300px; }
    .vr-panel-actions .btn { width: 100%; }
    .admin-vr-card-head { align-items: flex-start; flex-direction: column; }
}

.admin-upload-limits{margin-top:12px;padding:12px 14px;border:1px solid #b8d8c8;background:#f4fbf7;border-radius:12px;color:#17422d;line-height:1.7}
.admin-upload-limits a{margin-left:10px;color:#0b7a45;font-weight:800;text-decoration:underline}
.admin-help-list{line-height:1.9;color:#42564b;padding-left:22px}
.admin-help-list code{background:#eef6f2;border:1px solid #d8e9df;border-radius:6px;padding:2px 6px;color:#143d2b}

/* Home banner carousel */
.hero-banner-slider { position: relative; overflow: hidden; background: linear-gradient(135deg, #eef8f2, #ffffff 50%, #e5f3ec); }
.hero-bg-slides { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hero-bg-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.02); transition: opacity 1s ease-in-out, transform 6s ease; }
.hero-bg-slide.active { opacity: var(--banner-opacity, .2); transform: scale(1); }
.hero-bg-slides::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(238,248,242,.45), rgba(255,255,255,.72) 48%, rgba(229,243,236,.52)); }
.hero-banner-slider .container { position: relative; z-index: 2; }
.banner-upload-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 12px 0 20px; }
.banner-upload-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: #fbfdfc; min-width: 0; }
.banner-upload-card strong { color: var(--green-dark); }
.banner-upload-card input[type="file"] { width: 100%; max-width: 100%; }
.banner-opacity-control { margin: 12px 0 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: #fbfdfc; }
.banner-opacity-control label { display: block; font-weight: 800; color: var(--green-dark); }
.banner-opacity-control input[type="range"] { width: 100%; margin-top: 10px; accent-color: var(--green); }
.banner-opacity-control .admin-help { margin: 8px 0 0; }
@media (max-width: 1100px) { .banner-upload-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .banner-upload-grid { grid-template-columns: 1fr; } }
