/* ============================================================
   Singzo — Shared Styles
   CSS custom properties theme system, dark mode, responsive,
   components, animations, and utilities.
   ============================================================ */

/* ------------------------------------------------------------
   1. CSS Custom Properties (Theme System)
   ------------------------------------------------------------ */
:root {
  --primary: #1a3a6b;
  --primary-light: #2a5aa8;
  --secondary: #e8a838;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --text: #1a1a2e;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --card-bg: #ffffff;
  --skeleton-bg: #e5e7eb;
  --skeleton-shimmer: #f0f1f3;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --transition: 0.3s ease;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Dark mode */
[data-theme="dark"] {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --text: #e2e8f0;
  --text-light: #94a3b8;
  --border: #334155;
  --card-bg: #1e293b;
}

/* ------------------------------------------------------------
   2. Base / Reset
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color var(--transition), color var(--transition);
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ------------------------------------------------------------
   3. Responsive Breakpoints (Mobile-first)
   ------------------------------------------------------------ */
/* Tablet: 768px+ */
@media (min-width: 768px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Desktop: 1024px+ */
@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* ------------------------------------------------------------
   4. Skeleton Shimmer Animation
   ------------------------------------------------------------ */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--skeleton-bg) 25%,
    var(--skeleton-shimmer) 50%,
    var(--skeleton-bg) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

/* Skeleton variants */
.skeleton-hero {
  width: 100%;
  height: 60vh;
  border-radius: 0;
}

.skeleton-card {
  width: 100%;
  height: 280px;
}

.skeleton-text {
  width: 100%;
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
  width: 60%;
}

/* ------------------------------------------------------------
   5. Navigation
   ------------------------------------------------------------ */
main {
  padding-top: 80px;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition),
    box-shadow var(--transition);
  padding: 1rem 0;
}

.nav.scrolled {
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

[data-theme="dark"] .nav.scrolled {
  background: rgba(15, 23, 42, 0.95);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.nav-logo:hover {
  color: var(--primary);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition),
    visibility var(--transition);
  z-index: 100;
  padding: 0.5rem 0;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-weight: 400;
  color: var(--text);
}

.nav-dropdown-menu a:hover {
  background: var(--bg-alt);
  color: var(--primary);
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: 0;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-open .nav-toggle span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity var(--transition), visibility var(--transition),
      transform var(--transition);
    z-index: 999;
  }

  .nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links a {
    font-size: 1.25rem;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    padding-left: 1rem;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }
}

/* ------------------------------------------------------------
   6. Hero Section
   ------------------------------------------------------------ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  z-index: 1;
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2;
}

.hero-content {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  width: 90%;
  max-width: 720px;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

/* Swipe dots */
.hero-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 3;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: background var(--transition);
}

.hero-dot.active {
  background: #fff;
}

@media (min-width: 768px) {
  .hero-content h1 {
    font-size: 3.5rem;
  }

  .hero-content p {
    font-size: 1.25rem;
  }
}

/* ------------------------------------------------------------
   7. Cards
   ------------------------------------------------------------ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.card-text {
  font-size: 0.925rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ------------------------------------------------------------
   8. Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: #fff;
}

/* ------------------------------------------------------------
   9. Banner (Page Header)
   ------------------------------------------------------------ */
.banner {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.banner-content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  width: 90%;
  max-width: 640px;
}

.banner-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.banner-content p {
  font-size: 1rem;
  opacity: 0.9;
}

@media (min-width: 768px) {
  .banner {
    height: 360px;
  }

  .banner-content h1 {
    font-size: 2.75rem;
  }
}

/* ------------------------------------------------------------
   10. Scroll Animations (triggered by JS .visible class)
   ------------------------------------------------------------ */
.fade-in {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
}

.slide-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------------------------------
   11. WhatsApp Floating Button
   ------------------------------------------------------------ */
.whatsapp-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
  transition: box-shadow var(--transition);
  color: #fff;
  font-size: 1.5rem;
}

.whatsapp-btn:hover {
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
  color: #fff;
}

.whatsapp-btn svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

/* ------------------------------------------------------------
   12. Cookie Consent Banner
   ------------------------------------------------------------ */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 950;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}

.cookie-consent.show {
  display: flex;
}

.cookie-consent p {
  font-size: 0.875rem;
  color: var(--text);
  flex: 1;
}

.cookie-consent .btn {
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .cookie-consent {
    flex-direction: column;
    text-align: center;
  }
}

/* ------------------------------------------------------------
   13. Loading Spinner
   ------------------------------------------------------------ */
.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner-center {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 0;
}

/* ------------------------------------------------------------
   14. Form Inputs
   ------------------------------------------------------------ */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(42, 90, 168, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* ------------------------------------------------------------
   15. Google Maps Embed (responsive 16:9)
   ------------------------------------------------------------ */
.map-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
}

.map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ------------------------------------------------------------
   16. Contact Cards
   ------------------------------------------------------------ */
.contact-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.contact-card {
  flex: 1;
  min-width: 220px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.contact-card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.contact-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.contact-card p {
  font-size: 0.925rem;
  color: var(--text-light);
}

@media (max-width: 767px) {
  .contact-cards {
    flex-direction: column;
  }
}

/* ------------------------------------------------------------
   17. Category Filter Tabs
   ------------------------------------------------------------ */
.category-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  flex-shrink: 0;
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.category-tab:hover {
  color: var(--primary);
  border-color: var(--primary-light);
}

.category-tab.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

/* ------------------------------------------------------------
   18. Product Grid
   ------------------------------------------------------------ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}



/* Product Card Styles */
.products-section .products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .products-section .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .products-section .products-grid {
    grid-template-columns: 1fr;
  }
}

.product-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  max-width: 100%;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.product-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-alt);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-info {
  padding: 0.75rem;
}

.product-name {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
  line-height: 1.3;
}

.product-category-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  color: var(--primary);
  background: #e8edf5;
  border-radius: 4px;
}
.product-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.product-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-alt);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}




/* News Article Card Styles */
.article-card {
  display: flex;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  margin-bottom: 1.5rem;
}

.article-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: var(--primary-light);
}

.article-image {
  width: 280px;
  min-height: 180px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-alt);
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-content {
  flex: 1;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.article-date {
  color: var(--text-light);
}

.article-category-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  color: var(--primary);
  background: #e8edf5;
  border-radius: 4px;
}

.article-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
  line-height: 1.4;
}

.article-excerpt {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  flex: 1;
}

@media (max-width: 768px) {
  .article-card {
    flex-direction: column;
  }
  .article-image {
    width: 100%;
    height: 200px;
  }
}

/* ------------------------------------------------------------
   19. Footer
   ------------------------------------------------------------ */
.footer {
  background: var(--text);
  color: #e2e8f0;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

[data-theme="dark"] .footer {
  background: #020617;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Brand takes full width first row */
.footer-brand {
  grid-column: 1 / -1;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-links,
  .footer-categories,
  .footer-contact {
    display: flex;
    flex-direction: column;
  }
}

.footer-col h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #fff;
}

.footer-col p {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.6;
}

.footer-col a {
  color: #94a3b8;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.4rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ------------------------------------------------------------
   20. Preview Mode Banner
   ------------------------------------------------------------ */
.preview-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #dc2626;
  color: #fff;
  text-align: center;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.preview-banner .btn {
  background: #fff;
  color: #dc2626;
  font-size: 0.8rem;
  padding: 0.3rem 0.9rem;
  border: none;
}

.preview-banner .btn:hover {
  background: #f1f1f1;
}

/* Add top padding when preview banner is present */
.preview-active {
  padding-top: 42px;
}

/* ------------------------------------------------------------
   21. Utility Classes
   ------------------------------------------------------------ */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   DYNAMIC CONTENT SECTIONS (added 2026-06-08)
   ============================================ */

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-padding {
  padding: 60px 0;
}

/* Hero Carousel */
.hero-carousel {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: #1a1a2e;
}

.carousel-track {
  position: relative;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

.carousel-content {
  text-align: center;
  color: #fff;
  max-width: 700px;
  padding: 40px;
}

.carousel-badge {
  display: inline-block;
  padding: 4px 16px;
  background: rgba(37,99,235,0.9);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.carousel-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.2;
}

.carousel-subtitle {
  font-size: 18px;
  margin-bottom: 8px;
  opacity: 0.9;
}

.carousel-description {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 24px;
  line-height: 1.6;
}

.carousel-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.6);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
}

.hero-dot.active {
  background: #fff;
  border-color: #fff;
}

/* Hero skeleton fallback */
.hero-content {
  display: none;
}

/* Advantages Section */
.advantages {
  background: #f8fafc;
}

.advantages h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 40px;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.advantage-card {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.advantage-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.advantage-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  object-fit: contain;
}

.advantage-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.advantage-description {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* Product Categories */
.product-categories {
  background: #fff;
}

.product-categories h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 40px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  background: #f8fafc;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s;
  border: 1px solid #e5e7eb;
}

.category-card:hover {
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  border-color: #2563eb;
}

.category-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 12px;
  object-fit: contain;
}

.category-icon-placeholder {
  width: 80px;
  height: 80px;
  margin-bottom: 12px;
  background: #e5e7eb;
  border-radius: 8px;
}

.category-name {
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 4px;
}

.category-count {
  font-size: 12px;
  color: #9ca3af;
}

.category-card:hover .category-count {
  color: rgba(255,255,255,0.7);
}

/* Latest News */
.latest-news {
  background: #f8fafc;
}

.latest-news h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 40px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.news-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.news-image-wrapper {
  height: 180px;
  overflow: hidden;
}

.news-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.news-card:hover .news-image {
  transform: scale(1.05);
}

.news-content {
  padding: 20px;
}

.news-date {
  font-size: 12px;
  color: #9ca3af;
}

.news-category {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: #dbeafe;
  color: #2563eb;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.news-title {
  font-size: 16px;
  font-weight: 600;
  margin: 8px 0;
  line-height: 1.4;
}

.news-excerpt {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 12px;
}

.news-read-more {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  text-align: center;
}

.cta-title {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-description {
  font-size: 16px;
  opacity: 0.8;
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn-cta {
  padding: 12px 32px;
  font-size: 16px;
}

/* Coming Soon / Error messages */
.coming-soon {
  text-align: center;
  padding: 40px;
  color: #9ca3af;
  font-style: italic;
}

.error-message {
  text-align: center;
  padding: 40px;
  color: #dc2626;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-carousel { height: 350px; }
  .carousel-title { font-size: 24px; }
  .carousel-subtitle { font-size: 15px; }
  .section-padding { padding: 40px 0; }
  .advantages-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
}

/* === HTML v2 Nav overrides (match actual HTML classes) === */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
  position: relative;
  text-decoration: none;
}

.nav-link:hover,
.nav-link[aria-current=page] {
  color: var(--primary);
}

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: 0;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-open .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-open .hamburger span:nth-child(2) {
  opacity: 0;
}

.nav-open .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-quote {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-lang {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
}

.btn-lang:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Mobile nav - match HTML classes */
@media (max-width: 767px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity var(--transition), visibility var(--transition),
      transform var(--transition);
    z-index: 999;
  }

  .nav-open .nav-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-link {
    font-size: 1.25rem;
  }

  .nav-actions {
    display: none;
  }
}


/* Page banner - offset fixed nav */
.page-banner {
  padding-top: 80px;
}

/* === HTML v2 Footer overrides (match actual HTML classes) === */
.footer-brand,
.footer-links,
.footer-categories {
  margin-bottom: 1.5rem;
}

.footer-links ul,
.footer-categories ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-brand h3,
.footer-links h3,
.footer-categories h3,
.footer-contact h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #fff;
}

.footer-tagline {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.6;
}

.footer-links a,
.footer-categories a {
  color: #94a3b8;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.4rem;
  text-decoration: none;
}

.footer-links a:hover,
.footer-categories a:hover {
  color: #fff;
}

.footer-contact {
  margin-bottom: 0;
}

.footer-contact h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #fff;
}

.contact-person {
  margin-bottom: 1.25rem;
}

.contact-name {
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.contact-phone {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 0.2rem;
}

.contact-email a {
  color: #60a5fa;
  font-size: 0.85rem;
  text-decoration: none;
}

.contact-email a:hover {
  text-decoration: underline;
}


/* === Default Hero (static fallback when API hero=null) === */
.hero-carousel {
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f1b2d 100%);
  margin-top: 0;

}

.default-hero {
  text-align: center;
  width: 100%;
  padding: 80px 0;
}

.default-hero .hero-static-content {
  max-width: 720px;
}

.default-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
  line-height: 1.15;
}



/* === Homepage Hero: Chinese Slogan === */
.hero-slogan-zh {
  display: block;
  font-size: 1.5rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
  letter-spacing: 0.1em;
}
.hero-slogan {
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 300;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-actions .btn-primary {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}

.hero-actions .btn-primary:hover {
  background: #1d4ed8;
}

.hero-actions .btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.3);
  padding: 0.85rem 2rem;
  font-size: 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
}

.hero-actions .btn-secondary:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}

/* When dynamic carousel is active, hide default hero */
.hero-carousel.has-slides .default-hero {
  text-align: center;
  display: none;
}

/* Mobile */
@media (max-width: 767px) {
  .default-hero h1 {
    font-size: 1.8rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  

/* === Homepage Hero: Chinese Slogan === */
.hero-slogan-zh {
  display: block;
  font-size: 1.5rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
  letter-spacing: 0.1em;
}
.hero-slogan {
    font-size: 1.1rem;
  }

  .hero-actions {
    flex-direction: column;
  }
}


/* Advantage icon placeholder (for static Why Choose Us) */
.advantage-icon-placeholder {
  width: 56px;
  height: 56px;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.5rem;
  color: #2563eb;
}

/* Contact card styles */
.contact-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 400px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .contact-cards-grid {
    flex-direction: row;
    max-width: 860px;
    justify-content: center;
  }
  .contact-card {
    flex: 0 0 400px;
    min-height: 240px;
  }
}

.contact-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 32px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  gap: 20px;
  align-items: center;
  text-align: left;
}

.contact-card-body {
  flex: 1;
}

.contact-card-body .contact-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
}

.contact-detail {
  margin-bottom: 8px;
}

.contact-detail a {
  color: #2563eb;
  text-decoration: none;
}

.contact-detail a:hover {
  text-decoration: underline;
}

.contact-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.contact-card-actions {
  display: flex;
  gap: 8px;
}

.company-address {
  background: #f8fafc;
}

.address-content h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.address-content p {
  color: #666;
  margin-bottom: 8px;
  line-height: 1.6;
}


/* === Sidebar Layout (News, Products, Support) === */
.sidebar-layout-wrapper {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.category-sidebar,
.support-sidebar,
.products-sidebar {
  width: 250px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.sidebar-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Unified sidebar button style (covers .sidebar-btn and .category-tab) */
.sidebar-btn,
.category-tab {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-light);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
}

.sidebar-btn:hover,
.category-tab:hover {
  color: var(--primary);
  background: #e8edf5;
  border-color: var(--primary-light);
}

.sidebar-btn.active,
.category-tab.active,
.sidebar-btn[aria-pressed="true"],
.category-tab[aria-selected="true"] {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

/* Content area - takes remaining space */
.articles-section,
.support-content-section,
.products-section {
  flex: 1;
  min-width: 0;
}

/* Mobile: stack sidebar above content, use horizontal scroll buttons */
@media (max-width: 767px) {
  .sidebar-layout-wrapper {
    flex-direction: column;
    gap: 1rem;
  }
  .category-sidebar,
  .support-sidebar,
  .products-sidebar {
    width: 100%;
    position: static;
  }
  .sidebar-title {
    display: none;
  }
  .sidebar-buttons,
  .products-sidebar .category-tabs {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.5rem;
    padding-bottom: 0.25rem;
  }
  .sidebar-btn,
  .category-tab {
    flex-shrink: 0;
    width: auto;
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 0.4rem 0.9rem;
  }
}

/* Override horizontal category tab layout for products sidebar */
.products-sidebar .category-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-x: visible;
  padding-bottom: 0;
}



.page-banner-contact {
  position: relative;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f1b2d 100%);
  padding-top: 0;
  min-height: 200px;
}

@media (min-width: 768px) {
  .page-banner-contact {
    min-height: 200px;
  }
}

.page-banner-about,
.page-banner-news,
.page-banner-products,
.page-banner-support {
  position: relative;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f1b2d 100%);
  padding-top: 0;
  min-height: 200px;
}

@media (min-width: 768px) {
  .page-banner-about,
  .page-banner-news,
  .page-banner-products,
  .page-banner-support {
    min-height: 240px;
  }
}

.page-banner-contact .banner-title {
  color: #fff;
  font-size: 2.5rem;
}

.page-banner-contact .banner-description {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
}


/* === About Page: Company Intro === */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1e3a5f;
  text-align: center;
  margin-bottom: 1.5rem;
}

.intro-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #4a5568;
}

.intro-content p {
  margin-bottom: 1rem;
}

/* === About Page: Core Values === */
.core-values {
  background: #f8fafc;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.value-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.value-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  line-height: 1;
}

.value-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1e3a5f;
  margin-bottom: 8px;
}

.value-description {
  font-size: 0.95rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .section-title { font-size: 1.6rem; }
  .values-grid { grid-template-columns: 1fr; }
}

/* === Contact Page: Avatar === */
.contact-card-avatar {
  flex-shrink: 0;
  padding: 4px 0 0;
}

.avatar-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e2e8f0;
  background: #f1f5f9;
}

/* Download category badge */
.download-cat { display:block; font-size:11px; color:var(--primary-light); margin-top:4px; }

/* ============================
   About Us — Section Styles
   ============================ */
.about-section {
  background: #fff;
}

.about-section:nth-child(even) {
  background: #f9fafb;
}

.about-section .section-title {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  font-weight: 700;
  color: #1e3a5f;
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #374151;
}

.about-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e3a5f;
  margin: 1.5rem 0 0.75rem;
}

.about-content h3:first-child {
  margin-top: 0;
}

.about-content p {
  margin-bottom: 1rem;
}

/* History timeline */
.about-content ul.timeline {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.about-content ul.timeline li {
  position: relative;
  padding: 0 0 1.25rem 1.75rem;
  border-left: 2px solid #2563eb;
  margin-left: 0.5rem;
}

.about-content ul.timeline li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.about-content ul.timeline li::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 10px;
  background: #2563eb;
  border-radius: 50%;
}

.about-content ul.timeline li strong {
  display: block;
  font-weight: 700;
  color: #2563eb;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.about-content ul.timeline li span {
  color: #6b7280;
  font-size: 0.95rem;
}
