/*
Theme Name: Catalog WhatsApp
Theme URI: https://local.project/catalog-whatsapp
Author: Codex
Description: Product catalog theme for a non-ecommerce showroom website with WhatsApp inquiry flow.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: catalog-whatsapp
*/

:root {
  --cw-bg: #f7f2ea;
  --cw-surface: #fffaf3;
  --cw-surface-soft: rgba(255, 250, 243, 0.88);
  --cw-ink: #211a15;
  --cw-muted: #6b6056;
  --cw-line: rgba(221, 208, 190, 0.75);
  --cw-accent: #bc4d30;
  --cw-accent-dark: #96361f;
  --cw-highlight: #f0cb86;
  --cw-success: #1e8f54;
  --cw-navy: #24283f;
  --cw-radius: 24px;
  --cw-shadow: 0 24px 60px rgba(58, 38, 20, 0.11);
  --cw-max: 1200px;
  --cw-font-heading: "Georgia", "Times New Roman", serif;
  --cw-font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fcf9f5 0%, var(--cw-bg) 100%);
  color: var(--cw-ink);
  font-family: var(--cw-font-body);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.cw-shell {
  width: min(calc(100% - 32px), var(--cw-max));
  margin: 0 auto;
}

.cw-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(252, 248, 242, 0.92);
  border-bottom: 1px solid var(--cw-line);
}

.cw-site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.home .cw-site-header {
  position: absolute;
  inset: 0 0 auto 0;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}

.home .cw-site-header__row {
  margin-top: 16px;
  padding: 16px 22px;
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.cw-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cw-brand__title {
  font-family: var(--cw-font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cw-brand__tag {
  color: var(--cw-muted);
  font-size: 0.9rem;
}

.home .cw-brand__title,
.home .cw-nav a {
  color: #fff;
}

.home .cw-brand__tag {
  color: rgba(255, 255, 255, 0.76);
}

.cw-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.cw-nav a {
  color: var(--cw-muted);
  font-weight: 600;
}

.cw-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--cw-accent);
  color: #fff;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.cw-button:hover {
  background: var(--cw-accent-dark);
  transform: translateY(-1px);
}

.cw-button--ghost {
  background: transparent;
  color: var(--cw-ink);
  border: 1px solid var(--cw-line);
}

.cw-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(125deg, rgba(36, 40, 63, 0.96) 0%, rgba(35, 39, 63, 0.90) 52%, rgba(188, 77, 48, 0.82) 100%);
  color: #fff;
}

.cw-hero::before,
.cw-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.cw-hero::before {
  width: 520px;
  height: 520px;
  top: -180px;
  right: -120px;
}

.cw-hero::after {
  width: 420px;
  height: 420px;
  left: -120px;
  bottom: -120px;
}

.cw-hero__card {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), var(--cw-max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 30px;
  align-items: center;
  padding: 130px 0 80px;
}

.cw-eyebrow {
  color: var(--cw-highlight);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.cw-hero h1,
.cw-section h2,
.cw-product-card__title,
.cw-page-title {
  font-family: var(--cw-font-heading);
}

.cw-hero h1 {
  margin: 16px 0 18px;
  font-size: clamp(2.9rem, 6vw, 5.8rem);
  line-height: 0.98;
  max-width: 10ch;
}

.cw-hero p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 58ch;
  font-size: 1.04rem;
  line-height: 1.7;
}

.cw-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.cw-hero__actions .cw-button--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.10);
}

.cw-hero__panel {
  padding: 26px;
  border-radius: 30px;
  background: rgba(255, 250, 243, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  box-shadow: var(--cw-shadow);
}

.cw-hero__panel h3 {
  margin: 0 0 14px;
  font-size: 1.5rem;
  color: #fff;
}

.cw-hero__panel p {
  color: rgba(255, 255, 255, 0.82);
}

.cw-hero__cats {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.cw-hero__cat {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.cw-hero__cat strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
}

.cw-hero__cat span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.cw-hero__dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}

.cw-hero__dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
}

.cw-hero__dots span:first-child {
  background: #fff;
}

.cw-section {
  padding: 54px 0;
}

.cw-section__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
}

.cw-section__head p {
  margin: 0;
  color: var(--cw-muted);
  max-width: 46ch;
  line-height: 1.7;
}

.cw-grid {
  display: grid;
  gap: 18px;
}

.cw-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.cw-card {
  background: var(--cw-surface);
  border: 1px solid var(--cw-line);
  border-radius: var(--cw-radius);
  box-shadow: var(--cw-shadow);
}

.cw-category-card,
.cw-product-card {
  overflow: hidden;
}

.cw-category-card__body,
.cw-product-card__body {
  padding: 22px;
}

.cw-category-card__title,
.cw-product-card__title {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.cw-product-card__meta,
.cw-breadcrumbs,
.cw-muted {
  color: var(--cw-muted);
}

.cw-product-card__image {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #efe4d5;
}

.cw-product-card__footer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.cw-stock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
}

.cw-stock::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cw-success);
}

.cw-page-header {
  padding: 44px 0 20px;
}

.cw-page-title {
  margin: 8px 0 6px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.cw-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  padding-bottom: 48px;
}

.cw-sidebar,
.cw-content-panel,
.cw-product-detail {
  background: var(--cw-surface-soft);
  border: 1px solid var(--cw-line);
  border-radius: 24px;
  box-shadow: var(--cw-shadow);
}

.cw-sidebar,
.cw-content-panel,
.cw-product-detail {
  padding: 22px;
}

.cw-product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.cw-product-detail__image {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 22px;
  background: #efe4d5;
}

.cw-product-detail__title {
  margin: 12px 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.cw-detail-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.cw-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(216, 203, 184, 0.7);
}

.cw-site-footer {
  border-top: 1px solid var(--cw-line);
  padding: 30px 0 50px;
  color: var(--cw-muted);
}

.cw-main-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.cw-info-card {
  padding: 22px;
}

.cw-structure {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.cw-tree {
  padding: 24px;
  background: #fffaf4;
  border: 1px solid var(--cw-line);
  border-radius: var(--cw-radius);
  box-shadow: var(--cw-shadow);
  font-family: Menlo, Monaco, monospace;
  font-size: 0.95rem;
  line-height: 1.9;
  color: #4b4037;
  white-space: pre-line;
}

.cw-future {
  background: linear-gradient(135deg, #fff5e7 0%, #ecd8ba 100%);
}

@media (max-width: 980px) {
  .cw-hero__card,
  .cw-layout,
  .cw-product-detail,
  .cw-main-categories,
  .cw-structure,
  .cw-grid--4,
  .cw-grid--3 {
    grid-template-columns: 1fr;
  }

  .cw-site-header__row,
  .cw-section__head {
    align-items: start;
    flex-direction: column;
  }

  .cw-hero h1 {
    max-width: none;
  }
}
