/* ==========================================================================
   SHOP BASE — shared by cart, checkout, order received, account and by the
   WooCommerce forms that appear on product pages (options, notices).
   These screens are not in the Figma file. They reuse the system of the designed pages:
   #161616 panels with a 10 px radius (quote form), 56 px fields on #0e0e0e, 1 px hairlines,
   uppercase 12–13 px labels, the white pill as the single primary action.
   ========================================================================== */

.ev-shop { font-size: 15px; line-height: 1.6; }
.ev-shop .ev-pagehead { padding-bottom: clamp(24px, 2.1vw, 40px); }
.ev-shop .woocommerce { position: relative; }
.ev-shop :where(h2, h3) { margin: 0; }
.woocommerce :where(a:not(.button, .ev-btn, .remove)) { text-decoration: underline; text-underline-offset: 3px; transition: opacity 0.3s; }
.woocommerce :where(a:not(.button, .ev-btn, .remove)):hover { opacity: 0.7; }
.woocommerce :where(ul, ol) { margin: 0; padding: 0; list-style: none; }
.woocommerce :where(p) { margin: 0; }
.woocommerce :where(table) { width: 100%; border-collapse: collapse; }
.woocommerce :where(th) { text-align: left; font-weight: 500; }
.woocommerce :where(del) { opacity: 0.5; }
.woocommerce :where(ins) { text-decoration: none; }
.woocommerce :where(fieldset) { margin: 0; padding: 0; border: 0; }
.woocommerce :where(legend) { padding: 0; }
.woocommerce .clear { clear: both; }
.woocommerce :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* --- Panels ---------------------------------------------------------------- */
.ev-shop-panel,
.ev-shop .cart_totals,
.ev-shop #order_review,
.ev-shop #customer_details,
.ev-shop .woocommerce-MyAccount-content,
.ev-shop .woocommerce-form-login,
.ev-shop .woocommerce-form-register,
.ev-shop .woocommerce-ResetPassword,
.ev-shop .woocommerce-order-details,
.ev-shop .woocommerce-customer-details {
  padding: clamp(24px, 2.9vw, 56px);
  border-radius: var(--ev-radius-panel);
  background: var(--ev-bg-2);
}

/* --- Section titles inside shop screens ------------------------------------ */
.ev-shop .woocommerce :where(h2, h3, legend) {
  margin-bottom: 28px;
  font-size: var(--ev-fs-h3);
  font-weight: 500;
  line-height: 1.35;
}

/* --- Notices: the bordered banner of the quote form ------------------------ */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews,
p.no-comments {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  margin: 0 0 24px;
  padding: 20px 28px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.6;
  list-style: none;
}
.woocommerce-message { border-color: rgba(159, 216, 176, 0.6); }
.woocommerce-error { flex-direction: column; align-items: flex-start; border-color: var(--ev-error); }
.woocommerce-error li { width: 100%; }
.woocommerce-message:focus,
.woocommerce-info:focus,
.woocommerce-error:focus { outline: none; }
/* the action of a notice ("View cart", "Undo") sits at its end */
.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button { order: 2; min-height: 38px; padding: 0 18px; }
.woocommerce-message .restore-item { order: 2; }

/* --- Buttons --------------------------------------------------------------- */
.woocommerce :is(a.button, button.button, input.button, .woocommerce-button, .woocommerce-Button),
.ev-shop :is(a.button, button.button, input.button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 70px;
  background: var(--ev-white);
  color: #000;
  font-family: var(--ev-font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s ease-out, color 0.3s ease-out, border-color 0.3s ease-out, opacity 0.3s;
}
.woocommerce :is(a.button, button.button, input.button, .woocommerce-button, .woocommerce-Button):hover,
.ev-shop :is(a.button, button.button, input.button):hover {
  border-color: var(--ev-white);
  background: var(--ev-bg-hover);
  color: var(--ev-white);
  opacity: 1;
}
/* secondary actions: outline */
.woocommerce :is([name="apply_coupon"], [name="update_cart"], [name="calc_shipping"], a.button.view, a.button.pay, a.button.cancel, a.button.wc-backward, .woocommerce-button--previous, .woocommerce-button--next, button.show-password-input),
.woocommerce .woocommerce-MyAccount-content a.button:not(.alt) {
  border-color: rgba(255, 255, 255, 0.4);
  background: none;
  color: var(--ev-white);
}
.woocommerce :is(button.button, input.button, a.button):is(:disabled, .disabled, [aria-disabled="true"]) {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --- Fields: the controls of the quote form --------------------------------- */
.woocommerce form .form-row { display: flex; flex-direction: column; gap: 10px; margin: 0 0 24px; padding: 0; }
.woocommerce form .form-row > label,
.woocommerce form label:where(:not(.checkbox, .woocommerce-form__label-for-checkbox, [for^="payment_method_"], [for^="shipping_method_"])) {
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
}
.woocommerce form .required { color: var(--ev-error-text); text-decoration: none; }
.woocommerce form .optional { color: rgba(255, 255, 255, 0.5); }
.woocommerce .woocommerce-input-wrapper { display: block; width: 100%; }
.woocommerce :is(input.input-text, input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], input[type="url"], select, textarea) {
  width: 100%;
  height: 56px;
  margin: 0;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background-color: var(--ev-bg);
  color: var(--ev-white);
  color-scheme: dark;
  font-family: var(--ev-font);
  font-size: 15px;
  line-height: 1.6;
  transition: background-color 0.3s ease-out, border-color 0.3s ease-out;
}
.woocommerce textarea { height: 140px; padding: 16px 20px; resize: vertical; }
.woocommerce select {
  padding-right: 48px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23fff' stroke-opacity='.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 12px 8px;
}
.woocommerce :is(input, select, textarea)::placeholder { color: rgba(255, 255, 255, 0.4); opacity: 1; }
.woocommerce :is(input.input-text, input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], select, textarea):is(:hover, :focus) {
  border-color: rgba(255, 255, 255, 0.5);
  background-color: var(--ev-bg-2);
}
.woocommerce form .woocommerce-invalid :is(input.input-text, select, textarea, .select2-selection) { border-color: var(--ev-error); }
.woocommerce .checkout-inline-error-message,
.woocommerce form .woocommerce-invalid .description { font-size: 13px; color: var(--ev-error-text); }
.woocommerce form .description,
.woocommerce form em { font-size: 13px; font-style: normal; color: rgba(255, 255, 255, 0.6); }
/* under the VAT number: what the field is for, then the answer of the register (inc/woocommerce/tax.php) */
.woocommerce form .ev-vat-note { display: block; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, 0.6); }
.woocommerce form .ev-vat-status[data-state="valid"] { color: var(--ev-success-text); }
.woocommerce form .ev-vat-status[data-state="invalid"] { color: var(--ev-error-text); }
.woocommerce form .ev-vat-status[data-state="unknown"] { color: var(--ev-white); }

/* check boxes and radios: the square of the quote form, round for radios */
.woocommerce :is(input[type="checkbox"], input[type="radio"]) {
  flex: none;
  width: 18px; height: 18px;
  margin: 0 12px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: none;
  vertical-align: -4px;
  cursor: pointer;
  transition: border-color 0.3s ease-out;
}
.woocommerce input[type="radio"] { border-radius: 50%; }
.woocommerce :is(input[type="checkbox"], input[type="radio"]):hover { border-color: rgba(255, 255, 255, 0.95); }
.woocommerce input[type="checkbox"]:checked {
  border-color: var(--ev-white);
  background: var(--ev-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 8' fill='none' stroke='%230e0e0e' stroke-width='1.5'%3E%3Cpath d='M1 4l3 3 6-6'/%3E%3C/svg%3E") center / 10px 8px no-repeat;
}
.woocommerce input[type="radio"]:checked { border-color: var(--ev-white); background: radial-gradient(circle, var(--ev-white) 0 4px, transparent 5px); }
.woocommerce :is(label.checkbox, .woocommerce-form__label-for-checkbox) { display: inline-flex; align-items: flex-start; font-size: 14px; font-weight: 500; line-height: 19px; cursor: pointer; }

/* password field with the "show" toggle */
.woocommerce .password-input { position: relative; display: block; }
.woocommerce .password-input input { padding-right: 56px; }
.woocommerce .show-password-input {
  position: absolute;
  right: 6px; top: 6px;
  width: 44px; height: 44px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.woocommerce .show-password-input::before {
  content: "";
  position: absolute;
  inset: 13px;
  background: currentColor;
  opacity: 0.6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23000'%3E%3Cpath d='M1 9s3-5.5 8-5.5S17 9 17 9s-3 5.5-8 5.5S1 9 1 9z'/%3E%3Ccircle cx='9' cy='9' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23000'%3E%3Cpath d='M1 9s3-5.5 8-5.5S17 9 17 9s-3 5.5-8 5.5S1 9 1 9z'/%3E%3Ccircle cx='9' cy='9' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.woocommerce .show-password-input.display-password::before { opacity: 1; }

/* --- selectWoo (country / state) in the same skin --------------------------- */
.woocommerce .select2-container { width: 100% !important; }
.woocommerce .select2-container .select2-selection--single {
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: var(--ev-bg);
  transition: background-color 0.3s ease-out, border-color 0.3s ease-out;
}
.woocommerce .select2-container--open .select2-selection--single,
.woocommerce .select2-container .select2-selection--single:hover { border-color: rgba(255, 255, 255, 0.5); background: var(--ev-bg-2); }
.woocommerce .select2-container .select2-selection--single .select2-selection__rendered { padding: 0 48px 0 20px; color: var(--ev-white); font-size: 15px; line-height: 54px; }
.woocommerce .select2-container .select2-selection--single .select2-selection__placeholder { color: rgba(255, 255, 255, 0.4); }
.woocommerce .select2-container .select2-selection--single .select2-selection__arrow { top: 0; right: 14px; width: 20px; height: 54px; }
.woocommerce .select2-container .select2-selection--single .select2-selection__arrow b {
  width: 8px; height: 8px;
  margin: -6px 0 0 -4px;
  border: 0 solid rgba(255, 255, 255, 0.6);
  border-width: 0 1px 1px 0;
  rotate: 45deg;
}
.select2-container .select2-dropdown {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: var(--ev-bg-2);
  color: var(--ev-white);
  font-family: var(--ev-font);
  font-size: 15px;
  overflow: hidden;
}
.select2-container .select2-search--dropdown { padding: 10px; }
.select2-container .select2-search--dropdown .select2-search__field {
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: var(--ev-bg);
  color: var(--ev-white);
  color-scheme: dark;
  font-family: var(--ev-font);
}
.select2-container .select2-results__option { padding: 10px 20px; }
.select2-container--default .select2-results__option[aria-selected="true"],
.select2-container--default .select2-results__option[data-selected="true"] { background: var(--ev-bg-card); color: var(--ev-white); }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected] { background: var(--ev-bg-hover); color: var(--ev-white); }

/* --- Quantity: − value + in one outlined pill ------------------------------- */
.woocommerce .quantity {
  display: inline-flex;
  align-items: center;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 70px;
}
.woocommerce .quantity .qty {
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.woocommerce .quantity .qty:is(:hover, :focus) { background: none; }
.woocommerce .quantity .qty::-webkit-outer-spin-button,
.woocommerce .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.woocommerce .quantity .ev-qty__btn {
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ev-white);
  font-family: var(--ev-font);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
}
.woocommerce .quantity .ev-qty__btn:hover { opacity: 1; }
/* sold individually: WooCommerce prints a hidden input */
.woocommerce .quantity:has(input[type="hidden"]) { display: none; }

/* --- Product options (variable / grouped products, panel under the product hero) --- */
.woocommerce table.variations :is(th, td) { display: block; padding: 0; border: 0; text-align: left; }
.woocommerce table.variations th { padding-bottom: 10px; }
.woocommerce table.variations td { max-width: 420px; padding-bottom: 24px; }
.woocommerce .reset_variations { display: inline-block; margin-top: 10px; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.woocommerce .woocommerce-variation-price { margin-bottom: 8px; font-size: clamp(24px, 1.5625vw, 30px); font-weight: 300; line-height: 1.2; }
.woocommerce .woocommerce-variation-description,
.woocommerce .woocommerce-variation-availability { margin-bottom: 16px; font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.woocommerce :is(.woocommerce-variation-add-to-cart, form.cart:not(.variations_form, .grouped_form)) { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 16px; }
.woocommerce table.group_table td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--ev-line); vertical-align: middle; }
.woocommerce .stock { font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.woocommerce .stock.out-of-stock { color: var(--ev-error-text); }

/* --- Tables ----------------------------------------------------------------- */
.woocommerce table.shop_table th,
.woocommerce table.shop_table td { padding: 16px 0; border-bottom: 1px solid var(--ev-line); vertical-align: top; }
.woocommerce table.shop_table thead th,
.woocommerce table.shop_table tfoot th,
.woocommerce table.shop_table tbody th {
  font-size: 12px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.woocommerce table.shop_table td:last-child,
.woocommerce table.shop_table th:last-child { text-align: right; }
.woocommerce table.shop_table tr:last-child > :is(td, th) { border-bottom: 0; }
/* the last item row still needs its line when totals follow */
.woocommerce table.shop_table tbody:not(:last-child) tr:last-child > :is(td, th) { border-bottom: 1px solid var(--ev-line); }
.woocommerce table.shop_table .order-total :is(th, td) { padding-top: 20px; }
.woocommerce table.shop_table .order-total td { font-size: clamp(20px, 1.25vw, 24px); font-weight: 300; line-height: 1.2; }
.woocommerce table.shop_table .order-total .includes_tax { display: block; margin-top: 6px; font-size: 13px; font-weight: 400; color: rgba(255, 255, 255, 0.6); }

/* shipping methods inside the totals */
.woocommerce ul#shipping_method { display: grid; gap: 10px; justify-items: end; }
.woocommerce ul#shipping_method label { font-size: 15px; font-weight: 400; cursor: pointer; }
.woocommerce .woocommerce-shipping-destination,
.woocommerce .woocommerce-shipping-calculator { margin-top: 10px; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.woocommerce .shipping-calculator-form { margin-top: 16px; text-align: left; }
/* what "Individual quote" means (inc/woocommerce/shipping.php) */
.woocommerce .ev-ship-note { display: block; max-width: 300px; margin-top: 6px; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, 0.6); }
/* with a quote the "options will be updated" line is blank: only a known destination (in <strong>) keeps the paragraph */
.woocommerce .shipping:has(.ev-ship-note) .woocommerce-shipping-destination:not(:has(strong)) { display: none; }

/* --- Steps: Cart → Details → Confirmation ----------------------------------- */
.ev-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px clamp(20px, 2.9vw, 56px);
  margin: 0 0 clamp(28px, 2.9vw, 56px);
  padding: 0 0 22px;
  border-bottom: 1px solid var(--ev-line);
  list-style: none;
}
.ev-steps__item :is(a, span) {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}
.ev-steps__num { font-size: 12px; font-weight: 400; letter-spacing: 0.25em; }
.ev-steps__item.is-done :is(a, span) { color: rgba(255, 255, 255, 0.7); }
.ev-steps__item.is-current > span { position: relative; color: var(--ev-white); }
/* the short rule of the navigation marks the current step */
.ev-steps__item.is-current > span::after {
  content: "";
  position: absolute;
  left: 0; bottom: -23px;
  width: 50px; height: 1px;
  background: currentColor;
}

@media (max-width: 600px) {
  .ev-steps { gap: 8px 20px; }
  .ev-steps__item :is(a, span) { font-size: 11px; gap: 8px; }
  .woocommerce :is(input.input-text, input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], select, textarea) { font-size: 16px; }
  .woocommerce-message,
  .woocommerce-info,
  .woocommerce-error { padding: 16px 20px; }
}
