/* =============================================================
   WooCommerce — account pages, notices, classic forms, side cart
   (matches the theme tokens: navy #181F30/#1E2738, cream #F7F6F3,
   coral #F05C4E, border #E5E7EB, body #61605C, pill radius 999px)
   ============================================================= */

/* ---------- Shared WooCommerce page wrapper ---------- */
.bags-wc-page {
  max-width: 68rem;
  margin: 0 auto;
}

/* ---------- Notices ---------- */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0.875rem 1.25rem;
  border-radius: 0.875rem;
  background: #f7f6f3;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #1e2738;
  color: #1e2738;
  font-size: 0.9375rem;
}
.woocommerce-error { border-left-color: #c83131; }
.woocommerce-message { border-left-color: #2e7d32; }
.woocommerce-error li { margin: 0.25rem 0; }
.woocommerce-message .button,
.woocommerce-info .button,
.woocommerce-error .button { float: right; margin-left: 1rem; }

/* ---------- Inputs & buttons (classic Woo markup) ---------- */
.woocommerce .input-text,
.woocommerce select,
.woocommerce textarea {
  display: block;
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 0.6rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  color: #1e2738;
  background: #fff;
  outline: none;
}
.woocommerce .input-text:focus,
.woocommerce select:focus,
.woocommerce textarea:focus {
  border-color: #1e2738;
  box-shadow: 0 0 0 0.2rem rgba(30, 39, 56, 0.08);
}
.woocommerce .form-row { margin: 0 0 1rem; padding: 0; }
.woocommerce .form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: #181f30;
  margin-bottom: 0.375rem;
}
.woocommerce .form-row .required { color: #c83131; text-decoration: none; }
.woocommerce .show-password-input { display: none; }

.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button {
  display: inline-block;
  background: #1e2738;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.625rem 1.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover {
  background: #181f30;
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- Login / register ---------- */
.bags-wc-page .woocommerce-form-login,
.bags-wc-page .woocommerce-form-register,
.bags-wc-page .woocommerce-ResetPassword {
  max-width: 30rem;
  margin: 0 auto;
  background: #f7f6f3;
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem;
  border: 0;
}
.bags-wc-page #customer_login {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .bags-wc-page #customer_login { grid-template-columns: 1fr 1fr; }
  .bags-wc-page #customer_login .woocommerce-form-login,
  .bags-wc-page #customer_login .woocommerce-form-register { max-width: none; }
}
.bags-wc-page #customer_login h2,
.bags-wc-page .woocommerce-MyAccount-content h2,
.bags-wc-page .woocommerce-MyAccount-content h3 {
  font-weight: 700;
  font-size: 1.25rem;
  color: #181f30;
  margin-bottom: 1rem;
}
.woocommerce-form-login__rememberme {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500 !important;
  margin-bottom: 0.75rem;
}
.woocommerce-LostPassword { margin: 0.75rem 0 0; font-size: 0.875rem; }
.woocommerce-LostPassword a,
.woocommerce-privacy-policy-text a { color: #f05c4e; font-weight: 600; }
.woocommerce-privacy-policy-text { font-size: 0.8125rem; color: #61605c; margin: 0.75rem 0; }

/* ---------- My Account layout ---------- */
.bags-wc-page .woocommerce:has(.woocommerce-MyAccount-navigation) {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 992px) {
  .bags-wc-page .woocommerce:has(.woocommerce-MyAccount-navigation) {
    grid-template-columns: 16rem minmax(0, 1fr);
  }
}
.woocommerce-MyAccount-navigation {
  background: #f7f6f3;
  border-radius: 1.25rem;
  padding: 1rem;
}
.woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.woocommerce-MyAccount-navigation li a {
  display: block;
  padding: 0.625rem 1rem;
  border-radius: 999px;
  color: #61605c;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.woocommerce-MyAccount-navigation li a:hover { background: #fff; color: #181f30; }
.woocommerce-MyAccount-navigation li.is-active a {
  background: #1e2738;
  color: #fff;
}
.woocommerce-MyAccount-content {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem;
  color: #61605c;
  font-size: 0.9375rem;
  min-width: 0;
}
.woocommerce-MyAccount-content > p:first-child { margin-top: 0; }
.woocommerce-MyAccount-content a:not(.button) { color: #f05c4e; font-weight: 600; }
.woocommerce-MyAccount-content fieldset {
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  padding: 1rem 1.25rem;
  margin: 0 0 1.25rem;
}
.woocommerce-MyAccount-content legend {
  float: none;
  width: auto;
  padding: 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #181f30;
}

/* ---------- Tables (orders, downloads) ---------- */
.woocommerce table.shop_table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  overflow: hidden;
  font-size: 0.9rem;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}
.woocommerce table.shop_table thead th {
  background: #f7f6f3;
  color: #181f30;
  font-weight: 700;
}
.woocommerce table.shop_table tbody tr:last-child td { border-bottom: 0; }
.woocommerce table.shop_table .button { padding: 0.375rem 1rem; font-size: 0.8125rem; }

/* ---------- Addresses ---------- */
.woocommerce-Addresses { display: grid; gap: 1.25rem; }
@media (min-width: 768px) { .woocommerce-Addresses { grid-template-columns: 1fr 1fr; } }
.woocommerce-Addresses .woocommerce-Address { width: 100% !important; float: none !important; }
.woocommerce-Address address {
  background: #f7f6f3;
  border-radius: 0.875rem;
  padding: 1rem 1.25rem;
  font-style: normal;
  margin: 0.5rem 0 0;
}
.woocommerce-Address-title { position: relative; }
.woocommerce-Address-title h3 { font-size: 1.05rem; }
.woocommerce-Address-title .edit {
  position: absolute;
  right: 0;
  top: 0.2rem;
  font-size: 0.8125rem;
}

/* ---------- Downloads / no-content states ---------- */
.woocommerce-Message--info .button,
.woocommerce-info .button { margin-top: 0; }

/* =============================================================
   SIDE CART (off-canvas drawer)
   ============================================================= */
.bags-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 1080;
}
.bags-cart-overlay.is-open { opacity: 1; visibility: visible; }

.bags-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(26rem, 100vw);
  background: #fff;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -20px 0 60px rgba(17, 24, 39, 0.18);
}
.bags-cart-drawer.is-open { transform: translateX(0); }

.bags-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.375rem;
  border-bottom: 1px solid #e5e7eb;
}
.bags-cart-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #181f30;
}
.bags-cart-close {
  border: 0;
  background: #f7f6f3;
  border-radius: 999px;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #181f30;
  cursor: pointer;
}
.bags-cart-close:hover { background: #e5e7eb; }

.bags-cart-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.bags-cart-body.is-loading { opacity: 0.5; pointer-events: none; }
.bags-cart-drawer .widget_shopping_cart_content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

/* mini-cart list */
.bags-cart-drawer .woocommerce-mini-cart {
  list-style: none;
  margin: 0;
  padding: 1.125rem 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.bags-cart-item {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  position: relative;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}
.bags-cart-item:last-child { border-bottom: 0; padding-bottom: 0; }
.bags-cart-item-media {
  flex: 0 0 4.5rem;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #f7f6f3;
}
.bags-cart-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bags-cart-item-body { flex: 1; min-width: 0; padding-right: 1.75rem; }
.bags-cart-item-name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.35;
  color: #181f30;
  text-decoration: none;
}
.bags-cart-item-name:hover { color: #f05c4e; }
.bags-cart-item-meta { font-size: 0.78rem; color: #61605c; margin-top: 0.2rem; }
.bags-cart-item-meta dl,
.bags-cart-item-meta dt,
.bags-cart-item-meta dd { display: inline; margin: 0; padding: 0; font-weight: 400; }
.bags-cart-item-qty { display: block; font-size: 0.85rem; color: #61605c; margin-top: 0.35rem; }
.bags-cart-item-qty .woocommerce-Price-amount { color: #181f30; font-weight: 600; }
.bags-cart-item .remove_from_cart_button {
  position: absolute;
  top: 0;
  right: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f7f6f3;
  color: #61605c !important;
  font-size: 0.8rem;
  line-height: 1;
  text-decoration: none;
}
.bags-cart-item .remove_from_cart_button:hover { background: #c83131; color: #fff !important; }

.bags-cart-empty {
  text-align: center;
  color: #61605c;
  padding: 2.5rem 1rem;
  margin: auto;
}
.bags-cart-empty i { font-size: 2.25rem; color: #e5e7eb; display: block; margin-bottom: 0.75rem; }

/* footer pinned to bottom of drawer */
.bags-cart-foot {
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid #e5e7eb;
  padding: 1.25rem 1.375rem calc(1.25rem + env(safe-area-inset-bottom));
  background: #f7f6f3;
}
.bags-cart-drawer .woocommerce-mini-cart__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
  color: #181f30;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}
.bags-cart-drawer .bags-cart-subtotal-label { font-weight: 600; }
.bags-cart-drawer .bags-cart-subtotal-value,
.bags-cart-drawer .bags-cart-subtotal-value .woocommerce-Price-amount {
  font-weight: 700;
}
.bags-cart-drawer .woocommerce-mini-cart__buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
}
.bags-cart-drawer .woocommerce-mini-cart__buttons .button,
.woocommerce .bags-cart-drawer .woocommerce-mini-cart__buttons a.button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  float: none !important;
  margin: 0 !important;
  box-sizing: border-box;
  text-align: center;
  background: #fff;
  color: #181f30;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transform: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.bags-cart-drawer .woocommerce-mini-cart__buttons .button.checkout,
.woocommerce .bags-cart-drawer .woocommerce-mini-cart__buttons a.button.checkout {
  background: #1e2738;
  border-color: #1e2738;
  color: #fff;
}
.bags-cart-drawer .woocommerce-mini-cart__buttons .button:hover {
  border-color: #1e2738;
  transform: none;
}
.bags-cart-drawer .woocommerce-mini-cart__buttons .button.checkout:hover {
  background: #181f30;
  color: #fff;
}

body.bags-cart-open { overflow: hidden; }
