/* ==========================================================================
   HERBANUSA LIQUID STOREFRONT v2 - PRODUCTION & COMMERCE STYLES
   ========================================================================== */

:root {
  --container: 1280px;
  --section-pad-y: clamp(48px, 5vw, 72px);
  color-scheme: light;
}

.container {
  max-width: var(--container, 1280px) !important;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

body {
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  color: var(--color-text-primary, #223127);
  background-color: var(--color-background, #ffffff);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading, 'Fraunces', Georgia, serif);
  color: var(--heading-color, #244d3d);
}

/* --- Button Styling Variables Integration --- */
.btn-primary, .btn:not(.btn-outline):not(.btn-secondary):not(.btn-accent):not(.btn-whatsapp):not(.action-btn):not(.btn-cart-add) {
  background-color: var(--btn-primary-bg, #244d3d) !important;
  color: var(--btn-primary-text, #ffffff) !important;
  border-color: var(--btn-primary-bg, #244d3d) !important;
}
.btn-primary:hover, .btn:not(.btn-outline):not(.btn-secondary):not(.btn-accent):not(.btn-whatsapp):not(.action-btn):not(.btn-cart-add):hover {
  background-color: var(--btn-primary-hover-bg, #193c30) !important;
  color: var(--btn-primary-hover-text, #ffffff) !important;
  border-color: var(--btn-primary-hover-bg, #193c30) !important;
}

.btn-secondary, .btn-outline {
  background-color: var(--btn-secondary-bg, #ffffff) !important;
  color: var(--btn-secondary-text, #244d3d) !important;
  border: 1.5px solid var(--btn-secondary-text, #244d3d) !important;
}
.btn-secondary:hover, .btn-outline:hover {
  background-color: var(--btn-secondary-hover-bg, #eaf0e9) !important;
  color: var(--btn-secondary-hover-text, #193c30) !important;
}

.btn-accent {
  background-color: var(--btn-accent-bg, #c49a42) !important;
  color: var(--btn-accent-text, #223127) !important;
  border-color: var(--btn-accent-bg, #c49a42) !important;
}
.btn-accent:hover {
  background-color: var(--btn-accent-hover-bg, #b58f4f) !important;
  color: var(--btn-accent-hover-text, #223127) !important;
  border-color: var(--btn-accent-hover-bg, #b58f4f) !important;
}

/* --- Header & Navigation Links --- */
.site-header {
  transition: all 0.25s ease;
}
.site-header.scrolled {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.main-nav .nav-link {
  color: var(--menu-color, #244d3d);
}
.main-nav .nav-link:hover, .main-nav .nav-link.active {
  color: var(--menu-hover, #2e7d59);
}
a {
  color: var(--link-color, #244d3d);
}
a:hover {
  color: var(--link-hover, #2e7d59);
}

/* Logo Sizing */
.logo img, .site-header .logo img {
  max-width: var(--logo-width, 160px);
  height: auto;
  object-fit: contain;
}

/* Skip Link & Accessibility */
.skip-link {
  position: fixed;
  top: 8px;
  left: 16px;
  z-index: 2000;
  transform: translateY(-150%);
  padding: 10px 18px;
  background: #ffffff;
  color: var(--primary-900, #244d3d);
  border: 1px solid var(--neutral-300, #cbd4c9);
  border-radius: var(--radius-sm, 0.5rem);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.skip-link:focus {
  transform: translateY(0);
}
:focus-visible {
  outline: 2px solid var(--accent-gold, #c49a42);
  outline-offset: 3px;
}

/* --- Product Grid Aspect Ratio & Columns --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(var(--product-grid-columns, 4), minmax(0, 1fr));
  gap: 1.5rem;
}
.product-card .product-image-container {
  aspect-ratio: var(--product-image-aspect, 4 / 5);
  overflow: hidden;
  position: relative;
  background: var(--neutral-100, #f6f8f5);
  border-radius: var(--radius-md, 0.75rem);
}
.product-card .product-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-image-container img {
  transform: scale(1.04);
}

@media (max-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(var(--product-grid-columns-tablet, 2), minmax(0, 1fr));
  }
}
@media (max-width: 576px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

/* --- Cart Drawer --- */
.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(2px);
}
.cart-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 92vw);
  background: #ffffff;
  z-index: 999;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--neutral-200, #e0e6df);
}
.cart-drawer__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-900, #244d3d);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cart-drawer__count {
  font-size: 0.85rem;
  background: var(--primary-100, #e0eadd);
  color: var(--primary-900, #244d3d);
  padding: 2px 8px;
  border-radius: 99px;
}
.cart-drawer__close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--neutral-600, #526152);
  padding: 4px;
}

.cart-drawer__shipping {
  padding: 0.85rem 1.5rem;
  background: var(--neutral-100, #f6f8f5);
  border-bottom: 1px solid var(--neutral-200, #e0e6df);
}
.shipping-bar__message {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--neutral-800, #334335);
}
.shipping-bar__track {
  height: 6px;
  background: var(--neutral-200, #e0e6df);
  border-radius: 99px;
  overflow: hidden;
}
.shipping-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-600, #2e7d59), var(--accent-gold, #c49a42));
  border-radius: 99px;
  transition: width 0.4s ease;
}

.cart-drawer__items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.drawer-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--neutral-200, #e0e6df);
}
.drawer-item__media {
  width: 72px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm, 0.5rem);
  flex-shrink: 0;
  background: var(--neutral-100, #f6f8f5);
}
.drawer-item__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.drawer-item__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-900, #244d3d);
  text-decoration: none;
  line-height: 1.3;
}
.drawer-item__variant {
  font-size: 0.8rem;
  color: var(--neutral-600, #526152);
  margin-top: 2px;
  display: block;
}
.drawer-item__price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-900, #244d3d);
  margin-top: 4px;
  display: block;
}
.drawer-item__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}
.drawer-quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--neutral-300, #cbd4c9);
  border-radius: var(--radius-sm, 0.5rem);
  overflow: hidden;
}
.drawer-quantity button {
  background: none;
  border: none;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--neutral-700, #415242);
}
.drawer-quantity span {
  padding: 2px 8px;
  font-size: 0.85rem;
  font-weight: 600;
}
.drawer-remove {
  background: none;
  border: none;
  color: var(--error, #ef4444);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}

.cart-drawer__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  color: var(--neutral-600, #526152);
}
.cart-drawer__empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.cart-drawer__footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--neutral-200, #e0e6df);
  background: var(--neutral-50, #ffffff);
}
.drawer-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-900, #244d3d);
  margin-bottom: 0.5rem;
}
.drawer-tax-note {
  font-size: 0.8rem;
  color: var(--neutral-600, #526152);
  margin-bottom: 1rem;
}
.drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* --- Modern Product Gallery Zoom --- */
.product-gallery {
  position: relative;
}
.gallery-main-img {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg, 0.875rem);
  background: var(--neutral-100, #f6f8f5);
}
.gallery-main-img img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.product-zoom-button {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: #ffffff;
  border: 1px solid var(--neutral-200, #e0e6df);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  color: var(--primary-900, #244d3d);
  transition: transform 0.2s ease;
  z-index: 5;
}
.product-zoom-button:hover {
  transform: scale(1.08);
}
dialog.product-zoom-dialog {
  width: min(94vw, 1000px);
  height: min(90vh, 850px);
  padding: 48px 16px 16px;
  background: #ffffff;
  border: 1px solid var(--neutral-300, #cbd4c9);
  border-radius: var(--radius-lg, 0.875rem);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  margin: auto;
}
dialog.product-zoom-dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}
dialog.product-zoom-dialog img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
dialog.product-zoom-dialog.is-zoomed img {
  transform: scale(1.8);
  cursor: grab;
}
.zoom-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
}
.zoom-tools button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--neutral-100, #f6f8f5);
  border: 1px solid var(--neutral-300, #cbd4c9);
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
}

/* --- Article Detail Sidebar --- */
.article-with-sidebar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3rem;
  align-items: start;
}
.article-sidebar {
  background: #ffffff;
  border: 1px solid var(--neutral-200, #e0e6df);
  border-radius: var(--radius-lg, 0.875rem);
  padding: 1.75rem;
}
.article-sidebar-section {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--neutral-200, #e0e6df);
}
.article-sidebar-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}
.article-sidebar-section h3 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  color: var(--primary-900, #244d3d);
}
.article-sidebar-search form {
  display: flex;
  gap: 0.5rem;
}
.article-sidebar-search input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--neutral-300, #cbd4c9);
  border-radius: var(--radius-sm, 0.5rem);
  font-size: 0.9rem;
}
.article-sidebar-categories, .article-sidebar-recent {
  list-style: none;
  padding: 0;
  margin: 0;
}
.article-sidebar-categories li a, .article-sidebar-recent li a {
  display: block;
  padding: 0.5rem 0;
  color: var(--neutral-800, #334335);
  text-decoration: none;
  font-size: 0.92rem;
  border-bottom: 1px dashed var(--neutral-200, #e0e6df);
}
.article-sidebar-categories li a:hover, .article-sidebar-recent li a:hover {
  color: var(--primary-600, #2e7d59);
}
.article-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.article-tag-chip {
  background: var(--neutral-100, #f6f8f5);
  border: 1px solid var(--neutral-300, #cbd4c9);
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 0.8rem;
  color: var(--neutral-700, #415242);
  text-decoration: none;
}
.article-tag-chip:hover {
  background: var(--primary-100, #e0eadd);
  color: var(--primary-900, #244d3d);
}

@media (max-width: 900px) {
  .article-with-sidebar-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --- Compact Language Switcher --- */
.jualify-language-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.jualify-language-switcher select {
  background: transparent;
  border: 1px solid var(--neutral-300, #cbd4c9);
  border-radius: var(--radius-sm, 0.5rem);
  padding: 4px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-900, #244d3d);
  cursor: pointer;
}

/* --- Cart Note --- */
.cart-note-container {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--neutral-100, #f6f8f5);
  border-radius: var(--radius-md, 0.75rem);
  border: 1px solid var(--neutral-200, #e0e6df);
}
.cart-note-container label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-900, #244d3d);
}
.cart-note-container textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--neutral-300, #cbd4c9);
  border-radius: var(--radius-sm, 0.5rem);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

/* --- Professional Error Page --- */
.error-page-wrapper {
  padding: 5rem 1rem;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.error-icon-box {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-50, #eaf0e9);
  color: var(--primary-900, #244d3d);
  display: grid;
  place-items: center;
  font-size: 2.25rem;
  margin: 0 auto 1.5rem;
}
.error-actions-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Toast Notifications */
.jualify-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary-950, #193c30);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 99px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  pointer-events: none;
}
.jualify-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   FOOTER GLOBAL PAYMENT ICONS BAR
   ========================================================================== */
.footer-payments {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1.35rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-payments > span {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}
.payment-methods-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.payment-methods-grid li {
  display: inline-flex;
}
.payment-method-badge {
  width: 52px;
  height: 32px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  padding: 3px 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   CUSTOMER ACCOUNT PORTAL & BOTANICAL DASHBOARD UI
   ========================================================================== */
.customer-breadcrumbs-wrap {
  margin-top: 1.5rem;
}
.customer-dashboard-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 0.75rem;
  margin-bottom: 2rem;
  padding: 1.75rem 2rem;
  background: linear-gradient(135deg, var(--primary-50, #eaf0e9) 0%, #f6f8f5 100%);
  border: 1px solid var(--neutral-200, #e0e6df);
  border-radius: var(--radius-lg, 0.875rem);
}
.customer-eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-600, #2e7d59);
  margin-bottom: 0.35rem;
}
.customer-dashboard-header h1 {
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  color: var(--primary-900, #244d3d);
  margin: 0 0 0.35rem;
  font-weight: 600;
}
.customer-dashboard-header p {
  color: var(--neutral-600, #526152);
  font-size: 0.94rem;
  margin: 0;
  max-width: 60ch;
}
.address-mode-tabs,
.order-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}
.customer-portal-section {
  padding-top: 0 !important;
}
.account-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
.account-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: #ffffff;
  border: 1px solid var(--neutral-200, #e0e6df);
  border-radius: var(--radius-lg, 0.875rem);
  padding: 0.85rem;
  position: sticky;
  top: 104px;
}
.account-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm, 0.5rem);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--neutral-700, #415242);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.account-nav-item svg {
  flex-shrink: 0;
  color: var(--neutral-500, #647063);
  transition: color 0.2s ease;
}
.account-nav-item:hover {
  background: var(--primary-50, #eaf0e9);
  color: var(--primary-900, #244d3d);
}
.account-nav-item:hover svg {
  color: var(--primary-700, #225c42);
}
.account-nav-item.active,
.account-nav-item.is-active {
  background: var(--primary-900, #244d3d);
  color: #ffffff;
}
.account-nav-item.active svg,
.account-nav-item.is-active svg {
  color: var(--accent-gold, #c49a42);
}
.account-nav-item .account-badge {
  margin-left: auto;
  background: var(--accent-gold, #c49a42);
  color: var(--primary-950, #193c30);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.account-logout-link {
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--neutral-200, #e0e6df);
  color: #b91c1c;
}
.account-logout-link svg {
  color: #b91c1c;
}
.account-logout-link:hover {
  background: #fef2f2;
  color: #991b1b;
}

.account-content {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  min-width: 0;
}
.account-panel {
  background: #ffffff;
  border: 1px solid var(--neutral-200, #e0e6df);
  border-radius: var(--radius-lg, 0.875rem);
  padding: 1.75rem;
  box-shadow: 0 2px 10px rgba(25, 60, 48, 0.03);
}
.account-panel-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--neutral-200, #e0e6df);
}
.account-panel-heading h2 {
  font-size: 1.3rem;
  color: var(--primary-900, #244d3d);
  margin: 0;
}
.account-panel-heading .muted,
.account-panel .muted {
  color: var(--neutral-600, #526152);
  font-size: 0.88rem;
  margin: 0.25rem 0 0;
}
.account-book-bar {
  background: var(--neutral-100, #f6f8f5);
  border: 1px solid var(--neutral-200, #e0e6df);
  border-radius: var(--radius-md, 0.75rem);
  padding: 1.15rem 1.5rem;
  margin-bottom: 0;
}
.account-badge {
  display: inline-flex;
  align-items: center;
  background: var(--primary-50, #eaf0e9);
  color: var(--primary-900, #244d3d);
  border: 1px solid var(--primary-200, #c8d8c5);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
}
.account-badge.is-muted {
  background: var(--neutral-100, #f6f8f5);
  color: var(--neutral-600, #526152);
  border-color: var(--neutral-300, #cbd4c9);
}
.text-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary-800, #1b4d37);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.text-link:hover {
  color: var(--accent-gold-dark, #8e6d36);
}
.text-link.address-delete {
  color: #dc2626;
}
.text-right {
  text-align: right !important;
}

/* Status Alerts */
.form-status {
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-sm, 0.5rem);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.form-status.success,
.form-status.form-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.form-status.error,
.form-status.form-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.form-status ul {
  margin: 0;
  padding-left: 1.2rem;
  list-style: disc;
}

/* Stats Grid */
.account-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.account-stat-card {
  background: #ffffff;
  border: 1px solid var(--neutral-200, #e0e6df);
  border-radius: var(--radius-md, 0.75rem);
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.account-stat-card .stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--neutral-600, #526152);
}
.account-stat-card .stat-number {
  font-family: var(--font-heading, 'Fraunces', serif);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--primary-900, #244d3d);
  line-height: 1.15;
}
.account-stat-card .stat-value-sm {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-900, #244d3d);
}

/* Forms & Address Form Grid */
.form-grid,
.herbal-address-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}
.form-grid .wide,
.herbal-address-form .wide {
  grid-column: 1 / -1;
}
.form-grid .field,
.herbal-address-form > label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--neutral-800, #334335);
}
.form-grid input:not([type="checkbox"]):not([type="file"]),
.form-grid select,
.form-grid textarea,
.herbal-address-form input:not([type="checkbox"]),
.herbal-address-form select,
.herbal-address-form textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--neutral-300, #cbd4c9);
  border-radius: 8px;
  background: #ffffff;
  color: var(--neutral-900, #223127);
  font-size: 0.92rem;
  font-weight: 400;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-grid input[readonly] {
  background: var(--neutral-100, #f6f8f5);
  color: var(--neutral-600, #526152);
}
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.herbal-address-form input:focus,
.herbal-address-form select:focus,
.herbal-address-form textarea:focus {
  border-color: var(--primary-600, #2e7d59);
  box-shadow: 0 0 0 3px rgba(46, 125, 89, 0.14);
  outline: none;
}
.note-hint {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--neutral-600, #526152);
}
.address-default-choice {
  flex-direction: row !important;
  align-items: center;
  gap: 0.6rem !important;
  cursor: pointer;
  font-weight: 500 !important;
}
.address-default-choice input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-900, #244d3d);
}
.form-actions,
.account-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.35rem;
}
.address-location-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #92400e;
  font-size: 0.85rem;
}
.address-location-feedback p {
  margin: 0;
  color: inherit;
}

/* Address Cards & Address Block */
.herbal-address-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}
.herbal-address-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  background: #fbfcfa;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.herbal-address-card.is-default {
  border: 2px solid var(--primary-800, #1b4d37);
  background: linear-gradient(180deg, var(--primary-50, #eaf0e9) 0%, #ffffff 100%);
}
.address-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.address-card-heading h3 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--primary-900, #244d3d);
}
.address-recipient {
  margin: 0;
  font-size: 0.95rem;
  color: var(--neutral-900, #223127);
}
.address-lines,
.address-contact {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--neutral-700, #415242);
}
.address-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding-top: 0.85rem;
  margin-top: 0.35rem;
  border-top: 1px solid var(--neutral-200, #e0e6df);
}
.address-card-actions form {
  display: inline;
}
.address-block {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--neutral-700, #415242);
}
.address-block p {
  margin: 0 0 0.25rem;
}
.address-block__recipient strong {
  color: var(--neutral-900, #223127);
}
.address-block__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0.65rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--neutral-200, #e0e6df);
  font-size: 0.84rem;
}
.address-block__meta > div {
  display: flex;
  gap: 0.35rem;
}
.address-block__meta dt {
  font-weight: 600;
  color: var(--neutral-600, #526152);
}
.address-block__meta dd {
  margin: 0;
}

/* Loyalty Portal Styles */
.herbal-loyalty-summary {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem 2.25rem;
  border-radius: var(--radius-lg, 0.875rem);
  background: linear-gradient(135deg, var(--primary-950, #193c30) 0%, var(--primary-800, #1b4d37) 100%);
  color: #ffffff;
  border: 1px solid rgba(196, 154, 66, 0.35);
  box-shadow: 0 12px 30px -8px rgba(25, 60, 48, 0.2);
}
.herbal-loyalty-summary h2,
.herbal-loyalty-summary h3,
.herbal-loyalty-summary p {
  color: #ffffff;
  margin: 0;
}
.herbal-loyalty-summary .loyalty-tier {
  display: inline-flex;
  align-items: center;
  background: var(--accent-gold, #c49a42);
  color: var(--primary-950, #193c30);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.herbal-loyalty-summary .loyalty-balance {
  display: block;
  font-family: var(--font-heading, 'Fraunces', serif);
  font-size: clamp(2.25rem, 4vw, 3.1rem);
  font-weight: 600;
  line-height: 1.05;
  color: #f7f2e8;
}
.herbal-loyalty-summary h2 {
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.9;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}
.herbal-loyalty-summary p {
  font-size: 0.86rem;
  opacity: 0.85;
}
.loyalty-progress {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md, 0.75rem);
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.loyalty-progress h3 {
  font-size: 1rem;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  font-weight: 700;
}
.loyalty-progress progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  margin-top: 0.35rem;
}
.loyalty-progress progress::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}
.loyalty-progress progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--accent-gold, #c49a42), #f0d591);
  border-radius: 999px;
}
.loyalty-progress progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--accent-gold, #c49a42), #f0d591);
  border-radius: 999px;
}

.account-referral-code {
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
}
.account-referral-code code {
  background: var(--primary-50, #eaf0e9);
  color: var(--primary-900, #244d3d);
  border: 1px solid var(--primary-200, #c8d8c5);
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.account-copy-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--neutral-600, #526152);
  margin-bottom: 0.35rem;
}
.account-copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.account-copy-row input {
  flex: 1;
  min-width: 200px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--neutral-300, #cbd4c9);
  border-radius: 8px;
  background: var(--neutral-100, #f6f8f5);
  color: var(--neutral-900, #223127);
  font-size: 0.88rem;
  font-weight: 600;
}
.account-copy-status {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-700, #225c42);
  min-height: 1.2em;
}
.loyalty-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.account-section-header h2 {
  font-size: 1.35rem;
  color: var(--primary-900, #244d3d);
  margin: 0;
}
.herbal-reward-grid,
.loyalty-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.herbal-reward-card,
.herbal-voucher-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}
.herbal-voucher-card {
  border-style: dashed;
  border-color: var(--primary-300, #a3bda0);
  background: #fbfcfa;
}
.reward-cost {
  display: inline-block;
  background: var(--accent-gold-light, #f7f2e8);
  color: var(--accent-gold-dark, #8e6d36);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}
.herbal-reward-card h3,
.loyalty-tier-card h3 {
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
  color: var(--primary-900, #244d3d);
}
.herbal-reward-card p,
.loyalty-tier-card p {
  font-size: 0.88rem;
  color: var(--neutral-600, #526152);
  margin: 0;
}

/* Tables & Empty States */
.account-table-wrap {
  overflow-x: auto;
}
.account-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}
.account-table th {
  padding: 0.85rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--neutral-600, #526152);
  background: var(--neutral-100, #f6f8f5);
  border-bottom: 1px solid var(--neutral-200, #e0e6df);
}
.account-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--neutral-200, #e0e6df);
  color: var(--neutral-800, #334335);
  vertical-align: middle;
}
.account-table tbody tr:last-child td {
  border-bottom: none;
}
.account-table tfoot td {
  padding: 0.75rem 1rem;
  border-bottom: none;
}
.account-table .order-grand-total td {
  border-top: 2px solid var(--neutral-200, #e0e6df);
  font-size: 1.02rem;
  color: var(--primary-900, #244d3d);
}
.order-link {
  font-weight: 700;
  color: var(--primary-800, #1b4d37);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.order-total-cell {
  font-weight: 700;
  color: var(--primary-900, #244d3d);
}
.order-item-title {
  display: block;
  color: var(--primary-900, #244d3d);
}
.order-item-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--neutral-600, #526152);
  margin-top: 2px;
}
.order-download-form {
  margin-top: 0.5rem;
}
.order-note-box {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--neutral-100, #f6f8f5);
  border-radius: 8px;
  font-size: 0.88rem;
}
.order-note-box p {
  margin: 0.25rem 0 0;
}
.account-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--primary-50, #eaf0e9);
  color: var(--primary-900, #244d3d);
}
.account-status-pill.is-subtle {
  background: var(--neutral-100, #f6f8f5);
  color: var(--neutral-700, #415242);
}
.points-earned {
  font-weight: 700;
  color: #15803d !important;
}
.points-spent {
  font-weight: 700;
  color: #dc2626 !important;
}
.account-empty {
  text-align: center;
  padding: 2.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}
.account-empty-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-50, #eaf0e9);
  color: var(--primary-700, #225c42);
  display: grid;
  place-items: center;
  margin-bottom: 0.35rem;
}
.account-empty h2 {
  font-size: 1.3rem;
  margin: 0;
}
.account-empty p {
  color: var(--neutral-600, #526152);
  max-width: 44ch;
  margin: 0 0 0.5rem;
}

@media (max-width: 960px) {
  .account-layout {
    grid-template-columns: 1fr;
  }
  .account-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 0.5rem;
  }
  .account-nav-item {
    white-space: nowrap;
  }
  .account-logout-link {
    margin-top: 0;
    padding-top: 0.75rem;
    border-top: none;
  }
  .herbal-loyalty-summary {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .customer-dashboard-header {
    padding: 1.35rem;
  }
  .account-stats-grid,
  .form-grid,
  .herbal-address-form {
    grid-template-columns: 1fr;
  }
  .account-panel {
    padding: 1.25rem;
  }
}
@media print {
  .site-header,
  .site-footer,
  .announcement-bar,
  .account-nav,
  .order-header-actions,
  .customer-breadcrumbs-wrap {
    display: none !important;
  }
  .account-layout {
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ---- Herbal Custom Content Page & Rich Text ---- */
.page-main-section .page-header h1 { font-family: 'Fraunces', Georgia, serif !important; font-size: clamp(2.2rem, 4.2vw, 3.2rem) !important; color: var(--primary-900, #244d3d); line-height: 1.15; }
.page-content, .page-content.rich-text, .page-content.rte, .page-content.prose, .rich-text, .rte, .prose { max-width: 760px; margin-inline: auto; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16.5px; line-height: 1.85; color: var(--neutral-800, #334335); word-break: break-word; }
.page-content > *:first-child, .rich-text > *:first-child, .rte > *:first-child, .prose > *:first-child { margin-top: 0 !important; padding-top: 0 !important; }
.page-content > *:last-child, .rich-text > *:last-child, .rte > *:last-child, .prose > *:last-child { margin-bottom: 0 !important; }
.page-content h1, .rich-text h1, .rte h1, .prose h1 { font-family: 'Fraunces', serif; font-size: clamp(2rem, 3.5vw, 2.75rem); line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; margin-top: clamp(2rem, 4vw, 3rem); margin-bottom: 1.25rem; color: var(--primary-900, #244d3d); }
.page-content h2, .rich-text h2, .rte h2, .prose h2 { font-family: 'Fraunces', serif; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; margin-top: clamp(2rem, 3.8vw, 2.75rem); margin-bottom: 0.95rem; color: var(--primary-900, #244d3d); }
.page-content h3, .rich-text h3, .rte h3, .prose h3 { font-family: 'Fraunces', serif; font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.35; font-weight: 600; margin-top: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: 0.75rem; color: var(--primary-900, #244d3d); }
.page-content h4, .rich-text h4, .rte h4, .prose h4 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.05rem; line-height: 1.4; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 1.35rem; margin-bottom: 0.5rem; color: var(--primary-900, #244d3d); }
.page-content p, .rich-text p, .rte p, .prose p { margin-top: 0; margin-bottom: 1.5rem; line-height: 1.85; color: var(--neutral-800, #334335); }
.page-content ul, .page-content ol, .rich-text ul, .rich-text ol, .rte ul, .rte ol, .prose ul, .prose ol { margin-top: 0; margin-bottom: 1.65rem; padding-left: 1.75rem; color: var(--neutral-800, #334335); }
.page-content li, .rich-text li, .rte li, .prose li { margin-bottom: 0.6rem; line-height: 1.8; }
.page-content li:last-child, .rich-text li:last-child, .rte li:last-child, .prose li:last-child { margin-bottom: 0; }
.page-content blockquote, .rich-text blockquote, .rte blockquote, .prose blockquote { margin: 1.85rem 0; padding: 1.1rem 1.6rem; border-left: 3px solid var(--accent-gold, #c49a42); background: var(--accent-gold-light, #f7f2e8); border-radius: 0 4px 4px 0; font-family: 'Fraunces', serif; font-style: italic; font-size: 1.15rem; line-height: 1.65; color: var(--primary-900, #244d3d); }
.page-content blockquote p:last-child, .rich-text blockquote p:last-child, .rte blockquote p:last-child, .prose blockquote p:last-child { margin-bottom: 0; }
.page-content img, .rich-text img, .rte img, .prose img { max-width: 100%; height: auto; border-radius: 8px; margin-block: 1.75rem; display: block; }
.page-content hr, .rich-text hr, .rte hr, .prose hr { border: 0; height: 1px; background: var(--neutral-200, #e0e6df); margin: 2.5rem 0; }
.page-content a, .rich-text a, .rte a, .prose a { color: var(--primary-600, #2e7d59); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.page-content a:hover, .rich-text a:hover, .rte a:hover, .prose a:hover { color: var(--primary-900, #244d3d); }
.page-content table, .rich-text table, .rte table, .prose table { width: 100%; border-collapse: collapse; margin-block: 2rem; font-size: 0.95rem; }
.page-content th, .page-content td, .rich-text th, .rich-text td, .rte th, .rte td, .prose th, .prose td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--neutral-200, #e0e6df); text-align: left; }
.page-content th, .rich-text th, .rte th, .prose th { font-family: 'Fraunces', serif; font-weight: 600; color: var(--primary-900, #244d3d); border-bottom: 2px solid var(--primary-900, #244d3d); }



.page-main-section .page-header { text-align: center; }
.page-main-section .page-header h1 { text-align: center; margin-inline: auto; }
.page-main-section .breadcrumbs, .page-main-section .breadcrumb { display: flex; justify-content: center; align-items: center; text-align: center; margin-inline: auto; }

