/* EzPage Golden — WooCommerce skin for cart / checkout / my-account / shop / product pages.
   Themed via --shop-primary (set inline per shop from theme.json <id>-primary preset). */

:root {
  --shop-primary: #111827;
  --shop-primary-ink: #ffffff;
  --shop-ink: #0f172a;
  --shop-muted: #64748b;
  --shop-border: #e2e8f0;
  --shop-bg-soft: #f8fafc;
  --shop-radius: 12px;
  --shop-radius-sm: 8px;
}

.woocommerce, .woocommerce-page,
.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout,
.woocommerce-account {
  font-family: "Noto Sans TC", system-ui, -apple-system, sans-serif;
  color: var(--shop-ink);
}

/* Constrain + breathe */
.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content,
.woocommerce-account .entry-content,
.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding: 32px 24px 64px;
}

/* ---- Buttons (classic + block) ---- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .button.alt,
.wc-block-components-button,
.wp-element-button,
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
  background-color: var(--shop-primary) !important;
  color: var(--shop-primary-ink) !important;
  border: none !important;
  border-radius: var(--shop-radius-sm) !important;
  padding: 12px 24px !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  cursor: pointer;
  transition: filter .2s ease, transform .2s ease;
  box-shadow: none !important;
  text-decoration: none !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce .button.alt:hover,
.wc-block-components-button:hover,
.wp-element-button:hover,
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
}
/* secondary / ghost buttons */
.woocommerce a.button.wc-backward,
.woocommerce .button:not(.alt):not([name="update_cart"]) {
  background-color: transparent !important;
  color: var(--shop-primary) !important;
  border: 1px solid var(--shop-primary) !important;
}
.woocommerce button[name="update_cart"] {
  background-color: var(--shop-bg-soft) !important;
  color: var(--shop-ink) !important;
  border: 1px solid var(--shop-border) !important;
}

/* ---- Links + prices ---- */
.woocommerce a { color: var(--shop-primary); }
.woocommerce .price, .woocommerce-Price-amount,
.wc-block-components-product-price, .wc-block-formatted-money-amount,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  color: var(--shop-ink);
}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value { color: var(--shop-primary); font-weight: 800; }

/* ---- Form fields ---- */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce .select2-container .select2-selection,
.woocommerce form .form-row select,
.wc-block-components-text-input input,
.wc-block-components-select .wc-block-components-select__container,
.wc-block-components-textarea {
  border: 1px solid var(--shop-border) !important;
  border-radius: var(--shop-radius-sm) !important;
  font-size: 15px;
  background: #fff;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce .select2-container .select2-selection,
.woocommerce form .form-row select {
  padding: 12px 14px !important;
}
.wc-block-components-text-input input,
.wc-block-components-textarea {
  padding: 1.6em 14px 0.5em !important;
}
.wc-block-components-combobox .wc-block-components-combobox-control input {
  border: 1px solid var(--shop-border) !important;
  border-radius: var(--shop-radius-sm) !important;
  padding: 1.6em 14px 0.5em !important;
  font-size: 15px;
  background: #fff;
}
.wc-blocks-components-select__select {
  border: 1px solid var(--shop-border) !important;
  border-radius: var(--shop-radius-sm) !important;
  padding: 16px 14px 6px !important;
  min-height: 56px !important;
  height: auto !important;
  line-height: 1.4;
  font-size: 15px;
  background: #fff;
}
.wc-block-components-address-form .wc-block-components-text-input,
.wc-block-components-address-form .wc-blocks-components-select,
.wc-block-components-address-form .wc-block-components-combobox {
  margin-bottom: 14px;
}
.woocommerce form .form-row input.input-text:focus,
.wc-block-components-text-input input:focus {
  outline: none !important;
  border-color: var(--shop-primary) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--shop-primary) 18%, transparent) !important;
}
.wc-block-components-text-input.is-active label,
.wc-block-components-text-input input:focus + label { color: var(--shop-primary) !important; }

/* ---- Cards / panels ---- */
.woocommerce table.shop_table,
.wc-block-components-panel,
.wc-block-components-order-summary,
.wc-block-cart-items,
.woocommerce-MyAccount-content,
.woocommerce-order {
  border: 1px solid var(--shop-border) !important;
  border-radius: var(--shop-radius) !important;
  overflow: hidden;
}
.woocommerce table.shop_table th { background: var(--shop-bg-soft); }
.cart_totals h2, .wc-block-components-checkout-step__title,
.woocommerce-billing-fields h3, .woocommerce-checkout h3 {
  font-weight: 800;
}

/* ---- Notices ---- */
.woocommerce-info, .woocommerce-message, .wc-block-components-notice-banner {
  border-radius: var(--shop-radius-sm) !important;
  border-left: 4px solid var(--shop-primary) !important;
}
.woocommerce-message::before, .woocommerce-info::before { color: var(--shop-primary) !important; }

/* ---- My Account nav ---- */
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; }
.woocommerce-account .woocommerce-MyAccount-navigation li {
  border-radius: var(--shop-radius-sm);
  margin-bottom: 4px;
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active { background: var(--shop-primary); }
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a { color: var(--shop-primary-ink); }
.woocommerce-account .woocommerce-MyAccount-navigation li a { display: block; padding: 10px 14px; color: var(--shop-ink); text-decoration: none; }

/* ---- Shop archive product cards ---- */
.woocommerce ul.products li.product {
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  padding: 14px;
  background: #fff;
  transition: box-shadow .2s ease, transform .2s ease;
}
.woocommerce ul.products li.product:hover { box-shadow: 0 8px 24px rgba(2,6,23,.08); transform: translateY(-2px); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 16px; font-weight: 600; }

/* login/register forms */
.woocommerce-form-login, .woocommerce-form-register, .woocommerce form.checkout_coupon {
  border: 1px solid var(--shop-border) !important;
  border-radius: var(--shop-radius) !important;
}

.header-actions .wp-block-woocommerce-customer-account,
.header-actions .wp-block-woocommerce-mini-cart { margin: 0; }
.header-actions .wc-block-customer-account__link,
.header-actions .wc-block-mini-cart__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  color: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.header-actions .wc-block-customer-account__link:hover,
.header-actions .wc-block-mini-cart__button:hover,
.header-actions .wc-block-customer-account__link:focus-visible,
.header-actions .wc-block-mini-cart__button:focus-visible {
  background: color-mix(in srgb, var(--shop-primary) 12%, transparent);
  color: var(--shop-primary);
  outline: none;
}
.header-actions .wc-block-customer-account__link svg,
.header-actions .wc-block-mini-cart__button svg { width: 22px; height: 22px; }
.header-actions .wc-block-customer-account__link .label,
.header-actions .wc-block-mini-cart__amount { display: none; }
.header-actions .wc-block-mini-cart__quantity-badge { position: relative; display: inline-flex; }
.header-actions .wc-block-mini-cart__badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--shop-primary);
  color: var(--shop-primary-ink);
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wc-block-mini-cart__drawer, .wc-block-mini-cart__template-part {
  font-family: "Noto Sans TC", system-ui, -apple-system, sans-serif;
}
.wc-block-mini-cart__title { color: var(--shop-ink); font-weight: 800; }
.wc-block-mini-cart__footer-checkout {
  background: var(--shop-primary) !important;
  color: var(--shop-primary-ink) !important;
}
.wc-block-mini-cart__footer-cart {
  background: transparent !important;
  color: var(--shop-primary) !important;
  border: 1px solid var(--shop-primary) !important;
}

body.ezshop-modal-open { overflow: hidden; }
.ezshop-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
  font-family: "Noto Sans TC", system-ui, -apple-system, sans-serif;
}
.ezshop-modal-overlay[hidden] { display: none; }
.ezshop-modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: var(--shop-radius);
  padding: 32px 28px 28px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, .3);
  animation: ezshop-pop .22s ease;
}
@keyframes ezshop-pop {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.ezshop-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--shop-muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}
.ezshop-modal__close:hover { background: var(--shop-bg-soft); color: var(--shop-ink); }
.ezshop-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--shop-border);
}
.ezshop-tab {
  flex: 1;
  padding: 10px 8px 12px;
  border: none;
  background: transparent;
  color: var(--shop-muted);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .18s ease, border-color .18s ease;
}
.ezshop-tab.is-active { color: var(--shop-primary); border-bottom-color: var(--shop-primary); }
.ezshop-field { margin-bottom: 16px; }
.ezshop-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--shop-ink);
}
.ezshop-field input {
  width: 100%;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ezshop-field input:focus {
  outline: none;
  border-color: var(--shop-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--shop-primary) 18%, transparent);
}
.ezshop-hint { margin: 0 0 14px; font-size: 12px; color: var(--shop-muted); }
.ezshop-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 13px;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--shop-radius-sm);
}
.ezshop-submit {
  width: 100%;
  border: none;
  border-radius: var(--shop-radius-sm);
  padding: 13px 18px;
  background: var(--shop-primary);
  color: var(--shop-primary-ink);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .18s ease, transform .18s ease;
}
.ezshop-submit:hover { filter: brightness(.92); transform: translateY(-1px); }
.ezshop-submit.is-loading { opacity: .7; cursor: progress; transform: none; }

.ezshop-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 20px);
  z-index: 100001;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--shop-ink);
  color: #fff;
  font-family: "Noto Sans TC", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(2, 6, 23, .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.ezshop-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.ezshop-toast__tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--shop-primary);
  color: #fff;
  font-size: 11px;
}
.ezshop-fly {
  position: fixed;
  z-index: 100002;
  border-radius: 8px;
  object-fit: cover;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(2, 6, 23, .25);
  transition: left .7s cubic-bezier(.5, -0.2, .3, 1), top .7s cubic-bezier(.5, -0.2, .3, 1), width .7s ease, height .7s ease, opacity .7s ease;
}

.woocommerce-account .wp-site-blocks > header .wp-block-navigation,
.woocommerce-cart .wp-site-blocks > header .wp-block-navigation,
.woocommerce-checkout .wp-site-blocks > header .wp-block-navigation,
.woocommerce-page .wp-site-blocks > header .wp-block-navigation,
.single-product .wp-site-blocks > header .wp-block-navigation {
  display: none;
}

.woocommerce-account .woocommerce {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
}
.woocommerce-account .woocommerce-MyAccount-navigation {
  flex: 0 0 240px;
  width: 240px;
  float: none;
  margin: 0;
}
.woocommerce-account .woocommerce-MyAccount-content {
  flex: 1 1 320px;
  float: none;
  width: auto;
  margin: 0;
  padding: 28px !important;
  background: #fff;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 8px;
  list-style: none;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  background: #fff;
}
.woocommerce-account .woocommerce-MyAccount-navigation li {
  margin: 0;
  padding: 0;
  list-style: none;
  border: none;
  border-radius: var(--shop-radius-sm);
}
.woocommerce-account .woocommerce-MyAccount-navigation li a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--shop-ink);
  text-decoration: none;
}
.woocommerce-account .woocommerce-MyAccount-navigation li:hover {
  background: var(--shop-bg-soft);
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active {
  background: var(--shop-primary);
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
  color: var(--shop-primary-ink);
}
.woocommerce-account .woocommerce-MyAccount-content p {
  line-height: 1.7;
  color: var(--shop-ink);
}
.woocommerce-account .woocommerce-MyAccount-content a {
  color: var(--shop-primary);
  font-weight: 600;
}
.woocommerce-account .woocommerce-MyAccount-content > h2,
.woocommerce-account .woocommerce-MyAccount-content > h3 {
  margin-top: 0;
  font-weight: 800;
}
@media (max-width: 768px) {
  .woocommerce-account .woocommerce-MyAccount-navigation,
  .woocommerce-account .woocommerce-MyAccount-content {
    flex: 1 1 100%;
    width: 100%;
  }
}

.wc-block-customer-account__dropdown {
  border: 1px solid var(--shop-border) !important;
  border-radius: var(--shop-radius-sm) !important;
  box-shadow: 0 12px 32px rgba(2, 6, 23, .14) !important;
  padding: 6px !important;
  background: #fff !important;
  font-family: "Noto Sans TC", system-ui, -apple-system, sans-serif;
}
.wc-block-customer-account__dropdown a,
.wc-block-customer-account__dropdown-item {
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--shop-ink);
  text-decoration: none;
}
.wc-block-customer-account__dropdown a:hover,
.wc-block-customer-account__dropdown-item:hover {
  background: var(--shop-bg-soft);
  color: var(--shop-primary);
}
.wc-block-customer-account__dropdown-divider {
  border-color: var(--shop-border);
}
