/*
Theme Name: Liisolar
Theme URI: https://www.liisolar.com/
Author: Pannita Co., Ltd.
Description: Block theme for Liisolar — solar panels, inverters and batteries. Built from the Liisolar design system.
Version: 1.3.4
Requires at least: 6.4
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: liisolar
*/

:root {
  --surface: #ffffff; --surface-alt: #f3f4f6; --surface-warm: #f8f0e5;
  --line: #dde1e8; --line-strong: #7a8396;
  --ink: #131c33; --ink-muted: #5b6578;
  --navy: #131c33; --navy-soft: #24345a; --on-navy: #ffffff; --on-navy-muted: #b7c0d3;
  --copper: #8a4f3a; --sun: #e0a265; --cta: #a35a30; --cta-hover: #8a4f3a; --on-cta: #ffffff;
  --line-app: #06c755; --on-line-app: #ffffff;
  --success: #1c6b47; --success-soft: #e3f3ea; --warning: #8a5a00; --warning-soft: #fbf0d9;
  --focus: #a35a30;
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 16px; --radius-full: 999px;
  --shadow-card: 0 1px 2px rgba(19,28,51,.06), 0 4px 12px rgba(19,28,51,.06);
  --shadow-raised: 0 8px 24px rgba(19,28,51,.12);
  --font-display: "LINE Seed Sans TH", system-ui, sans-serif;
  --font-sans: "LINE Seed Sans TH", system-ui, sans-serif;
  --wrap: 1200px;
}

body { background: var(--surface); color: var(--ink); font-family: var(--font-sans); margin: 0; }
a:focus-visible, button:focus-visible, .wp-element-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ls-wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.ls-icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* Top bar */
.ls-topbar { background: var(--navy); color: var(--on-navy-muted); font-size: 14px; line-height: 22px; }
.ls-topbar .ls-wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding-block: 8px; }
.ls-topbar-group { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.ls-topbar a, .ls-topbar span { color: var(--on-navy); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.ls-topbar span { color: var(--on-navy-muted); }
.ls-topbar .ls-icon { width: 16px; height: 16px; color: var(--sun); }

/* Header */
.ls-site-header { position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 8px rgba(19,28,51,.08); }
.admin-bar .ls-site-header { top: 32px; }
.ls-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.ls-header .ls-wrap { display: flex; align-items: center; gap: 32px; padding-block: 10px; }
.ls-logo img { display: block; height: 56px; width: auto; }
.ls-nav { display: flex; gap: 28px; flex: 1; margin: 0; padding: 0; list-style: none; }
.ls-nav a { color: var(--ink); text-decoration: none; font-size: 15px; line-height: 20px; font-weight: 500; padding: 8px 0; border-bottom: 2px solid transparent; }
.ls-nav a:hover, .ls-nav a[aria-current="page"] { border-bottom-color: var(--cta); }
.ls-menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-md); padding: 8px 12px; font: inherit; color: var(--ink); cursor: pointer; }

/* Buttons */
.ls-btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-sans); font-size: 15px; line-height: 20px; font-weight: 600; padding: 12px 24px; border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s; }
.ls-btn-lg { font-size: 16px; padding: 14px 32px; }
.ls-btn-sm { font-size: 14px; padding: 8px 14px; }
.ls-btn-primary { background: var(--cta); color: var(--on-cta) !important; }
.ls-btn-primary:hover { background: var(--cta-hover); }
.ls-btn-secondary { background: transparent; color: var(--ink) !important; border-color: var(--line-strong); }
.ls-btn-secondary:hover { border-color: var(--ink); }
.ls-btn-light { background: transparent; color: var(--on-navy) !important; border-color: var(--on-navy-muted); }
.ls-btn-line { background: var(--line-app); color: var(--on-line-app) !important; border-radius: var(--radius-full); font-weight: 700; }
.ls-btn-line:hover { filter: brightness(.94); }
.ls-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Hero */
.ls-hero { background-color: var(--navy); color: var(--on-navy); position: relative; overflow: hidden; }
.ls-hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center right; z-index: 0; pointer-events: none; }
.ls-hero::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background-image: linear-gradient(90deg, rgba(19,28,51,.96) 0%, rgba(19,28,51,.86) 42%, rgba(19,28,51,.35) 75%, rgba(19,28,51,.15) 100%); }
.ls-hero .ls-wrap { display: grid; grid-template-columns: minmax(0, 640px); padding-block: 112px; position: relative; z-index: 1; }
.ls-hero h1 { font-family: var(--font-display); font-size: 48px; line-height: 60px; font-weight: 600; margin: 0 0 16px; color: var(--on-navy); letter-spacing: -.01em; }
.ls-hero p { font-size: 18px; line-height: 30px; color: var(--on-navy-muted); margin: 0 0 32px; max-width: 560px; }
.ls-hero .ls-eyebrow { color: var(--sun); }
.ls-hero-art { position: relative; aspect-ratio: 1; max-width: 420px; justify-self: end; width: 100%; }
.ls-hero-art svg { width: 100%; height: 100%; display: block; }
.ls-hero-stats { display: flex; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.ls-hero-stats div { border-left: 2px solid var(--sun); padding-left: 12px; }
.ls-hero-stats strong { display: block; font-family: var(--font-display); font-size: 22px; line-height: 30px; color: var(--on-navy); }
.ls-hero-stats span { font-size: 14px; color: var(--on-navy-muted); }

/* Solutions (image cards) */
.ls-solution { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: var(--ink); }
.ls-solution img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.ls-solution-body { padding: 20px 24px 24px; }
.ls-solution-body h3 { font-family: var(--font-display); font-size: 20px; line-height: 30px; font-weight: 600; margin: 0 0 4px; }
.ls-solution-body p { margin: 0 0 12px; color: var(--ink-muted); font-size: 16px; line-height: 28px; }
.ls-banner { display: block; width: 100%; height: 320px; object-fit: cover; }
.ls-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.ls-split img { width: 100%; height: auto; border-radius: var(--radius-md); display: block; aspect-ratio: 4 / 3; object-fit: cover; }

/* Sections */
.ls-section { padding-block: 80px; }
.ls-section-alt { background: var(--surface-alt); }
.ls-section-warm { background: var(--surface-warm); }
.ls-eyebrow { font-family: var(--font-display); font-size: 13px; line-height: 18px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; color: var(--copper); margin: 0 0 8px; }
.ls-h2 { font-family: var(--font-display); font-size: 28px; line-height: 40px; font-weight: 600; margin: 0; color: var(--ink); }
.ls-intro { font-size: 18px; line-height: 30px; color: var(--ink-muted); margin: 8px 0 0; max-width: 640px; }
.ls-head { margin-bottom: 32px; display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.ls-head-center { display: block; text-align: center; }
.ls-head-center .ls-intro { margin-inline: auto; }
.ls-link { color: var(--copper); font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.ls-link:hover { text-decoration: underline; }

/* Cards */
.ls-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-card); transition: box-shadow .15s, transform .15s; }
a.ls-card:hover, .ls-card-hover:hover { box-shadow: var(--shadow-raised); transform: translateY(-2px); }
.ls-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ls-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.ls-cat { display: flex; gap: 16px; align-items: center; padding: 24px; text-decoration: none; color: var(--ink); }
.ls-disc { width: 48px; height: 48px; border-radius: var(--radius-full); background: var(--navy); color: var(--sun); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ls-disc .ls-icon { width: 24px; height: 24px; }
.ls-cat-title { font-family: var(--font-display); font-size: 20px; line-height: 30px; font-weight: 600; margin: 0; }
.ls-cat-sub { font-size: 14px; line-height: 22px; color: var(--ink-muted); margin: 0; }
.ls-cat-arrow { margin-left: auto; color: var(--copper); }

.ls-feature { display: flex; flex-direction: column; gap: 12px; }
.ls-feature h3 { font-family: var(--font-display); font-size: 20px; line-height: 30px; font-weight: 600; margin: 0; }
.ls-feature p { margin: 0; font-size: 16px; line-height: 28px; color: var(--ink-muted); }

.ls-product { display: flex; flex-direction: column; overflow: hidden; }
.ls-product-img { aspect-ratio: 4 / 3; background: var(--surface-alt); display: flex; align-items: center; justify-content: center; color: var(--ink-muted); }
.ls-product-img.has-img { background: #ffffff; border-bottom: 1px solid var(--line); }
.ls-product-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ls-product-img .ls-icon { width: 56px; height: 56px; stroke-width: 1.25; }
.ls-product-body { padding: 16px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ls-product-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ls-product-brand { font-size: 13px; line-height: 18px; letter-spacing: .08em; text-transform: uppercase; color: var(--copper); font-weight: 500; }
.ls-product-name { font-family: var(--font-display); font-size: 19px; line-height: 28px; font-weight: 600; margin: 0; }
.ls-specs { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.ls-specs li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 4px 0; }
.ls-specs li span:last-child { color: var(--ink); font-weight: 500; }
.ls-product-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 12px; }
.ls-product-actions .ls-btn { flex: 1; }
.ls-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 18px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-sm); background: var(--surface-alt); color: var(--ink-muted); }
.ls-badge-success { background: var(--success-soft); color: var(--success); }
.ls-badge-warning { background: var(--warning-soft); color: var(--warning); }
.ls-badge-brand { background: var(--surface-warm); color: var(--copper); }

.ls-steps { counter-reset: step; }
.ls-step { padding: 24px; }
.ls-step-num { font-family: var(--font-display); font-size: 32px; line-height: 40px; font-weight: 600; color: var(--sun); }

.ls-brands { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.ls-brand { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 88px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--ink); text-decoration: none; text-align: center; }
.ls-brand small { font-family: var(--font-sans); font-weight: 400; font-size: 13px; color: var(--ink-muted); }

.ls-standards { display: flex; flex-wrap: wrap; gap: 8px; }
.ls-standards span { border: 1px solid var(--line-strong); border-radius: var(--radius-full); padding: 4px 14px; font-size: 14px; font-weight: 600; color: var(--ink); }

.ls-cta { background: var(--surface-warm); border-radius: var(--radius-lg); padding: 48px 40px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.ls-cta h2 { font-family: var(--font-display); font-size: 28px; line-height: 40px; font-weight: 600; margin: 0; }
.ls-cta p { margin: 8px 0 0; color: var(--ink-muted); font-size: 16px; line-height: 28px; }

/* Page header */
.ls-pagehead { background: var(--surface-alt); border-bottom: 1px solid var(--line); padding-block: 48px; }
.ls-pagehead h1 { font-family: var(--font-display); font-size: 36px; line-height: 48px; font-weight: 600; margin: 0; }
.ls-pagehead p { margin: 8px 0 0; color: var(--ink-muted); font-size: 18px; line-height: 30px; }

/* Contact */
.ls-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.ls-contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.ls-contact-list strong { display: block; font-family: var(--font-display); font-weight: 600; }
.ls-contact-list a { color: var(--copper); }

/* Footer */
.ls-footer { background: var(--navy); color: var(--on-navy-muted); font-size: 14px; line-height: 22px; }
.ls-footer-in { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; padding-block: 56px; }
.ls-footer h4 { color: var(--on-navy); font-family: var(--font-display); font-size: 16px; line-height: 24px; font-weight: 600; margin: 0 0 12px; }
.ls-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ls-footer a { color: var(--on-navy-muted); text-decoration: none; }
.ls-footer a:hover { color: var(--on-navy); text-decoration: underline; }
.ls-wordmark { color: var(--on-navy); font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: .02em; margin: 0 0 12px; }
.ls-wordmark span { color: var(--sun); }
.ls-footer-bottom { border-top: 1px solid var(--navy-soft); }
.ls-footer-bottom .ls-wrap { padding-block: 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* Floating LINE */
.ls-float-line { position: fixed; right: 20px; bottom: 20px; z-index: 60; box-shadow: var(--shadow-raised); }

/* Blog */
.ls-content { padding-block: 56px; }
.ls-content .wp-block-post-title a { color: var(--ink); text-decoration: none; }
.ls-content .wp-block-post-title a:hover { color: var(--copper); }
.wp-block-post-template.is-layout-grid .wp-block-post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; padding-bottom: 16px; }
.wp-block-post-template.is-layout-grid .wp-block-post > *:not(.wp-block-post-featured-image) { padding-inline: 20px; }

@media (max-width: 960px) {
  .ls-hero .ls-wrap { padding-block: 64px; }
  .ls-hero::after { background-image: linear-gradient(180deg, rgba(19,28,51,.88) 0%, rgba(19,28,51,.92) 100%); }
  .ls-split { grid-template-columns: 1fr; }
  .ls-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .ls-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .ls-footer-in { grid-template-columns: 1fr 1fr; }
  .ls-menu-toggle { display: inline-flex; }
  .ls-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); flex-direction: column; gap: 0; padding: 8px 24px 16px; border-bottom: 1px solid var(--line); }
  .ls-nav.is-open { display: flex; }
  .ls-nav a { display: block; padding: 12px 0; }
  .ls-header .ls-wrap { position: relative; }
  .ls-header-cta { display: none; }
}
@media (max-width: 782px) {
  .admin-bar .ls-site-header { top: 46px; }
}
@media (max-width: 600px) {
  .ls-wrap { padding-inline: 16px; }
  .ls-hero h1 { font-size: 34px; line-height: 46px; }
  .ls-section { padding-block: 48px; }
  .ls-grid-3, .ls-grid-4 { grid-template-columns: 1fr; }
  .ls-footer-in { grid-template-columns: 1fr; }
  .ls-cta { padding: 32px 20px; }
  .ls-logo img { height: 44px; }
  .ls-topbar-hide { display: none !important; }
  .ls-banner { height: 200px; }
  .admin-bar .ls-site-header { top: 0; }
}