/* Pile Head Super Theme - Complete Responsive CSS */

:root {
  --phst-bg: #f8f9fb;
  --phst-surface: #ffffff;
  --phst-border: #e4e7eb;
  --phst-muted: #6b7280;
  --phst-text: #111827;
  --phst-accent: #facc15;
  --phst-radius: 12px;
  --phst-radius-sm: 8px;
  --phst-shadow: 0 6px 18px rgba(17, 24, 39, .08);
  --phst-shadow-hover: 0 10px 24px rgba(17, 24, 39, .12);
  --phst-header-bg: #fff;
  --phst-header-text: #111827;
}

/* ========== ACCESSIBILITY ========== */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== GLOBAL RESET & SCROLL FIX ========== */
html {
  box-sizing: border-box;
  overflow-x: hidden; /* Prevent horizontal scroll from 100vw elements */
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  overflow-x: hidden; /* Double safety */
  width: 100%;
  position: relative;
  margin: 0;
}

/* ========== LAYOUT ========== */
.phst-section {
  margin: 28px 0;
}

.phst-section h2 {
  margin: 0 0 16px;
  font-size: 1.6rem;
  color: var(--phst-text);
  letter-spacing: .2px;
  position: relative;
}

.phst-section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 56px;
  height: 3px;
  background: var(--phst-accent);
  border-radius: 999px;
}

/* Container */
.phst-container {
  max-width: var(--phst-container-max-w, 1200px);
  margin: 0 auto;
  padding: 0 16px;
}

.phst-container--narrow { --phst-container-max-w: 960px; }
.phst-container--medium { --phst-container-max-w: 1200px; }
.phst-container--wide { --phst-container-max-w: 1400px; }

/* ========== BUTTONS ========== */
.phst-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: var(--phst-accent);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(10, 165, 114, .25);
  min-height: 44px;
  border: none;
  cursor: pointer;
}

/* ========== BANNER - FULLY RESPONSIVE ========== */
.phst-banner {
  background-size: cover;
  background-position: center;
  border-radius: var(--phst-radius);
  margin: 28px 0;
  overflow: hidden;
  position: relative;
  min-height: 300px;
}

.phst-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.1), rgba(0,0,0,.3));
  pointer-events: none;
}

.phst-banner-inner {
  padding: 40px 24px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: inherit;
}

.phst-banner h2 {
  font-size: 2rem;
  margin: 0 0 16px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
  max-width: 800px;
}

.phst-banner p {
  margin: 0 0 20px;
  color: #fff;
  font-size: 1.1rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
  max-width: 600px;
}

.phst-banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 400px;
}

/* ========== SLIDER ========== */
.phst-slider {
  position: relative;
  height: var(--phst-slider-h, 480px);
  overflow: hidden;
  border-radius: var(--phst-radius);
  background: #000;
  max-width: var(--phst-slider-max-w, 1000px);
  margin: 0 auto;
}

.phst-slider::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.35), rgba(0,0,0,0) 60%);
  pointer-events: none;
}

.phst-slide {
  display: none;
  height: 100%;
}

.phst-slide.active {
  display: block;
}

.phst-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phst-slide-content {
  position: absolute;
  left: 24px;
  bottom: 24px;
  background: rgba(255,255,255,.88);
  color: var(--phst-text);
  padding: 14px 18px;
  border-radius: var(--phst-radius-sm);
  max-width: 70%;
  box-shadow: var(--phst-shadow);
  backdrop-filter: saturate(180%) blur(6px);
}

.phst-slide-content h3 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

.phst-slide-content p {
  margin: 0 0 12px;
  color: var(--phst-muted);
}

.phst-prev, .phst-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.95);
  border: 1px solid var(--phst-border);
  box-shadow: var(--phst-shadow);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

  .phst-prev { left: 12px; }
  .phst-next { right: 12px; }

/* ========== MODULE HEADER + CAROUSEL CONTROLS (UNIFY WITH PLUGIN) ========== */
.phst-module-header-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.phst-module-header-container h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--phst-text);
}

.phst-product-slider {
  position: relative;
}

.phst-carousel-prev,
.phst-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: #fff;
  border: 1px solid var(--phst-border);
  border-radius: 999px;
  box-shadow: var(--phst-shadow);
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 1;
}

.phst-carousel-prev { left: 8px; }
.phst-carousel-next { right: 8px; }

.phst-view-all-product-item {
  border: 1px solid var(--phst-border);
  border-radius: var(--phst-radius-sm);
  color: var(--phst-text);
}

/* ========== MINI CATEGORY + SQUARE GRID (PLUGIN SUPPORT) ========== */
.phst-mini-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--phst-border);
  border-radius: var(--phst-radius-sm);
  background: var(--phst-surface);
}

.phst-square-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.phst-square-item {
  border: 1px solid var(--phst-border);
  border-radius: var(--phst-radius);
  background: var(--phst-surface);
  overflow: hidden;
}

/* ========== MENUS & CATEGORIES (SINGLE LINE FORCE) ========== */
.ph-nav-trigger,
.widget_nav_menu li a,
.widget_product_categories li a,
.phst-category-name,
.menu-item a,
.nav-menu a,
.phst-header-nav a,
.phst-menu a {
    white-space: nowrap;
}
