/* ============================================
   東光化学 WordPress Theme - Hero Carousel
   Full-width hero slider (ASUS-inspired)
   ============================================ */

/* ── Header ── */
.topbar {
  height: var(--topbar-height);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  color: var(--text-on-dark-muted);
  letter-spacing: var(--ls-wide);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar a {
  color: var(--accent-light);
  margin: 0 var(--space-4);
  transition: color var(--duration-fast) var(--ease-out);
}

.topbar a:hover {
  color: var(--white);
}

.header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  z-index: var(--z-sticky);
  transition: all var(--duration-normal) var(--ease-out);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header__inner {
  max-width: var(--container-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.header__logo-img {
  height: 32px;
}

.header__logo-text {
  display: flex;
  flex-direction: column;
}

.header__logo-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--accent);
  letter-spacing: var(--ls-wide);
  line-height: 1.2;
}

.header__logo-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: var(--ls-wide);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.header__nav-link {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-body);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--duration-normal) var(--ease-out);
}

.header__nav-link:hover {
  color: var(--accent);
}

.header__nav-link:hover::after {
  width: 60%;
}

.header__nav-link.active {
  color: var(--accent);
}

.header__nav-link.active::after {
  width: 60%;
}

/* ── Nav Item with Dropdown ── */
.header__nav-item {
  position: relative;
}

.header__nav-arrow {
  margin-left: 2px;
  transition: transform var(--duration-fast) var(--ease-out);
  vertical-align: middle;
}

.header__nav-item:hover .header__nav-arrow {
  transform: rotate(180deg);
}

.header__nav-item:hover > .header__nav-link {
  color: var(--accent);
}

/* ── Dropdown Mega Menu ── */
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 720px;
  padding-top: 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) var(--ease-out),
              visibility var(--duration-normal) var(--ease-out);
  z-index: var(--z-dropdown);
}

.dropdown--narrow {
  min-width: 300px;
}

.header__nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
}

.dropdown__inner {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: var(--space-6);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-6);
  position: relative;
}

.dropdown__inner::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: var(--white);
  border-radius: 2px;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: -1px -1px 2px rgba(0, 0, 0, 0.04);
}

.dropdown--narrow .dropdown__inner {
  grid-template-columns: 1fr;
}

.dropdown__column {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.dropdown__heading {
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-light);
}

.dropdown__link {
  font-size: var(--text-sm);
  color: var(--text-body);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.dropdown__link:hover {
  background: var(--bg-light);
  color: var(--accent);
  padding-left: var(--space-4);
}

/* ── Dropdown Featured Product ── */
.dropdown__column--highlight {
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: calc(var(--space-6) * -1);
  margin-left: 0;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.dropdown__column--highlight .dropdown__heading {
  border-bottom-color: var(--border);
}

.dropdown__featured {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
  text-align: center;
}

.dropdown__featured:hover {
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.dropdown__featured img {
  width: 140px;
  height: 100px;
  object-fit: contain;
}

.dropdown__featured-label {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  font-size: 10px;
  font-weight: var(--fw-bold);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: var(--ls-wide);
}

.dropdown__featured-title {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-dark);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header__search-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--text-body);
  font-size: var(--text-lg);
  transition: all var(--duration-fast) var(--ease-out);
}

.header__search-btn:hover {
  background: var(--bg-light);
  color: var(--accent);
}

.header__contact-btn {
  padding: var(--space-2) var(--space-5);
  background: var(--accent);
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.header__contact-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

/* Mobile menu toggle */
.header__menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.header__menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  transition: all var(--duration-normal) var(--ease-out);
}

/* ── Hero Section ── */
.hero {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--header-height));
  min-height: 600px;
  max-height: 860px;
  overflow: hidden;
  background: var(--primary);
}

.hero__carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity var(--duration-slower) var(--ease-in-out);
  pointer-events: none;
}

.hero__slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero__slide--dark {
  background: var(--gradient-hero);
}

.hero__slide--accent {
  background: linear-gradient(135deg, #006070 0%, #003040 100%);
}

.hero__slide--product {
  background: linear-gradient(135deg, #0d1f3c 0%, #162a4a 50%, #0a1628 100%);
}

.hero__slide-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__slide-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.hero__slide-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
}

.hero__slide-content {
  flex: 1;
  max-width: 580px;
}

.hero__slide-label {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--accent);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-5);
}

.hero__slide-heading {
  font-family: var(--font-display);
  font-size: var(--text-6xl);
  font-weight: var(--fw-extrabold);
  color: var(--white);
  line-height: 1.1;
  margin-bottom: var(--space-5);
  letter-spacing: var(--ls-tight);
}

.hero__slide-heading span {
  color: var(--accent-light);
}

.hero__slide-desc {
  font-size: var(--text-lg);
  color: var(--text-on-dark-muted);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-8);
  max-width: 480px;
}

.hero__slide-actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.hero__slide-image {
  flex: 1;
  max-width: 550px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__slide-image img {
  max-height: 450px;
  object-fit: contain;
  filter: drop-shadow(0 20px 60px rgba(0, 160, 170, 0.2));
}

/* Hero Navigation Dots */
.hero__dots {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-3);
  z-index: 10;
}

.hero__dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  padding: 0;
}

.hero__dot.active {
  background: var(--accent);
  border-color: var(--accent);
  width: 36px;
  border-radius: 6px;
}

.hero__dot:hover {
  border-color: var(--white);
}

/* Hero Progress Bar */
.hero__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.hero__progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 50ms linear;
}

/* Hero Arrow Buttons */
.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  color: var(--white);
  font-size: var(--text-xl);
  cursor: pointer;
  z-index: 10;
  transition: all var(--duration-normal) var(--ease-out);
  padding: 0;
}

.hero__arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.hero__arrow--prev {
  left: var(--space-6);
}

.hero__arrow--next {
  right: var(--space-6);
}

/* ── Decorative Elements ── */
.hero__decoration {
  position: absolute;
  border-radius: var(--radius-full);
  opacity: 0.05;
  pointer-events: none;
}

.hero__decoration--1 {
  width: 400px;
  height: 400px;
  border: 1px solid var(--accent);
  top: -100px;
  right: -100px;
}

.hero__decoration--2 {
  width: 300px;
  height: 300px;
  border: 1px solid var(--accent);
  bottom: -50px;
  left: -50px;
}

/* ── Announcement Banner ── */
.announcement-bar {
  background: var(--accent);
  color: var(--white);
  text-align: center;
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
}

.announcement-bar a {
  color: var(--white);
  text-decoration: underline;
  font-weight: var(--fw-bold);
}

.announcement-bar a:hover {
  opacity: 0.85;
}
