/*
Theme Name: MR Planner Rental
Theme URI: https://rental.mrplanner.hk
Author: MR Event Planner
Author URI: https://mrplanner.hk
Description: 香港投影機租賃網店 — 深色專業主題，支援 WooCommerce 租賃下單、AI 落單助手。Custom dark premium theme for the MR Planner rental store.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mrplanner-rental
*/

/* ============================================================
   MR PLANNER RENTAL — 設計系統
   深色專業主題 · 投影/舞台租賃 · 美觀大方
   ============================================================ */

:root {
  --bg: #07090f;
  --bg-2: #0b0f1a;
  --bg-3: #111827;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.10);
  --text: #f4f6fb;
  --text-2: #a6b0c3;
  --text-3: #6b7689;
  --accent: #00d4ff;
  --accent-2: #7c5cff;
  --accent-3: #ff3d81;
  --grad: linear-gradient(135deg, #00d4ff 0%, #7c5cff 50%, #ff3d81 100%);
  --grad-soft: linear-gradient(135deg, rgba(0,212,255,.14) 0%, rgba(124,92,255,.14) 50%, rgba(255,61,129,.14) 100%);
  --radius: 14px;
  --radius-lg: 22px;
  --font-d: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-b: 'Inter', system-ui, -apple-system, sans-serif;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.65);
  --container: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #7ce4ff; }
ul, ol { list-style-position: inside; }
h1, h2, h3, h4, h5 {
  font-family: var(--font-d);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
p { color: var(--text-2); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--grad); color: #fff !important;
  font-weight: 600; font-size: 15px; font-family: var(--font-d);
  padding: 13px 28px; border-radius: 999px; border: none; cursor: pointer;
  transition: transform .2s, box-shadow .2s, filter .2s;
  box-shadow: 0 8px 30px rgba(0, 212, 255, .25);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 14px 40px rgba(0, 212, 255, .35); }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text) !important; box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent) !important; }
.btn.sm { padding: 9px 20px; font-size: 13.5px; }

/* ---------- Section scaffolding ---------- */
.section { padding: 90px 0; position: relative; }
.section.alt { background: var(--bg-2); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section-head .kicker {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
  background: rgba(0, 212, 255, .08); border: 1px solid rgba(0, 212, 255, .25);
  padding: 6px 16px; border-radius: 999px;
}
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
.section-head p { font-size: 16.5px; }

/* ---------- Header / Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(7, 9, 15, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
.nav.scrolled { box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.nav-logo { display: flex; align-items: center; gap: 12px; font-family: var(--font-d); font-weight: 700; font-size: 19px; color: var(--text); letter-spacing: .01em; }
.nav-logo .logo-mark {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 14px; font-weight: 800; letter-spacing: 0;
  box-shadow: 0 6px 20px rgba(0,212,255,.3);
}
.nav-logo small { display: block; font-size: 10.5px; font-weight: 500; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links li a {
  display: block; padding: 9px 15px; color: var(--text-2); font-size: 14.5px; font-weight: 500;
  border-radius: 8px; transition: color .2s, background .2s;
}
.nav-links li a:hover { color: var(--text); background: var(--surface); }
.nav-links li.current-menu-item a, .nav-links li.current_page_item a { color: var(--accent); }

/* ---------- Dropdown submenu ---------- */
.nav-links li { position: relative; }
.nav-links .sub-menu {
  position: absolute; top: 100%; left: 0; z-index: 98;
  min-width: 240px; list-style: none;
  background: rgba(11, 15, 26, .97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.nav-links li:hover > .sub-menu,
.nav-links li:focus-within > .sub-menu {
  opacity: 1; visibility: visible; transform: translateY(4px);
}
.nav-links .sub-menu li { width: 100%; margin: 0; }
.nav-links .sub-menu li a {
  display: block; padding: 10px 14px; font-size: 13.5px; color: var(--text-2);
  border-radius: 8px; white-space: nowrap;
}
.nav-links .sub-menu li a:hover { color: var(--accent); background: rgba(0,212,255,.08); }
/* 商店項目 hover 時保留底色，令 dropdown 視覺連接 */
.nav-links li.menu-item-has-children > a::after {
  content: '▾'; margin-left: 5px; font-size: 11px; opacity: .7;
}
@media (hover: none) {
  /* 觸屏裝置：click 開合 */
  .nav-links .menu-item-has-children > a { cursor: pointer; }
}
.nav-cta { display: inline-flex; align-items: center; gap: 6px; background: var(--grad); color: #fff !important; font-weight: 600; font-size: 13.5px; padding: 10px 18px; border-radius: 999px; margin-left: 8px; }
.nav-cta:hover { filter: brightness(1.1); }
.nav-cart { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; background: var(--surface); color: var(--text); transition: background .2s; }
.nav-cart:hover { background: var(--surface-2); }
.nav-cart .cart-count {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--accent-3); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}
.nav-burger { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 8px; }
.nav-burger svg { width: 24px; height: 24px; }

@media (max-width: 900px) {
  .nav-burger { display: block; }
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0; z-index: 99;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(7, 9, 15, .97); border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px; transform: translateY(-110%); transition: transform .3s;
    overflow-y: auto; max-height: calc(100vh - 72px);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links li a { padding: 13px 10px; font-size: 16px; }
  .nav-links li .nav-cta { margin: 8px 0 0; justify-content: center; }
  /* 手機版 dropdown：click 展開，唔用 hover */
  .nav-links .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    background: transparent; border: none; box-shadow: none; backdrop-filter: none;
    min-width: 0; padding: 0 0 4px 18px; display: none;
  }
  .nav-links li.menu-item-has-children.submenu-open > .sub-menu { display: block; }
  .nav-links li.menu-item-has-children > a::after {
    content: '▾'; float: right; font-size: 14px; opacity: .7; transition: transform .2s;
  }
  .nav-links li.menu-item-has-children.submenu-open > a::after { transform: rotate(180deg); }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; padding: 140px 0 90px; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-bg .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-video[hidden] { display: none !important; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 40%, rgba(7,9,15,.55) 0%, rgba(7,9,15,.88) 60%, var(--bg) 100%); }
.hero-grid { position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: linear-gradient(rgba(124,92,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(124,92,255,.06) 1px, transparent 1px); background-size: 60px 60px; }
.hero-inner { max-width: 780px; }
.hero .badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--accent); background: rgba(0,212,255,.08); border: 1px solid rgba(0,212,255,.3);
  padding: 7px 16px; border-radius: 999px; margin-bottom: 24px;
}
.hero .badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.12; margin-bottom: 22px; }
.hero h1 .grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 18px; max-width: 620px; margin-bottom: 36px; color: var(--text-2); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 48px; }
.hero-trust .trust-item { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.hero-trust .trust-item svg { width: 18px; height: 18px; color: var(--accent); }

/* ---------- Category cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-card {
  position: relative; display: block; padding: 30px 26px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); overflow: hidden;
  transition: transform .25s, border-color .25s, background .25s;
}
.cat-card:hover { transform: translateY(-4px); border-color: rgba(0, 212, 255, .45); background: var(--surface-2); }
.cat-card .cat-emoji { font-size: 30px; margin-bottom: 14px; display: inline-block; }
.cat-card h3 { font-size: 18px; margin-bottom: 8px; color: var(--text); }
.cat-card p { font-size: 13.5px; color: var(--text-3); margin-bottom: 12px; }
.cat-card .cat-more { font-size: 13px; font-weight: 600; color: var(--accent); }
.cat-card .cat-count { position: absolute; top: 18px; right: 18px; font-size: 11.5px; color: var(--text-3); background: var(--bg-2); border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px; }
@media (max-width: 900px) { .cat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cat-grid { grid-template-columns: 1fr; } }

/* ---------- Product cards ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1000px) { .prod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .prod-grid { grid-template-columns: 1fr; } }
.prod-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; transition: transform .25s, border-color .25s;
}
.prod-card:hover { transform: translateY(-4px); border-color: rgba(0, 212, 255, .45); }
.prod-card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--bg-2); }
.prod-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.prod-card:hover .thumb img { transform: scale(1.05); }
.prod-card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.prod-card .cat-tag { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); }
.prod-card h3 { font-size: 15.5px; line-height: 1.35; margin: 0; }
.prod-card h3 a { color: var(--text); }
.prod-card h3 a:hover { color: var(--accent); }
.prod-card .price { font-family: var(--font-d); font-weight: 700; font-size: 16px; color: var(--text); margin-top: auto; }
.prod-card .price small { font-size: 12px; color: var(--text-3); font-weight: 500; }
.prod-card .btn { margin-top: 12px; justify-content: center; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; padding: 34px 28px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
}
.step .step-num {
  counter-increment: step; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad-soft); border: 1px solid rgba(0,212,255,.3); color: var(--accent);
  font-family: var(--font-d); font-weight: 800; font-size: 17px; margin-bottom: 16px;
}
.step h3 { font-size: 17.5px; margin-bottom: 8px; }
.step p { font-size: 14px; }

/* ---------- Why us ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1000px) { .why-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .why-grid { grid-template-columns: 1fr; } }
.why-item { padding: 26px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.why-item .why-icon { font-size: 26px; margin-bottom: 12px; }
.why-item h4 { font-size: 15.5px; margin-bottom: 6px; }
.why-item p { font-size: 13.5px; }

/* ---------- Cases ---------- */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .case-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .case-grid { grid-template-columns: 1fr; } }
.case-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; display: block;
  aspect-ratio: 16/10; border: 1px solid var(--border);
}
.case-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.case-card:hover img { transform: scale(1.06); }
.case-card .case-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px; background: linear-gradient(180deg, transparent 30%, rgba(5,7,12,.92) 100%);
}
.case-card .case-tag { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.case-card h3 { font-size: 16px; color: #fff; margin: 0; }
.case-card .case-desc { font-size: 12.5px; color: rgba(255,255,255,.72); margin-top: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; padding: 60px 48px;
  background: var(--grad-soft); border: 1px solid rgba(124,92,255,.3); text-align: center;
}
.cta-band h2 { font-size: clamp(26px, 3.6vw, 36px); margin-bottom: 12px; }
.cta-band p { max-width: 560px; margin: 0 auto 28px; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: 150px 0 60px; background: var(--bg-2); border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 0%, rgba(124,92,255,.12) 0%, transparent 55%); }
.page-hero .kicker { color: var(--accent); font-size: 12.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 12px; }
.page-hero h1 { font-size: clamp(30px, 4.4vw, 44px); }
.page-hero p { margin-top: 12px; max-width: 640px; font-size: 16.5px; }

/* ---------- Content ---------- */
.entry-content { max-width: 860px; margin: 0 auto; padding: 60px 24px 80px; }
.entry-content h2 { font-size: 26px; margin: 40px 0 14px; }
.entry-content h3 { font-size: 20px; margin: 30px 0 10px; }
.entry-content p, .entry-content li { font-size: 16px; line-height: 1.85; margin-bottom: 14px; }
.entry-content ul { padding-left: 22px; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { border-radius: var(--radius); margin: 10px 0; }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; padding: 60px 24px 90px; max-width: 1100px; margin: 0 auto; }
@media (max-width: 860px) { .contact-wrap { grid-template-columns: 1fr; } }
.contact-info h2 { font-size: 26px; margin-bottom: 14px; }
.contact-info .ci-item { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.contact-info .ci-item .ci-emoji { font-size: 22px; }
.contact-info .ci-item h4 { font-size: 15px; margin-bottom: 2px; }
.contact-info .ci-item p { font-size: 14.5px; margin: 0; }
.wpcf7-form label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.wpcf7-form input, .wpcf7-form textarea, .wpcf7-form select {
  width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 12px 14px; font-size: 15px; font-family: var(--font-b); margin-bottom: 16px;
}
.wpcf7-form input:focus, .wpcf7-form textarea:focus { outline: none; border-color: var(--accent); }
.wpcf7-form textarea { min-height: 130px; }
.wpcf7-form input[type="submit"] { background: var(--grad); border: none; color: #fff; font-weight: 600; cursor: pointer; padding: 13px 30px; width: auto; border-radius: 999px; font-family: var(--font-d); }
.wpcf7-form .wpcf7-response-output { border-color: var(--accent); border-radius: 10px; font-size: 14px; }

/* Native contact form (mrpr_contact_form) */
.mrpr-contact-form .mrpr-form-ok, .mrpr-contact-form .mrpr-form-err {
  padding: 14px 16px; border-radius: 10px; font-size: 14.5px; margin-bottom: 18px; border: 1px solid;
}
.mrpr-form-ok { background: rgba(0, 200, 140, .1); border-color: rgba(0, 200, 140, .4); color: #7de8c2; }
.mrpr-form-err { background: rgba(255, 61, 129, .1); border-color: rgba(255, 61, 129, .4); color: #ff9db8; }
.mrpr-contact-form label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 16px; }
.mrpr-contact-form input, .mrpr-contact-form textarea, .mrpr-contact-form select {
  width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 12px 14px; font-size: 15px; font-family: var(--font-b); margin-top: 6px;
}
.mrpr-contact-form input:focus, .mrpr-contact-form textarea:focus { outline: none; border-color: var(--accent); }
.mrpr-contact-form textarea { min-height: 130px; }
.mrpr-contact-form input[type="submit"] {
  background: var(--grad); border: none; color: #fff; font-weight: 600; cursor: pointer;
  padding: 13px 30px; width: auto; border-radius: 999px; font-family: var(--font-d); margin-top: 4px;
}
.mrpr-contact-form input[type="submit"]:hover { filter: brightness(1.1); }

/* ---------- Footer ---------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 70px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 50px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { font-size: 15px; margin-bottom: 16px; color: var(--text); }
.footer .f-about { font-size: 14px; color: var(--text-3); max-width: 320px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: var(--text-2); font-size: 14px; }
.footer ul a:hover { color: var(--accent); }
.footer .f-contact p { font-size: 14px; margin-bottom: 10px; color: var(--text-2); }
.footer .f-contact a { color: var(--accent); }
.footer .social-link:hover { transform: translateY(-3px) scale(1.05); filter: brightness(1.1); }
/* Footer logo 尺寸 */
.footer .nav-logo { margin-bottom: 16px; }
.footer .nav-logo img { height: 52px !important; max-height: 52px !important; width: auto; }
@media (max-width: 560px) {
  .footer .footer-social { flex-wrap: wrap; }
}
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }

/* ---------- WooCommerce ---------- */
.woocommerce ul.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; list-style: none; padding: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product {
  width: 100% !important; float: none !important; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; margin: 0 !important;
  transition: transform .25s, border-color .25s;
}
.woocommerce ul.products li.product:hover { transform: translateY(-4px); border-color: rgba(0,212,255,.45); }
.woocommerce ul.products li.product img { border-radius: 12px; margin-bottom: 14px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 15.5px; color: var(--text); padding: 0 0 6px; }
.woocommerce ul.products li.product .price { color: var(--text) !important; font-family: var(--font-d); font-weight: 700; }
.woocommerce ul.products li.product .button {
  background: var(--grad); color: #fff; border-radius: 999px; font-size: 13px; font-weight: 600; margin-top: 8px;
}
.woocommerce ul.products li.product .button:hover { filter: brightness(1.1); color: #fff; }
.woocommerce .woocommerce-ordering select, .woocommerce .woocommerce-result-count { color: var(--text-2); }
.woocommerce .woocommerce-ordering select { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 8px 12px; border-radius: 8px; }

/* Product page */
#sidebar { display: none !important; }
.woocommerce-page main, .woocommerce main, .woocommerce-page .container, .woocommerce .container { width: 100%; }
.woocommerce div.product { margin-top: 40px; }
.woocommerce div.product .product_title { font-size: 26px; }
.woocommerce div.product p.price { color: var(--accent); font-family: var(--font-d); font-weight: 700; font-size: 22px; }
.woocommerce div.product .woocommerce-product-details__short-description { color: var(--text-2); }
.woocommerce div.product form.cart { margin: 20px 0; }
.woocommerce div.product form.cart .variations select, .woocommerce div.product form.cart .quantity input {
  background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 10px 12px;
}
.woocommerce div.product form.cart .single_add_to_cart_button { background: var(--grad); color: #fff; border-radius: 999px; padding: 12px 30px; font-weight: 600; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { color: var(--text-2); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--accent); }
.woocommerce div.product .woocommerce-tabs .panel { color: var(--text-2); }
.woocommerce-product-gallery__wrapper img { border-radius: 14px; }

/* Cart & Checkout */
.woocommerce-cart table.cart th, .woocommerce-cart table.cart td { color: var(--text-2); border-color: var(--border); }
.woocommerce-cart .cart_totals h2, .woocommerce-checkout h3 { font-size: 20px; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select {
  background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 12px 14px;
}
.woocommerce form .form-row label { color: var(--text); }
.woocommerce .wc-block-components-button, .woocommerce .checkout-button, .woocommerce button.button {
  background: var(--grad) !important; color: #fff !important; border-radius: 999px !important; font-weight: 600;
}
.woocommerce-info, .woocommerce-message, .woocommerce-error { background: var(--surface); border-radius: 10px; color: var(--text-2); border-top-color: var(--accent); }

/* ---------- Chat widget ---------- */
#mr-chat-toggle {
  position: fixed; right: 22px; bottom: 22px; z-index: 9990; width: 60px; height: 60px; border-radius: 50%;
  background: var(--grad); border: none; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 10px 34px rgba(0, 212, 255, .4); transition: transform .25s;
}
/* 整體內容下移 200px（用戶要求，令固定 header 下留空位）*/
.site-main, .post-page { padding-top: 200px; }
.container.post-page { padding-left: 24px; padding-right: 24px; }

/* 文章頁 2 欄 layout（主內容 + 側邊欄）*/
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  padding-bottom: 60px;
}
.post-main { min-width: 0; }
.post-header { margin-bottom: 22px; }
.post-header .post-title { font-size: 2rem; line-height: 1.3; margin: 8px 0 12px; color: #fff; }
.post-meta { color: #8da2c0; font-size: .9rem; display: flex; gap: 8px; align-items: center; }
.post-header .post-categories, .post-header a { color: var(--accent, #00d4ff); text-decoration: none; }
.post-featured { margin: 0 0 26px; border-radius: 14px; overflow: hidden; }
.post-featured img { width: 100%; height: auto; display: block; }
.post-content { font-size: 1.02rem; line-height: 1.8; color: #d4deec; }
.post-content h2 { color: #fff; font-size: 1.5rem; margin: 32px 0 14px; }
.post-content h3 { color: #fff; font-size: 1.2rem; margin: 24px 0 10px; }
.post-content table { width: 100%; border-collapse: collapse; margin: 18px 0; background: var(--bg-2, #131a2b); border-radius: 10px; overflow: hidden; }
.post-content table th, .post-content table td { border: 1px solid rgba(255,255,255,.1); padding: 10px 14px; text-align: left; }
.post-content table th { background: rgba(0,212,255,.12); color: #fff; }
.post-content img { max-width: 100%; height: auto; border-radius: 10px; }
.post-content a { color: var(--accent, #00d4ff); }

/* 側邊欄 */
.post-sidebar { display: flex; flex-direction: column; gap: 24px; }
.side-block { background: var(--bg-2, #131a2b); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 20px; }
.side-block h3 { color: #fff; font-size: 1.1rem; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.1); }
.side-posts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.side-posts li { display: flex; gap: 12px; align-items: center; }
.side-post-thumb { flex: 0 0 64px; }
.side-post-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: block; }
.side-post-text { min-width: 0; }
.side-post-text a { color: #e3ebf6; text-decoration: none; font-weight: 600; font-size: .92rem; line-height: 1.35; display: block; }
.side-post-text a:hover { color: var(--accent, #00d4ff); }
.side-post-date { color: #8da2c0; font-size: .78rem; }
.side-cats ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.side-cats li { margin: 0; }
.side-cats a { display: inline-block; background: rgba(0,212,255,.1); color: #cfe9ff; text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: .85rem; }
.side-cats a:hover { background: var(--accent, #00d4ff); color: #06121f; }
.side-cta p { color: #b9c6dc; font-size: .9rem; margin: 0 0 14px; }
.side-btn { display: block; text-align: center; background: var(--grad); color: #fff; text-decoration: none; padding: 11px; border-radius: 999px; font-weight: 600; margin-bottom: 10px; }
.side-btn-2 { background: transparent; border: 1px solid rgba(255,255,255,.25); color: #e3ebf6; }
.side-contact p { color: #b9c6dc; font-size: .88rem; margin: 0 0 6px; }
.side-contact a { color: var(--accent, #00d4ff); text-decoration: none; }

@media (max-width: 900px) {
  .post-layout { grid-template-columns: 1fr; gap: 30px; }
  .post-sidebar { order: -1; }
}

/* 技術參考 blog — latest-posts 網格卡片（深色主題適配）*/
.site-main .wp-block-latest-posts.is-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}
.site-main .wp-block-latest-posts.is-grid li {
  background: var(--bg-2, #131a2b);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  overflow: hidden;
  margin: 0;
  width: 100% !important;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.site-main .wp-block-latest-posts.is-grid li:hover {
  transform: translateY(-4px);
  border-color: var(--accent, #00d4ff);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
}
.site-main .wp-block-latest-posts.is-grid li .wp-block-latest-posts__featured-image {
  margin: 0;
}
.site-main .wp-block-latest-posts.is-grid li .wp-block-latest-posts__featured-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.site-main .wp-block-latest-posts.is-grid li .wp-block-latest-posts__post-title,
.site-main .wp-block-latest-posts.is-grid li .wp-block-latest-posts__post-author,
.site-main .wp-block-latest-posts.is-grid li .wp-block-latest-posts__post-date,
.site-main .wp-block-latest-posts.is-grid li .wp-block-latest-posts__post-excerpt {
  padding: 0 18px;
}
.site-main .wp-block-latest-posts.is-grid li .wp-block-latest-posts__post-title {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  margin: 16px 0 6px;
  line-height: 1.4;
}
.site-main .wp-block-latest-posts.is-grid li .wp-block-latest-posts__post-title:hover { color: var(--accent, #00d4ff); }
.site-main .wp-block-latest-posts.is-grid li .wp-block-latest-posts__post-date {
  font-size: .8rem; color: #8da2c0; margin-bottom: 8px;
}
.site-main .wp-block-latest-posts.is-grid li .wp-block-latest-posts__post-excerpt {
  font-size: .9rem; color: #b9c6dc; margin-bottom: 18px; line-height: 1.6;
}
@media (max-width: 900px) {
  .site-main .wp-block-latest-posts.is-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .site-main .wp-block-latest-posts.is-grid { grid-template-columns: 1fr; }
}
#mr-chat-toggle:hover { transform: scale(1.07); }
#mr-chat-toggle svg { width: 28px; height: 28px; color: #fff; }
#mr-chat-toggle .chat-badge { position: absolute; top: -2px; right: -2px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent-3); border: 2px solid #0b0f1a; animation: pulse 1.6s infinite; }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .hero { min-height: auto; padding: 120px 0 70px; }
  .hero-trust { gap: 14px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .cta-band { padding: 44px 26px; }
  .footer-grid { gap: 28px; }
}
