/* ===================================================================
   IONA — WooCommerce Styles
   Wraps and polishes WooCommerce output to match the IONA design system.
   All color references use CSS custom properties from emerald.css.
=================================================================== */

/* ── General WooCommerce Resets ─────────────────────────────────── */

.woocommerce-page .entry-title,
.woocommerce-page h1.woocommerce-page-title {
  display: none; /* hidden — Elementor handles page titles */
}

.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error {
  border-top-color: var(--emerald);
  background: var(--emerald-tint);
  border-radius: var(--radius-sm);
  font-size: 14px;
  padding: 14px 20px;
}

.woocommerce .woocommerce-message::before,
.woocommerce .woocommerce-info::before {
  color: var(--emerald);
}

/* ── Product Card (shop loop) ────────────────────────────────────── */

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  padding: 12px 0 4px;
}

.woocommerce ul.products li.product .price {
  color: var(--emerald-deep);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-display);
}

.woocommerce ul.products li.product .button {
  background: var(--emerald);
  color: #fff;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 10px 20px;
  min-height: 40px;
  transition: background 0.2s ease, transform .15s ease;
  cursor: pointer;
}

.woocommerce ul.products li.product .button:hover {
  background: var(--emerald-deep);
  transform: translateY(-1px);
}

.woocommerce ul.products li.product .button:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
}

/* ── Single Product ──────────────────────────────────────────────── */

.single-product div.product .product_title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.single-product div.product p.price,
.single-product div.product span.price {
  color: var(--ink);
  font-size: 2rem;
  font-weight: 700;
}

.single-product div.product .woocommerce-product-details__short-description {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.65;
}

.single-product .cart .button,
.single-product .single_add_to_cart_button {
  background: var(--emerald) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-sans) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  padding: 14px 28px !important;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s !important;
}

.single-product .cart .button:hover,
.single-product .single_add_to_cart_button:hover {
  background: var(--emerald-deep) !important;
  transform: translateY(-1px) !important;
}

.single-product .quantity input.qty {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 15px;
  text-align: center;
  padding: 10px 12px;
  width: 68px;
}

/* Product tabs */
.single-product .woocommerce-tabs .tabs li a {
  color: var(--ink-2);
  font-weight: 600;
  font-size: 14px;
  border-radius: 0;
}

.single-product .woocommerce-tabs .tabs li.active a {
  color: var(--emerald);
  border-bottom: 2px solid var(--emerald);
}

/* Product images */
.single-product .woocommerce-product-gallery__image img {
  border-radius: var(--radius);
}

/* ── Artwork Badge (status + certificate pills) ───────────────────── */

.iona-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0;
}

.iona-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.iona-badge.badge--available { background: oklch(0.92 0.05 145); color: oklch(0.25 0.09 145); }
.iona-badge.badge--sold      { background: oklch(0.93 0.03 20);  color: oklch(0.30 0.08 20); }
.iona-badge.badge--reserved  { background: oklch(0.93 0.04 60);  color: oklch(0.30 0.08 60); }
.iona-badge.badge--cert      { background: var(--emerald-tint);  color: var(--emerald-deep); border: 1px solid var(--emerald-line); }

/* ── Cart & Checkout ─────────────────────────────────────────────── */

.woocommerce table.cart td.actions .coupon .input-text {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
}

.woocommerce table.cart td.actions .button,
.woocommerce .cart .button,
.woocommerce .checkout-button {
  background: var(--emerald);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 24px;
  cursor: pointer;
  transition: background 0.2s;
}

.woocommerce table.cart td.actions .button:hover,
.woocommerce .cart .button:hover,
.woocommerce .checkout-button:hover {
  background: var(--emerald-deep);
  color: #fff;
}

/* ── Order / Account ─────────────────────────────────────────────── */

.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
  display: block;
  padding: 10px 14px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
  background: var(--emerald-tint);
  color: var(--emerald);
}

/* ── IONA Artwork Card (ev-card used in loop templates) ──────────── */

.ev-card {
  width: 100%; /* was max-width: 390px — removed to allow proper grid fill */
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  padding: 10px 10px 18px;
  margin: 0 auto;
  text-align: left;
  transition:
    transform .25s cubic-bezier(.16,.84,.34,1),
    box-shadow .25s ease,
    border-color .2s ease;
}

.ev-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--emerald-line);
}

.ev-card .image-frame { overflow: hidden; border-radius: 7px; }

.ev-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 7px;
  display: block;
  transition: transform 1s cubic-bezier(.16,.84,.34,1);
  will-change: transform;
}

.ev-card:hover img { transform: scale(1.04); }

.ev-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.ev-cell {
  padding: 0 12px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.ev-cell:first-child { padding-left: 0; }
.ev-cell:last-child  { border-right: 0; padding-right: 0; }

.ev-label {
  display: block;
  font-size: 10px;
  line-height: 1.2;
  color: var(--ink-3);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.ev-value {
  display: block;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}

@media (max-width: 767px) {
  .ev-meta {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 14px;
  }
  .ev-cell:nth-child(2) { border-right: 0; }
  .ev-cell:nth-child(3) { padding-left: 0; }
}

/* ── IONA Card shared styles ─────────────────────────────────────── */

.iona-card {
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.iona-card-btns {
  display: flex;
  gap: 10px;
}

.iona-card-btn--view .elementor-button,
.iona-card-btn--cart .button {
  width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Checkout & Cart forms ───────────────────────────────────────── */

/* All WooCommerce text inputs share design-system styling */
.woocommerce .input-text,
.woocommerce form .input-text,
.woocommerce-page form .input-text,
.woocommerce form p input.input-text,
.woocommerce form input[type="text"],
.woocommerce form input[type="email"],
.woocommerce form input[type="tel"],
.woocommerce form input[type="password"],
.woocommerce form input[type="number"],
.woocommerce form textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 11px 14px;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  line-height: 1.5;
}

.woocommerce .input-text:focus,
.woocommerce form .input-text:focus,
.woocommerce form input[type="text"]:focus,
.woocommerce form input[type="email"]:focus,
.woocommerce form input[type="tel"]:focus,
.woocommerce form input[type="password"]:focus,
.woocommerce form input[type="number"]:focus,
.woocommerce form textarea:focus {
  outline: 0;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--emerald) 16%, transparent);
}

/* Country / state selects — keep native but improve appearance */
.woocommerce form select,
.woocommerce-page form select,
select#billing_country,
select#shipping_country,
select#billing_state,
select#shipping_state {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 11px 36px 11px 14px;
  width: 100%;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.woocommerce form select:focus,
select#billing_country:focus,
select#shipping_country:focus,
select#billing_state:focus,
select#shipping_state:focus {
  outline: 0;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--emerald) 16%, transparent);
}

/* Select2 — overrides for country/state dropdowns */
.woocommerce .select2-container .select2-selection--single {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  background: var(--surface) !important;
  height: 44px !important;
  display: flex;
  align-items: center;
  transition: border-color .15s, box-shadow .15s;
}

.woocommerce .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--ink) !important;
  font-family: var(--font-sans) !important;
  font-size: 15px !important;
  padding-left: 14px !important;
  line-height: 44px !important;
}

.woocommerce .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 44px !important;
}

.woocommerce .select2-container--focus .select2-selection--single,
.woocommerce .select2-container--open .select2-selection--single {
  border-color: var(--emerald) !important;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--emerald) 16%, transparent) !important;
}

.woocommerce .select2-dropdown {
  border: 1px solid var(--emerald-line) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-md) !important;
  font-family: var(--font-sans) !important;
}

.woocommerce .select2-results__option--highlighted {
  background: var(--emerald) !important;
}

/* Checkout form labels */
.woocommerce form .form-row label,
.woocommerce-checkout .form-row label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  margin-bottom: 6px;
  display: block;
}

/* Required asterisk */
.woocommerce form .form-row label .required {
  color: var(--emerald-deep);
  text-decoration: none;
}

/* Checkout column layout */
.woocommerce-checkout #customer_details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ── Cart table ──────────────────────────────────────────────────── */

.woocommerce table.shop_table,
.woocommerce table.cart {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  background: var(--surface);
  overflow: hidden;
}

.woocommerce table.shop_table th,
.woocommerce table.cart th {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  text-align: left;
}

.woocommerce table.shop_table td,
.woocommerce table.cart td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 15px;
  color: var(--ink);
}

.woocommerce table.shop_table tr:last-child td,
.woocommerce table.cart tr:last-child td {
  border-bottom: 0;
}

.woocommerce table.cart .product-thumbnail img {
  border-radius: var(--radius-sm);
  max-width: 80px;
}

.woocommerce table.cart .product-name a {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  transition: color .15s;
}

.woocommerce table.cart .product-name a:hover { color: var(--emerald); }

.woocommerce table.cart .product-price,
.woocommerce table.cart .product-subtotal {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--emerald-deep);
}

.woocommerce table.cart .product-remove a {
  color: var(--ink-3);
  font-size: 1.2rem;
  font-weight: 400;
  transition: color .15s;
}
.woocommerce table.cart .product-remove a:hover { color: oklch(0.55 0.18 25); }

/* Cart totals */
.woocommerce .cart-collaterals .cart_totals {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-card);
}

.woocommerce .cart_totals h2 {
  font-size: 1.2rem;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.woocommerce .cart_totals table.shop_table tr th,
.woocommerce .cart_totals table.shop_table tr td {
  padding: 12px 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.woocommerce .cart_totals .order-total td {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--emerald-deep);
}

/* Checkout button */
.woocommerce .checkout-button {
  background: var(--emerald);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  padding: 15px 28px;
  cursor: pointer;
  transition: background 0.2s ease, transform .15s ease, box-shadow .2s ease;
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: linear-gradient(180deg, var(--emerald) 0%, var(--emerald-deep) 100%);
  box-shadow: 0 6px 20px -6px color-mix(in oklab, var(--emerald) 60%, black);
}

.woocommerce .checkout-button:hover {
  background: var(--emerald-deep);
  background-image: linear-gradient(180deg, var(--emerald-deep) 0%, oklch(from var(--emerald-deep) calc(l - 0.05) c h) 100%);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -8px color-mix(in oklab, var(--emerald) 70%, black);
}

.woocommerce .checkout-button:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
}

/* ── Payment methods ─────────────────────────────────────────────── */

.woocommerce-checkout #payment {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.woocommerce-checkout #payment ul.payment_methods {
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.woocommerce-checkout #payment ul.payment_methods li.payment_method {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .15s;
}

.woocommerce-checkout #payment ul.payment_methods li.payment_method:last-child {
  border-bottom: 0;
}

.woocommerce-checkout #payment ul.payment_methods li.payment_method:hover {
  background: var(--surface-2);
}

.woocommerce-checkout #payment ul.payment_methods input[type="radio"] {
  accent-color: var(--emerald);
  width: 16px;
  height: 16px;
  margin-right: 10px;
}

.woocommerce-checkout #payment .payment_box {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding: 16px 20px;
  font-size: 14px;
  color: var(--ink-2);
}

.woocommerce-checkout #payment .place-order {
  padding: 20px;
}

/* Order review table */
.woocommerce-checkout #order_review .shop_table {
  font-size: 14px;
}

/* ── Order confirmation ───────────────────────────────────────────── */

.woocommerce .woocommerce-order-details,
.woocommerce .woocommerce-customer-details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 24px;
}

.woocommerce .woocommerce-order-details h2,
.woocommerce .woocommerce-customer-details h2 {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

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

@media (max-width: 1024px) {
  .woocommerce ul.products[class*=columns-] {
    column-count: unset;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .woocommerce ul.products[class*=columns-] {
    grid-template-columns: 1fr;
  }
  .single-product .cart .button,
  .single-product .single_add_to_cart_button {
    width: 100% !important;
  }
}
