/* ===== Account button ===== */
.hc-account-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 50px;
  border: 1px solid #eee;
  color: #333;
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
  background: #fff;
}
.hc-account-btn:hover {
  background: #f7f3ed;
  border-color: #c9a87c;
  color: #1a1a1a;
}
.hc-account-label { white-space: nowrap; }
@media (max-width: 900px) {
  .hc-account-label { display: none; }
  .hc-account-btn { padding: 8px; border-radius: 50%; width: 42px; height: 42px; justify-content: center; }
}

.cart-count.is-hidden { display: none !important; }
.cart-btn {
  cursor: pointer;
  background: none;
  border: 1px solid #eee;
  font: inherit;
}

/* ===== Mini Cart Sidebar ===== */
.hc-mini-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.hc-mini-overlay.open {
  opacity: 1;
  visibility: visible;
}
body.mini-cart-open { overflow: hidden; }

.hc-mini-cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  background: #fff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,.12);
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .35s cubic-bezier(.4,0,.2,1), visibility .35s;
  will-change: transform;
}
.hc-mini-cart.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.hc-mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.hc-mini-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: #1a1a1a;
}
.hc-mini-header h3 svg { color: #c9a87c; }
.hc-mini-close {
  width: 36px;
  height: 36px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: background .2s;
}
.hc-mini-close:hover { background: #eee; }

.hc-mini-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.hc-mini-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.hc-mini-empty svg { margin-bottom: 16px; opacity: .4; }
.hc-mini-empty p { margin-bottom: 16px; font-size: 14px; }
.hc-mini-shop-btn {
  display: inline-block;
  padding: 10px 24px;
  background: #c9a87c;
  color: #1a1a1a;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

.hc-mini-items {
  list-style: none;
  padding: 0;
  margin: 0;
}
.hc-mini-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid #f5f5f5;
  transition: opacity .2s;
}
.hc-mini-img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f8f8f8;
}
.hc-mini-img img,
.hc-mini-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hc-mini-info { flex: 1; min-width: 0; }
.hc-mini-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hc-mini-name:hover { color: #c9a87c; }
.hc-mini-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #777;
}
.hc-mini-price { font-weight: 700; color: #1a1a1a; }
.hc-mini-remove {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  transition: color .2s;
}
.hc-mini-remove:hover { color: #e53935; }

.hc-mini-footer {
  padding: 16px 20px 24px;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
  background: #fafafa;
}
.hc-mini-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 14px;
  color: #555;
}
.hc-mini-subtotal strong {
  font-size: 18px;
  color: #1a1a1a;
}
.hc-mini-view-cart,
.hc-mini-checkout {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  transition: all .2s;
}
.hc-mini-view-cart {
  background: #fff;
  border: 1.5px solid #e0e0e0;
  color: #333;
}
.hc-mini-view-cart:hover { border-color: #c9a87c; color: #c9a87c; }
.hc-mini-checkout {
  background: linear-gradient(135deg, #c9a87c, #b8976a);
  color: #1a1a1a;
  border: none;
}
.hc-mini-checkout:hover {
  box-shadow: 0 4px 14px rgba(201,168,124,.4);
}

/* ===== Toast ===== */
.hc-toast {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  max-width: 360px;
  transform: translateY(120%);
  opacity: 0;
  transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .35s;
  border-right: 4px solid #2e7d32;
}
.hc-toast.show {
  transform: translateY(0);
  opacity: 1;
}
.hc-toast-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f5f5f5;
}
.hc-toast-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hc-toast-text {
  flex: 1;
  min-width: 0;
}
.hc-toast-text strong {
  display: block;
  font-size: 13px;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.hc-toast-text span {
  font-size: 12px;
  color: #2e7d32;
  font-weight: 600;
}
.hc-toast-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #ccc;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.hc-toast-close:hover { color: #666; }

@media (max-width: 480px) {
  .hc-mini-cart { width: 100% !important; max-width: 100vw !important; right: 0 !important; transform: translateX(105%) !important; }
  .hc-mini-cart.open { transform: translateX(0) !important; }
  .hc-toast {
    left: 12px;
    right: 12px;
    max-width: none;
    bottom: 16px;
  }
}

/* Loading state on add button */
.hc-add-cart.loading,
.single_add_to_cart_button.loading {
  opacity: .6;
  pointer-events: none;
  position: relative;
}

/* ===== My Account ===== */
.hc-account-page {
  padding: 40px 0 60px;
  background: #f7f5f2;
  min-height: 60vh;
}
.hc-account-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}
.hc-account-nav {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,.05);
  overflow: hidden;
  position: sticky;
  top: 90px;
}
.hc-account-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: linear-gradient(135deg, #1a1a1a, #2a2520);
  color: #fff;
}
.hc-account-avatar {
  border-radius: 50%;
  width: 52px;
  height: 52px;
}
.hc-account-user-info strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}
.hc-account-user-info span {
  font-size: 11px;
  opacity: .7;
}
.hc-account-nav ul {
  list-style: none;
  padding: 8px 0;
  margin: 0;
}
.hc-account-nav ul li a {
  display: block;
  padding: 12px 20px;
  font-size: 13px;
  color: #555;
  transition: all .15s;
  border-right: 3px solid transparent;
}
.hc-account-nav ul li a:hover {
  background: #faf8f5;
  color: #1a1a1a;
}
.hc-account-nav ul li.is-active a {
  background: #f7f3ed;
  color: #c9a87c;
  border-right-color: #c9a87c;
  font-weight: 600;
}
.hc-account-content {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 16px rgba(0,0,0,.05);
  min-height: 400px;
}
.hc-account-content h2,
.hc-account-content h3 {
  font-size: 18px;
  margin-bottom: 16px;
}

/* Auth pages */
.hc-auth-page {
  padding: 50px 0 70px;
  background: #f7f5f2;
  min-height: 70vh;
}
.hc-auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}
.hc-auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.hc-auth-header {
  text-align: center;
  margin-bottom: 28px;
}
.hc-auth-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}
.hc-auth-header p {
  font-size: 13px;
  color: #888;
}
.hc-auth-card .form-row {
  margin-bottom: 16px;
}
.hc-auth-card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #444;
}
.hc-auth-card .input-text {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e5e5e5;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color .2s;
}
.hc-auth-card .input-text:focus {
  outline: none;
  border-color: #c9a87c;
}
.hc-auth-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.hc-auth-actions a { color: #c9a87c; }
.hc-auth-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #c9a87c, #b8976a);
  color: #1a1a1a;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .25s;
}
.hc-auth-btn:hover {
  box-shadow: 0 4px 16px rgba(201,168,124,.4);
}
.hc-auth-hint {
  font-size: 12px;
  color: #888;
  background: #faf8f5;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .hc-account-layout {
    grid-template-columns: 1fr;
  }
  .hc-account-nav {
    position: static;
  }
  .hc-account-nav ul {
    display: flex;
    overflow-x: auto;
    padding: 0;
  }
  .hc-account-nav ul li a {
    white-space: nowrap;
    border-right: none;
    border-bottom: 3px solid transparent;
  }
  .hc-account-nav ul li.is-active a {
    border-right: none;
    border-bottom-color: #c9a87c;
  }
  .hc-auth-grid {
    grid-template-columns: 1fr;
  }
}

.hc-mini-qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}
.hc-qty-minus,
.hc-qty-plus {
  width: 28px;
  height: 28px;
  border: none;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  line-height: 1;
}
.hc-qty-minus:hover,
.hc-qty-plus:hover {
  background: #c9a87c;
  color: #1a1a1a;
}
.hc-qty-input {
  width: 36px;
  height: 28px;
  border: none;
  text-align: center;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
}

/* Account forms polish */
.hc-account-content .woocommerce-EditAccountForm .form-row,
.hc-account-content .woocommerce-address-fields .form-row {
  margin-bottom: 16px;
}
.hc-account-content input.input-text,
.hc-account-content select,
.hc-account-content textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e5e5e5;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  transition: border-color .2s;
}
.hc-account-content input.input-text:focus,
.hc-account-content select:focus,
.hc-account-content textarea:focus {
  outline: none;
  border-color: #c9a87c;
}
.hc-account-content label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #444;
}
.hc-account-content button.button,
.hc-account-content .button {
  background: linear-gradient(135deg, #c9a87c, #b8976a) !important;
  color: #1a1a1a !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 12px 28px !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  cursor: pointer;
}
.hc-account-content table.shop_table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.hc-account-content table.shop_table th,
.hc-account-content table.shop_table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f0f0f0;
  text-align: right;
}
.hc-account-content .woocommerce-MyAccount-content fieldset {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
}
.hc-account-content legend {
  font-weight: 700;
  padding: 0 8px;
}
@media (max-width: 768px) {
  .hc-account-content {
    padding: 18px;
  }
  .hc-account-user {
    flex-direction: column;
    text-align: center;
  }
}

.hc-dash-welcome { margin-bottom: 28px; }
.hc-dash-welcome h2 { font-size: 22px; margin-bottom: 8px; }
.hc-dash-welcome p { color: #777; font-size: 14px; }
.hc-dash-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.hc-dash-card {
  background: #faf8f5;
  border-radius: 14px;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  transition: all .2s;
  border: 1px solid transparent;
}
.hc-dash-card:hover {
  border-color: #c9a87c;
  box-shadow: 0 4px 16px rgba(201,168,124,.2);
  transform: translateY(-2px);
}
.hc-dash-icon { font-size: 28px; display: block; margin-bottom: 10px; }
.hc-dash-card strong { display: block; font-size: 15px; margin-bottom: 4px; }
.hc-dash-card span:last-child { font-size: 12px; color: #888; }

.hc-section-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.hc-order-card, .hc-download-card, .hc-address-card {
  background: #fafafa;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 12px;
  border: 1px solid #f0f0f0;
}
.hc-order-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.hc-order-num { font-weight: 700; display: block; }
.hc-order-date { font-size: 12px; color: #999; }
.hc-order-status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: #eee;
}
.hc-order-status.status-completed { background: #e8f5e9; color: #2e7d32; }
.hc-order-status.status-processing { background: #e3f2fd; color: #1565c0; }
.hc-order-status.status-on-hold { background: #fff3e0; color: #ef6c00; }
.hc-order-status.status-cancelled { background: #ffebee; color: #c62828; }
.hc-order-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
}
.hc-order-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hc-order-btn {
  display: inline-block;
  padding: 8px 16px;
  background: #f7f3ed;
  color: #8b7355;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
}
.hc-order-btn:hover { background: #c9a87c; color: #1a1a1a; }
.hc-empty-state { text-align: center; padding: 40px 20px; color: #888; }
.hc-empty-state .btn { margin-top: 16px; display: inline-block; }

.hc-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.hc-field-hint { font-size: 11px; color: #aaa; display: block; margin-top: 4px; }
.hc-password-fieldset {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
}
.hc-password-fieldset legend { font-weight: 700; padding: 0 8px; }

.hc-address-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.hc-address-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.hc-address-card h3 { font-size: 15px; margin: 0; }
.hc-address-card address {
  font-style: normal;
  font-size: 13px;
  line-height: 1.8;
  color: #555;
}

.hc-sticky-menu {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}
.hc-sticky-menu .hc-mobile-nav-item,
.hc-mobile-nav-inner > .hc-mobile-nav-item {
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

@media (max-width: 768px) {
  .hc-dash-cards { grid-template-columns: 1fr; }
  .hc-form-row-2 { grid-template-columns: 1fr; }
  .hc-address-grid { grid-template-columns: 1fr; }
}
@media (min-width: 769px) {
  .hc-mobile-nav { display: none !important; }
}

/* Account panel – wider sidebar & better layout */
.hc-account-page {
  padding: 36px 0 60px;
}
.hc-account-layout {
  display: grid !important;
  grid-template-columns: 280px 1fr !important;
  gap: 28px !important;
  align-items: start;
}
.hc-account-nav {
  width: 100% !important;
  min-width: 260px;
  background: #fff;
  border-radius: 16px;
  padding: 20px 16px;
  border: 1px solid #f0ebe3;
  box-shadow: 0 4px 20px rgba(0,0,0,.05);
  position: sticky;
  top: 100px;
}
.hc-account-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 10px 18px;
  border-bottom: 1px solid #f0ebe3;
  margin-bottom: 12px;
}
.hc-account-avatar {
  width: 56px !important;
  height: 56px !important;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.hc-account-user-info strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}
.hc-account-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hc-account-nav ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px !important;
  border-radius: 10px;
  font-size: 14px !important;
  color: #444;
  text-decoration: none;
  transition: background .2s, color .2s;
  margin-bottom: 4px;
}
.hc-account-nav ul li a:hover {
  background: #faf8f5;
  color: #1a1a1a;
}
.hc-account-nav ul li.is-active a,
.hc-account-nav ul li.is-active a:hover {
  background: linear-gradient(135deg, #c9a87c, #b8976a) !important;
  color: #1a1a1a !important;
  font-weight: 700;
}
.hc-account-content {
  background: #fff;
  border-radius: 16px;
  padding: 28px 32px;
  border: 1px solid #f0ebe3;
  box-shadow: 0 4px 20px rgba(0,0,0,.04);
  min-height: 320px;
}
/* WC default navigation width override */
.woocommerce-account .woocommerce-MyAccount-navigation {
  width: 280px !important;
  float: none !important;
}
.woocommerce-account .woocommerce-MyAccount-content {
  width: auto !important;
  float: none !important;
}
.woocommerce-account .woocommerce {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 900px) {
  .hc-account-layout,
  .woocommerce-account .woocommerce {
    grid-template-columns: 1fr !important;
  }
  .hc-account-nav {
    position: static;
    min-width: 0;
  }
}

/* Account mobile redesign */
@media (max-width: 768px) {
  .hc-account-page { padding: 16px 0 80px; }
  .hc-account-layout,
  .woocommerce-account .woocommerce {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }
  .hc-account-nav {
    position: static !important;
    padding: 14px !important;
    border-radius: 14px;
  }
  .hc-account-nav ul {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .hc-account-nav ul::-webkit-scrollbar { display: none; }
  .hc-account-nav ul li {
    flex: 0 0 auto;
  }
  .hc-account-nav ul li a {
    white-space: nowrap;
    padding: 10px 14px !important;
    font-size: 12px !important;
    margin: 0 !important;
  }
  .hc-account-user {
    margin-bottom: 10px;
  }
  .hc-account-content {
    padding: 18px 16px !important;
    border-radius: 14px;
  }
}

/* Account page – centered & wider */
body.woocommerce-account .site-main,
body.woocommerce-account main {
  width: 100%;
}
body.woocommerce-account .hc-account-page {
  width: 100%;
  padding: 40px 0 70px;
  background: #f7f5f2;
}
body.woocommerce-account .hc-account-page > .container {
  max-width: 1400px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box;
}
body.woocommerce-account .hc-account-layout {
  display: grid !important;
  grid-template-columns: 280px 1fr !important;
  gap: 28px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  align-items: start;
  float: none !important;
}
/* Kill WC default floats that break centering */
body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content,
body.woocommerce-account .hc-account-nav,
body.woocommerce-account .hc-account-content {
  float: none !important;
  width: auto !important;
  max-width: none !important;
}
body.woocommerce-account .hc-account-nav {
  width: 100% !important;
  min-width: 0 !important;
}
body.woocommerce-account .hc-account-content {
  width: 100% !important;
  min-width: 0 !important;
}

/* If WC wraps without our layout class */
body.woocommerce-account .entry-content > .woocommerce,
body.woocommerce-account .woocommerce {
  display: grid !important;
  grid-template-columns: 280px 1fr !important;
  gap: 28px !important;
  max-width: 1400px !important;
  width: 100% !important;
  margin: 40px auto !important;
  padding: 0 24px !important;
  float: none !important;
  clear: both !important;
  box-sizing: border-box;
}

@media (min-width: 1600px) {
  body.woocommerce-account .hc-account-page > .container,
  body.woocommerce-account .entry-content > .woocommerce,
  body.woocommerce-account .woocommerce {
    max-width: 1560px !important;
  }
}

@media (max-width: 900px) {
  body.woocommerce-account .hc-account-layout,
  body.woocommerce-account .entry-content > .woocommerce,
  body.woocommerce-account .woocommerce {
    grid-template-columns: 1fr !important;
    padding: 0 14px !important;
  }
  body.woocommerce-account .hc-account-page > .container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

/* Mini-cart mobile: same size as filter sidebar drawer */
@media (max-width: 768px) {
  .hc-mini-cart {
    width: 300px !important;
    max-width: 88vw !important;
    right: 0 !important;
    transform: translateX(110%) !important;
  }
  .hc-mini-cart.open {
    right: 0 !important;
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  .hc-mini-header {
    padding: 14px 16px !important;
  }
  .hc-mini-header h3 {
    font-size: 14px !important;
  }
  .hc-mini-body {
    padding: 12px !important;
  }
  .hc-mini-item {
    gap: 10px !important;
  }
  .hc-mini-footer {
    padding: 12px 16px 20px !important;
  }
}

/* Toast works for warning messages too */
.hc-toast.show {
  z-index: 10050;
}

/* Account page: center the box */
body.woocommerce-account .hc-account-page,
body.woocommerce-account main.hc-account-page,
.hc-account-page {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
}
body.woocommerce-account .hc-account-page > .container,
.hc-account-page > .container {
  width: 100% !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
}
body.woocommerce-account .hc-account-layout,
.hc-account-layout {
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  justify-content: center !important;
}

/* ============================================================
   My Account layout fix – nav flush right, content fills rest
   ============================================================ */
body.woocommerce-account .hc-account-page,
.hc-account-page {
  padding: 36px 0 60px !important;
  background: #f5f3f0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
body.woocommerce-account .hc-account-page .container,
.hc-account-page .container {
  width: 100% !important;
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  box-sizing: border-box !important;
}

/* Kill WC default floats / widths that leave empty column */
body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content,
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
  float: none !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
}

.hc-account-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 280px !important;
  grid-template-areas: "content nav" !important;
  gap: 24px !important;
  align-items: start !important;
  width: 100% !important;
  max-width: 100% !important;
  direction: rtl !important; /* content right of nav in visual? wait */
}

/*
  DOM order: nav then content.
  We want visual: [content ........] [nav]
  With direction:rtl and columns 1fr 280px:
    first column (nav) goes to the RIGHT = 280px ✓
    second (content) goes to the LEFT = 1fr ✓
  But empty space was on the far right of nav – meaning layout wasn't full width
  or columns were 280px 1fr with LTR.

  Force areas so it's unambiguous:
*/
.hc-account-layout {
  direction: ltr !important; /* areas control placement */
  grid-template-columns: minmax(0, 1fr) 280px !important;
  grid-template-areas: "content nav" !important;
}
.hc-account-nav,
.hc-account-layout > .woocommerce-MyAccount-navigation,
.hc-account-layout > nav.hc-account-nav {
  grid-area: nav !important;
  width: 100% !important;
  max-width: 280px !important;
  justify-self: stretch !important;
  position: sticky !important;
  top: 100px !important;
  direction: rtl !important;
}
.hc-account-content,
.hc-account-layout > .woocommerce-MyAccount-content {
  grid-area: content !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  direction: rtl !important;
}

/* Ensure page wrappers don't constrain */
body.woocommerce-account .site-content,
body.woocommerce-account #content,
body.woocommerce-account .content-area,
body.woocommerce-account .entry-content,
body.woocommerce-account .woocommerce {
  max-width: none !important;
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.woocommerce-account .woocommerce {
  padding: 0 !important;
}

@media (max-width: 900px) {
  .hc-account-layout {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "nav"
      "content" !important;
    direction: rtl !important;
  }
  .hc-account-nav,
  .hc-account-layout > nav.hc-account-nav {
    max-width: none !important;
    position: relative !important;
    top: auto !important;
  }
}

/* ============================================================
   ACCOUNT LAYOUT FINAL – full width, content left, nav right
   ============================================================ */
body.woocommerce-account main.page-content,
body.woocommerce-account .page-content {
  background: #f5f3f0 !important;
  padding: 36px 0 60px !important;
}
body.woocommerce-account .page-content > .container {
  max-width: 1280px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  box-sizing: border-box !important;
}
body.woocommerce-account .page-body,
body.woocommerce-account .page-body > .woocommerce,
body.woocommerce-account .woocommerce {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  display: block !important;
}

/* Main grid: content (flex grow) | sidebar 280px on the RIGHT */
body.woocommerce-account .hc-account-layout {
  display: flex !important;
  flex-direction: row-reverse !important; /* nav visual right, content left */
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  gap: 24px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body.woocommerce-account .hc-account-layout > .hc-account-nav,
body.woocommerce-account .hc-account-layout > nav.woocommerce-MyAccount-navigation,
body.woocommerce-account .hc-account-layout > .woocommerce-MyAccount-navigation {
  flex: 0 0 280px !important;
  width: 280px !important;
  max-width: 280px !important;
  min-width: 260px !important;
  order: 0 !important;
  float: none !important;
  margin: 0 !important;
  position: sticky !important;
  top: 100px !important;
  background: #fff !important;
  border-radius: 16px !important;
  border: 1px solid #f0ebe3 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.05) !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

body.woocommerce-account .hc-account-layout > .hc-account-content,
body.woocommerce-account .hc-account-layout > .woocommerce-MyAccount-content {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  order: 0 !important;
  float: none !important;
  margin: 0 !important;
  background: #fff !important;
  border-radius: 16px !important;
  border: 1px solid #f0ebe3 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.04) !important;
  padding: 28px 32px !important;
  box-sizing: border-box !important;
}

/* Kill old grid rules that conflict */
body.woocommerce-account .hc-account-page {
  display: contents !important;
}
body.woocommerce-account .hc-account-page > .container {
  display: contents !important;
}

@media (max-width: 900px) {
  body.woocommerce-account .hc-account-layout {
    flex-direction: column !important;
  }
  body.woocommerce-account .hc-account-layout > .hc-account-nav,
  body.woocommerce-account .hc-account-layout > nav.woocommerce-MyAccount-navigation {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    top: auto !important;
  }
}

/* ============================================================
   Account mobile: orders, details, wishlist list
   ============================================================ */
@media (max-width: 768px) {
  body.woocommerce-account .page-content > .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  body.woocommerce-account .hc-account-layout > .hc-account-content,
  body.woocommerce-account .hc-account-content,
  body.woocommerce-account .woocommerce-MyAccount-content {
    padding: 14px 12px !important;
    border-radius: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  /* Orders table – no side overflow, readable */
  body.woocommerce-account table.shop_table,
  body.woocommerce-account .woocommerce-orders-table,
  body.woocommerce-account .woocommerce-MyAccount-orders {
    width: 100% !important;
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border: none !important;
    margin: 0 !important;
  }
  body.woocommerce-account table.shop_table thead {
    display: none !important;
  }
  body.woocommerce-account table.shop_table tbody {
    display: block !important;
    width: 100% !important;
  }
  body.woocommerce-account table.shop_table tr {
    display: block !important;
    width: 100% !important;
    background: #faf8f5 !important;
    border: 1px solid #f0ebe3 !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    padding: 12px !important;
    box-sizing: border-box !important;
  }
  body.woocommerce-account table.shop_table td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    border: none !important;
    border-bottom: 1px solid #f0ebe3 !important;
    padding: 8px 0 !important;
    text-align: right !important;
    font-size: 13px !important;
  }
  body.woocommerce-account table.shop_table td:last-child {
    border-bottom: none !important;
  }
  body.woocommerce-account table.shop_table td::before {
    content: attr(data-title);
    font-weight: 700;
    color: #666;
    flex-shrink: 0;
  }
  body.woocommerce-account table.shop_table td.woocommerce-orders-table__cell-order-actions,
  body.woocommerce-account table.shop_table td.order-actions {
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 8px !important;
  }
  body.woocommerce-account table.shop_table .button {
    margin: 0 !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  /* Account details form – full width, no side gap */
  body.woocommerce-account .woocommerce-EditAccountForm,
  body.woocommerce-account form.edit-account,
  body.woocommerce-account .hc-account-form {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  body.woocommerce-account .woocommerce-EditAccountForm .form-row,
  body.woocommerce-account .hc-account-form .form-row,
  body.woocommerce-account .woocommerce-address-fields .form-row {
    width: 100% !important;
    float: none !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
  }
  body.woocommerce-account .woocommerce-EditAccountForm .form-row-first,
  body.woocommerce-account .woocommerce-EditAccountForm .form-row-last,
  body.woocommerce-account .woocommerce-EditAccountForm .form-row-wide {
    width: 100% !important;
    float: none !important;
  }
  body.woocommerce-account .woocommerce-EditAccountForm input.input-text,
  body.woocommerce-account .woocommerce-EditAccountForm select,
  body.woocommerce-account .woocommerce-EditAccountForm textarea,
  body.woocommerce-account .hc-account-form input.input-text,
  body.woocommerce-account .hc-account-form select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  body.woocommerce-account fieldset {
    margin: 16px 0 0 !important;
    padding: 12px !important;
  }

  /* Wishlist – list layout on mobile */
  .hc-wishlist-page {
    width: 100% !important;
  }
  .hc-wishlist-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  .hc-wish-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px !important;
    border-radius: 12px !important;
    overflow: visible !important;
    background: #fff !important;
    border: 1px solid #f0ebe3 !important;
  }
  .hc-wish-thumb {
    flex: 0 0 72px !important;
    width: 72px !important;
    height: 72px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    display: block !important;
  }
  .hc-wish-thumb img {
    width: 72px !important;
    height: 72px !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    display: block !important;
  }
  .hc-wish-info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }
  .hc-wish-info h3 {
    font-size: 13px !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .hc-wish-info .price {
    font-size: 12px !important;
    color: #ef394e !important;
    font-weight: 700 !important;
  }
  .hc-wish-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
  }
  .hc-wish-actions .button {
    flex: none !important;
    padding: 8px 12px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    border-radius: 10px !important;
    min-width: 64px !important;
    text-align: center !important;
  }
}

@media (max-width: 768px) {
  /* Orders cards full width */
  .hc-orders-wrap,
  .hc-orders-list,
  .hc-form-wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  .hc-order-card,
  .hc-download-card,
  .hc-address-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 10px !important;
    padding: 14px 12px !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
  }
  .hc-order-top {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .hc-order-actions {
    gap: 6px !important;
  }
  .hc-order-btn {
    flex: 1 1 auto !important;
    text-align: center !important;
    padding: 10px 12px !important;
  }
  .hc-section-title {
    font-size: 16px !important;
    margin-bottom: 14px !important;
  }
  .hc-form-row-2 {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
  .hc-password-fieldset {
    padding: 12px !important;
    margin: 14px 0 !important;
  }
  .hc-address-grid {
    grid-template-columns: 1fr !important;
  }
  .hc-dash-cards {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .hc-dash-card {
    padding: 14px 12px !important;
  }
}

/* ============================================================
   Mobile: no horizontal scroll on address form + sticky nav fixed
   ============================================================ */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  body.woocommerce-account,
  body.woocommerce-account #page,
  body.woocommerce-account .site,
  body.woocommerce-account main,
  body.woocommerce-account .page-content,
  body.woocommerce-account .page-content > .container,
  body.woocommerce-account .page-body,
  body.woocommerce-account .woocommerce,
  body.woocommerce-account .hc-account-layout,
  body.woocommerce-account .hc-account-content,
  body.woocommerce-account .hc-form-wrap,
  body.woocommerce-account .woocommerce-address-fields,
  body.woocommerce-account .woocommerce-address-fields__field-wrapper {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* WooCommerce form fields – kill float layouts that cause overflow */
  body.woocommerce-account .woocommerce-address-fields__field-wrapper,
  body.woocommerce-account .woocommerce-address-fields .form-row,
  body.woocommerce-account .woocommerce-EditAccountForm .form-row,
  body.woocommerce-account form .form-row {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    clear: both !important;
    box-sizing: border-box !important;
  }
  body.woocommerce-account .form-row-first,
  body.woocommerce-account .form-row-last,
  body.woocommerce-account .form-row-wide {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  body.woocommerce-account input.input-text,
  body.woocommerce-account input[type="text"],
  body.woocommerce-account input[type="tel"],
  body.woocommerce-account input[type="email"],
  body.woocommerce-account input[type="password"],
  body.woocommerce-account input[type="number"],
  body.woocommerce-account select,
  body.woocommerce-account textarea,
  body.woocommerce-account .select2-container,
  body.woocommerce-account .select2-container .select2-selection--single {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  body.woocommerce-account .select2-container {
    display: block !important;
  }
  body.woocommerce-account label {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Bottom sticky menu – lock to viewport, never shift */
  .hc-mobile-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
  }
  .hc-mobile-nav-inner {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  body {
    padding-bottom: 72px !important;
  }
}

/* Prevent mini-cart from causing page horizontal scroll */
html, body {
  overflow-x: clip;
  max-width: 100%;
}
@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}
.hc-mini-cart:not(.open) {
  transform: translateX(105%) !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.hc-mini-cart.open {
  transform: translateX(0) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative !important;
  }
  .hc-mini-cart:not(.open) {
    transform: translateX(110%) !important;
  }
  /* account page extra lock */
  body.woocommerce-account {
    overflow-x: hidden !important;
  }
}


/* Mini-cart above header + sticky mobile nav */
.hc-mini-overlay,
#miniCartOverlay {
  z-index: 100100 !important;
}
.hc-mini-cart,
#miniCart {
  z-index: 100110 !important;
}
@media (max-width: 768px) {
  body.mini-cart-open .header,
  body.mini-cart-open #hcSiteHeader,
  body.mini-cart-open .hc-mobile-nav,
  body.mini-cart-open #hcMobileNav {
    z-index: 10000 !important;
  }
  body.mini-cart-open {
    overflow: hidden !important;
  }
}
