/*
 * wywa-lux-legacy.css
 * Shim: makes generic Shopify sections render acceptably under wywa-lux.liquid.
 * Scoped to .wywa-lux-body so rules don't leak to home/product pages.
 * Uses palette tokens already defined in wywa-lux.css.
 * Do NOT import legacy theme.css — that would conflict with the lux palette.
 */

/* ─── Page wrapper / spacing ────────────────────────────────────────────── */

.wywa-lux-body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wywa-lux-body .page-width,
.wywa-lux-body .container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.wywa-lux-body .section {
  padding-top: 48px;
  padding-bottom: 48px;
}

/* ─── Typography ─────────────────────────────────────────────────────────── */

.wywa-lux-body h1,
.wywa-lux-body h2,
.wywa-lux-body h3,
.wywa-lux-body h4,
.wywa-lux-body h5,
.wywa-lux-body h6 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 0.5em;
}

.wywa-lux-body h1 { font-size: clamp(2rem, 4vw, 3rem); }
.wywa-lux-body h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
.wywa-lux-body h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
.wywa-lux-body h4 { font-size: 1.25rem; }
.wywa-lux-body h5 { font-size: 1.1rem; }
.wywa-lux-body h6 { font-size: 1rem; }

.wywa-lux-body p {
  color: var(--ink-soft);
  margin-bottom: 1em;
}

.wywa-lux-body ul,
.wywa-lux-body ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
  color: var(--ink-soft);
}

.wywa-lux-body li {
  margin-bottom: 0.35em;
}

.wywa-lux-body a {
  color: var(--rose-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.wywa-lux-body a:hover {
  color: var(--rose);
}

/* ─── Forms ──────────────────────────────────────────────────────────────── */

.wywa-lux-body label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.wywa-lux-body input[type="text"],
.wywa-lux-body input[type="email"],
.wywa-lux-body input[type="tel"],
.wywa-lux-body input[type="number"],
.wywa-lux-body input[type="password"],
.wywa-lux-body input[type="search"],
.wywa-lux-body textarea,
.wywa-lux-body select {
  width: 100%;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

.wywa-lux-body input:focus,
.wywa-lux-body textarea:focus,
.wywa-lux-body select:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(200, 149, 132, 0.2);
}

.wywa-lux-body textarea {
  min-height: 120px;
  resize: vertical;
}

.wywa-lux-body .field {
  margin-bottom: 20px;
}

/* Primary submit / CTA buttons */
.wywa-lux-body button[type="submit"],
.wywa-lux-body input[type="submit"],
.wywa-lux-body .button--primary,
.wywa-lux-body .btn {
  display: inline-block;
  background: var(--rose);
  color: var(--ivory);
  border: none;
  border-radius: 6px;
  padding: 12px 28px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}

.wywa-lux-body button[type="submit"]:hover,
.wywa-lux-body input[type="submit"]:hover,
.wywa-lux-body .button--primary:hover,
.wywa-lux-body .btn:hover {
  background: var(--rose-deep);
}

.wywa-lux-body .button--secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.wywa-lux-body .button--secondary:hover {
  border-color: var(--rose);
  color: var(--rose-deep);
}

/* ─── Cart line items ────────────────────────────────────────────────────── */

.wywa-lux-body .cart-items {
  width: 100%;
  border-collapse: collapse;
}

.wywa-lux-body .cart-items th,
.wywa-lux-body .cart-items td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-size: 14px;
  text-align: left;
}

.wywa-lux-body .cart-items th {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.wywa-lux-body .cart-item__image {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
}

.wywa-lux-body .quantity__input,
.wywa-lux-body input[type="number"].quantity {
  width: 64px;
  text-align: center;
  padding: 6px 8px;
}

.wywa-lux-body .cart-subtotal,
.wywa-lux-body .totals {
  text-align: right;
  padding: 24px 0;
}

.wywa-lux-body .totals__total-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}

/* ─── Article / blog post ────────────────────────────────────────────────── */

.wywa-lux-body .article-template {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px;
}

.wywa-lux-body .article__title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  color: var(--ink);
  margin-bottom: 12px;
}

.wywa-lux-body .article__meta {
  font-size: 0.875rem;
  color: var(--ink-mute);
  margin-bottom: 32px;
}

.wywa-lux-body .article__content {
  color: var(--ink-soft);
  line-height: 1.8;
}

.wywa-lux-body .article__content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 24px 0;
}

/* Blog post grid */
.wywa-lux-body .blog-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
  padding: 48px 0;
}

.wywa-lux-body .card--article {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s;
}

.wywa-lux-body .card--article:hover {
  box-shadow: var(--shadow-card);
}

.wywa-lux-body .card__heading {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
  padding: 16px 20px 8px;
}

.wywa-lux-body .article-card__info {
  padding: 0 20px 20px;
  font-size: 0.875rem;
  color: var(--ink-mute);
}

/* ─── Generic product card fallback ─────────────────────────────────────── */

.wywa-lux-body .card--product {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.2s;
  text-align: center;
}

.wywa-lux-body .card--product:hover {
  box-shadow: var(--shadow-card);
}

.wywa-lux-body .card__media img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  padding: 12px;
  background: var(--ivory-2);
}

.wywa-lux-body .card__content {
  padding: 16px;
}

.wywa-lux-body .card__heading a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.wywa-lux-body .price {
  color: var(--rose-deep);
  font-weight: 700;
  margin-top: 6px;
}

.wywa-lux-body .price--on-sale .price__regular {
  text-decoration: line-through;
  color: var(--ink-faint);
  font-weight: 400;
}

/* ─── 404 page ───────────────────────────────────────────────────────────── */

.wywa-lux-body .template-404 {
  text-align: center;
  padding: 80px 24px;
}

.wywa-lux-body .template-404 h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  margin-bottom: 16px;
}

/* CUSTOMER PAGES — login/register/account/order/addresses/reset/activate ─── */

/* Narrow centred form container (login, register, reset, activate) */
.wywa-lux-body .customer {
  max-width: 520px;
  margin: 48px auto;
  padding: 0 24px 64px;
}

.wywa-lux-body .customer h1,
.wywa-lux-body .customer h2 {
  margin-bottom: 24px;
}

/* Error / notice banners emitted by Shopify customer forms */
.wywa-lux-body .form__message,
.wywa-lux-body .errors ul {
  background: #fdf0ef;
  border: 1px solid #e8b4ae;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: var(--rose-deep);
  font-size: 0.9rem;
  list-style: none;
}

/* Account dashboard — order history table */
.wywa-lux-body .account-page {
  max-width: 900px;
  margin: 48px auto;
  padding: 0 24px 64px;
}

.wywa-lux-body .orders-table,
.wywa-lux-body table.order-history {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}

.wywa-lux-body .orders-table th,
.wywa-lux-body table.order-history th {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 10px 12px;
  border-bottom: 2px solid var(--line);
  text-align: left;
}

.wywa-lux-body .orders-table td,
.wywa-lux-body table.order-history td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-size: 0.9rem;
  vertical-align: middle;
}

.wywa-lux-body .orders-table tr:last-child td,
.wywa-lux-body table.order-history tr:last-child td {
  border-bottom: none;
}

/* Order detail page */
.wywa-lux-body .order-detail {
  max-width: 900px;
  margin: 48px auto;
  padding: 0 24px 64px;
}

.wywa-lux-body .order-detail__meta {
  font-size: 0.875rem;
  color: var(--ink-mute);
  margin-bottom: 24px;
}

/* Address cards grid */
.wywa-lux-body .addresses-page {
  max-width: 900px;
  margin: 48px auto;
  padding: 0 24px 64px;
}

.wywa-lux-body .address-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}

.wywa-lux-body .address-card address {
  font-style: normal;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 16px;
}

.wywa-lux-body .address-card .address-card__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Link-style secondary action (Edit / Delete) */
.wywa-lux-body .link {
  color: var(--rose-deep);
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--sans);
}

.wywa-lux-body .link:hover {
  color: var(--rose);
}

/* Add-new-address form hidden by default (Shopify toggles via JS) */
.wywa-lux-body #AddressNewForm { margin-top: 32px; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .wywa-lux-body .page-width,
  .wywa-lux-body .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .wywa-lux-body .section {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .wywa-lux-body .blog-articles {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .wywa-lux-body .cart-items th {
    display: none;
  }

  .wywa-lux-body .cart-items td {
    display: block;
    padding: 8px 0;
    border-bottom: none;
  }

  .wywa-lux-body .cart-items tr {
    display: block;
    border-bottom: 1px solid var(--line-soft);
    padding: 16px 0;
  }
}
