/* ==========================================================================
   Amo Luz — Product Page Styles
   File: /wp-content/themes/amoluz-theme/css/amoluz-product.css
   Enqueue: is_product() only via functions.php
   Brand: Amo Luz — amoluz.com
   ========================================================================== */

/* ── CSS Variables ── */
:root {
  /* Primary palette */
  --al-ink: #2C2C2A;
  --al-parchment: #F1EFE8;
  --al-amber: #854F0B;
  --al-stone: #D3D1C7;

  /* Extended palette */
  --al-sage: #8B9F7B;
  --al-dusty-rose: #C4908A;
  --al-mustard: #C9A84C;
  --al-slate: #6B7B8D;
  --al-ivory: #F5F0E8;
  --al-berry: #7D4E6B;
  --al-terracotta: #B8704B;

  /* Semantic */
  --al-text-primary: #2C2C2A;
  --al-text-secondary: #5F5E5A;
  --al-text-muted: #888780;
  --al-bg-primary: #F1EFE8;
  --al-bg-card: #F5F0E8;
  --al-bg-white: #FFFFFF;
  --al-border: #D3D1C7;
  --al-accent: #854F0B;

  /* Typography */
  --al-font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --al-font-body: 'Source Sans 3', 'Source Sans Pro', -apple-system, sans-serif;

  /* Spacing & radii */
  --al-radius-sm: 8px;
  --al-radius-md: 12px;
  --al-border-width: 0.5px;
}

/* ── Reset ── */
.al-sd *,
.al-sd *::before,
.al-sd *::after,
.al-long-desc *,
.al-long-desc *::before,
.al-long-desc *::after {
  box-sizing: border-box;
}

/* ==========================================================================
   SHORT DESCRIPTION
   ========================================================================== */

.al-sd {
  font-family: var(--al-font-body);
  max-width: 600px;
  color: var(--al-text-primary);
  line-height: 1.6;
}

.al-sd p {
  font-size: 0.95rem;
  margin: 0 0 14px;
  color: var(--al-text-secondary);
  text-align: left;
  line-height: 1.7;
}

.al-sd p strong {
  color: var(--al-text-primary);
}

/* Spec pills */
.al-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.al-pills li {
  background: var(--al-bg-card);
  border: 1px solid var(--al-border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--al-accent);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-family: var(--al-font-body);
}

/* ==========================================================================
   LONG DESCRIPTION — Base
   ========================================================================== */

.al-long-desc {
  font-family: var(--al-font-body);
  color: var(--al-text-primary);
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  line-height: 1.7;
  font-size: 0.95rem;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ── Sections ── */
.al-section {
  margin-bottom: 42px;
  padding-bottom: 42px;
  border-bottom: var(--al-border-width) solid var(--al-border);
}

.al-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* ── Headings ── */
.al-long-desc h2.al-h2 {
  font-family: var(--al-font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--al-text-primary);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  text-align: left;
  line-height: 1.3;
}

.al-long-desc h3.al-h3 {
  font-family: var(--al-font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--al-text-primary);
  margin: 0 0 5px;
  text-align: left;
}

.al-long-desc p.al-lead {
  margin: 0 0 16px;
  color: var(--al-text-secondary);
  text-align: justify;
}

/* ── Links ── */
.al-long-desc a {
  color: var(--al-accent);
  text-decoration: none;
  transition: text-decoration 0.2s;
}

.al-long-desc a:hover {
  text-decoration: underline;
}

/* ── Spec Table ── */
.al-table-wrap {
  overflow-x: auto;
  margin: 14px 0 0;
}

.al-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  font-family: var(--al-font-body);
}

.al-table caption {
  text-align: left;
  font-size: 0.8rem;
  color: var(--al-text-muted);
  margin-bottom: 6px;
  caption-side: top;
}

.al-table th {
  background: var(--al-bg-card);
  color: var(--al-accent);
  font-weight: 600;
  padding: 9px 14px;
  text-align: left;
  border: var(--al-border-width) solid var(--al-border);
  letter-spacing: 0.02em;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.al-table td {
  padding: 9px 14px;
  border: var(--al-border-width) solid var(--al-border);
  color: var(--al-text-secondary);
  vertical-align: top;
  text-align: left;
}

.al-table tr:nth-child(even) td {
  background: var(--al-bg-card);
}

/* ── Lists ── */
.al-list {
  padding-left: 0;
  list-style: none;
  margin: 10px 0 0;
}

.al-list li {
  padding: 5px 0 5px 22px;
  position: relative;
  font-size: 0.9rem;
  color: var(--al-text-secondary);
  border-bottom: 1px dashed var(--al-border);
  text-align: left;
}

.al-list li:last-child {
  border-bottom: none;
}

.al-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--al-accent);
  font-weight: 700;
}

.al-list li strong {
  color: var(--al-text-primary);
}

/* ── 2-col grid list ── */
.al-list-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
  padding: 0;
  list-style: none;
  margin: 10px 0 0;
}

.al-list-2col li {
  padding: 4px 0 4px 20px;
  position: relative;
  font-size: 0.875rem;
  color: var(--al-text-secondary);
  text-align: left;
}

.al-list-2col li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--al-accent);
  font-size: 0.6rem;
  top: 7px;
}

/* ── Callout Box ── */
.al-callout {
  background: var(--al-bg-card);
  border-left: 4px solid var(--al-accent);
  border-radius: 0 var(--al-radius-sm) var(--al-radius-sm) 0;
  padding: 14px 18px;
  margin: 16px 0 0;
  font-size: 0.9rem;
  color: var(--al-text-secondary);
  text-align: left;
}

.al-callout strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
  color: var(--al-text-primary);
  font-family: var(--al-font-display);
  font-weight: 500;
}

.al-callout p {
  text-align: justify;
  margin: 0;
}

/* ── FAQ Accordion ── */
.al-faq {
  margin: 0;
  padding: 0;
  list-style: none;
}

.al-faq li {
  border: var(--al-border-width) solid var(--al-border);
  border-radius: var(--al-radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}

.al-faq details {
  width: 100%;
}

.al-faq summary {
  cursor: pointer;
  padding: 13px 16px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--al-text-primary);
  background: var(--al-bg-card);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background 0.2s;
  text-align: left;
  font-family: var(--al-font-body);
}

.al-faq summary:hover {
  background: var(--al-parchment);
}

.al-faq summary::-webkit-details-marker {
  display: none;
}

.al-faq summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--al-accent);
  flex-shrink: 0;
  margin-left: 12px;
}

.al-faq details[open] summary::after {
  content: "−";
}

.al-faq .faq-answer {
  padding: 14px 16px;
  font-size: 0.875rem;
  color: var(--al-text-secondary);
  background: var(--al-bg-white);
  border-top: var(--al-border-width) solid var(--al-border);
  line-height: 1.65;
  text-align: left;
}

.al-faq .faq-answer strong {
  color: var(--al-text-primary);
}

/* ── Related Collections Grid ── */
.al-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.al-related-grid li a {
  display: block;
  padding: 14px 16px;
  background: var(--al-bg-card);
  border: var(--al-border-width) solid var(--al-border);
  border-radius: var(--al-radius-md);
  text-decoration: none;
  color: var(--al-text-primary);
  font-size: 0.84rem;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
  line-height: 1.4;
  text-align: left;
  font-family: var(--al-font-body);
}

.al-related-grid li a:hover {
  background: var(--al-parchment);
  border-color: var(--al-accent);
}

.al-related-grid li a .rel-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--al-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

/* ── Wash Care Badges ── */
.al-wash-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.al-wash-badges li {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--al-bg-card);
  border: var(--al-border-width) solid var(--al-border);
  border-radius: 20px;
  padding: 5px 13px 5px 10px;
  font-size: 0.8rem;
  color: var(--al-text-secondary);
  font-weight: 500;
  font-family: var(--al-font-body);
}

.al-wash-badges li .wi {
  font-size: 1rem;
}

/* ── Note text ── */
.al-long-desc p.al-note {
  font-size: 0.82rem;
  color: var(--al-text-muted);
  margin: 10px 0 0;
  text-align: left;
}

/* ==========================================================================
   PRESERVE LEFT-ALIGN for structured elements
   ========================================================================== */

.al-long-desc h2.al-h2,
.al-long-desc h3.al-h3,
.al-table,
.al-list,
.al-list-2col,
.al-faq,
.al-related-grid,
.al-wash-badges,
.al-callout {
  text-align: left;
}

/* ==========================================================================
   WOOCOMMERCE OVERRIDES
   ========================================================================== */

/* Override theme H2 size inside long desc */
.woocommerce div.product .al-long-desc h2.al-h2 {
  font-family: var(--al-font-display) !important;
  font-size: 1.25rem !important;
  font-weight: 500;
  margin: 0 0 6px;
  text-align: left;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 540px) {
  .al-list-2col {
    grid-template-columns: 1fr;
  }

  .al-related-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .al-pills li {
    flex: 1 1 calc(50% - 7px);
    text-align: center;
  }
  .al-pills li:first-child {
    flex: 1 1 100%;
  }
}

@media (max-width: 380px) {
  .al-related-grid {
    grid-template-columns: 1fr;
  }
}