/* ============================================================
 * WooCommerce — Storfloen design language
 *
 * Styles WooCommerce pages (Order received, Checkout, Cart,
 * My Account) to match the rest of the site: Fraunces serif
 * headings, Manrope body, --forest/--cream/--cream-warm tokens,
 * rounded card backgrounds. Pure CSS — no template overrides.
 *
 * Design tokens are inherited from main.css :root.
 * ========================================================== */

/* --------- Page wrapper -------------------------------- */
.woocommerce {
  font-family: 'Manrope', -apple-system, sans-serif;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
}

/* The fallback template (index.php) wraps content in main.container; pad it
   generously on WooCommerce pages so the section breathes. */
body.woocommerce-page main.container,
body.woocommerce-checkout main.container,
body.woocommerce-cart main.container,
body.woocommerce-account main.container,
body.woocommerce-order-received main.container {
  max-width: 980px;
  padding: 5rem 1.5rem 6rem !important;
  min-height: 60vh;
}
body.woocommerce-page main.container > article > h1,
body.woocommerce-page main.container > article > .entry-content > h1,
body.woocommerce-checkout main.container > article > h1,
body.woocommerce-account main.container > article > h1 {
  display: none; /* hide the Page title — WC has its own h1 ("Ordre mottatt", etc.) */
}

/* --------- Headings ------------------------------------ */
.woocommerce h1,
.woocommerce h2,
.woocommerce h3,
.woocommerce-order h1,
.woocommerce-order h2,
.woocommerce-order h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  color: var(--forest);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.6rem;
}
.woocommerce h1 { font-size: clamp(2.2rem, 4vw, 2.8rem); }
.woocommerce h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.8rem);
  margin: 3rem 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(31, 48, 39, 0.12);
}
.woocommerce h3 { font-size: 1.2rem; margin: 1.5rem 0 0.75rem; }

/* "Takk, vi har mottatt ordren din." */
.woocommerce-thankyou-order-received,
.woocommerce-notice--success {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
  background: none;
  border: none;
  padding: 0;
}

/* --------- Order overview (top label row) -------------- */
ul.woocommerce-order-overview,
ul.order_details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.4rem 2rem;
  list-style: none;
  margin: 0 0 3rem !important;
  padding: 1.6rem 2rem !important;
  background: var(--cream-warm);
  border: 1px solid rgba(31, 48, 39, 0.08);
  border-radius: 14px;
}
ul.woocommerce-order-overview li,
ul.order_details li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0 !important;
  border: none !important;
  margin: 0 !important;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}
ul.woocommerce-order-overview li strong,
ul.order_details li strong {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--forest);
  text-transform: none;
  letter-spacing: 0;
  margin-top: 0.1rem;
  line-height: 1.3;
}

/* --------- Sections ------------------------------------- */
.woocommerce-order-details,
.woocommerce-customer-details {
  margin-top: 3rem;
}

/* --------- Tables (order details, account orders) ------- */
.woocommerce-table,
table.shop_table,
.woocommerce-orders-table,
.cart_totals table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid rgba(31, 48, 39, 0.08);
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 2rem;
}
.woocommerce-table thead th,
table.shop_table thead th {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--cream-warm);
  padding: 1rem 1.4rem;
  text-align: left;
  border-bottom: 1px solid rgba(31, 48, 39, 0.08);
}
.woocommerce-table tbody td,
table.shop_table tbody td {
  padding: 1.4rem;
  border-bottom: 1px solid rgba(31, 48, 39, 0.06);
  vertical-align: top;
  font-size: 0.95rem;
  color: var(--ink);
}
.woocommerce-table tbody tr:last-child td,
table.shop_table tbody tr:last-child td { border-bottom: 1px solid rgba(31, 48, 39, 0.12); }

.woocommerce-table .product-name,
table.shop_table .product-name {
  font-weight: 500;
  color: var(--forest);
}
.woocommerce-table .product-name a,
table.shop_table .product-name a {
  color: var(--forest);
  text-decoration: none;
}
.woocommerce-table .product-name a:hover,
table.shop_table .product-name a:hover { color: var(--terracotta); }

.woocommerce-table .product-total,
.woocommerce-table .product-quantity,
table.shop_table .product-total,
table.shop_table .product-quantity {
  text-align: right;
  white-space: nowrap;
  font-weight: 600;
  color: var(--forest);
}

/* Amelia appointment details inside the product cell */
.woocommerce-table .wc-item-meta,
table.shop_table .wc-item-meta,
.woocommerce-table dl.variation,
table.shop_table dl.variation {
  margin: 1rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid rgba(31, 48, 39, 0.08);
  font-size: 0.92rem;
}
.woocommerce-table .wc-item-meta li,
.woocommerce-table dl.variation dt,
.woocommerce-table dl.variation dd {
  margin: 0.35rem 0;
  padding: 0;
}
.woocommerce-table .wc-item-meta strong,
.woocommerce-table dl.variation dt {
  font-weight: 600;
  color: var(--forest);
  margin-right: 0.3rem;
}

/* Footer rows (subtotal / total / payment method) */
.woocommerce-table tfoot th,
.woocommerce-table tfoot td,
table.shop_table tfoot th,
table.shop_table tfoot td {
  padding: 1.1rem 1.4rem;
  background: var(--cream-warm);
  border-top: 1px solid rgba(31, 48, 39, 0.08);
  border-bottom: none;
  font-size: 0.95rem;
}
.woocommerce-table tfoot th,
table.shop_table tfoot th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
}
.woocommerce-table tfoot td,
table.shop_table tfoot td {
  text-align: right;
  color: var(--forest);
  font-weight: 600;
}
.woocommerce-table tfoot tr.order-total td,
.woocommerce-table tfoot tr.order_total td,
table.shop_table tfoot tr.order-total td {
  border-top: 1px solid rgba(31, 48, 39, 0.15);
}
.woocommerce-table tfoot tr.order-total .amount,
table.shop_table tfoot tr.order-total .amount {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
}
.woocommerce-Price-amount.amount { font-feature-settings: 'tnum'; }
.woocommerce-Price-currencySymbol { margin-right: 0.15em; }

/* --------- Customer (billing) address card -------------- */
.woocommerce-customer-details address {
  font-style: normal;
  background: var(--cream-warm);
  border: 1px solid rgba(31, 48, 39, 0.08);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink);
  margin: 0;
}
.woocommerce-customer-details .woocommerce-customer-details--phone,
.woocommerce-customer-details .woocommerce-customer-details--email {
  margin: 0.6rem 0 0;
  color: var(--forest);
  font-weight: 500;
}
.woocommerce-customer-details .woocommerce-customer-details--phone::before,
.woocommerce-customer-details .woocommerce-customer-details--email::before {
  color: var(--terracotta);
  margin-right: 0.5rem;
}
.woocommerce-customer-details--addresses .col-1,
.woocommerce-customer-details--addresses .col-2 {
  margin-bottom: 1.5rem;
}

/* --------- Buttons (any WC button) ----------------------- */
.woocommerce .button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce-page .button,
.woocommerce-page a.button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  background: var(--forest);
  color: var(--cream) !important;
  border-radius: 999px;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  text-shadow: none;
  box-shadow: none;
}
.woocommerce .button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover {
  background: var(--terracotta);
  color: var(--cream) !important;
  transform: translateY(-1px);
}
.woocommerce .button.alt {
  background: var(--terracotta);
}
.woocommerce .button.alt:hover {
  background: var(--terracotta-deep);
}

/* --------- Notices / messages ---------------------------- */
.woocommerce-info,
.woocommerce-message {
  background: var(--cream-warm);
  border: 1px solid rgba(31, 48, 39, 0.08);
  border-left: 4px solid var(--terracotta);
  border-radius: 10px;
  padding: 1rem 1.3rem;
  color: var(--ink);
  margin: 0 0 1.5rem;
}
.woocommerce-info::before,
.woocommerce-message::before { color: var(--terracotta); }
.woocommerce-error {
  background: #fbeae6;
  border: 1px solid #e8b8a8;
  border-left: 4px solid var(--terracotta-deep);
  border-radius: 10px;
  padding: 1rem 1.3rem;
  color: var(--terracotta-deep);
}

/* --------- Forms (checkout fields, account) -------------- */
.woocommerce form .form-row label {
  font-weight: 500;
  color: var(--forest);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(31, 48, 39, 0.18);
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row select:focus,
.woocommerce form .form-row textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(31, 48, 39, 0.1);
}

/* --------- Responsive ----------------------------------- */
@media (max-width: 720px) {
  body.woocommerce-page main.container,
  body.woocommerce-checkout main.container,
  body.woocommerce-cart main.container,
  body.woocommerce-account main.container,
  body.woocommerce-order-received main.container { padding: 3rem 1rem 4rem !important; }
  .woocommerce h1 { font-size: 2rem; }
  .woocommerce h2 { font-size: 1.35rem; margin-top: 2.5rem; }
  ul.woocommerce-order-overview,
  ul.order_details {
    grid-template-columns: 1fr 1fr;
    padding: 1.25rem !important;
    gap: 1.1rem 1.4rem;
  }
  .woocommerce-table thead th { padding: 0.75rem 1rem; font-size: 0.7rem; }
  .woocommerce-table tbody td,
  .woocommerce-table tfoot td,
  .woocommerce-table tfoot th { padding: 1rem; }
}
