/* Metline WooCommerce General Styling (Account, Cart, Checkout) */

/*
 * Layout for WooCommerce Account Page.
 *
 * The theme intentionally never prints body_class() (see header.php), so
 * WooCommerce's own `.woocommerce-account` / `.logged-in` body classes never
 * exist and selectors scoped to them are silently dead. `:has()` detects the
 * real signal instead: the sidebar nav (`.woocommerce-MyAccount-navigation`)
 * is only rendered on the logged-in dashboard, never on the login/register
 * screen, so its presence is what should drive the two-column grid.
 */
.woocommerce:has(> .woocommerce-MyAccount-navigation) {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-top: 36px;
  margin-bottom: 60px;
}

@media (max-width: 991px) {
  .woocommerce:has(> .woocommerce-MyAccount-navigation) {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .woocommerce:has(> .woocommerce-MyAccount-navigation) {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 24px;
    margin-bottom: 40px;
  }
}

/*
 * Login/Register screen: no sidebar, just center the auth card. Scoped to
 * `:has(> .metline-auth)` rather than a catch-all `:not()` so this doesn't
 * also match the `.woocommerce` wrapper on cart/checkout, which has its own
 * layout rules elsewhere in this file.
 */
.woocommerce:has(> .metline-auth) {
  display: block;
  margin-top: 36px;
  margin-bottom: 60px;
}

/* Center the "Moje konto" page title above the (now centered) auth card */
article:has(> .entry-content > .woocommerce > .metline-auth) .entry-header {
  text-align: center;
}

@media (max-width: 768px) {
  .woocommerce:has(> .metline-auth) {
    margin-top: 24px;
    margin-bottom: 40px;
  }
}

/* Sidebar Navigation (.woocommerce-MyAccount-navigation / .metline-account-nav) */
.woocommerce-MyAccount-navigation {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 0;
  box-shadow: 0 4px 18px rgba(23, 36, 47, 0.03);
  border-radius: 0;
  overflow: hidden;
}

/* User identity header */
.metline-account-nav-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 22px 20px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
}

.metline-account-nav-avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: #fff;
  font-family: Montserrat, sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.metline-account-nav-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.metline-account-nav-user-info strong {
  color: #fff;
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metline-account-nav-user-info small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.woocommerce-MyAccount-navigation ul {
  list-style: none !important;
  padding: 10px !important;
  margin: 0 !important;
}

.woocommerce-MyAccount-navigation li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.woocommerce-MyAccount-navigation li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 2px 0;
  color: var(--text);
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0;
  transition: all 0.18s ease;
}

.metline-account-nav-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: var(--light);
  color: var(--muted);
  transition: all 0.18s ease;
}

.metline-account-nav-icon svg {
  width: 16px;
  height: 16px;
}

.metline-account-nav-label {
  flex: 1 1 auto;
}

.metline-account-nav-chevron {
  flex: 0 0 auto;
  display: flex;
  color: var(--line);
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.18s ease;
}

.metline-account-nav-chevron svg {
  width: 15px;
  height: 15px;
}

.woocommerce-MyAccount-navigation li a:hover {
  background: var(--light);
  color: var(--navy);
}

.woocommerce-MyAccount-navigation li a:hover .metline-account-nav-icon {
  background: #fff;
  color: var(--red);
}

.woocommerce-MyAccount-navigation li a:hover .metline-account-nav-chevron {
  opacity: 1;
  transform: translateX(0);
  color: var(--red);
}

.woocommerce-MyAccount-navigation li.is-active a {
  background: var(--red);
  color: #fff;
  box-shadow: 0 6px 16px rgba(216, 17, 48, 0.25);
}

.woocommerce-MyAccount-navigation li.is-active .metline-account-nav-icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Styling for customer logout to make it stand out and avoid accidental clicks */
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout {
  border-top: 1px solid var(--line) !important;
  margin-top: 8px !important;
  padding-top: 8px !important;
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a {
  color: var(--muted) !important;
  font-weight: 500 !important;
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout .metline-account-nav-icon {
  background: transparent;
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
  color: var(--red) !important;
  background: rgba(216, 17, 48, 0.06) !important;
}

.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a:hover .metline-account-nav-icon {
  color: var(--red);
  background: transparent;
}

@media (max-width: 768px) {
  .woocommerce-MyAccount-navigation {
    position: static;
  }
}

/* Content Area (.woocommerce-MyAccount-content) */
.woocommerce-MyAccount-content {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 40px;
  box-shadow: 0 4px 18px rgba(23, 36, 47, 0.02);
  border-radius: 0;
}

.woocommerce-MyAccount-content p {
  margin-bottom: 1.5em;
  line-height: 1.6;
}

.woocommerce-MyAccount-content a:not(.button):not(.edit) {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed rgba(216, 17, 48, 0.4);
  transition: all 0.18s ease;
}

.woocommerce-MyAccount-content a:not(.button):not(.edit):hover {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

@media (max-width: 768px) {
  .woocommerce-MyAccount-content {
    padding: 24px 20px;
  }
}

/* Tables (Orders, Downloads, etc.) */
.woocommerce-MyAccount-content table.shop_table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.woocommerce-MyAccount-content table.shop_table th {
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--line);
}

.woocommerce-MyAccount-content table.shop_table td {
  padding: 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  line-height: 1.5;
}

.woocommerce-MyAccount-content table.shop_table tbody tr:hover td {
  background: var(--light);
}

/* Forms & Inputs */
.woocommerce form .form-row {
  margin-bottom: 20px;
}

.woocommerce form label {
  display: block;
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.woocommerce form input[type="text"],
.woocommerce form input[type="email"],
.woocommerce form input[type="password"],
.woocommerce form input[type="tel"],
.woocommerce form input.input-text,
.woocommerce form select,
.woocommerce form textarea {
  width: 100% !important;
  padding: 12px 16px !important;
  border: 1px solid var(--line) !important;
  background: #ffffff !important;
  color: var(--text) !important;
  border-radius: 0 !important;
  font-family: Roboto, sans-serif;
  font-size: 14px !important;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

.woocommerce form select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317242f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  background-size: 16px !important;
  padding-right: 40px !important;
}

.woocommerce form input[type="text"]:focus,
.woocommerce form input[type="email"]:focus,
.woocommerce form input[type="password"]:focus,
.woocommerce form input[type="tel"]:focus,
.woocommerce form input.input-text:focus,
.woocommerce form select:focus,
.woocommerce form textarea:focus {
  outline: none !important;
  border-color: var(--red) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(239, 35, 60, 0.12) !important;
}

.woocommerce form .required {
  color: var(--red);
  text-decoration: none;
}

/* ============================================================
   Metline Auth Card (login / register) — replaces default
   WooCommerce login layout with a redesigned experience.
   ============================================================ */

.metline-auth {
  max-width: 460px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 12px 40px rgba(23, 36, 47, 0.06);
  overflow: hidden;
}

.metline-auth--split {
  max-width: 480px;
}

/* Tabs (login / register switcher) */
.metline-auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--light);
  padding: 6px;
  gap: 4px;
}

.metline-auth-tab {
  position: relative;
  z-index: 2;
  background: transparent;
  border: 0;
  padding: 12px 16px;
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  border-radius: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.metline-auth-tab.is-active {
  color: var(--navy);
}

.metline-auth-tab-indicator {
  position: absolute;
  z-index: 1;
  top: 6px;
  left: 6px;
  width: calc(50% - 8px);
  height: calc(100% - 12px);
  background: #ffffff;
  border-radius: 0;
  box-shadow: 0 3px 10px rgba(23, 36, 47, 0.08);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.metline-auth--register-active .metline-auth-tab-indicator {
  transform: translateX(100%);
}

/* Panels */
.metline-auth-panel {
  display: none;
  padding: 36px 36px 0;
}

.metline-auth-panel.is-active {
  display: block;
  animation: metline-auth-fade 0.25s ease;
}

@keyframes metline-auth-fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.metline-auth--single .metline-auth-panel {
  padding: 40px 36px 0;
}

/* Neutralize a stray border/padding/margin some WooCommerce core CSS puts on
   bare <form> elements, which was boxing the fields off from the submit
   button instead of letting the panel's own padding contain everything. */
.metline-auth-panel form {
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Header (icon + heading) */
.metline-auth-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
}

.metline-auth-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(216, 17, 48, 0.08);
  color: var(--red);
}

.metline-auth-icon svg {
  width: 22px;
  height: 22px;
}

.metline-auth-header h2 {
  margin: 0 0 4px;
  font-family: Montserrat, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
}

.metline-auth-subtitle {
  margin: 0 !important;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.metline-auth-note {
  font-size: 13px;
  color: var(--muted);
}

/* Icon-prefixed inputs */
.metline-input-row label {
  margin-bottom: 8px !important;
}

/*
 * Grid, not `position:relative` + `top:50%`. WooCommerce's own JS auto-adds
 * a `password-input` class to any <span> that directly wraps a password
 * field, and its own core CSS (`.woocommerce form .password-input`) forces
 * `display:flex` on it with higher specificity than a single class selector
 * — hence the `!important` below, otherwise WC's rule silently wins and
 * stacks the icon/input/toggle instead of overlaying them. WC's JS can also
 * append extra elements (e.g. `#password_strength`) as siblings of the
 * input *inside* this wrap, which would grow the wrap's height and throw
 * off percentage-based vertical centering; pinning input/icon/toggle to
 * grid-row 1 keeps their row's height locked to just those three,
 * regardless of what lands in row 2+.
 */
.metline-input-wrap {
  display: grid !important;
  grid-template-columns: 1fr !important;
}

.metline-input-wrap>input,
.metline-input-wrap>.metline-input-icon,
.metline-input-wrap>.metline-password-toggle {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

.metline-input-wrap .metline-input-icon {
  justify-self: start;
  align-self: center;
  margin-left: 14px;
  z-index: 1;
  display: flex;
  color: var(--muted);
  pointer-events: none;
  transition: color 0.2s ease;
}

.metline-input-wrap .metline-input-icon svg {
  width: 18px;
  height: 18px;
}

.woocommerce form .metline-input-wrap input,
.woocommerce-page form .metline-input-wrap input,
.woocommerce .metline-input-wrap input,
.woocommerce-page .metline-input-wrap input,
.metline-input-wrap input {
  padding-left: 44px !important;
}

.metline-input-wrap:has(input:focus) .metline-input-icon {
  color: var(--red);
}

/* Hide native browser password reveal/clear icons so they don't double up with our custom toggle */
.woocommerce-account input[type="password"]::-ms-reveal,
.woocommerce-account input[type="password"]::-ms-clear,
.metline-input-wrap input[type="password"]::-ms-reveal,
.metline-input-wrap input[type="password"]::-ms-clear {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  position: absolute !important;
  right: -9999px !important;
}

/* Hide default WooCommerce password visibility toggle to prevent duplicate eyes */
.woocommerce form .show-password-input,
.woocommerce-page form .show-password-input,
.show-password-input {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}


.metline-input-wrap input::-webkit-credentials-auto-fill-button,
.metline-input-wrap input::-webkit-strong-password-auto-fill-button {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  right: 0;
}

.metline-password-toggle {
  position: relative;
  justify-self: end;
  align-self: center;
  margin-right: 6px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s ease;
}

.metline-password-toggle:hover {
  background: var(--light);
  color: var(--navy);
}

.metline-password-toggle svg {
  width: 18px;
  height: 18px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.metline-password-toggle .metline-eye-closed {
  opacity: 0;
}

.metline-password-toggle.is-visible .metline-eye-open {
  opacity: 0;
}

.metline-password-toggle.is-visible .metline-eye-closed {
  opacity: 1;
}

.woocommerce form .metline-input-wrap:has(.metline-password-toggle) input,
.woocommerce-page form .metline-input-wrap:has(.metline-password-toggle) input,
.woocommerce .metline-input-wrap:has(.metline-password-toggle) input,
.woocommerce-page .metline-input-wrap:has(.metline-password-toggle) input,
.metline-input-wrap:has(.metline-password-toggle) input {
  padding-right: 44px !important;
}

/* Remember me + lost password row */
.metline-login-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 22px 0 4px !important;
  flex-wrap: wrap !important;
  float: none !important;
  clear: both !important;
}

.metline-login-actions .woocommerce-form-login__rememberme {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  cursor: pointer !important;
  font-family: Montserrat, sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--navy) !important;
}

.metline-login-actions .woocommerce-form-login__rememberme input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 8px 0 0 !important;
  position: relative !important;
  top: 0 !important;
  accent-color: var(--red) !important;
  cursor: pointer;
}

.metline-lost-password {
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted) !important;
  text-decoration: none !important;
  border-bottom: 1px dashed var(--line) !important;
  transition: all 0.18s ease;
}

.metline-lost-password:hover {
  color: var(--red) !important;
  border-bottom-color: var(--red) !important;
}

/* Submit button (icon + full width) */
.metline-auth-submit.button {
  width: 100% !important;
  gap: 10px !important;
  margin-top: 24px !important;
  margin-bottom: 40px !important;
  padding: 15px 24px !important;
}

/* form-row owijający przycisk submit w formularzu rejestracji — reset marginu,
   żeby odstęp kontrolował sam przycisk przez margin-bottom */
.woocommerce form .form-row:has(.metline-auth-submit) {
  margin-bottom: 0 !important;
}

.metline-auth-submit.button svg {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}

.metline-auth-submit.button:hover svg {
  transform: translateX(3px);
}

@media (max-width: 480px) {

  .metline-auth-panel,
  .metline-auth--single .metline-auth-panel {
    padding: 28px 22px 26px;
  }

  .metline-auth-header {
    align-items: center;
  }
}

/* Układ Grid dla formularzy WooCommerce (Edycja konta, formularze adresów) */
.woocommerce-EditAccountForm,
.woocommerce-address-fields__field-wrapper,
.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px 24px !important;
  clear: both !important;
}

.woocommerce-EditAccountForm .form-row-wide,
.woocommerce-address-fields__field-wrapper .form-row-wide,
.woocommerce-billing-fields__field-wrapper .form-row-wide,
.woocommerce-shipping-fields__field-wrapper .form-row-wide,
.woocommerce-EditAccountForm fieldset,
.woocommerce-EditAccountForm h3 {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

.woocommerce-EditAccountForm .form-row-first,
.woocommerce-EditAccountForm .form-row-last,
.woocommerce-address-fields__field-wrapper .form-row-first,
.woocommerce-address-fields__field-wrapper .form-row-last,
.woocommerce-billing-fields__field-wrapper .form-row-first,
.woocommerce-billing-fields__field-wrapper .form-row-last {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
}

.woocommerce-EditAccountForm p.form-row:not(.form-row-first):not(.form-row-last) {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

.woocommerce-EditAccountForm fieldset {
  border: 1px solid var(--line) !important;
  padding: 24px !important;
  border-radius: 0 !important;
  margin-top: 24px !important;
  margin-bottom: 16px !important;
  grid-column: 1 / -1 !important;
}

.woocommerce-EditAccountForm fieldset legend {
  font-family: Montserrat, sans-serif !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--navy) !important;
  padding: 0 10px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
}

/* Password strength meter */
.woocommerce-password-strength {
  padding: 8px 12px;
  margin-top: 8px;
  font-size: 13px;
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  border-radius: 0;
}

.woocommerce-password-strength.strong {
  background-color: rgba(20, 133, 76, 0.1);
  color: var(--green);
}

.woocommerce-password-strength.short,
.woocommerce-password-strength.bad {
  background-color: rgba(239, 35, 60, 0.1);
  color: var(--red);
}

.woocommerce-password-strength.good {
  background-color: rgba(239, 180, 35, 0.1);
  color: #efb423;
}

.woocommerce-password-hint {
  display: block;
  margin-top: 8px !important;
  margin-bottom: 20px !important;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* Buttons */
.woocommerce button.button,
.woocommerce .button,
.woocommerce-page button.button,
.woocommerce-page .button,
.woocommerce-Button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red) !important;
  color: #ffffff !important;
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 28px !important;
  border: 0 !important;
  border-radius: 0 !important;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 16px;
  box-shadow: 0 4px 15px rgba(239, 35, 60, 0.15);
}

.woocommerce button.button:hover,
.woocommerce .button:hover,
.woocommerce-page button.button:hover,
.woocommerce-page .button:hover,
.woocommerce-Button.button:hover {
  background: var(--navy) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(23, 36, 47, 0.2);
}

/* Secondary Actions (Actions in Tables like "Zobacz", and "Edytuj" in Address cards) */
.woocommerce-MyAccount-content table.shop_table .button,
.woocommerce-MyAccount-content table.shop_table a.button,
.woocommerce-MyAccount-content .woocommerce-Addresses .edit,
.woocommerce-MyAccount-content a.edit {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--red) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 10px 18px !important;
  font-family: Montserrat, sans-serif !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  margin-top: 0 !important;
  box-shadow: 0 4px 10px rgba(239, 35, 60, 0.15) !important;
  cursor: pointer;
}

.woocommerce-MyAccount-content table.shop_table .button:hover,
.woocommerce-MyAccount-content table.shop_table a.button:hover,
.woocommerce-MyAccount-content .woocommerce-Addresses .edit:hover,
.woocommerce-MyAccount-content a.edit:hover {
  background: var(--navy) !important;
  color: #ffffff !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 6px 15px rgba(23, 36, 47, 0.2) !important;
}

/* WooCommerce Notices (Messages, Errors, Info) */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  padding: 18px 24px !important;
  margin-bottom: 28px !important;
  border-left: 4px solid #2ecc71 !important;
  background: #f4faf6 !important;
  color: #1b4d3e !important;
  font-family: Roboto, sans-serif !important;
  font-size: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  border-top: none !important;
  border-right: none !important;
  border-bottom: none !important;
  border-radius: 0 !important;
  box-shadow: 0 4px 12px rgba(23, 36, 47, 0.02) !important;
  position: relative !important;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
  display: none !important;
}

.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button {
  padding: 8px 16px !important;
  font-size: 11px !important;
  margin: 0 !important;
  background: var(--red) !important;
  color: #ffffff !important;
  border-radius: 0 !important;
  box-shadow: 0 3px 8px rgba(239, 35, 60, 0.15) !important;
}

.woocommerce-message .button:hover,
.woocommerce-info .button:hover,
.woocommerce-error .button:hover {
  background: var(--navy) !important;
  box-shadow: 0 5px 12px rgba(23, 36, 47, 0.2) !important;
}

.woocommerce-info {
  border-left-color: var(--navy) !important;
  background: #f5f7fa !important;
  color: var(--navy) !important;
}

.woocommerce-error {
  border-left-color: var(--red) !important;
  background: #fff5f6 !important;
  color: #b80c26 !important;
  display: block !important;
  list-style: none !important;
  padding-left: 24px !important;
}

.woocommerce-error li {
  list-style: none !important;
  margin-bottom: 6px;
}

.woocommerce-error li:last-child {
  margin-bottom: 0;
}

/* ============================================================
   Bloki WooCommerce: Koszyk (.wp-block-woocommerce-cart)
   i Zamówienie (.wp-block-woocommerce-checkout) — dopasowanie
   typografii, przycisków i pól do design systemu Metline.
   ============================================================ */

/* Pusty koszyk (Empty Cart State) */
.wp-block-woocommerce-empty-cart-block,
.wc-block-cart__empty-cart {
  text-align: center;
  padding: 80px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(23, 36, 47, 0.03);
  isolation: isolate;
}

.wp-block-woocommerce-empty-cart-block::before,
.wc-block-cart__empty-cart::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.4;
  pointer-events: none;
  z-index: -1;
}

/* Wymuszenie pełnej szerokości dla kontenerów (np. siatki produktów) wewnątrz pustego koszyka,
   ponieważ flex + align-items: center na rodzicu powoduje ich zwijanie/kolaps szerokości. */
.wp-block-woocommerce-empty-cart-block>*,
.wc-block-cart__empty-cart>* {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Jeśli koszyk jest pusty, rozciągamy główną sekcję na 100% szerokości i ukrywamy pusty panel boczny,
   zapobiegając ściśnięciu treści i produktów po lewej stronie. */
.wc-block-components-sidebar-layout:has(.wc-block-cart__empty-cart),
.wc-block-components-sidebar-layout:has(.wp-block-woocommerce-empty-cart-block),
.wc-block-cart.is-empty .wc-block-components-sidebar-layout {
  display: block !important;
  grid-template-columns: 1fr !important;
}

.wc-block-components-sidebar-layout:has(.wc-block-cart__empty-cart) .wc-block-components-main,
.wc-block-components-sidebar-layout:has(.wp-block-woocommerce-empty-cart-block) .wc-block-components-main,
.wc-block-components-sidebar-layout:has(.wc-block-cart__empty-cart) .wc-block-cart__main,
.wc-block-components-sidebar-layout:has(.wp-block-woocommerce-empty-cart-block) .wc-block-cart__main,
.wc-block-cart.is-empty .wc-block-components-main,
.wc-block-cart.is-empty .wc-block-cart__main {
  flex-basis: 100% !important;
  max-width: 100% !important;
  width: 100% !important;
}

.wc-block-components-sidebar-layout:has(.wc-block-cart__empty-cart) .wc-block-components-sidebar,
.wc-block-components-sidebar-layout:has(.wp-block-woocommerce-empty-cart-block) .wc-block-components-sidebar,
.wc-block-cart.is-empty .wc-block-components-sidebar {
  display: none !important;
}

/* Zachowanie domyślnego wyśrodkowania przycisku */
.wp-block-woocommerce-empty-cart-block .wp-block-button,
.wc-block-cart__empty-cart .wp-block-button {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
}

/* Ikona/obrazek pustego koszyka WooCommerce */
.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__image,
.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__icon,
.wc-block-cart__empty-cart .wc-block-cart__empty-cart__image,
.wc-block-cart__empty-cart .wc-block-cart__empty-cart__icon {
  width: 90px;
  height: 90px;
  margin-bottom: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 35, 60, 0.04);
  border: 2px dashed rgba(239, 35, 60, 0.25);
  border-radius: 50%;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, background-color 0.3s ease;
  z-index: 2;
}

.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__image::after,
.wc-block-cart__empty-cart .wc-block-cart__empty-cart__image::after,
.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__icon::after,
.wc-block-cart__empty-cart .wc-block-cart__empty-cart__icon::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(239, 35, 60, 0.1);
  border-radius: 50%;
  pointer-events: none;
  animation: spin-slow 20s linear infinite;
}

.wp-block-woocommerce-empty-cart-block:hover .wc-block-cart__empty-cart__image,
.wp-block-woocommerce-empty-cart-block:hover .wc-block-cart__empty-cart__icon,
.wc-block-cart__empty-cart:hover .wc-block-cart__empty-cart__image,
.wc-block-cart__empty-cart:hover .wc-block-cart__empty-cart__icon {
  transform: translateY(-6px) scale(1.05);
  border-color: var(--red);
  background-color: rgba(239, 35, 60, 0.08);
}

.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__image svg,
.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__icon svg,
.wc-block-cart__empty-cart .wc-block-cart__empty-cart__image svg,
.wc-block-cart__empty-cart .wc-block-cart__empty-cart__icon svg,
.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__image img,
.wc-block-cart__empty-cart .wc-block-cart__empty-cart__image img {
  width: 36px !important;
  height: 36px !important;
  fill: none !important;
  stroke: var(--red) !important;
  stroke-width: 1.5 !important;
  color: var(--red) !important;
  transition: transform 0.3s ease;
}

.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title,
.wc-block-cart__empty-cart .wc-block-cart__empty-cart__title {
  font-family: Montserrat, sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 2;
}

.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__message,
.wc-block-cart__empty-cart .wc-block-cart__empty-cart__message {
  font-family: Roboto, sans-serif;
  font-size: 14.5px;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.65;
  margin: 0 auto 28px;
  position: relative;
  z-index: 2;
}

.wp-block-woocommerce-empty-cart-block .wp-block-button__link,
.wc-block-cart__empty-cart .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 32px;
  background: var(--red) !important;
  color: #ffffff !important;
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px !important;
  border: none;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(239, 35, 60, 0.2);
  position: relative;
  z-index: 2;
}

.wp-block-woocommerce-empty-cart-block .wp-block-button__link:hover,
.wc-block-cart__empty-cart .wp-block-button__link:hover {
  background: var(--red-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 35, 60, 0.3);
}

.wp-block-woocommerce-empty-cart-block .wp-block-button__link:active,
.wc-block-cart__empty-cart .wp-block-button__link:active {
  transform: translateY(0);
}

/* Nagłówki i typografia bloków */
.wp-block-woocommerce-cart h2,
.wp-block-woocommerce-checkout h2,
.wc-block-components-title,
.wc-block-components-checkout-step__title {
  font-family: Montserrat, sans-serif;
  color: var(--navy, #17242f);
  font-weight: 900;
  letter-spacing: -.02em;
}

.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
  color: var(--navy, #17242f);
}

/* Przyciski główne (Przejdź do płatności, Zamawiam i płacę) */
.wc-block-components-button:not(.is-link),
.wp-block-woocommerce-cart .wc-block-cart__submit-button,
.wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button {
  background: var(--red, #ef233c);
  color: #fff;
  border: none;
  border-radius: 0;
  font-family: Montserrat, sans-serif;
  font-weight: 900;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: background .18s ease, transform .18s ease;
}

.wc-block-components-button:not(.is-link):hover,
.wc-block-components-button:not(.is-link):focus {
  background: #d31b31;
  color: #fff;
}

/* Pola formularzy — proste krawędzie, akcent marki przy focus */
.wc-block-components-text-input input[type="text"],
.wc-block-components-text-input input[type="email"],
.wc-block-components-text-input input[type="tel"],
.wc-block-components-text-input input[type="number"],
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-block-components-form .wc-block-components-text-input input,
.wc-block-components-totals-coupon__input input {
  border: 1px solid var(--line, #e6ebef);
  border-radius: 0;
}

.wc-block-components-text-input input:focus,
.wc-block-components-combobox .wc-block-components-combobox-control input:focus,
.wc-block-components-totals-coupon__input input:focus {
  border-color: var(--red, #ef233c);
  box-shadow: 0 0 0 1px var(--red, #ef233c);
}

/* Linki wewnątrz bloków */
.wp-block-woocommerce-cart a:not(.wc-block-components-button),
.wp-block-woocommerce-checkout a:not(.wc-block-components-button) {
  color: var(--red, #ef233c);
}

/* Podsumowanie zamówienia — mocniejsze sumy */
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  font-family: Montserrat, sans-serif;
  font-weight: 900;
  color: var(--navy, #17242f);
}

/* Selektor ilości i usuwanie z koszyka */
.wc-block-cart-item__quantity .wc-block-components-quantity-selector {
  border-radius: 0;
  border-color: var(--line, #e6ebef);
}

.wc-block-cart-item__remove-link {
  color: var(--muted, #6d7884);
  text-decoration: none;
}

.wc-block-cart-item__remove-link:hover {
  color: var(--red, #ef233c);
}

/* Radio / checkbox w kolorze marki */
.wp-block-woocommerce-cart input[type="radio"],
.wp-block-woocommerce-cart input[type="checkbox"],
.wp-block-woocommerce-checkout input[type="radio"],
.wp-block-woocommerce-checkout input[type="checkbox"] {
  accent-color: var(--red, #ef233c);
}

/* Płatność odroczona dla instytucji — wyróżnione oświadczenie na checkout */
.metline-institution-interest-field {
  margin: 20px 0 0;
  padding: 18px 20px;
  border: 2px solid var(--navy, #17242f);
  background: linear-gradient(135deg, rgba(23, 36, 47, 0.04) 0%, rgba(216, 17, 48, 0.06) 100%);
  box-shadow: 0 4px 18px rgba(23, 36, 47, 0.06);
}

.metline-institution-interest-field label,
.metline-institution-interest-field .wc-block-components-checkbox__label {
  font-family: Montserrat, sans-serif;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.45;
  color: var(--navy, #17242f);
}

.metline-institution-popup-field {
  display: none !important;
}

.metline-institution-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.metline-institution-modal[hidden] {
  display: none !important;
}

body.metline-institution-modal-open {
  overflow: hidden;
}

.metline-institution-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 25, 33, 0.62);
}

.metline-institution-modal__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 28px 28px 24px;
  border: 2px solid var(--navy, #17242f);
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 25, 33, 0.28);
}

.metline-institution-modal__title {
  margin: 0 0 12px;
  font-family: Montserrat, sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--navy, #17242f);
}

.metline-institution-modal__intro,
.metline-institution-modal__body {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text, #202b35);
}

.metline-institution-modal__body {
  padding: 14px 16px;
  border-left: 4px solid var(--red, #ef233c);
  background: rgba(216, 17, 48, 0.05);
}

.metline-institution-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.metline-institution-modal__btn {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.metline-institution-modal__btn--cancel {
  background: #eef2f5;
  color: var(--navy, #17242f);
}

.metline-institution-modal__btn--confirm {
  background: var(--red, #ef233c);
  color: #fff;
}

.metline-institution-modal__btn--confirm:hover,
.metline-institution-modal__btn--confirm:focus {
  background: #d31b31;
}

.metline-institution-deferred-info {
  margin: 16px 0 20px;
  padding: 16px 18px;
  border: 1px solid rgba(20, 133, 76, 0.35);
  background: rgba(20, 133, 76, 0.08);
  color: var(--navy, #17242f);
}

.metline-institution-deferred-info strong {
  display: block;
  margin-bottom: 6px;
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  font-weight: 900;
  color: var(--green, #14854c);
}

.metline-institution-deferred-info p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

body.metline-institution-deferred-active .wp-block-woocommerce-checkout-payment-block,
body.metline-institution-deferred-active .wp-block-woocommerce-checkout-express-payment-block,
body.metline-institution-deferred-active .wc-block-checkout__payment-method {
  display: none !important;
}

/* Panele / karty bloków — proste krawędzie zamiast zaokrągleń */
.wc-block-components-sidebar .wc-block-components-panel,
.wc-block-components-order-summary,
.wc-block-components-checkout-order-summary__title {
  border-radius: 0;
}

/* --- EKRAN PODSUMOWANIA ZAMÓWIENIA (THANKYOU PAGE) --- */

.woocommerce-order {
  max-width: 960px;
  margin: 40px auto;
  padding: 40px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(23, 36, 47, 0.04);
  border-radius: 0;
}

/* Radosny i profesjonalny komunikat sukcesu z ikoną */
.woocommerce-thankyou-order-received {
  font-size: 20px;
  font-family: Montserrat, sans-serif;
  font-weight: 900;
  color: #2b9348 !important;
  /* Zielony kolor sukcesu */
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.woocommerce-thankyou-order-received::before {
  content: "";
  display: block;
  width: 64px;
  height: 64px;
  background-color: #2b9348;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 32px;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 0;
  box-shadow: 0 6px 20px rgba(43, 147, 72, 0.25);
  animation: scaleUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes scaleUp {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Szczegóły zamówienia (lista u góry) */
.woocommerce-order-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin: 36px 0 !important;
  padding: 24px !important;
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: 0;
  list-style: none !important;
}

/* Wyłączenie pseudoelementów clearfix, które rozbijały siatkę CSS Grid */
.woocommerce-order-overview::before,
.woocommerce-order-overview::after {
  display: none !important;
}

.woocommerce-order-overview li {
  margin: 0 !important;
  padding: 0 20px 0 0 !important;
  /* Margines po prawej przed separatorem pionowym */
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  border-right: 1px solid var(--line) !important;
}

.woocommerce-order-overview li:last-child {
  border-right: none !important;
  padding-right: 0 !important;
}

.woocommerce-order-overview li strong {
  font-size: 14px;
  color: var(--navy);
  text-transform: none;
  font-weight: 800;
}

/* Usunięcie zbugowanych czerwonych kropek z list wewnątrz modułów WooCommerce */
.entry-content [class*="woocommerce"] ul li::before,
.entry-content [class*="wc-block"] ul li::before,
.entry-content [class*="woocommerce"] ol li::before,
.entry-content [class*="wc-block"] ol li::before,
.entry-content ul.order_details li::before,
.entry-content ul.wc-item-meta li::before {
  display: none !important;
}

.entry-content [class*="woocommerce"] ul:not(.wc-block-grid__products) li,
.entry-content [class*="wc-block"] ul:not(.wc-block-grid__products) li,
.entry-content [class*="woocommerce"] ol li,
.entry-content [class*="wc-block"] ol li,
.entry-content ul.order_details li,
.entry-content ul.wc-item-meta li {
  padding-left: 0 !important;
}

/* Tabela szczegółów zamówienia */
.woocommerce-order-details {
  margin-top: 48px;
}

.woocommerce-order-details__title {
  font-family: Montserrat, sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.woocommerce-table--order-details {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  margin-bottom: 30px;
}

.woocommerce-table--order-details th,
.woocommerce-table--order-details td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.woocommerce-table--order-details th {
  background: #f8f9fa;
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--navy);
  letter-spacing: 0.04em;
}

.woocommerce-table--order-details td a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.woocommerce-table--order-details td a:hover {
  color: var(--red);
}

/* Sekcja Adresów */
.woocommerce-customer-details {
  margin-top: 48px;
}

.woocommerce-customer-details h2 {
  font-family: Montserrat, sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

/* Layout kart adresowych w Moje konto oraz Podsumowaniu zamówienia */
.woocommerce-columns--addresses,
.woocommerce-Addresses,
.woocommerce-MyAccount-content .col2-set.addresses,
.woocommerce-account .addresses,
.woocommerce-account .col2-set {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 24px !important;
  margin-top: 20px !important;
  float: none !important;
  clear: both !important;
}

/* Ukrycie pseudoelementów WooCommerce, które generują puste komórki w siatce Grid */
.woocommerce-columns--addresses::before,
.woocommerce-columns--addresses::after,
.woocommerce-Addresses::before,
.woocommerce-Addresses::after,
.woocommerce-MyAccount-content .col2-set.addresses::before,
.woocommerce-MyAccount-content .col2-set.addresses::after,
.woocommerce-account .addresses::before,
.woocommerce-account .addresses::after,
.woocommerce-account .col2-set::before,
.woocommerce-account .col2-set::after {
  display: none !important;
}

.woocommerce-column--billing-address,
.woocommerce-column--shipping-address,
.woocommerce-Address,
.woocommerce-MyAccount-content .col2-set.addresses .col-1,
.woocommerce-MyAccount-content .col2-set.addresses .col-2,
.woocommerce-account .addresses .col-1,
.woocommerce-account .addresses .col-2,
.woocommerce-account .col2-set .col-1,
.woocommerce-account .col2-set .col-2 {
  padding: 24px 24px 80px 24px !important;
  /* Dolny padding pod przycisk */
  background: #f8f9fa !important;
  border: 1px solid var(--line) !important;
  border-radius: 0 !important;
  box-shadow: 0 4px 12px rgba(23, 36, 47, 0.01) !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  /* Pod pozycjonowanie absolutne przycisku */
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  min-height: 220px !important;
  box-sizing: border-box !important;
}

/* Dostosowanie nagłówków sekcji adresowych na podstronie Moje konto */
.woocommerce-Address-title {
  display: block !important;
  border-bottom: 1px solid var(--line) !important;
  padding-bottom: 10px !important;
  margin-bottom: 16px !important;
}

.woocommerce-Address-title h3 {
  margin: 0 !important;
  font-family: Montserrat, sans-serif !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--navy) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
}

.woocommerce-column__title {
  font-family: Montserrat, sans-serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: var(--navy) !important;
  margin-bottom: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  border-bottom: 1px solid var(--line) !important;
  padding-bottom: 10px !important;
}

.woocommerce-customer-details address,
.woocommerce-Address address,
.woocommerce-MyAccount-content .col2-set.addresses address {
  font-style: normal !important;
  color: var(--text) !important;
  line-height: 1.6 !important;
  font-size: 14px !important;
  margin-top: 8px !important;
}

/* Pozycjonowanie przycisku Edytuj na dole karty adresowej */
.woocommerce-Address-title a.edit,
.woocommerce-MyAccount-content .col2-set.addresses .edit {
  position: absolute !important;
  bottom: 20px !important;
  left: 24px !important;
  right: 24px !important;
  margin: 0 !important;
}

/* Responsywność */
@media (max-width: 768px) {
  .woocommerce-order {
    padding: 24px 20px !important;
  }

  .woocommerce-order-overview {
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
    padding: 16px !important;
  }

  .woocommerce-order-overview li {
    border-right: none !important;
    border-bottom: 1px solid var(--line) !important;
    padding: 0 0 10px 0 !important;
  }

  .woocommerce-order-overview li:nth-last-child(-n+2) {
    border-bottom: none !important;
    padding-bottom: 0 !important;
  }

  .woocommerce-columns--addresses,
  .woocommerce-Addresses,
  .woocommerce-MyAccount-content .col2-set.addresses,
  .woocommerce-account .addresses,
  .woocommerce-account .col2-set {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* ============================================================
   Wyrównanie siatki produktów w blokach WooCommerce (Nowe w sklepie)
   ============================================================ */

.wc-block-grid__products {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 24px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  list-style: none !important;
  width: 100% !important;
}

.wc-block-grid__product {
  flex: 1 1 calc(25% - 18px) !important;
  /* Siatka 4-kolumnowa */
  margin: 0 !important;
  /* Reset marginesów WooCommerce, zapobiega przesunięciu siatki w lewo */
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  /* Wymusza rozciąganie elementów na całą szerokość karty */
  height: auto !important;
  box-sizing: border-box !important;
  padding: 22px !important;
  background: #f8f9fa !important;
  border: 1px solid var(--line) !important;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease !important;
}

/* Lista produktow jest rowniez lista HTML, ale nie jest lista tresci.
   Nie pozwalamy globalnemu resetowi list WooCommerce nadpisac tylko lewego
   paddingu karty, bo daje to optycznie przesunieta zawartosc. */
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product {
  padding-inline: 22px !important;
}

@media (max-width: 992px) {
  .wc-block-grid__product {
    flex: 1 1 calc(50% - 12px) !important;
    /* 2 kolumny na tabletach */
  }
}

@media (max-width: 576px) {
  .wc-block-grid__product {
    flex: 1 1 100% !important;
    /* 1 kolumna na telefonach */
  }
}

.wc-block-grid__product:hover {
  transform: translateY(-4px) !important;
  background: #ffffff !important;
  box-shadow: 0 18px 36px rgba(23, 36, 47, 0.08) !important;
  border-color: rgba(23, 36, 47, 0.1) !important;
}

.wc-block-grid__product-link {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  /* Wymusza rozciąganie kontenera na zdjęcia na pełną szerokość linku */
  flex-grow: 1 !important;
  width: 100% !important;
  text-decoration: none !important;
}

/* Wyrównanie kontenera i obrazka */
.wc-block-grid__product-image {
  width: 100% !important;
  height: 248px !important;
  position: relative !important;
  margin-bottom: 20px !important;
  background: #ffffff !important;
  overflow: hidden !important;
  border: 1px solid var(--line) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

.wc-block-grid__product-image img {
  max-height: 100% !important;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  padding: 8px !important;
  transform: scale(1.12) !important;
  transform-origin: center center !important;
  transition: transform 0.22s ease !important;
}

.wc-block-grid__product:hover .wc-block-grid__product-image img {
  transform: scale(1.14) !important;
}

/* Spójna wysokość i typografia tytułu */
.wc-block-grid__product-title {
  color: var(--navy) !important;
  font-family: Montserrat, sans-serif !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
  letter-spacing: -0.03em !important;
  font-weight: 900 !important;
  text-align: center !important;
  margin-bottom: 12px !important;
  min-height: 40px !important;
  /* Zapewnia spójność dla 1- lub 2-liniowych tytułów */
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* Wyrównanie cen i spójne spuszczenie w dół */
.wc-block-grid__product-price {
  margin-top: auto !important;
  /* Popycha cenę oraz przycisk w dół karty */
  margin-bottom: 16px !important;
  text-align: center !important;
  color: var(--green) !important;
  font-family: Montserrat, sans-serif !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em !important;
}

/* Przyciski dodawania na pełną szerokość */
.wc-block-grid__product-add-to-cart {
  width: 100% !important;
  margin: 0 !important;
}

.wc-block-grid__product-add-to-cart .wp-block-button__link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 46px !important;
  background: var(--red) !important;
  color: #ffffff !important;
  font-family: Montserrat, sans-serif !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  border-radius: 0 !important;
  border: none !important;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease !important;
  box-shadow: 0 4px 15px rgba(239, 35, 60, 0.15) !important;
}

.wc-block-grid__product-add-to-cart .wp-block-button__link:hover {
  background: #d31b31 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(211, 27, 49, 0.3) !important;
}

.wc-block-grid__product-add-to-cart .wp-block-button__link:active {
  transform: translateY(0) !important;
}

/* ============================================================
   Nowy, premium Kokpit (Dashboard My Account) - Spójny z motywem
   ============================================================ */

.woocommerce-MyAccount-dashboard-wrap {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.metline-dashboard-welcome {
  background: var(--navy) !important;
  border: none !important;
  padding: 28px !important;
  border-radius: 0 !important;
  box-shadow: 0 4px 15px rgba(23, 36, 47, 0.04) !important;
  color: #ffffff !important;
}

.metline-dashboard-welcome h2 {
  color: #ffffff !important;
  font-family: Montserrat, sans-serif !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  margin: 0 0 10px 0 !important;
  letter-spacing: -0.02em !important;
}

.metline-dashboard-welcome p {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  margin: 0 !important;
  font-family: Roboto, sans-serif;
}

.metline-dashboard-stats-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
}

@media (max-width: 900px) {
  .metline-dashboard-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

.metline-stat-card {
  background: var(--red) !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 12px !important;
  box-shadow: 0 4px 12px rgba(239, 35, 60, 0.1) !important;
  transition: transform 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease !important;
  box-sizing: border-box !important;
}

.metline-stat-card:hover {
  background: var(--navy) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 20px rgba(23, 36, 47, 0.15) !important;
}

.metline-stat-label {
  display: block !important;
  font-family: Montserrat, sans-serif !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: rgba(255, 255, 255, 0.8) !important;
  line-height: 1.2 !important;
}

.metline-stat-value {
  font-family: Montserrat, sans-serif !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  color: #ffffff !important;
  margin: 4px 0 !important;
}

.metline-stat-link {
  font-family: Montserrat, sans-serif !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.4) !important;
  width: fit-content !important;
  transition: all 0.18s ease !important;
}

.metline-stat-link:hover {
  border-bottom-color: #ffffff !important;
}

/* Ostatnie zamówienie (Dashboard Card) */
.metline-dashboard-recent-order {
  background: #ffffff !important;
  border: 1px solid var(--line) !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(23, 36, 47, 0.01) !important;
}

.metline-recent-order-header {
  padding: 18px 24px !important;
  border-bottom: 1px solid var(--line) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  background: #f8f9fa !important;
}

.metline-recent-order-header h3 {
  margin: 0 !important;
  font-family: Montserrat, sans-serif !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--navy) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
}

.metline-status-badge {
  display: inline-flex !important;
  align-items: center !important;
  font-family: Montserrat, sans-serif !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  padding: 6px 12px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.status-completed {
  background-color: rgba(20, 133, 76, 0.08) !important;
  color: #106b3c !important;
  border: 1px solid rgba(20, 133, 76, 0.2) !important;
}

.status-pending {
  background-color: rgba(0, 102, 204, 0.08) !important;
  color: #0056b3 !important;
  border: 1px solid rgba(0, 102, 204, 0.2) !important;
}

.status-failed {
  background-color: rgba(239, 35, 60, 0.08) !important;
  color: #b80c26 !important;
  border: 1px solid rgba(239, 35, 60, 0.2) !important;
}

.status-default {
  background-color: rgba(109, 120, 132, 0.08) !important;
  color: #4a535c !important;
  border: 1px solid rgba(109, 120, 132, 0.2) !important;
}

.metline-recent-order-body {
  padding: 24px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 24px !important;
}

@media (max-width: 768px) {
  .metline-recent-order-body {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 20px !important;
  }
}

.metline-recent-order-info-grid {
  display: flex !important;
  gap: 40px !important;
}

@media (max-width: 576px) {
  .metline-recent-order-info-grid {
    flex-direction: column !important;
    gap: 16px !important;
  }
}

.metline-recent-order-info-grid small {
  display: block !important;
  font-family: Montserrat, sans-serif !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: var(--muted) !important;
  margin-bottom: 4px !important;
}

.metline-recent-order-info-grid strong {
  font-family: Montserrat, sans-serif !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  color: var(--navy) !important;
}

.metline-recent-order-actions {
  flex-shrink: 0 !important;
}

.metline-recent-order-actions a.button {
  display: inline-flex !important;
  align-items: center !important;
  background: var(--red) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 10px 18px !important;
  font-family: Montserrat, sans-serif !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 10px rgba(239, 35, 60, 0.15) !important;
  margin: 0 !important;
}

.metline-recent-order-actions a.button:hover {
  background: var(--navy) !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 6px 15px rgba(23, 36, 47, 0.2) !important;
}

/* Nadpisanie domyślnego żółtego wyróżnienia tagów <mark> w panelu klienta */
.woocommerce-MyAccount-content mark {
  background: rgba(23, 36, 47, 0.05) !important;
  color: var(--navy) !important;
  font-weight: 700 !important;
  padding: 2px 6px !important;
  border-radius: 0 !important;
}

/* Odsunięcie sekcji rekomendacji "Nowe w sklepie" w koszyku */
.woocommerce-cart h2.wp-block-heading,
.wc-block-cart h2.wp-block-heading,
.woocommerce-cart .wp-block-heading,
.wc-block-cart .wp-block-heading,
.woocommerce-cart .entry-content>h2,
.woocommerce-cart .entry-content>h3,
.woocommerce-cart .entry-content>h4,
.wp-block-woocommerce-empty-cart-block h2.wp-block-heading:not(.wc-block-cart__empty-cart__title),
.wp-block-woocommerce-empty-cart-block .wp-block-heading:not(.wc-block-cart__empty-cart__title),
.wp-block-woocommerce-cart h2.wp-block-heading:not(.wc-block-cart__empty-cart__title),
.wp-block-woocommerce-cart .wp-block-heading:not(.wc-block-cart__empty-cart__title) {
  margin-top: 72px !important;
  margin-bottom: 28px !important;
}

.woocommerce-cart .wc-block-grid,
.wc-block-cart .wc-block-grid,
.wp-block-woocommerce-cart .wc-block-grid,
.wp-block-woocommerce-empty-cart-block .wc-block-grid {
  margin-top: 0 !important;
}

/* Wymuszenie odstępu pod koszykiem (zarówno pełnym, jak i pustym) */
.wp-block-woocommerce-cart,
.wc-block-cart,
.wp-block-woocommerce-empty-cart-block,
.wc-block-cart__empty-cart {
  margin-bottom: 72px !important;
}