/* ============================================
   P STORE CHIANG MAI — Design System
   Premium Second-Hand Apple Store
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Colors from Guidelines */
  --color-bg: #ffffff;
  --color-bg-secondary: #f9f9f9;
  --color-bg-card: #ffffff;
  --color-text-primary: #111111;
  --color-text-secondary: #444444;
  --color-text-tertiary: #888888;

  --color-accent: #ffa400; /* Orange */
  --color-primary: #2180eb; /* Blue */
  --color-cta: #25c860; /* Green (LINE) */
  --color-border: #eeeeee;
  --color-border-light: #f5f5f5;

  /* Condition Badge Colors */
  --color-grade-a: #25c860;
  --color-grade-b: #ffa400;
  --color-grade-c: #ff4d4f;

  /* Trust Colors */
  --color-trust-green: #25c860;
  --color-trust-blue: #2180eb;

  /* LINE & Social */
  --color-line: #25c860;
  --color-messenger: #0084ff;
  --color-facebook: #1877f2;
  --color-instagram-gradient: linear-gradient(
    45deg,
    #f09433,
    #e6683c,
    #dc2743,
    #cc2366,
    #bc1888
  );

  /* Typography */
  --font-family:
    'Noto Sans Thai', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --font-size-5xl: 3.5rem;
  --font-size-hero: clamp(2.5rem, 6vw, 4.5rem);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.05);
  --shadow-card-hover: 0 20px 50px rgba(0, 0, 0, 0.1);

  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 980px;
  --header-height: 56px;
}

/* --- Search Bar --- */
.search-container {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 14px 20px 14px 45px;
  border-radius: 30px;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-alt);
  font-size: var(--font-size-base);
  font-family: inherit;
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
  outline: none;
}

.search-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
  background-color: var(--color-bg);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--color-text-tertiary);
  pointer-events: none;
}

/* --- Product Filters --- */
.filters-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.product-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.filter-group label,
.filter-label-spacer {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: var(--space-xs);
}

.filter-label-spacer {
  visibility: hidden;
  user-select: none;
}

.filter-select {
  padding: 12px 16px; /* Increased from 10px */
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  background-color: #f5f5f7;
  font-size: var(--font-size-base); /* Increased from sm (16px) */
  font-family: inherit;
  color: var(--color-text-primary);
  outline: none;
  transition: all var(--transition-fast);
  min-width: 140px;
  min-height: 44px; /* Ensure touch target */
}

.filter-select:focus {
  border-color: var(--color-accent);
  background-color: white;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.filter-group--checkbox {
  flex-direction: row;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 16px; /* Increased from 10px */
  background: #f5f5f7;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  cursor: pointer;
  height: 44px; /* Increased from 42px */
}

.filter-group--checkbox:hover {
  background: #ebebed;
}

.filter-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.filter-group--checkbox label {
  padding-left: 0;
  cursor: pointer;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .filters-container {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .product-filters {
    margin-bottom: 0;
    justify-content: flex-start;
  }

  .search-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    width: 320px;
  }

  .search-container {
    margin: 0;
    width: 100%;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

button {
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  background: none;
}

ul,
ol {
  list-style: none;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* --- Typography --- */
.text-hero {
  font-size: var(--font-size-hero);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.text-headline {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-title {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.text-body {
  font-size: var(--font-size-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.text-caption {
  font-size: var(--font-size-sm);
  font-weight: 400;
  color: var(--color-text-tertiary);
}

.text-accent {
  color: var(--color-accent);
  font-weight: 700;
}

.text-underline {
  position: relative;
  display: inline-block;
}

.text-underline::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 8px;
  background: rgba(255, 164, 0, 0.2);
  z-index: -1;
}

.text-center {
  text-align: center;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 1000;
  border-bottom: 1px solid var(--color-border-light);
  transition: background var(--transition-base);
}

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

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.header__logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

@media (max-width: 480px) {
  .header__inner {
    padding: 0 var(--space-md);
  }

  .header__logo {
    font-size: var(--font-size-lg);
    gap: var(--space-xs);
  }

  .header__logo-img {
    width: 28px;
    height: 28px;
  }

  .header__line-btn {
    padding: 8px 16px;
    font-size: var(--font-size-xs);
    min-height: 44px;
  }
}

.header__nav {
  display: none;
  gap: var(--space-2xl);
}

.header__nav a {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.header__nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition-base);
  border-radius: 1px;
}

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

.header__nav a:hover::after {
  width: 100%;
}

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

.header__line-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--color-line);
  color: white;
  padding: 12px 24px; /* Increased from 8px 20px */
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 700;
  transition: all var(--transition-fast);
  min-height: 44px; /* Ensure touch target */
}

.header__line-btn:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 200, 96, 0.3);
}

.header__line-btn svg {
  width: 20px; /* Increased from 18px */
  height: 20px;
}

.header__menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px; /* Increased from 8px */
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}

.header__menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.header__menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.header__menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.header__menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: var(--space-2xl) var(--space-lg);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-base);
}

.mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-size: var(--font-size-xl); /* Reduced from 2xl for better fit */
  font-weight: 600;
  color: var(--color-text-primary);
  padding: 18px 0; /* Increased from space-md for better touch target */
  border-bottom: 1px solid var(--color-border-light);
  display: block;
  transition: color var(--transition-fast);
  min-height: 56px; /* Ensure 44px+ touch target */
}

.mobile-menu a:hover {
  color: var(--color-accent);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-height) + var(--space-xl)) var(--space-lg)
    var(--space-2xl);
  background: linear-gradient(180deg, #f5f5f7 0%, #ffffff 100%);
  overflow: hidden;
}

@media (max-width: 480px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + var(--space-3xl));
  }

  .hero__title {
    font-size: 2.2rem;
    line-height: 1.1;
  }

  .hero__subtitle {
    font-size: 1rem;
    margin-bottom: var(--space-xl);
  }

  .hero__logo {
    width: 100px;
    height: 100px;
    margin-bottom: var(--space-lg);
  }

  .hero__cta-group {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .btn--lg {
    padding: 14px 28px;
    font-size: var(--font-size-base);
    width: 100%;
  }

  .hero__stats {
    padding: var(--space-md);
    margin-top: var(--space-xl);
  }

  .hero__stat-value {
    font-size: var(--font-size-lg);
  }
}

.hero__bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__bg-shapes::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 113, 227, 0.06) 0%,
    transparent 70%
  );
  top: -200px;
  right: -200px;
  animation: float 20s ease-in-out infinite;
}

.hero__bg-shapes::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(52, 199, 89, 0.05) 0%,
    transparent 70%
  );
  bottom: -100px;
  left: -100px;
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

.hero__content {
  position: relative;
  max-width: 680px;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(0, 113, 227, 0.08);
  color: var(--color-accent);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.8s ease-out;
}

.hero__logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin: 0 auto var(--space-xl);
  animation: fadeInUp 0.6s ease-out;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.5);
  }
}

.hero__title {
  font-size: var(--font-size-hero);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero__title span {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    #40a9ff 40%,
    var(--color-cta) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 580px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.6;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* --- Hero Stats --- */
.hero__stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 500px;
  margin: var(--space-2xl) auto 0;
  padding: var(--space-lg) var(--space-xl);
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero__stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.hero__stat-item:not(:last-child) {
  border-right: 1px solid var(--color-border);
}

.hero__stat-value {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1.1;
}

.hero__stat-label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.hero__stat-check {
  width: 28px;
  height: 28px;
  color: var(--color-cta);
  margin-left: var(--space-sm);
}

.hero__cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  max-width: 650px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-base);
  font-weight: 700;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: white;
}

.btn--primary:hover {
  background: #1a6dca;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(33, 128, 235, 0.25);
}

.btn--secondary {
  background: white;
  color: var(--color-text-primary);
  border: 1.5px solid var(--color-border);
}

.btn--secondary:hover {
  background: #f9f9f9;
  border-color: var(--color-accent);
  transform: translateY(-3px);
}

.btn--line {
  background: var(--color-cta);
  color: white;
}

.btn--line:hover {
  background: #1eb553;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(37, 200, 96, 0.25);
}

.btn--accent {
  background: var(--color-accent);
  color: white;
}

.btn--accent:hover {
  background: #e69500;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 164, 0, 0.25);
}

.btn--facebook {
  background: var(--color-facebook);
  color: white;
}

.btn--facebook:hover {
  color: white;
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(24, 119, 242, 0.3);
}

.btn--sm {
  padding: 10px 20px;
  font-size: var(--font-size-sm);
}

.btn--lg {
  padding: 16px 40px;
  font-size: var(--font-size-lg);
}

.btn--full {
  width: 100%;
}

/* ============================================
   SECTION BASE
   ============================================ */
.section {
  padding: var(--space-4xl) 0;
}

.section--gray {
  background: var(--color-bg);
}

#featured,
.tab-content {
  background: var(--color-bg);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section__eyebrow {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.section__title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.section__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================
   CATEGORIES
   ============================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.category-card {
  position: relative;
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  border: 1px solid var(--color-border-light);
  transition: all var(--transition-base);
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  display: block;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), #40a9ff);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.category-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.category-card:hover::before {
  opacity: 1;
}

.category-card__icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  display: block;
}

.category-card__icon-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto var(--space-md);
}

.category-card__name {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.category-card__count {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
}

/* ============================================
   PRODUCT CARDS — Native Design System
   Solves the uneven baseline issue by using
   consistent fixed-zone card layouts.
   ============================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

/* === Product Card === */
.pcard {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
  animation: cardFadeIn 0.5s ease-out both;
  position: relative;
}

.pcard:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(255, 164, 0, 0.2);
  color: inherit;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Image Area (fixed aspect ratio = consistent height) --- */
.pcard__image-area {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f7; /* Default background while loading */
}

.pcard__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
  display: block; /* Ensure no extra space */
}

/* Handle broken images */
.pcard__image[src=''],
.pcard__image:not([src]) {
  visibility: hidden;
}

.pcard__placeholder-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}

.pcard:hover .pcard__image {
  transform: scale(1.04);
}

.pcard__placeholder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pcard__placeholder-icon svg {
  width: 64px;
  height: 64px;
}

/* --- Badges --- */
.pcard__badges-container {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 8px;
  z-index: 2;
  align-items: flex-start;
  flex-wrap: wrap;
}

.pcard__badge-discount {
  background: #ff3b30;
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.3);
}

/* "ราคาพิเศษ" badge — golden/amber variant for small discounts */
.pcard__badge-special {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-size: 0.65rem;
  padding: 4px 12px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Condition Badges */
.pcard__badge-hand {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pcard__badge-hand.new {
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-text-primary);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pcard__badge-hand.used {
  background: rgba(44, 44, 46, 0.85); /* Dark Apple-like aesthetic */
  color: #ffffff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


.pcard__badge-installment {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-accent);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 164, 0, 0.2);
  z-index: 2;
}

/* --- Card Body (flex-grow to push footer down) --- */
.pcard__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-md) var(--space-md) 0;
}

/* Meta row: type badge + storage */
.pcard__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.pcard__type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(33, 128, 235, 0.08);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pcard__type-badge svg {
  width: 12px;
  height: 12px;
}

.pcard__storage {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-text-tertiary);
  background: rgba(0, 0, 0, 0.04);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

/* Title */
.pcard__title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.3;
  margin-bottom: var(--space-xs);
  /* Fixed 2 lines for baseline consistency */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  /* Prevent overflow from very long words (model names) */
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Color row */
.pcard__color-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--space-xs);
  min-height: 20px;
}

.pcard__color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.1);
}

.pcard__color-name {
  font-size: 0.72rem;
  color: var(--color-text-tertiary);
  font-weight: 500;
}

/* ============================================
   PRODUCT DESCRIPTION — 5-line clamp
   Works on: iOS Safari 14+, Android Chrome 88+,
             Firefox 68+, all modern Chromium
   Fallback: JS adds .is-clamped class for
             older browsers using max-height
   ============================================ */
.pcard__description {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  line-height: 1.55;

  /* ── Primary method: webkit-line-clamp (all modern browsers) ── */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3; /* standard property (future-proof)    */
  overflow: hidden;

  /* ── Word handling: prevent single long words from overflowing ── */
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto; /* auto-hyphenation where supported     */
  -webkit-hyphens: auto;

  /* ── JS-fallback class: browsers where webkit-line-clamp fails ── */
  /* max-height is (line-height × font-size × 3 lines)               */
  /* = 1.55 × 0.82rem × 3 ≈ 3.813rem — round up to 3.9rem            */
}

/* Fallback for very old browsers that ignore line-clamp              */
/* JS will add .is-clamped to the element when needed                */
.pcard__description.is-clamped {
  display: block; /* override the -webkit-box display     */
  max-height: 3.9rem; /* 3 lines × 1.55 line-height × 0.82rem */
  overflow: hidden;
  position: relative; /* for the fade-out pseudo-element      */
}

/* Soft fade-out bottom edge on the fallback — more elegant than ... */
.pcard__description.is-clamped::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1.4rem;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--color-surface, #fff) 90%
  );
  pointer-events: none;
}

.pcard__spec-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.pcard__battery {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #34c759;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  line-height: 1;
  min-width: 44px;
}

/* No longer using battery icon decoration */

.pcard__condition-warranty {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.pcard__price-section {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.pcard__price-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.pcard__price-old {
  font-size: 1rem;
  color: var(--color-primary);
  text-decoration: line-through;
  font-weight: 600;
}

.pcard__price-new {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ff3b30;
  letter-spacing: -0.02em;
}

.pcard__installment-shelf {
  min-height: 48px;
  margin-bottom: var(--space-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pcard__installment-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, #0071e3 0%, #00d2ff 100%);
  color: white;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.15);
}

.pcard__star {
  font-size: 1.2rem;
}

.pcard__installment-text {
  font-size: 0.85rem;
  font-weight: 700;
}

.pcard__details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-lg);
  border-top: 1px solid var(--color-border-light);
  padding-top: var(--space-md);
}

.pcard__detail-item {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.pcard__detail-item strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

.pcard__action-area {
  margin-top: auto;
}

.pcard__btn-view {
  display: block;
  width: 100%;
  padding: 14px;
  background: #f5f5f7;
  color: var(--color-text-secondary);
  text-align: center;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--transition-base);
}

.pcard:hover .pcard__btn-view {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(33, 128, 235, 0.3);
}

/* --- Card Footer (always at bottom) --- */
.pcard__footer {
  padding: 0 var(--space-md) var(--space-md);
  margin-top: auto;
  border-top: 1px solid var(--color-border-light);
  padding-top: var(--space-md);
}

.pcard__price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.pcard__price-original {
  font-size: 0.78rem;
  color: var(--color-text-tertiary);
  text-decoration: line-through;
  font-weight: 500;
}

.pcard__price {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: -0.02em;
}

.pcard__price--ask {
  font-size: var(--font-size-sm);
  color: var(--color-primary);
  font-weight: 600;
}

.pcard__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.pcard__action-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.pcard__action svg {
  color: var(--color-text-tertiary);
  transition: all var(--transition-fast);
}

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

/* Legacy FB embed support (for any remaining iframes) */
.fb-embed-wrapper {
  width: 100%;
  max-width: 500px;
  height: 100%;
  min-height: 760px;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: all var(--transition-base);
  background: transparent;
  display: flex;
  flex-direction: column;
}

.fb-embed-wrapper iframe {
  width: 100% !important;
  height: 100% !important;
  flex-grow: 1;
  border: none;
}

/* ============================================
   CONDITION GUIDE
   ============================================ */
.condition-guide {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
}

.condition-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--color-border-light);
  transition: all var(--transition-base);
}

.condition-card:hover {
  box-shadow: var(--shadow-md);
}

.condition-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.condition-badge--a {
  background: var(--color-grade-a);
}
.condition-badge--b {
  background: var(--color-grade-b);
}
.condition-badge--c {
  background: var(--color-grade-c);
}

/* ============================================
   MAP SECTION
   ============================================ */
.map-container {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border-light);
  background: var(--color-bg-card);
}

.map-container iframe {
  display: block;
}

.condition-card__title {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.condition-card__desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ============================================
   TRUST SECTION
   ============================================ */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.trust-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  border: 1px solid var(--color-border-light);
  transition: all var(--transition-base);
}

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

.trust-card__icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  display: block;
}

.trust-card__icon-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin: 0 auto var(--space-md);
}

.trust-card__title {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.trust-card__desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* ============================================
   SOCIAL SECTION
   ============================================ */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-xl);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: white;
  transition: all var(--transition-fast);
}

.social-link:hover {
  color: white;
  transform: scale(1.06);
}

.social-link--facebook {
  background: var(--color-facebook);
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.25);
}

.social-link--instagram {
  background: var(--color-instagram-gradient);
  box-shadow: 0 4px 12px rgba(220, 39, 67, 0.25);
}

.social-link--line {
  background: var(--color-line);
  box-shadow: 0 4px 12px rgba(6, 199, 85, 0.25);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-text-primary);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer__brand-name {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: white;
  margin-bottom: var(--space-sm);
}

.footer__brand-desc {
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

.footer__heading {
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: white;
  margin-bottom: var(--space-md);
}

.footer__links a {
  display: block;
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.6);
  padding: var(--space-xs) 0;
  transition: color var(--transition-fast);
}

.footer__links a:hover {
  color: white;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-xl);
  text-align: center;
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 480px) {
  .footer {
    padding: var(--space-2xl) 0 var(--space-xl);
    text-align: center;
  }

  .footer__grid {
    gap: var(--space-xl);
  }

  .footer__brand-name {
    font-size: var(--font-size-lg);
  }

  .footer__links a {
    padding: 12px 0; /* Better touch target */
  }

  .social-links {
    flex-direction: column;
    align-items: center;
  }

  .social-link {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
}

/* ============================================
   FLOATING CHAT BUTTONS
   ============================================ */
.floating-btns {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  z-index: 900;
}

.floating-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-lg);
}

.floating-btn:hover {
  transform: scale(1.12);
  color: white;
}

.floating-btn--line {
  background: var(--color-line);
}

.floating-btn--messenger {
  background: var(--color-messenger);
}

.floating-btn svg {
  width: 28px;
  height: 28px;
}

/* ============================================
   PRODUCT LISTING PAGE
   ============================================ */
.page-header {
  padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-2xl);
  text-align: center;
  background: var(--color-bg-secondary);
}

.page-header__title {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.page-header__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
}

/* Category Tabs */
.category-tabs {
  display: flex;
  overflow-x: auto;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text-secondary);
  background: white;
  border: 1.5px solid var(--color-border);
  white-space: nowrap;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.category-tab svg {
  flex-shrink: 0;
}

.category-tab:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(255, 164, 0, 0.04);
}

.category-tab.active {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(255, 164, 0, 0.25);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 {
  transition-delay: 0.1s;
}
.animate-on-scroll.delay-2 {
  transition-delay: 0.2s;
}
.animate-on-scroll.delay-3 {
  transition-delay: 0.3s;
}
.animate-on-scroll.delay-4 {
  transition-delay: 0.4s;
}

/* ============================================
   CTA BANNER
   ============================================ */
.cta-banner {
  background: linear-gradient(135deg, #1d1d1f 0%, #2d2d30 100%);
  border-radius: var(--radius-2xl);
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.15), transparent 70%);
  top: -100px;
  right: -100px;
}

.cta-banner__title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
}

.cta-banner__subtitle {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-xl);
  position: relative;
  z-index: 1;
}

.cta-banner__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  position: relative;
  z-index: 1;
}

@media (max-width: 480px) {
  .trust-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .trust-card {
    padding: var(--space-lg);
  }

  .trust-card__icon-img {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  .cta-banner {
    padding: var(--space-2xl) var(--space-lg);
    border-radius: var(--radius-xl);
  }

  .cta-banner__title {
    font-size: var(--font-size-2xl);
  }

  .cta-banner__subtitle {
    font-size: var(--font-size-base);
  }

  .cta-banner__buttons {
    flex-direction: column;
  }
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 639px) {
  .pcard__footer {
    padding: 0 var(--space-sm) var(--space-sm);
    padding-top: var(--space-sm);
  }

  .pcard__meta {
    flex-wrap: wrap;
    gap: 4px;
  }

  .pcard__action {
    padding: 8px 10px;
  }

  .pcard__badge-discount {
    font-size: 0.6rem;
    padding: 3px 7px;
    top: 8px;
    left: 8px;
  }

  .pcard__badge-installment {
    font-size: 0.55rem;
    padding: 3px 7px;
    top: 8px;
    right: 8px;
  }
}

@media (max-width: 374px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .container {
    padding: 0 var(--space-md);
  }

  .pcard__title {
    font-size: var(--font-size-base);
  }

  /* Tighten description to 5 lines at smallest screens */
  .pcard__description {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    font-size: 0.78rem;
  }

  /* Recalculate fallback max-height for smaller font-size */
  .pcard__description.is-clamped {
    max-height: 3.627rem; /* 1.55 × 0.78rem × 3 */
  }
}

@media (min-width: 375px) and (max-width: 639px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .pcard__body {
    padding: var(--space-sm);
  }

  .pcard__title {
    font-size: 0.95rem;
  }

  /* Consistent 5-line clamp at standard mobile widths */
  .pcard__description {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    font-size: 0.8rem;
  }

  .pcard__description.is-clamped {
    max-height: 3.72rem; /* 1.55 × 0.80rem × 3 */
  }

  .pcard__price {
    font-size: 1.1rem;
  }
}

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

  .condition-guide {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .trust-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .header__nav {
    display: flex;
  }

  .header__menu-btn {
    display: none;
  }

  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
  }

  .section {
    padding: var(--space-5xl) 0;
  }

  .section__title {
    font-size: var(--font-size-4xl);
  }

  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* ============================================
   UTILITY
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.spacer {
  padding-top: var(--header-height);
}

/* ============================================
   ABOUT US HERO
   ============================================ */
.about-hero {
  position: relative;
  padding: calc(var(--header-height) + var(--space-4xl)) 0 var(--space-3xl);
  text-align: center;
  background: var(--color-bg);
  overflow: hidden;
}

.about-hero__header {
  position: relative;
  z-index: 2;
  margin-bottom: var(--space-md);
}

.about-hero__title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  color: #000000;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.02em;
}

.about-hero__subtitle {
  font-size: var(--font-size-xl);
  color: #000000;
  font-weight: 500;
}

.about-hero__content {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 450px;
}

.about-hero__bg-text {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(4rem, 15vw, 16rem); /* Reduced from 8rem for mobile */
  font-weight: 900;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.05em;
  background: linear-gradient(
    180deg,
    rgba(255, 164, 0, 0.4) 0%,
    rgba(255, 164, 0, 0) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  z-index: 0;
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .about-hero {
    padding-top: calc(var(--header-height) + var(--space-xl));
  }

  .about-hero__title {
    font-size: var(--font-size-2xl);
  }

  .about-hero__quote-box {
    padding: var(--space-xl);
    min-width: 0;
    width: 100%;
  }

  .about-hero__quote-text {
    font-size: 1rem;
  }

  .about-hero__quote-text strong {
    font-size: var(--font-size-xl);
  }

  .about-hero__quote-icon {
    font-size: 3rem;
  }
}

.about-hero__main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xl);
  width: 100%;
  max-width: 900px;
  flex-wrap: wrap-reverse;
  margin-top: 30px;
}

.about-hero__quote-box {
  position: relative;
  background: white;
  border: 1px solid #000000;
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
  z-index: 2;
  min-width: 320px;
}

.about-hero__quote-icon {
  position: absolute;
  font-size: 5rem;
  font-weight: 900;
  color: #ff9f59;
  line-height: 1;
  font-family: Arial, sans-serif;
}

.about-hero__quote-icon--top {
  top: -10px;
  left: -10px;
}

.about-hero__quote-icon--bottom {
  bottom: -40px;
  right: -10px;
}

.about-hero__quote-text {
  font-size: var(--font-size-xl);
  color: #444444;
  line-height: 1.6;
}

.about-hero__quote-text strong {
  display: block;
  font-size: var(--font-size-3xl);
  font-weight: 800;
  color: #333333;
  margin-top: var(--space-sm);
}

.about-hero__quote-text strong:first-child {
  margin-top: 0;
}

.about-hero__image-wrapper {
  position: relative;
  z-index: 1;
  max-width: 450px;
}

.about-hero__image-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, var(--color-bg) 0%, transparent 100%);
  pointer-events: none;
}

.about-hero__image {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .about-hero__main {
    flex-wrap: nowrap;
    margin-top: 60px;
  }
}

/* ============================================
   ABOUT US — CLEAN SERVICES LIST
   ============================================ */
.about-services-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.about-service-divider {
  border: none;
  border-top: 1px solid var(--color-border-light);
  margin: 0 var(--space-xl);
}

/* --- Service Item --- */
.about-service-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-xl);
  transition:
    transform var(--transition-base),
    background var(--transition-base);
}

.about-service-item:hover {
  background: var(--color-bg-alt);
  transform: translateX(8px);
}

.about-service-item__icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-2xl);
  background: rgba(0, 113, 227, 0.08);
  flex-shrink: 0;
}

.about-service-item__icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.about-service-item__content {
  flex-grow: 1;
}

.about-service-item__title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
  letter-spacing: -0.02em;
}

.about-service-item__question {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  font-weight: 500;
  margin-bottom: var(--space-md);
}

.about-service-item__list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-lg);
  text-align: left;
}

.about-service-item__list li {
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  padding: var(--space-xs) 0;
  padding-left: var(--space-xl);
  position: relative;
  line-height: 1.6;
}

.about-service-item__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-trust-green);
  font-weight: 800;
  font-size: var(--font-size-lg);
}

.about-service-item__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-accent);
  font-weight: 600;
  font-size: var(--font-size-base);
  transition: all var(--transition-fast);
}

.about-service-item__link:hover {
  color: var(--color-accent-hover);
  gap: var(--space-sm);
}

.about-service-item__link svg {
  transition: transform var(--transition-fast);
}

.about-service-item__link:hover svg {
  transform: translateX(4px);
}

@media (max-width: 480px) {
  .about-service-item {
    padding: var(--space-lg);
    gap: var(--space-md);
  }

  .about-service-item__icon-wrapper {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-sm);
  }

  .about-service-item__icon {
    font-size: 2rem;
  }

  .about-service-item__title {
    font-size: var(--font-size-xl);
  }

  .about-service-item__list li {
    font-size: 0.95rem;
  }
}

/* --- Responsive --- */
@media (min-width: 768px) {
  .about-services-list {
    gap: var(--space-2xl);
  }

  .about-service-item {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-2xl);
    padding: var(--space-2xl);
  }

  .about-service-item__icon-wrapper {
    width: 100px;
    height: 100px;
  }

  .about-service-item__icon {
    font-size: 3rem;
  }

  .about-service-item__title {
    font-size: var(--font-size-3xl);
  }

  .about-service-item__question {
    font-size: var(--font-size-lg);
  }

  .about-service-item__list li {
    font-size: var(--font-size-lg);
  }
}

/* --- GOOGLE MAPS HEADER WITH LINES --- */
.title-with-lines {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.title-with-lines::before,
.title-with-lines::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-border), transparent);
  max-width: 150px;
}

.title-with-lines .section__title {
  margin-bottom: 0;
  white-space: nowrap;
}

/* --- SHOP GALLERY SLIDER --- */
.shop-gallery {
  margin-top: var(--space-xl);
  width: 100%;
  overflow: hidden;
  position: relative;
}

.shop-slider {
  width: 100%;
  cursor: grab;
}

.shop-slider:active {
  cursor: grabbing;
}

.shop-slider__track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  gap: var(--space-md);
  will-change: transform;
}

.shop-slide {
  flex: 0 0 100%; /* Default mobile: 1 slide */
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  background: var(--color-bg-secondary);
}

.shop-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--transition-base);
}

.shop-slide:hover img {
  transform: scale(1.05);
}

/* Slider Pagination Dots */
.shop-slider__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: var(--space-lg);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d1d6;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: #8e8e93;
  width: 24px;
  border-radius: 4px;
}

/* Responsive Slider */
@media (min-width: 640px) {
  .shop-slide {
    flex: 0 0 calc(50% - (var(--space-md) / 2)); /* 2 slides */
  }
}

@media (min-width: 1024px) {
  .shop-slide {
    flex: 0 0 calc(33.333% - (var(--space-md) * 2 / 3)); /* 3 slides */
  }
}

@media (max-width: 480px) {
  .shop-gallery {
    margin-top: var(--space-lg);
  }
  .shop-slide {
    border-radius: var(--radius-md);
  }
}
