/*
 * Petchsiam Custom Stylesheet Overrides
 * Design System implementation for Petchsiam (Thailand) Co., Ltd.
 * Scope-isolated to page templates under .petchsiam-theme-root
 */

.petchsiam-theme-root {
  --color-primary: #1B4332;       /* Forest Green */
  --color-accent: #40916C;        /* Emerald Green */
  --color-secondary: #2D3142;     /* Slate / Charcoal */
  --color-bg-warm: #E6DFD3;       /* Warm Sand/Cream matching Petchsiam slider */
  --color-neutral-dark: #1D2D44;  /* Deep Charcoal Text */
  --color-neutral-light: #F8F9FA; /* Light Gray BG */
  --color-white: #FFFFFF;
  --color-border: #E5E5E5;
  --color-text-body: #333333;
  --color-text-muted: #666666;

  font-family: 'Inter', 'Noto Sans Thai', sans-serif;
  color: var(--color-text-body);
}

/* 20-25% Padding Reduction for Layout Density */
.petchsiam-theme-root .section-padding {
  padding: 2.25rem 0; /* Reduced from 3rem (25% reduction) */
}

/* Sticky Navigation Anchor Scroll margin */
.petchsiam-theme-root section[id] {
  scroll-margin-top: 100px; /* Offset for sticky header */
}

/* CERTIFICATE BADGES BAR (Directly below header) */
.petchsiam-theme-root .certifications-top-bar {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  padding: 1.15rem 0; /* Reduced padding */
}

.petchsiam-theme-root .certs-outline-container {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 1.25rem;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.petchsiam-theme-root .cert-outline-box {
  width: 160px;
  border: 2.5px solid #000000;
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
  color: #000000;
  font-family: Arial, Helvetica, sans-serif;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.15);
}

.petchsiam-theme-root .cert-box-header {
  border-bottom: 1.5px solid #000000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 6px;
}

.petchsiam-theme-root .bsi-text {
  font-size: 1.05rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.05em;
}

.petchsiam-theme-root .cert-heart-icon {
  font-size: 1.05rem;
  font-weight: bold;
}

.petchsiam-theme-root .cert-box-body {
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.petchsiam-theme-root .cert-box-body strong {
  font-size: 0.85rem;
  font-weight: 900;
  margin-bottom: 2px;
}

.petchsiam-theme-root .cert-desc-text {
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 1.2;
}

.petchsiam-theme-root .cert-accredit {
  font-size: 0.45rem;
  border: 1px solid #000000;
  padding: 1px 4px;
  margin: 3px 0;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.petchsiam-theme-root .cert-scope {
  font-size: 0.4rem;
  font-weight: 700;
  line-height: 1.2;
}

.petchsiam-theme-root .cert-badge-bottom {
  border: 1.5px solid #000000;
  padding: 1px 6px;
  font-size: 0.5rem;
  font-weight: 900;
  margin-top: 3px;
  letter-spacing: 0.05em;
}

.petchsiam-theme-root .tmark-box {
  width: 240px;
  flex-direction: row;
  align-items: center;
  padding: 8px;
  gap: 8px;
}

.petchsiam-theme-root .tmark-emblem {
  font-size: 1.25rem;
  border: 2px solid #000000;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-white);
  flex-shrink: 0;
}

.petchsiam-theme-root .tmark-body {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.petchsiam-theme-root .tmark-title {
  font-size: 0.8rem;
  font-weight: 900;
  color: #000000;
  letter-spacing: 0.02em;
}

.petchsiam-theme-root .tmark-sub {
  font-size: 0.4rem;
  font-weight: 700;
  color: #333333;
  line-height: 1.2;
  margin-top: 2px;
}

/* HERO SECTION - SPLIT LAYOUT */
.petchsiam-theme-root .hero-section {
  position: relative;
  background-color: var(--color-white);
}

.petchsiam-theme-root .hero-grid {
  display: grid;
  grid-template-columns: 55% 45%;
  align-items: stretch;
}

.petchsiam-theme-root .hero-slider-column {
  position: relative;
  background-color: #F0EDE6;
  min-height: 380px; /* Reduced height */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.petchsiam-theme-root .hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.petchsiam-theme-root .hero-slide.active {
  opacity: 1;
  z-index: 2;
}

.petchsiam-theme-root .slide-image-placeholder {
  font-size: 4rem;
}

.petchsiam-theme-root .slide-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
}

.petchsiam-theme-root .slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.8);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 1.1rem;
}

.petchsiam-theme-root .slider-nav-btn.prev { left: 10px; }
.petchsiam-theme-root .slider-nav-btn.next { right: 10px; }

.petchsiam-theme-root .hero-text-column {
  background-color: var(--color-bg-warm);
  padding: 2.25rem; /* Reduced padding */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.petchsiam-theme-root .hero-title-main {
  font-size: 2rem; /* Reduced from 2.25rem */
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.petchsiam-theme-root .hero-desc-main {
  font-size: 0.95rem;
  color: var(--color-text-body);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.petchsiam-theme-root .btn-hero-view-more {
  background-color: var(--color-white);
  color: var(--color-neutral-dark);
  border-radius: 30px;
  border: none;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.5rem 1.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.petchsiam-theme-root .btn-hero-view-more:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* SECTION TITLES & DIVIDERS */
.petchsiam-theme-root .section-divider-title {
  padding-top: 2rem;
  padding-bottom: 0;
  background-color: var(--color-neutral-light);
  text-align: center;
}

.petchsiam-theme-root .featured-main-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #111111;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.petchsiam-theme-root .divider-line {
  width: 60px;
  height: 3px;
  background-color: var(--color-primary);
  margin: 0 auto;
}

/* ABOUT SECTION */
.petchsiam-theme-root .about-section {
  background-color: var(--color-white);
}

.petchsiam-theme-root .grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.petchsiam-theme-root .section-title {
  font-size: 1.75rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-weight: 700;
}

.petchsiam-theme-root .section-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-body);
  margin-bottom: 1rem;
}

.petchsiam-theme-root .about-image-block {
  background: linear-gradient(135deg, var(--color-bg-warm), var(--color-white));
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  align-items: center;
}

.petchsiam-theme-root .about-highlight-card h3 {
  color: var(--color-primary);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.petchsiam-theme-root .about-highlight-card p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.petchsiam-theme-root .certifications-inline {
  display: flex;
  gap: 8px;
}

.petchsiam-theme-root .cert-badge {
  background: rgba(27,67,50,0.1);
  color: var(--color-primary);
  font-size: 0.75rem;
  padding: 2px 8px;
  font-weight: bold;
  border-radius: 3px;
}

/* WOOCOMMERCE PRODUCT CATALOG INTEGRATION */
.petchsiam-theme-root .products-section {
  padding: 2.25rem 0;
}

.petchsiam-theme-root .shop-layout-grid {
  display: grid;
  grid-template-columns: 75% 25%;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.petchsiam-theme-root .catalog-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--color-border);
  background-color: var(--color-white);
  padding: 0.6rem 0.8rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
}

.petchsiam-theme-root .catalog-results-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.petchsiam-theme-root .sorting-select {
  padding: 0.3rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.75rem;
  background-color: var(--color-white);
}

.petchsiam-theme-root .catalog-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.petchsiam-theme-root .product-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: center;
  padding-bottom: 0.75rem;
  transition: all 0.3s ease;
}

.petchsiam-theme-root .product-card:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.petchsiam-theme-root .product-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  background-color: var(--color-neutral-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}

.petchsiam-theme-root .product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.petchsiam-theme-root .product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(0,0,0,0.7);
  color: var(--color-white);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 2px;
}

.petchsiam-theme-root .product-tagline-bar {
  background-color: #E2D3C4;
  color: var(--color-primary);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 4px 0;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.petchsiam-theme-root .product-info {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
}

.petchsiam-theme-root .product-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-neutral-dark);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.petchsiam-theme-root .product-inquiry-btn {
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  background-color: var(--color-white);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  display: block;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.petchsiam-theme-root .product-inquiry-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* WOOCOMMERCE SIDEBAR */
.petchsiam-theme-root .shop-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.petchsiam-theme-root .sidebar-widget {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  padding: 0.75rem;
  border-radius: 4px;
}

.petchsiam-theme-root .widget-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-neutral-dark);
  text-transform: uppercase;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 0.3rem;
  margin-bottom: 0.5rem;
}

.petchsiam-theme-root .search-widget-form {
  display: flex;
}

.petchsiam-theme-root .search-widget-input {
  flex-grow: 1;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-size: 0.8rem;
}

.petchsiam-theme-root .search-widget-btn {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  padding: 0 0.6rem;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.petchsiam-theme-root .sidebar-category-list {
  list-style: none;
  padding: 0;
}

.petchsiam-theme-root .sidebar-category-item {
  margin-bottom: 0.3rem;
}

.petchsiam-theme-root .sidebar-category-link {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.petchsiam-theme-root .sidebar-category-link:hover {
  background-color: rgba(27, 67, 50, 0.08);
  color: var(--color-primary);
}

.petchsiam-theme-root .sidebar-category-count {
  background-color: var(--color-neutral-light);
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 10px;
}

/* MANUFACTURING CAPABILITIES */
.petchsiam-theme-root .grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.petchsiam-theme-root .capability-card {
  background-color: var(--color-white);
  padding: 1.5rem;
  border-radius: 6px;
  border: 1px solid var(--color-border);
}

.petchsiam-theme-root .cap-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.petchsiam-theme-root .capability-card h3 {
  font-size: 1.1rem;
  color: var(--color-neutral-dark);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.petchsiam-theme-root .capability-card p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* OEM / ODM PROCESS WORKFLOW TIMELINE */
.petchsiam-theme-root .timeline-line {
  position: absolute;
  top: 25px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-border);
  z-index: 1;
}

.petchsiam-theme-root .desktop-timeline {
  position: relative;
}

.petchsiam-theme-root .grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.petchsiam-theme-root .timeline-step {
  text-align: center;
}

.petchsiam-theme-root .step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: var(--color-white);
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  color: var(--color-primary);
  font-weight: 700;
  margin: 0 auto 0.75rem auto;
  font-size: 0.95rem;
}

.petchsiam-theme-root .timeline-step h4 {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: var(--color-neutral-dark);
  font-weight: 700;
}

.petchsiam-theme-root .timeline-step p {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* SUSTAINABILITY SECTION */
.petchsiam-theme-root .sustainability-section {
  background-color: var(--color-secondary);
}

.petchsiam-theme-root .glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1.25rem;
}

/* NEWS SECTION */
.petchsiam-theme-root .news-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
}

.petchsiam-theme-root .news-excerpt {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* RESPONSIVE LAYOUTS */
@media (max-width: 1024px) {
  .petchsiam-theme-root .hero-grid {
    grid-template-columns: 1fr;
  }
  .petchsiam-theme-root .shop-layout-grid {
    grid-template-columns: 1fr;
  }
  .petchsiam-theme-root .catalog-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .petchsiam-theme-root .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .petchsiam-theme-root .catalog-products-grid {
    grid-template-columns: 1fr;
  }
  .petchsiam-theme-root .grid-3 {
    grid-template-columns: 1fr;
  }
  .petchsiam-theme-root .grid-6 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .petchsiam-theme-root .timeline-line {
    display: none;
  }
  .petchsiam-theme-root .grid-2 {
    grid-template-columns: 1fr;
  }
}
