:root {
  --bg-color: #FAFAFA;
  /* Shared storefront and product-page background */
  --bg-secondary: #EAE3D5;
  /* Slightly darker warm beige */
  --text-primary: #1C1917;
  /* Deep charcoal */
  --text-secondary: #57534E;
  /* Warm gray */
  --border-color: #D6D0C4;
  --accent-color: #E33022;
  /* Vibrant Brand Red */
  --accent-light: #F7E53B;
  /* Bright Honey Yellow */
  --accent-hover: #C62828;
  /* Deep Red for hover */
  --error-color: #991B1B;
  --success-color: #3D5A40;
  /* Sage organic green */
  /* Shadows for depth */
  --shadow-sm: 0 2px 4px rgba(28, 25, 23, 0.05), 0 1px 2px rgba(28, 25, 23, 0.02);
  --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.08), 0 2px 4px rgba(28, 25, 23, 0.04);
  --shadow-lg: 0 12px 32px rgba(227, 48, 34, 0.15), 0 4px 8px rgba(28, 25, 23, 0.04);
  /* Radiuses */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .logo {
  font-family: 'Playfair Display', serif;
  color: var(--text-primary);
}

/* Navbar (App Bar) - Glassmorphism */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  background: rgba(250, 250, 249, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(231, 229, 228, 0.5);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: padding 0.3s ease;
}

.logo {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 1rem;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-pill);
  transition: all 0.3s ease;
}

.header-main-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 16px;
}

#searchForm {
  flex: 1 1 auto;
  min-width: 0;
}

.site-desktop-nav {
  display: none;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 1rem;
  white-space: nowrap;
}

.site-desktop-nav > a {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.35rem 0.4rem;
  white-space: nowrap;
}

.site-desktop-nav > #nav-affiliate-link[hidden],
.header-mobile-nav > .flex > #mob-nav-affiliate-link[hidden],
.site-desktop-nav > #nav-orders[hidden],
.header-mobile-nav > .flex > #mob-nav-orders[hidden] {
  display: none !important;
}

.nav-user-greeting {
  flex: 0 0 auto;
  white-space: nowrap;
}

.header-main-row > .nav-user-greeting {
  max-width: 13rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-mobile-controls {
  display: flex;
}

.header-mobile-nav:not(.hidden) {
  position: absolute;
  top: 100%;
  right: 20px;
  z-index: 100;
  display: block;
  box-sizing: border-box;
  width: min(250px, calc(100vw - 40px));
  padding: 8px;
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.header-mobile-nav > .flex {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.header-mobile-nav a {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  border-radius: 8px;
  text-align: left;
  white-space: nowrap;
}

.header-mobile-nav a:hover,
.header-mobile-nav a:focus-visible {
  color: #92400e;
  background-color: #fffbeb;
}

@media (min-width: 1280px) {
  .site-desktop-nav {
    display: flex;
  }

  .header-mobile-controls,
  .header-mobile-nav {
    display: none !important;
  }
}

.navbar nav a:hover {
  color: var(--accent-color);
  background-color: rgba(227, 48, 34, 0.08);
}

.cart-link {
  color: var(--accent-color) !important;
  background-color: rgba(227, 48, 34, 0.1);
  border: 1px solid rgba(227, 48, 34, 0.2);
  border-radius: var(--radius-pill);
}

.header-cart-link {
  position: relative;
  display: inline-flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.header-cart-icon {
  display: block;
  width: 23px;
  height: 23px;
}

.header-cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  display: none;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 9999px;
  background: var(--accent-color);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.cart-link:hover {
  background-color: rgba(227, 48, 34, 0.2) !important;
}

.lang-btn,
#lang-toggle {
  box-sizing: border-box;
  width: auto !important;
  min-width: 50px;
  height: 36px;
  min-height: 36px;
  padding: 0 12px !important;
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #d6d3d1 !important;
  border-radius: 20px !important;
  color: #92400e !important;
  background: #fff !important;
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.lang-btn:hover {
  border-color: #92400e !important;
  color: #78350f !important;
  background: #fffbeb !important;
}

@media (max-width: 1279px) {
  .header-main-row {
    gap: 8px;
  }

  .header-main-row > .nav-user-greeting {
    max-width: 7rem;
  }

  .header-mobile-controls {
    flex: 0 0 auto;
  }
}

@media (max-width: 359px) {
  .header-main-row > .nav-user-greeting {
    max-width: 5rem;
  }
}

/* Layout */

.content-container {
  max-width: 1000px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.content-container h2 {
  font-size: 2.5rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
}

.content-container p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1.15rem;
  font-weight: 300;
}

/* Hero Section */

.hero {
  text-align: center;
  padding: 8rem 1rem 5rem;
  max-width: 900px;
  margin: 0 auto;
  animation: fadeInDown 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

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

.hero h1 {
  font-size: 4.5rem;
  font-weight: 600;
  letter-spacing: -1px;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero p {
  font-size: 1.35rem;
  color: var(--text-secondary);
  margin-bottom: 3.5rem;
  font-weight: 300;
}

/* Search Bar */

.search-container {
  display: flex;
  max-width: 650px;
  margin: 0 auto;
  position: relative;
  box-shadow: var(--shadow-sm);
  background: #fff;
  border-radius: var(--radius-pill);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  padding: 0.35rem;
  border: 1px solid var(--border-color);
}

.search-container:hover, .search-container:focus-within {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--accent-light);
}

.search-container input {
  flex: 1;
  border: none;
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius-pill);
  font-size: 1.15rem;
  font-family: inherit;
  font-weight: 300;
  outline: none;
  background: transparent;
  color: var(--text-primary);
}

.search-container button {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-color) 100%);
  color: #fff;
  border: none;
  padding: 0 2.5rem;
  border-radius: var(--radius-pill);
  font-size: 1.1rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.search-container button:hover {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
  box-shadow: 0 4px 15px rgba(227, 48, 34, 0.4);
}

/* Results Section */

.results-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.results-section h2 {
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 2.5rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
}

/* Product Card */

.product-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.storefront-product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.storefront-product-card > :not(.product-card-actions) {
  min-width: 0;
}

.storefront-product-card > .flex-1,
.storefront-product-card > .product-details,
.storefront-product-card .product-details {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.storefront-product-card .product-card-price {
  margin-top: auto;
}

.product-card-price,
.product-detail-price {
  margin-bottom: 10px;
}

.product-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
}

.product-card-actions > .marketplace-links {
  margin-top: 0;
}

.product-detail-price {
  font-size: clamp(1.25rem, 2vw, 2.25rem);
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: rgba(227, 48, 34, 0.3);
}

.product-card .info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.product-card p.desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 300;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.product-card .bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.product-card .price {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-primary);
  font-family: 'Playfair Display', serif;
}

.product-card .score {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-hover);
  background: rgba(227, 48, 34, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(227, 48, 34, 0.2);
}

.add-to-cart-btn {
  display: block;
  background-color: transparent;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  padding: 1rem;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-weight: 500;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.add-to-cart-btn:hover {
  background-color: var(--accent-color);
  color: #fff;
  box-shadow: 0 4px 12px rgba(227, 48, 34, 0.3);
}

/* Forms & Inputs */

.styled-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.styled-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 0; /* Let gap handle it if using flex, otherwise reset */
}

.styled-form input, .styled-form textarea, .styled-input {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 400;
  outline: none;
  background: #fff;
  color: var(--text-primary);
  transition: all 0.3s ease;
  line-height: 1.5;
}

.styled-form textarea, .styled-input[nodeName="TEXTAREA"], textarea.styled-input {
  min-height: 120px;
  resize: vertical;
}

.styled-form input:focus, .styled-form textarea:focus, .styled-input:focus {
  border: 1px solid var(--accent-color);
  box-shadow: 0 0 0 4px rgba(227, 48, 34, 0.1);
}

.styled-form button, .primary-btn {
  padding: 1.15rem 2.5rem;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-color) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.styled-form button:hover, .primary-btn:hover {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
  box-shadow: 0 6px 16px rgba(227, 48, 34, 0.4);
  transform: translateY(-2px);
}

.primary-btn:disabled {
  background: var(--border-color);
  color: var(--text-secondary);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Cart & Checkout Lists */

.cart-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
}

.cart-item:hover {
  box-shadow: var(--shadow-md);
}

.cart-product-image-link {
  display: block;
  flex: 0 0 5rem;
  margin-right: 1rem;
  cursor: pointer;
}

.cart-product-image {
  width: 5rem;
  height: 5rem;
  border-radius: 0.75rem;
  object-fit: contain;
  background: #fafafa;
}

.cart-product-name-link {
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.cart-product-name-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.cart-item-info h4 {
  font-size: 1.3rem;
  font-weight: 500;
  font-family: 'Playfair Display', serif;
}

.cart-item-info p {
  margin-top: 0.35rem;
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 300;
}

.cart-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.remove-btn {
  background: transparent;
  border: none;
  color: var(--error-color);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.remove-btn:hover {
  background: #FEF2F2;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.5rem;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-top: 2rem;
  border: 1px solid var(--accent-light);
}

.cart-summary h3 {
  font-size: 1.8rem;
}

/* Admin Specific */

.admin-products-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 10px;
}

.admin-card {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.admin-metric-card {
  margin-top: 0;
  border-radius: 12px;
}

.admin-table-wrap,
.admin-products-table-wrap {
  width: 100%;
  margin-top: 1.5rem;
  overflow-x: auto;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-table {
  width: 100%;
  min-width: 850px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.admin-table-header th {
  height: 40px;
  padding: 0.55rem 0.75rem !important;
  background: #1f2937 !important;
  color: #fff !important;
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-table-header th:first-child {
  border-top-left-radius: 10px;
}

.admin-table-header th:last-child {
  border-top-right-radius: 10px;
}

.admin-table-header input[type="checkbox"] {
  accent-color: var(--button-primary);
}

.admin-table-row td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.admin-table-row:hover {
  background: #fafaf9;
}

.admin-table-actions {
  min-width: 190px;
  white-space: normal;
}

.admin-orders-table {
  min-width: 1050px;
}

.admin-order-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}

.admin-order-total {
  font-weight: 700;
  white-space: nowrap;
}

.admin-order-status {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #78350f;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-order-status-draft,
.admin-order-draft-badge {
  padding: 0.25rem 0.6rem;
  border: 1px solid #9ca3af;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-order-draft-badge {
  display: inline-block;
  margin: 0.12rem 0.2rem 0.12rem 0;
}

.badge-shipping {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge-shipping.badge-instant {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.badge-shipping.badge-sameday {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-shipping.badge-car {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.badge-shipping.badge-regular {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.admin-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0.12rem 0.2rem 0.12rem 0;
  padding: 0.32rem 0.7rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

#section-admin .admin-btn-primary {
  color: #92400e;
  border-color: #d97706;
}

#section-admin .admin-btn-primary:hover:not(:disabled) {
  color: #fff;
  background: #b45309;
  border-color: #b45309;
}

#section-admin .admin-btn-danger {
  color: #b91c1c;
  border-color: #dc2626;
}

#section-admin .admin-btn-danger:hover:not(:disabled) {
  color: #fff;
  background: #b91c1c;
  border-color: #b91c1c;
}

#section-admin .admin-btn-success {
  color: #047857;
  border-color: #059669;
}

#section-admin .admin-btn-success:hover:not(:disabled) {
  color: #fff;
  background: #047857;
  border-color: #047857;
}

.admin-btn-outline:disabled {
  cursor: wait;
  opacity: 0.55;
}

/* Modals */

.modal {
  display: none;
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(28, 25, 23, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal.is-open {
  display: block;
}

.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 3rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 480px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.15);
  position: relative;
  animation: modalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.affiliate-voucher-modal {
  position: fixed;
  z-index: 10001;
  inset: 0;
  display: none;
  overflow-y: auto;
  padding: 1rem;
  background: rgb(28 25 23 / 55%);
  backdrop-filter: blur(4px);
}

.affiliate-voucher-modal.is-open {
  display: grid;
  place-items: center;
}

.affiliate-voucher-modal[hidden] {
  display: none;
}

.affiliate-voucher-modal-content {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 480px);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 2rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 48px rgb(0 0 0 / 20%);
}

.affiliate-voucher-modal-content h3 {
  margin: 0 2rem .75rem 0;
  color: #292524;
  font-size: 1.25rem;
  font-weight: 700;
}

.affiliate-voucher-form {
  display: grid;
  gap: .7rem;
  margin-top: 1rem;
}

.affiliate-voucher-form label {
  color: #44403c;
  font-size: .9rem;
  font-weight: 600;
}

.affiliate-voucher-form input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.8rem;
  padding: .65rem .75rem;
  border: 1px solid #d6d3d1;
  border-radius: 9px;
  color: #292524;
}

.affiliate-voucher-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.affiliate-voucher-chips button {
  min-height: 2.25rem;
  padding: .35rem .65rem;
  border: 1px solid #fbbf24;
  border-radius: 999px;
  background: #fffbeb;
  color: #78350f;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
}

.affiliate-voucher-success {
  display: grid;
  justify-items: start;
  gap: .75rem;
}

.affiliate-voucher-success[hidden] {
  display: none;
}

.affiliate-voucher-success > strong {
  display: block;
  width: 100%;
  padding: 1rem .75rem;
  border: 1px dashed #d97706;
  border-radius: 10px;
  background: #fffbeb;
  color: #78350f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.2rem, 5vw, 1.65rem);
  text-align: center;
  overflow-wrap: anywhere;
}

.affiliate-voucher-success .primary-btn,
.affiliate-voucher-success .secondary-btn,
.affiliate-voucher-form > .primary-btn {
  justify-self: stretch;
  text-align: center;
}

.public-affiliate-modal.is-open {
  display: block;
}

.public-affiliate-modal-content {
  box-sizing: border-box;
  width: min(560px, calc(100% - 2rem));
  max-width: 560px;
  max-height: calc(100vh - 2rem);
  margin: 1rem auto;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  overflow-y: auto;
}

.public-affiliate-modal-content h2 {
  margin: 0 2.5rem .5rem 0;
  color: #332719;
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
}

.public-affiliate-intro {
  color: #6b6258;
}

.public-affiliate-form {
  display: grid;
  gap: .55rem;
  margin-top: 1rem;
}

.public-affiliate-form[hidden],
.public-affiliate-success[hidden] {
  display: none;
}

.public-affiliate-form label {
  color: #44403c;
  font-size: .9rem;
  font-weight: 600;
}

.public-affiliate-form input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.8rem;
  padding: .65rem .75rem;
  border: 1px solid #d6d3d1;
  border-radius: 8px;
  color: #292524;
  font: inherit;
}

.public-affiliate-form button {
  margin-top: .6rem;
}

.public-affiliate-error {
  margin: .25rem 0;
  color: #b42318;
  font-size: .88rem;
}

.public-affiliate-success {
  margin-top: 1.25rem;
  padding: 1.5rem;
  border: 1px solid #86efac;
  border-radius: 14px;
  background: #f0fdf4;
  text-align: center;
}

.public-affiliate-success h3 {
  margin: 0 0 .75rem;
  color: #166534;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
}

.public-affiliate-success strong {
  display: block;
  overflow-wrap: anywhere;
  margin: .75rem 0;
  color: #92400e;
  font-size: clamp(1.35rem, 5vw, 2rem);
}

.affiliate-upsell-section {
  box-sizing: border-box;
  min-height: 70vh;
  padding: clamp(2rem, 7vw, 5rem) 1rem;
  background:
    radial-gradient(circle at 15% 5%, rgba(251, 191, 36, .2), transparent 34rem),
    linear-gradient(145deg, #fffaf0, #fef3c7);
}

.affiliate-upsell-card {
  box-sizing: border-box;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(1.5rem, 6vw, 3.5rem);
  border: 1px solid rgba(180, 83, 9, .18);
  border-radius: 28px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 28px 70px rgba(120, 53, 15, .16);
  text-align: center;
}

.affiliate-upsell-eyebrow {
  margin: 0 0 .75rem;
  color: #a16207;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.affiliate-upsell-card h1 {
  margin: 0 auto 1rem;
  color: #422006;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: 1.08;
}

.affiliate-upsell-pitch {
  max-width: 560px;
  margin: 0 auto 1.6rem;
  color: #57534e;
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  line-height: 1.6;
}

.affiliate-upsell-customer {
  display: grid;
  max-width: 420px;
  margin: 0 auto 1.5rem;
  gap: .45rem;
  text-align: left;
}

.affiliate-upsell-customer label {
  color: #57534e;
  font-size: .82rem;
  font-weight: 700;
}

.affiliate-upsell-customer input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.8rem;
  margin-bottom: .35rem;
  padding: .65rem .75rem;
  border: 1px solid #d6d3d1;
  border-radius: 9px;
  background: #fafaf9;
  color: #292524;
  font: inherit;
}

.affiliate-upsell-cta {
  width: 100%;
  min-height: 4.25rem;
  padding: 1rem 1.5rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #b45309, #d97706);
  box-shadow: 0 12px 24px rgba(180, 83, 9, .25);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease;
}

.affiliate-upsell-cta:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(180, 83, 9, .3);
}

.affiliate-upsell-cta:disabled {
  cursor: wait;
  opacity: .72;
}

.affiliate-upsell-success {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid #86efac;
  border-radius: 16px;
  background: #f0fdf4;
}

.affiliate-upsell-success[hidden] {
  display: none;
}

.affiliate-upsell-success h2 {
  margin: 0 0 .6rem;
  color: #166534;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
}

.affiliate-upsell-success strong {
  display: block;
  margin: .7rem 0;
  color: #92400e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.3rem, 5vw, 2rem);
  overflow-wrap: anywhere;
}

.affiliate-dashboard-page {
  min-height: calc(100vh - 4rem);
  padding: clamp(1.25rem, 4vw, 3.5rem) 1rem 4rem;
  background: #fafaf9;
}

.affiliate-page-shell {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.affiliate-page-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  padding: clamp(2rem, 6vw, 4.5rem);
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 12%, rgb(251 191 36 / 25%), transparent 18rem),
    linear-gradient(125deg, #292016, #573719 62%, #7c3e13);
  color: #fff;
  box-shadow: 0 28px 65px rgb(68 45 22 / 18%);
}

.affiliate-page-hero-copy {
  position: relative;
  z-index: 1;
}

.affiliate-page-eyebrow,
.affiliate-section-eyebrow {
  margin: 0 0 .55rem;
  color: #b45309;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.affiliate-page-hero .affiliate-page-eyebrow {
  color: #fcd34d;
}

.affiliate-page-hero h1 {
  max-width: 720px;
  margin: 0;
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6.5vw, 5rem);
  font-weight: 700;
  line-height: 1.04;
}

.affiliate-page-hero-copy > p:not(.affiliate-page-eyebrow):not(.affiliate-page-proof) {
  max-width: 620px;
  margin: 1.25rem 0 1.6rem;
  color: #f5e9d6;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.65;
}

.affiliate-page-primary-cta {
  display: inline-flex;
  min-height: 3.35rem;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  padding: .85rem 1.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 12px 26px rgb(0 0 0 / 20%);
  color: #422006;
  font-weight: 800;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.affiliate-page-primary-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgb(0 0 0 / 26%);
}

.affiliate-page-proof {
  margin: 1rem 0 0;
  color: #e7d9c6;
  font-size: .78rem;
  line-height: 1.6;
}

.affiliate-hero-reward {
  display: grid;
  justify-items: start;
  gap: .7rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 22px;
  background: linear-gradient(145deg, rgb(255 255 255 / 16%), rgb(255 255 255 / 7%));
  box-shadow: inset 0 1px rgb(255 255 255 / 18%);
  backdrop-filter: blur(10px);
}

.affiliate-hero-reward-icon {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border-radius: 14px;
  background: #fbbf24;
  color: #422006;
  font-size: 1.55rem;
}

.affiliate-hero-reward-label,
.affiliate-hero-reward-caption {
  color: #f5e9d6;
  font-size: .88rem;
  line-height: 1.5;
}

.affiliate-hero-reward strong {
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.affiliate-hero-reward-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .35rem;
}

.affiliate-hero-reward-badges span {
  padding: .35rem .55rem;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 999px;
  color: #ffedd5;
  font-size: .72rem;
  font-weight: 700;
}

.affiliate-rewards-showcase {
  padding: clamp(2rem, 5vw, 3.4rem) 0;
}

.affiliate-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.affiliate-section-heading h2,
.affiliate-section-heading h3 {
  margin: 0;
  color: #292524;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.2;
}

.affiliate-section-heading > p {
  max-width: 420px;
  margin: 0;
  color: #78716c;
  font-size: .9rem;
  line-height: 1.55;
}

.affiliate-reward-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
}

.affiliate-reward-category {
  display: flex;
  min-height: 112px;
  align-items: center;
  gap: .8rem;
  padding: 1rem;
  border: 1px solid #eee7db;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgb(41 37 36 / 4%);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.affiliate-reward-category:hover {
  transform: translateY(-3px);
  border-color: #d6b978;
  box-shadow: 0 12px 26px rgb(41 37 36 / 9%);
}

.affiliate-reward-category:focus-visible {
  outline: 3px solid #d6b978;
  outline-offset: 3px;
}

.affiliate-reward-category > span {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: #fff7e6;
  font-size: 1.35rem;
}

.affiliate-reward-category h3 {
  margin: 0 0 .2rem;
  color: #292524;
  font-size: .9rem;
  font-weight: 750;
}

.affiliate-reward-category p {
  margin: 0;
  color: #78716c;
  font-size: .78rem;
  line-height: 1.4;
}

.affiliate-rewards-note {
  margin: .85rem 0 0;
  color: #78716c;
  font-size: .78rem;
}

.affiliate-dashboard-app {
  position: relative;
  padding: clamp(1.2rem, 4vw, 2.2rem);
  border: 1px solid #e7e5e4;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 36px rgb(41 37 36 / 6%);
}

.affiliate-dashboard-heading,
.affiliate-account-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.affiliate-dashboard-heading h2,
.affiliate-account-heading h3 {
  margin: 0;
  color: #292524;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.affiliate-dashboard-heading .affiliate-section-eyebrow,
.affiliate-account-heading .affiliate-section-eyebrow {
  margin-bottom: .25rem;
}

.affiliate-dashboard-back {
  padding: .55rem .85rem;
}

.affiliate-vendor-selector {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.25rem;
  padding: 1rem;
  border: 1px solid #f1e6d6;
  border-radius: 14px;
  background: #fffbf5;
}

.affiliate-vendor-selector > div {
  flex: 1 1 24rem;
}

.affiliate-vendor-selector label {
  display: block;
  margin-bottom: .4rem;
  color: #57534e;
  font-size: .82rem;
  font-weight: 700;
}

.affiliate-vendor-selector select {
  width: 100%;
  min-height: 2.8rem;
  padding: .65rem .8rem;
  border: 1px solid #d6d3d1;
  border-radius: 9px;
  background: #fff;
  color: #292524;
}

.affiliate-vendor-selector p {
  margin: .4rem 0 0;
  color: #78716c;
  font-size: .78rem;
}

.affiliate-vendor-selector > a {
  flex: 0 0 auto;
  text-decoration: none;
}

.affiliate-auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.affiliate-auth-card {
  padding: clamp(1.15rem, 3vw, 1.7rem);
  border: 1px solid #eee7db;
  border-radius: 16px;
  background: #fffdfa;
}

.affiliate-auth-card h3 {
  margin: 0 0 .5rem;
  color: #292524;
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
}

.affiliate-auth-eyebrow {
  margin: 0 0 .4rem;
  color: #a16207;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.affiliate-auth-switch {
  margin-top: 1rem;
}

.affiliate-auth-card .public-affiliate-intro {
  margin: 0 0 1rem;
  font-size: .9rem;
  line-height: 1.55;
}

.affiliate-auth-card .public-affiliate-form,
.affiliate-auth-card .affiliate-wallet-login {
  max-width: none;
  gap: .5rem;
  margin-top: .75rem;
}

.affiliate-auth-card .public-affiliate-form input,
.affiliate-auth-card .affiliate-wallet-login input {
  min-height: 2.8rem;
}

.affiliate-auth-card .public-affiliate-form button,
.affiliate-auth-card .affiliate-wallet-login button,
.affiliate-auth-card .affiliate-auth-switch {
  width: 100%;
}

.affiliate-account-overview {
  padding: clamp(1.1rem, 3vw, 1.7rem);
  border-radius: 18px;
  background: linear-gradient(125deg, #fffaf0, #fffbeb);
}

.affiliate-account-heading {
  margin-bottom: 1rem;
}

.affiliate-account-stats {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: .75rem;
}

.affiliate-account-stat {
  display: grid;
  min-width: 0;
  align-content: space-between;
  gap: .7rem;
  padding: 1rem;
  border: 1px solid #f1e7d6;
  border-radius: 14px;
  background: #fff;
}

.affiliate-account-stat > span {
  color: #78716c;
  font-size: .78rem;
  font-weight: 700;
}

.affiliate-account-stat > strong {
  color: #422006;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.affiliate-account-stat > small {
  color: #78716c;
  font-size: .72rem;
  line-height: 1.4;
}

.affiliate-referral-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.affiliate-referral-key-row strong {
  color: #422006;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(.82rem, 2vw, 1rem);
  overflow-wrap: anywhere;
}

.affiliate-referral-key-row button {
  flex: 0 0 auto;
  padding: .35rem .6rem;
}

.affiliate-wallet-dashboard[hidden],
.affiliate-auth-grid[hidden],
.affiliate-ppob-product-grid:empty {
  display: none;
}

.affiliate-balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  margin-top: 1rem;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 0;
  border-radius: 18px;
  background: linear-gradient(120deg, #422006, #78350f);
  color: #fff;
}

.affiliate-balance-card[hidden],
.affiliate-ppob-catalog[hidden] {
  display: none;
}

.affiliate-balance-card > div:first-child > span {
  display: block;
  margin-bottom: .25rem;
  color: #fde68a;
  font-size: .82rem;
  font-weight: 700;
}

.affiliate-balance-card > div:first-child > strong {
  display: block;
  color: #fff;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
}

.affiliate-balance-card > div:first-child > p {
  margin: .45rem 0 0;
  color: #f5e9d6;
}

.affiliate-balance-card .primary-btn {
  flex: 0 0 auto;
  padding: .9rem 1.3rem;
  background: #fbbf24;
  color: #422006;
  font-weight: 800;
}

.affiliate-wallet-cta-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem;
}

.affiliate-wallet-cta-actions .secondary-btn {
  border-color: rgba(255, 255, 255, .55);
  color: #fff;
}

.affiliate-wallet-maintenance {
  margin: 0;
  color: #f5e9d6;
  font-size: .8rem;
}

.affiliate-bank-wallet-actions {
  display: grid;
  width: min(480px, 100%);
  gap: .8rem;
}

.affiliate-ppob-catalog {
  display: block;
  margin-top: 1rem;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 1px solid #e7e5e4;
  border-radius: 18px;
  background: #fff;
}

.affiliate-ppob-catalog .affiliate-section-heading {
  align-items: center;
}

.affiliate-ppob-catalog .affiliate-section-heading h3 {
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.affiliate-ppob-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: .75rem;
  margin: 1rem 0;
}

.affiliate-ppob-product {
  display: grid;
  align-content: space-between;
  gap: .55rem;
  min-height: 140px;
  padding: .9rem;
  border: 1px solid #eee7db;
  border-radius: 14px;
  background: #fffdfa;
}

.affiliate-ppob-product[hidden] {
  display: none;
}

.affiliate-ppob-product-category {
  color: #a16207;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.affiliate-ppob-product h4 {
  margin: 0;
  color: #292524;
  font-size: .9rem;
  line-height: 1.35;
}

.affiliate-ppob-product strong {
  color: #422006;
  font-size: 1rem;
}

.affiliate-ppob-product button {
  justify-self: start;
  padding: .42rem .65rem;
  font-size: .78rem;
}

.affiliate-ppob-quote-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: .65rem;
  padding-top: 1rem;
  border-top: 1px solid #e7e5e4;
}

.affiliate-ppob-quote-form label {
  grid-row: 1;
}

.affiliate-ppob-quote-form select,
.affiliate-ppob-quote-form input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.8rem;
  padding: .6rem .7rem;
  border: 1px solid #d6d3d1;
  border-radius: 9px;
  background: #fff;
  color: #292524;
}

.affiliate-ppob-quote-form button {
  min-height: 2.8rem;
}

.affiliate-ppob-quote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .85rem;
  padding: .9rem;
  border-radius: 12px;
  background: #fffbeb;
}

.affiliate-ppob-quote p {
  margin: 0;
  color: #57534e;
}

.affiliate-ppob-quote[hidden],
.affiliate-ppob-quote-form [hidden] {
  display: none;
}

.affiliate-wallet-error[hidden] {
  display: none;
}

@media (max-width: 768px) {
  .affiliate-page-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .affiliate-hero-reward {
    max-width: 480px;
  }

  .affiliate-reward-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .affiliate-section-heading,
  .affiliate-dashboard-heading {
    align-items: start;
    flex-direction: column;
  }

  .affiliate-vendor-selector {
    align-items: stretch;
    flex-direction: column;
  }

  .affiliate-vendor-selector > a {
    align-self: start;
  }

  .affiliate-auth-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .affiliate-account-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .affiliate-account-key-stat {
    grid-column: 1 / -1;
  }

  .affiliate-ppob-quote-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .affiliate-ppob-quote-form label,
  .affiliate-ppob-quote-form button {
    grid-row: auto;
  }

  .affiliate-balance-card {
    align-items: stretch;
    flex-direction: column;
  }

  .affiliate-wallet-cta-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .affiliate-wallet-cta-actions button {
    align-self: start;
  }

  .affiliate-ppob-quote {
    align-items: stretch;
    flex-direction: column;
  }
}

.crm-detail-modal-content {
  box-sizing: border-box;
  width: min(820px, calc(100% - 2rem));
  max-width: 820px;
  max-height: calc(100vh - 2rem);
  margin: 1rem auto;
  padding: 2rem;
  overflow-y: auto;
}

.crm-detail-modal-content h3 {
  margin: 0 2.5rem .25rem 0;
  color: #332719;
  font-family: var(--font-serif, Georgia, serif);
  font-size: 1.5rem;
}

.crm-detail-close {
  position: absolute;
  top: .75rem;
  right: .9rem;
  border: 0;
  background: transparent;
  color: #756b60;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.crm-detail-subtitle {
  margin: 0 0 1.25rem;
  color: #756b60;
  overflow-wrap: anywhere;
}

.crm-detail-grid,
.crm-customer-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.crm-detail-section,
.crm-customer-metrics > div {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--border-color, #eee6da);
  border-radius: 12px;
  background: #fffdfa;
}

.crm-detail-section h4 {
  margin: 0 0 .7rem;
  color: #75501c;
}

.crm-detail-section p {
  margin: .35rem 0;
  overflow-wrap: anywhere;
}

.crm-detail-items {
  min-width: 560px;
}

.crm-detail-items th,
.crm-detail-items td {
  padding: 0.75rem 1rem;
}

.crm-detail-items th:nth-child(1),
.crm-detail-items td:nth-child(1) {
  text-align: left;
}

.crm-detail-items th:nth-child(2),
.crm-detail-items td:nth-child(2) {
  text-align: center;
}

.crm-detail-items th:nth-child(3),
.crm-detail-items td:nth-child(3),
.crm-detail-items th:nth-child(4),
.crm-detail-items td:nth-child(4) {
  text-align: right;
}

.crm-financial-breakdown p,
.crm-customer-metrics > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.crm-financial-total {
  padding-top: .75rem;
  border-top: 1px solid #e8ddcf;
  color: #8a570e;
  font-size: 1.05rem;
}

.crm-financial-breakdown .crm-affiliate-fraud-warning {
  justify-content: flex-start;
  padding: .65rem .75rem;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
}

.crm-address-list,
.crm-order-history {
  display: grid;
  gap: .6rem;
  margin: 0;
  padding-left: 1.25rem;
}

.crm-order-history li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.crm-order-history li > span {
  color: #756b60;
  font-size: .9rem;
}

.crm-order-detail-btn,
.crm-customer-detail-btn,
.crm-order-detail-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #8a570e;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.crm-vip-badge {
  display: inline-block;
  margin-left: .5rem;
  padding: .15rem .45rem;
  border-radius: 999px;
  background: #fff3d6;
  color: #80520e;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}

.crm-returning-customer {
  background: #fffcf4;
}

.crm-whatsapp-link {
  white-space: nowrap;
}

.crm-detail-error {
  color: #a32121;
}

.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin: .85rem 0 1.1rem;
}

.marketing-performance {
  margin: 1.25rem 0 1.5rem;
}

.marketing-performance > h3 {
  margin: 0 0 .65rem;
  color: #1f2937;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.marketing-performance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

.marketing-performance-card {
  min-width: 0;
  margin: 0;
  padding: 1rem 1.15rem;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.045);
}

.marketing-performance-card h4 {
  margin: 0 0 .3rem;
  color: #57534e;
  font-size: .9rem;
  font-weight: 600;
}

.marketing-performance-card .analytics-kpi-value {
  margin: 0;
}

.analytics-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .85rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}

.analytics-date-range {
  display: flex;
  align-items: flex-end;
  gap: .75rem;
  flex-wrap: wrap;
}

.analytics-date-range label {
  display: grid;
  gap: .25rem;
  color: #57534e;
  font-size: .76rem;
  font-weight: 600;
}

.analytics-date-range input {
  min-height: 2.35rem;
  padding: .4rem .65rem;
  border: 1px solid #d6d3d1;
  border-radius: 8px;
  color: #292524;
  font: inherit;
}

.analytics-date-error {
  flex-basis: 100%;
  margin: 0;
  color: #b42318;
  font-size: .82rem;
}

.admin-card.analytics-kpi-card,
.admin-card.analytics-chart-card,
.admin-card.analytics-list-card {
  min-width: 0;
  margin: 0;
  padding: clamp(1rem, 2.2vw, 1.5rem);
  border-color: #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.045);
}

.analytics-kpi-card {
  display: flex;
  min-height: 105px;
  flex-direction: column;
  justify-content: center;
  gap: .2rem;
  padding: .8rem 1rem !important;
  cursor: pointer;
  border: 1px solid #e5e7eb !important;
  --analytics-metric-color: #1d4ed8;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.analytics-kpi-card[data-analytics-metric="daily_orders"] {
  --analytics-metric-color: #059669;
}

.analytics-kpi-card[data-analytics-metric="daily_customers"] {
  --analytics-metric-color: #7c3aed;
}

.analytics-kpi-card[data-analytics-metric="daily_aov"] {
  --analytics-metric-color: #f97316;
}

.analytics-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(31, 41, 55, .1);
}

.analytics-kpi-card:focus-visible {
  outline: 3px solid rgba(22, 163, 106, .35);
  outline-offset: 2px;
}

.analytics-kpi-card.is-active {
  border-color: var(--analytics-metric-color) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--analytics-metric-color) 14%, transparent),
    0 5px 16px rgba(31, 41, 55, .08);
  background: #f8fafc;
}

.analytics-kpi-card h3,
.analytics-chart-card h3,
.analytics-list-card h3 {
  margin: 0;
  color: #1f2937;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.analytics-kpi-card h3 {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.analytics-tooltip {
  position: relative;
  display: inline-grid;
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  place-items: center;
  border: 1px solid #a8a29e;
  border-radius: 50%;
  color: #78716c;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.analytics-tooltip::after {
  position: absolute;
  z-index: 20;
  bottom: calc(100% + .55rem);
  left: 50%;
  width: max-content;
  max-width: min(230px, 75vw);
  padding: .5rem .65rem;
  border-radius: 7px;
  background: #1f2937;
  color: #fff;
  content: attr(data-tooltip);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 3px);
  transition: opacity .15s ease, transform .15s ease;
  white-space: normal;
}

.analytics-tooltip:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.analytics-tooltip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.analytics-legend-item {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  color: #78716c;
  font-size: .74rem;
  opacity: .48;
  white-space: nowrap;
}

.analytics-legend-item.is-selected {
  color: #44403c;
  opacity: 1;
}

.analytics-legend-item i {
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
  background: var(--analytics-metric-color);
}

.analytics-chart-card .store-settings-card-heading p,
.analytics-list-card .store-settings-card-heading p {
  color: #78716c;
  font-size: .82rem;
}

.analytics-kpi-value {
  min-height: 1.65rem;
  margin: .15rem 0 0;
  color: #332719;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.analytics-revenue-value {
  color: #1d4ed8;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 800;
}

.analytics-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
  align-items: start;
  gap: 1rem;
}

.admin-card.analytics-chart-card,
.admin-card.analytics-list-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.analytics-chart-card .store-settings-card-heading,
.analytics-list-card .store-settings-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.analytics-chart-card .store-settings-card-heading p,
.analytics-list-card .store-settings-card-heading p {
  margin: .25rem 0 0;
}

.analytics-list-card .store-settings-card-heading h3 {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.analytics-chart-legend {
  display: flex;
  justify-content: flex-end;
  gap: .55rem;
  flex-wrap: wrap;
}

.analytics-chart-wrap {
  position: relative;
  width: 100%;
  height: 320px;
}

.analytics-chart-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.analytics-chart-loading,
.analytics-empty-state {
  color: #78716c;
  font-size: .9rem;
}

.analytics-empty-state:not([hidden]) {
  padding: .75rem 1rem;
  border-radius: 10px;
  background: #fffbeb;
  color: #80520e;
}

.analytics-leaderboards {
  display: grid;
  gap: 1rem;
}

.marketing-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.admin-card.marketing-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: .9rem;
  margin: 0;
  padding: clamp(1.1rem, 2vw, 1.5rem);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(31, 41, 55, .045);
}

.marketing-card .store-settings-card-heading {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.marketing-card .store-settings-card-heading > div {
  display: grid;
  gap: .65rem;
}

.marketing-card h3 {
  margin: 0;
  color: #1f2937;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 650;
}

.marketing-card p {
  margin: 0;
  color: #6b7280;
  font-size: .9rem;
  line-height: 1.55;
}

.marketing-card-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 12px;
  background: #f3f4f6;
  color: #475569;
  font-size: 1rem;
}

.marketing-coming-soon {
  flex: 0 0 auto;
  padding: .25rem .5rem;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: .68rem;
  font-weight: 650;
}

.marketing-card > button {
  margin-top: auto;
}

.marketing-affiliate-key-row {
  display: flex;
  width: 100%;
  min-width: 0;
  gap: .5rem;
}

.marketing-affiliate-key-row input {
  box-sizing: border-box;
  flex: 1 1 auto;
  width: 0;
  min-width: 0;
  min-height: 2.7rem;
  padding: .65rem .75rem;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  background: #f3f4f6;
  color: #1f2937;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem;
  letter-spacing: .035em;
}

.marketing-affiliate-key-row button {
  min-height: 2.7rem;
  padding: .6rem .9rem;
  font-size: .85rem;
}

.marketing-affiliate-key-row button:disabled,
.marketing-affiliate-generate:disabled {
  cursor: wait;
  opacity: .6;
}

.marketing-card .marketing-affiliate-generate {
  min-height: 2.7rem;
  padding: .7rem 1.15rem;
  font-size: .9rem;
}

.marketing-affiliate-help {
  color: #78716c;
  font-size: .75rem;
  line-height: 1.4;
}

.marketing-affiliate-ledger {
  width: 100%;
  margin-top: .65rem;
  padding-top: .85rem;
  border-top: 1px solid #e5e7eb;
}

.marketing-affiliate-ledger h4 {
  margin: 0 0 .6rem;
  color: #292524;
  font-size: .9rem;
  font-weight: 650;
}

.marketing-affiliate-ledger-wrap {
  width: 100%;
  overflow-x: auto;
}

.marketing-affiliate-ledger-table {
  width: 100%;
  border-collapse: collapse;
  color: #374151;
  font-size: .72rem;
  text-align: left;
}

.marketing-affiliate-ledger-table th,
.marketing-affiliate-ledger-table td {
  padding: .5rem .35rem;
  border-bottom: 1px solid #e5e7eb;
}

.marketing-affiliate-ledger-table th {
  color: #6b7280;
  font-size: .67rem;
  font-weight: 650;
  white-space: nowrap;
}

.marketing-affiliate-ledger-table td:first-child {
  max-width: 9rem;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.marketing-affiliate-ledger-table td:nth-child(2) {
  text-align: center;
}

.marketing-affiliate-ledger-table td:last-child {
  text-align: right;
  white-space: nowrap;
}

.marketing-affiliate-ledger-empty {
  color: #78716c;
  text-align: center !important;
  font-family: inherit !important;
}

.marketing-affiliate-ledger-error {
  margin: .55rem 0 0;
  color: #b91c1c;
  font-size: .75rem;
}

.affiliate-preview-notice {
  padding: .65rem .8rem;
  border: 1px solid #fcd34d;
  border-radius: .5rem;
  background: #fffbeb;
  color: #92400e;
  font-size: .9rem;
}

.affiliate-preview-stats {
  margin: .75rem 0;
  color: #57534e;
  font-size: .9rem;
}

.marketing-card .marketing-affiliate-manage {
  min-height: 2.7rem;
  margin-top: .5rem;
  padding: .7rem 1.15rem;
  font-size: .9rem;
}

.marketing-affiliate-security {
  display: grid;
  width: 100%;
  gap: .45rem;
  margin-top: .35rem;
}

.marketing-security-toggle {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #374151;
  cursor: pointer;
  font-size: .84rem;
  font-weight: 600;
}

.marketing-security-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.marketing-security-toggle-track {
  position: relative;
  flex: 0 0 auto;
  width: 2.65rem;
  height: 1.45rem;
  border-radius: 999px;
  background: #9ca3af;
  transition: background-color .15s ease;
}

.marketing-security-toggle-track::after {
  position: absolute;
  top: .17rem;
  left: .17rem;
  width: 1.11rem;
  height: 1.11rem;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform .15s ease;
}

.marketing-security-toggle input:checked + .marketing-security-toggle-track {
  background: #15803d;
}

.marketing-security-toggle input:checked + .marketing-security-toggle-track::after {
  transform: translateX(1.2rem);
}

.marketing-security-toggle input:focus-visible + .marketing-security-toggle-track {
  outline: 3px solid rgb(59 130 246 / .45);
  outline-offset: 2px;
}

.marketing-security-toggle input:disabled + .marketing-security-toggle-track {
  cursor: wait;
  opacity: .6;
}

.marketing-affiliate-security small {
  color: #78716c;
  font-size: .74rem;
  line-height: 1.45;
}

.marketing-security-save-status {
  min-height: 1rem;
  color: #15803d;
  font-size: .75rem;
}

.marketing-security-save-status[data-state="error"] {
  color: #b91c1c;
}

.marketing-affiliate-modal[aria-hidden="true"] {
  display: none;
}

.marketing-affiliate-modal-content {
  box-sizing: border-box;
  width: min(1000px, calc(100% - 2rem));
  max-width: 1000px;
  max-height: 90vh;
  margin: 5vh auto;
  overflow-y: auto;
  padding: 2rem;
}

.marketing-affiliate-modal-content h3 {
  margin: 0 2rem 1.25rem 0;
  color: #1f2937;
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 650;
}

.affiliate-history-modal-content {
  width: min(1200px, calc(100% - 2rem));
  max-width: 1200px;
}

.affiliate-history-table {
  min-width: 1000px;
}

.affiliate-history-table td:first-child,
.affiliate-history-table td:last-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.affiliate-history-open {
  padding: 0;
  border: 0;
  background: transparent;
  color: #7c3aed;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.affiliate-history-open:hover,
.affiliate-history-open:focus-visible {
  color: #5b21b6;
}

.affiliate-management-section + .affiliate-management-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e5e7eb;
}

.affiliate-management-section h4 {
  margin: 0 0 .8rem;
  color: #292524;
  font-size: 1rem;
  font-weight: 650;
}

.affiliate-register-panel[hidden] {
  display: none;
}

.affiliate-register-toggle {
  min-height: 2.35rem;
  padding: .55rem .85rem;
  font-size: .88rem;
  font-weight: 600;
}

.affiliate-register-panel:not([hidden]) {
  margin-top: 1rem;
}

.affiliate-register-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem .9rem;
}

.affiliate-register-form label {
  color: #374151;
  font-size: .82rem;
  font-weight: 600;
}

.affiliate-register-form input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.7rem;
  padding: .65rem .75rem;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  background: #fff;
  color: #1f2937;
}

.affiliate-register-submit {
  grid-column: 1 / -1;
  justify-self: start;
  width: auto;
  min-height: 2.35rem;
  padding: .55rem .9rem;
  font-size: .85rem;
}

.affiliate-register-submit:disabled {
  cursor: wait;
  opacity: .6;
}

.affiliate-registration-result {
  margin-top: .75rem !important;
  padding: .75rem;
  border-radius: 9px;
  background: #f0fdf4;
  color: #166534 !important;
  overflow-wrap: anywhere;
}

.affiliate-registration-result strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.affiliate-network-table {
  min-width: 1180px;
  font-size: .82rem;
}

.affiliate-network-table td:first-child {
  font-family: inherit;
  width: 2.5rem;
  text-align: center;
}

.affiliate-network-table td:nth-child(4) {
  max-width: 14rem;
  overflow-wrap: anywhere;
}

.affiliate-network-search-label {
  display: block;
  margin: .2rem 0 .35rem;
  color: #57534e;
  font-size: .82rem;
  font-weight: 600;
}

.affiliate-network-search {
  box-sizing: border-box;
  width: min(100%, 34rem);
  min-height: 2.6rem;
  margin-bottom: .8rem;
  padding: .6rem .75rem;
  border: 1px solid #d6d3d1;
  border-radius: 8px;
  font: inherit;
}

.affiliate-bulk-actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: .65rem;
  margin: 0 0 .9rem;
  padding: .8rem;
  border: 1px solid #d6d3d1;
  border-radius: 10px;
  background: #fafaf9;
}

.affiliate-bulk-actions[hidden] {
  display: none;
}

.affiliate-bulk-actions strong {
  align-self: center;
  margin-right: .35rem;
  color: #292524;
}

.affiliate-bulk-actions label {
  color: #57534e;
  font-size: .78rem;
  font-weight: 600;
}

.affiliate-bulk-actions input {
  box-sizing: border-box;
  width: 5.5rem;
  min-height: 2.5rem;
  padding: .45rem;
  border: 1px solid #d6d3d1;
  border-radius: 7px;
  font: inherit;
}

.affiliate-bulk-actions button {
  min-height: 2.5rem;
  padding: .55rem .85rem;
}

.affiliate-bank-editor {
  display: grid;
  min-width: 12rem;
  gap: .35rem;
  margin-top: .35rem;
}

.affiliate-bank-editor input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.2rem;
  padding: .4rem .55rem;
  border: 1px solid #d6d3d1;
  border-radius: 6px;
  font: inherit;
}

.affiliate-bank-legacy-info {
  display: block;
  max-width: 14rem;
  color: #78716c;
  overflow-wrap: anywhere;
}

.affiliate-network-table td:nth-child(5) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.affiliate-network-table td:nth-child(3) {
  text-align: left;
}

.affiliate-network-table .affiliate-commission-input,
.affiliate-network-table .affiliate-discount-input {
  box-sizing: border-box;
  width: 5.5rem;
  min-height: 2.2rem;
  padding: .4rem .5rem;
  border: 1px solid #d6d3d1;
  border-radius: 6px;
  font: inherit;
}

.affiliate-network-table td:last-child {
  text-align: left;
}

.affiliate-rates-save {
  min-height: 2.2rem;
  margin: 0 .35rem .35rem 0;
  padding: .45rem .75rem;
  font-size: .78rem;
}

.affiliate-network-pay {
  min-height: 2.2rem;
  padding: .45rem .75rem;
  font-size: .78rem;
}

.affiliate-network-delete {
  min-height: 2.2rem;
  margin-left: .35rem;
  padding: .45rem .75rem;
  border: 1px solid #b91c1c !important;
  border-radius: 6px !important;
  color: #b91c1c !important;
  background: #fff !important;
  font-size: .78rem;
  font-weight: 600;
}

.affiliate-network-delete:hover {
  border-color: #991b1b !important;
  color: #991b1b !important;
  background: #fef2f2 !important;
}

.affiliate-bank-save {
  min-height: 2.2rem;
  padding: .45rem .75rem;
  font-size: .78rem;
}

.marketing-card .marketing-broadcast-open {
  min-height: 2.7rem;
  padding: .7rem 1.15rem;
  font-size: .9rem;
}

.marketing-replenishment-count {
  margin: .85rem 0;
  color: var(--text-secondary, #6b6258);
  font-size: .88rem;
}

.marketing-replenishment-count strong {
  color: var(--text-primary, #33281f);
  font-variant-numeric: tabular-nums;
}

.marketing-card > small {
  color: #78716c;
  font-size: .75rem;
  line-height: 1.4;
}

.marketing-broadcast-modal-content {
  box-sizing: border-box;
  width: min(520px, calc(100% - 2rem));
  max-width: 520px;
  margin: 5vh auto;
  padding: 2rem;
}

@media (max-width: 640px) {
  .marketing-affiliate-modal-content {
    padding: 1.25rem;
  }

  .affiliate-register-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .affiliate-register-submit {
    grid-column: auto;
  }
}

.affiliate-code-entry {
  margin-top: 1rem;
}

.affiliate-code-entry label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.affiliate-code-controls {
  display: flex;
  gap: 0.5rem;
}

.affiliate-code-controls input {
  min-width: 0;
  flex: 1;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 8px;
  font: inherit;
}

.affiliate-code-controls input.is-applied {
  border-color: #16803c;
  background: #f0fdf4;
  color: #166534;
}

.affiliate-code-status {
  min-height: 1.2em;
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
}

.affiliate-code-status.is-success {
  color: #16803c;
}

.affiliate-code-status.is-error {
  color: #b91c1c;
}

.checkout-discount-row {
  display: flex;
  justify-content: space-between;
  margin-top: 0.45rem;
  color: #16803c;
  font-weight: 600;
}

.checkout-discount-row[hidden],
#checkoutOriginalTotal[hidden] {
  display: none;
}

#checkoutOriginalTotal {
  margin-right: 0.25rem;
  color: #777;
  font-size: 0.85em;
  font-weight: 400;
}

.marketing-broadcast-modal-content h3 {
  margin: 0 2rem .35rem 0;
  color: #1f2937;
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
}

.marketing-broadcast-close {
  position: absolute;
  top: .8rem;
  right: .9rem;
  border: 0;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.marketing-broadcast-close:disabled,
.marketing-broadcast-cancel:disabled {
  cursor: wait;
  opacity: .55;
}

.marketing-broadcast-intro {
  margin: 0 0 1.25rem;
  color: #6b7280;
  font-size: .9rem;
}

.marketing-broadcast-form {
  display: grid;
  gap: .65rem;
}

.marketing-broadcast-form label {
  color: #374151;
  font-size: .85rem;
  font-weight: 600;
}

.marketing-broadcast-form select,
.marketing-broadcast-form textarea {
  box-sizing: border-box;
  width: 100%;
  padding: .75rem .85rem;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  background: #fff;
  color: #1f2937;
  font: inherit;
}

.marketing-broadcast-form textarea {
  min-height: 8rem;
  resize: vertical;
}

.marketing-broadcast-form select:focus,
.marketing-broadcast-form textarea:focus {
  border-color: #9ca3af;
  outline: 3px solid rgba(107, 114, 128, .15);
}

.marketing-broadcast-form > small {
  color: #6b7280;
  font-size: .78rem;
}

.marketing-broadcast-error {
  margin: .25rem 0;
  color: #b91c1c;
  font-size: .85rem;
}

.marketing-broadcast-actions {
  display: flex;
  justify-content: flex-end;
  gap: .65rem;
  margin-top: .5rem;
}

.marketing-broadcast-actions button {
  min-height: 2.65rem;
  padding: .65rem 1rem;
  font-size: .9rem;
}

.marketing-broadcast-spinner:not([hidden]) {
  width: 1rem;
  height: 1rem;
  margin-left: .55rem;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: marketing-broadcast-spin .7s linear infinite;
}

@keyframes marketing-broadcast-spin {
  to { transform: rotate(360deg); }
}

.marketing-referral-placeholder {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .8rem;
  border: 1px dashed #d6d3d1;
  border-radius: 9px;
  color: #78716c;
  font-size: .8rem;
}

.marketing-referral-placeholder code {
  color: #57534e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.marketing-card > label {
  color: #57534e;
  font-size: .82rem;
  font-weight: 600;
}

.marketing-tracking-form {
  display: grid;
  gap: .55rem;
}

.marketing-tracking-form label {
  color: #57534e;
  font-size: .82rem;
  font-weight: 600;
}

.marketing-tracking-form input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.5rem;
  padding: .55rem .7rem;
  border: 1px solid #d6d3d1;
  border-radius: 8px;
  font: inherit;
}

.marketing-tracking-form input:disabled {
  background: #f9fafb;
  color: #78716c;
}

.marketing-tracking-save-status {
  min-height: 1.2em;
  color: #15803d;
  font-size: .82rem;
}

.marketing-tracking-save-status[data-state="error"] {
  color: #b91c1c;
}

.marketing-card > input {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.5rem;
  padding: .55rem .7rem;
  border: 1px solid #d6d3d1;
  border-radius: 8px;
  font: inherit;
}

.marketing-card > input:disabled {
  background: #f9fafb;
  color: #78716c;
}

.marketing-card .marketing-seo-analyze {
  min-height: 2.7rem;
  padding: .7rem 1.15rem;
  font-size: .9rem;
}

.marketing-seo-analyze:disabled {
  cursor: wait;
  opacity: .65;
}

.marketing-seo-spinner:not([hidden]) {
  width: 1rem;
  height: 1rem;
  margin-left: .55rem;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: marketing-broadcast-spin .7s linear infinite;
}

.marketing-seo-error {
  margin: 0;
  color: #b91c1c;
  font-size: .82rem;
}

.marketing-seo-results:not([hidden]) {
  box-sizing: border-box;
  width: 100%;
  padding: .85rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
}

.marketing-seo-score {
  display: block;
  margin-bottom: .55rem;
  font-size: .95rem;
}

.marketing-seo-score-high { color: #15803d; }
.marketing-seo-score-medium { color: #c2410c; }
.marketing-seo-score-low { color: #b91c1c; }

.marketing-seo-results ul {
  display: grid;
  gap: .4rem;
  margin: 0;
  padding-left: 1.15rem;
  color: #4b5563;
  font-size: .8rem;
  line-height: 1.45;
}

.analytics-ranking-list {
  display: grid;
  gap: .25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: analytics-rank;
}

.analytics-ranking-list > li {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: .7rem .25rem;
  border-bottom: 1px solid #f0ede8;
  counter-increment: analytics-rank;
}

.analytics-ranking-list > li:last-child {
  border-bottom: 0;
}

.analytics-ranking-list > li:not(.analytics-empty-list, .analytics-loading-item)::before {
  content: counter(analytics-rank);
  display: grid;
  width: 1.65rem;
  height: 1.65rem;
  flex: 0 0 1.65rem;
  place-items: center;
  border-radius: 50%;
  background: #f5f0e8;
  color: #76501a;
  font-size: .78rem;
  font-weight: 700;
}

.analytics-ranking-name-wrap {
  display: block;
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
}

.analytics-ranking-list .analytics-ranking-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-ranking-metric-group {
  display: flex;
  min-width: max-content;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: .1rem;
  text-align: right;
  white-space: nowrap;
}

.analytics-ranking-list .analytics-ranking-metric {
  flex: 0 0 auto;
  color: #332719;
  font-size: .86rem;
  text-align: right;
  white-space: nowrap;
}

.analytics-ranking-orders {
  color: #78716c;
  font-size: .72rem;
}

.analytics-vip-customer {
  display: block;
  min-width: 0;
  flex: 1 1 0;
  border: 0 !important;
  padding: .25rem 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #8a570e !important;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.analytics-vip-customer:hover {
  color: #5f3c08 !important;
  text-decoration: underline;
}

.analytics-vip-customer:focus-visible {
  outline: 2px solid rgba(138, 87, 14, .45);
  outline-offset: 2px;
}

.analytics-empty-list {
  color: #78716c;
  font-size: .88rem;
}

.analytics-loading-item {
  min-height: 2.5rem;
}

.analytics-loading-bar {
  display: inline-block;
  width: 70%;
  height: .85rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #f1eee9 25%, #faf9f7 50%, #f1eee9 75%);
  background-size: 200% 100%;
  animation: analytics-loading 1.35s ease-in-out infinite;
}

@keyframes analytics-loading {
  to { background-position: -200% 0; }
}

@media (max-width: 640px) {
  .crm-detail-modal-content {
    padding: 1.25rem;
  }

  .crm-detail-grid,
  .crm-customer-metrics {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .analytics-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketing-performance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketing-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-chart-wrap {
    height: 250px;
  }
}

@media (max-width: 380px) {
  .analytics-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketing-performance-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .marketing-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .analytics-kpi-card,
  .analytics-tooltip::after {
    transition: none;
  }

  .analytics-kpi-card:hover {
    transform: none;
  }
}

.product-editor-modal {
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-sizing: border-box;
  padding: 1rem;
}

.product-editor-modal-content {
  width: min(1120px, 100%);
  max-width: 1120px;
  max-height: calc(100vh - 2rem);
  margin: auto;
  padding: 2.5rem;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  background: #fff;
  box-shadow: var(--shadow-lg);
  opacity: 1;
  animation: none;
}

#editProductModal .product-editor-modal-content {
  max-width: 1120px;
  padding: 2rem;
}

.product-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: stretch;
  gap: 1.25rem;
}

.product-form-details,
.product-form-media {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  background: #fff;
}

.product-form-details {
  display: flex;
  flex-direction: column;
}

.product-form-details > h5,
.product-form-media > h5 {
  margin: 0 0 1rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
}

.product-form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.product-form-fields > .form-group {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.product-form-fields > .form-group > label,
.product-category-editor > label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
}

.product-form-fields .styled-input,
.product-category-field .styled-input,
.product-form-media .styled-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.product-image-url-field {
  margin-top: 1rem;
}

.product-image-url-field > label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
}

.product-image-url-field textarea {
  min-height: 4rem;
  resize: vertical;
  overflow-wrap: anywhere;
}

.product-category-field {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 0;
}

.product-category-editor {
  display: none;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px dashed var(--border-color);
  border-radius: 0.5rem;
  background: #fafafa;
}

.product-category-editor .product-category-field > .styled-input {
  flex: 1 1 auto;
}

.product-description-group {
  margin: 1rem 0 0;
}

.product-form-details > .product-description-group,
.product-form-details > .product-description-editor {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.product-description-group > label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.product-description-group textarea,
.product-description-editor textarea {
  box-sizing: border-box;
  flex: 1 1 auto;
  width: 100%;
  min-height: 12rem;
  resize: vertical;
}

.product-form-details > small {
  display: block;
  margin-top: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.product-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

@keyframes modalPop {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }

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

.close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg-secondary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  color: var(--error-color);
  background: #FEF2F2;
  transform: rotate(90deg);
}

.category-manager-modal-content {
  max-width: 520px;
  padding: 2rem;
}

.admin-category-list {
  display: grid;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.admin-category-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  background: #fff;
}

.admin-category-list-item button {
  margin: 0;
}

.admin-category-protected,
.admin-category-list-empty {
  color: #6b7280;
  font-size: 0.875rem;
}

/* Loader */

.loader {
  border: 3px solid rgba(227, 48, 34, 0.2);
  border-top: 3px solid var(--accent-color);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  margin: 4rem auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.feedback-msg {
  margin-top: 1.25rem;
  font-size: 1rem;
  text-align: center;
  font-weight: 400;
}

.feedback-msg.error {
  color: var(--error-color);
}

.feedback-msg.success {
  color: var(--success-color);
}

/* ========== ABOUT US (MATERIAL DESIGN) ========== */

.about-hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem auto;
}

.about-hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.about-hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.about-heritage {
  background: #ffffff;
  padding: 3rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  margin-bottom: 4rem;
}

.about-heritage h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--accent-color);
}

.about-heritage p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.about-features-section h3 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.about-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.feature-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-card h4 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.trust-banner {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  text-align: center;
  padding: 3rem 2rem;
}

.trust-banner h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.trust-banner p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ========== MD3 LOGIN MODAL ========== */

.md3-modal {
  font-family: 'Roboto', sans-serif;
}

.md3-modal .modal-content {
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  max-width: 450px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.md3-modal h2 {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 2rem;
  color: #1f1f1f;
  margin-bottom: 0.5rem;
  text-align: center;
}

.md3-modal p {
  text-align: center;
  color: #444746;
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* Floating Label Fields */

.md3-outlined-field {
  position: relative;
  margin-bottom: 1.5rem;
}

.md3-outlined-field input,
.md3-outlined-field textarea,
.md3-outlined-field select {
  width: 100%;
  padding: 1rem 0.75rem;
  font-size: 1rem;
  font-family: 'Roboto', sans-serif;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: transparent;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

.md3-outlined-field input:focus,
.md3-outlined-field textarea:focus,
.md3-outlined-field select:focus {
  border-color: #d97706;
  border-width: 2px;
  padding: calc(1rem - 1px) calc(1rem - 1px);
}

.md3-outlined-field label {
  position: absolute;
  left: 1rem;
  top: 1rem;
  font-size: 1rem;
  color: #444746;
  pointer-events: none;
  background: transparent;
  padding: 0 4px;
  transition: 0.2s ease all;
  margin-left: -4px;
  z-index: 10;
}

.md3-outlined-field input:not(:-moz-placeholder-shown) ~ label,
.md3-outlined-field textarea:not(:-moz-placeholder-shown) ~ label {
  top: -0.6rem;
  font-size: 0.75rem;
  color: #d97706;
  background: #fff;
}

.md3-outlined-field input:focus ~ label,
.md3-outlined-field input:not(:placeholder-shown) ~ label,
.md3-outlined-field textarea:focus ~ label,
.md3-outlined-field textarea:not(:placeholder-shown) ~ label,
.md3-outlined-field select ~ label {
  top: -0.6rem;
  font-size: 0.75rem;
  color: #d97706;
  background: #fff;
  z-index: 10;
}

.md3-outlined-field input:not(:focus):not(:-moz-placeholder-shown) ~ label,
.md3-outlined-field textarea:not(:focus):not(:-moz-placeholder-shown) ~ label {
  color: #444746;
}

.md3-outlined-field input:not(:focus):not(:placeholder-shown) ~ label,
.md3-outlined-field textarea:not(:focus):not(:placeholder-shown) ~ label {
  color: #444746;
}

/* Primary Pill Button */

.md3-btn {
  width: 100%;
  border-radius: 100px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Roboto', sans-serif;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

.md3-btn.primary {
  background: #d97706;
  color: #fff;
}

.md3-btn.primary:hover {
  background: #b45309;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

/* Google SSO Button */

.md3-google-btn {
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #747775;
}

.md3-google-btn:hover {
  background: #f8fafd;
}

.md3-google-btn svg {
  width: 20px;
  height: 20px;
}

/* Or Divider */

.md3-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #747775;
  margin: 1.5rem 0;
}

.md3-divider::before, .md3-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e0e2e0;
}

.md3-divider span {
  padding: 0 10px;
  font-size: 0.9rem;
}

/* Drop Zone Styles */

.drop-zone {
  width: 100%;
  padding: 2rem;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  text-align: center;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.drop-zone:hover {
  border-color: var(--accent-color);
  background: #fffafa;
}

.drop-zone--active {
  border-color: var(--success-color);
  background: #f0fff0;
}

.admin-product-upload-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.featured-product-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #fff4d6;
  color: #8a4b08;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.4;
  vertical-align: middle;
}

.admin-featured-product-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
  color: var(--text-primary);
  font-weight: 600;
}

.admin-featured-product-toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent-color);
}

.admin-product-upload-group {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  background: #fff;
}

.admin-product-upload-group > small {
  display: block;
  margin-top: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.admin-product-media-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

.admin-product-drop-zone {
  display: flex;
  width: 100%;
  min-height: 6rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  font-size: 0.85rem;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
}

.admin-product-drop-zone p {
  margin: 0;
  color: var(--text-secondary);
  pointer-events: none;
}

.admin-product-drop-zone span {
  pointer-events: none;
}

.admin-product-drop-zone input[type="file"] {
  display: none;
}

.admin-product-media-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  align-content: start;
  gap: 0.5rem;
  min-width: 0;
}

.admin-product-media-preview:empty {
  display: none;
}

.admin-product-media-preview > img,
.admin-product-media-preview > video {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  object-fit: cover;
}

#addProductImageUrls {
  box-sizing: border-box;
  width: 100%;
  min-height: 3.5rem;
  height: 3.5rem;
  resize: vertical;
}

.admin-product-video-section {
  margin: 1rem 0 0;
}

.admin-product-video-row {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 1rem;
}

.admin-product-video-input {
  flex: 1 1 0;
  min-width: 0;
}

.admin-product-video-preview {
  flex: 0 1 20rem;
  width: 100%;
  max-width: 20rem;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #111;
  aspect-ratio: 16 / 9;
}

.admin-product-video-preview[hidden] {
  display: none;
}

.admin-product-video-preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.admin-product-media-help {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* Media Preview Styles */

.media-preview-item {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #eee;
}

.media-preview-item img, .media-preview-item video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -o-object-fit: cover;
     object-fit: cover;
}

.media-preview-item--video::after {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: rgb(0 0 0 / 65%);
  color: #fff;
  content: '▶';
  font-size: 0.85rem;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.product-form-actions button[aria-busy="true"] {
  cursor: wait;
  opacity: 0.8;
}

.admin-product-image-placeholder {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #f3eee8, #e6ddd3);
  color: #75675b;
  font-size: 0.65rem;
}

.admin-edit-media-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 5rem;
  margin-bottom: 0.25rem;
}

.admin-edit-media-upload {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  background: #fff;
}

.admin-edit-media-upload input[type="file"] {
  width: auto;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-color);
  font: inherit;
}

.admin-edit-media-upload input[type="file"]::file-selector-button {
  margin-right: 0.65rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--button-primary);
  border-radius: var(--radius-pill);
  color: var(--button-primary);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.admin-edit-media-upload label {
  flex: 0 0 auto;
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 500;
}

.admin-edit-media-preview {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-edit-media-preview img {
  display: block;
  width: 80px;
  height: 80px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  object-fit: cover;
}

@media (max-width: 520px) {
  #editProductModal .product-editor-modal-content {
    padding: 1.25rem;
  }

  .admin-product-video-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-product-video-preview {
    flex-basis: auto;
    max-width: none;
  }

  .admin-edit-media-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .admin-edit-media-upload {
    flex: 1 1 100%;
  }
}

@media (max-width: 768px) {
  .product-form-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .broker-service-tabs,
  .broker-config-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-form-details > .product-description-group,
  .product-form-details > .product-description-editor {
    flex: 0 0 auto;
  }

  .product-description-group textarea,
  .product-description-editor textarea {
    flex: 0 0 auto;
    min-height: 12rem;
  }

  .product-form-details {
    order: 0;
  }

  .product-form-media {
    order: 1;
  }
}

.remove-media-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-size: 12px;
  cursor: pointer;
}

.remove-media-btn:hover {
  background: var(--error-color);
}

/* App notifications */

#app-notification-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-notification {
  padding: 12px 20px;
  border-radius: 4px;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(20px);
  animation: slideIn 0.3s forwards, fadeOut 0.3s forwards 2.7s;
}

.app-notification-success {
  background-color: var(--success-color);
}

.app-notification-error {
  background-color: var(--error-color);
}

.app-notification-info {
  background-color: var(--accent-light);
}

/* Button Loading Spinner */

.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hover\:-translate-y-1:hover{
  --tw-translate-y: -0.25rem;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.hover\:bg-gray-50:hover{
  --tw-bg-opacity: 1;
  background-color: rgb(249 250 251 / var(--tw-bg-opacity, 1));
}

.hover\:bg-red-600:hover{
  --tw-bg-opacity: 1;
  background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));
}

.hover\:bg-red-700:hover{
  --tw-bg-opacity: 1;
  background-color: rgb(185 28 28 / var(--tw-bg-opacity, 1));
}

.hover\:text-gray-900:hover{
  --tw-text-opacity: 1;
  color: rgb(17 24 39 / var(--tw-text-opacity, 1));
}

.hover\:text-red-500:hover{
  --tw-text-opacity: 1;
  color: rgb(239 68 68 / var(--tw-text-opacity, 1));
}

.hover\:text-red-600:hover{
  --tw-text-opacity: 1;
  color: rgb(220 38 38 / var(--tw-text-opacity, 1));
}

.hover\:text-red-700:hover{
  --tw-text-opacity: 1;
  color: rgb(185 28 28 / var(--tw-text-opacity, 1));
}

.hover\:shadow-xl:hover{
  --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

.focus\:border-red-500:focus{
  --tw-border-opacity: 1;
  border-color: rgb(239 68 68 / var(--tw-border-opacity, 1));
}

.focus\:placeholder-gray-400:focus::-moz-placeholder{
  --tw-placeholder-opacity: 1;
  color: rgb(156 163 175 / var(--tw-placeholder-opacity, 1));
}

.focus\:placeholder-gray-400:focus::placeholder{
  --tw-placeholder-opacity: 1;
  color: rgb(156 163 175 / var(--tw-placeholder-opacity, 1));
}

.focus\:outline-none:focus{
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.focus\:ring-1:focus{
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.focus\:ring-4:focus{
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.focus\:ring-red-500:focus{
  --tw-ring-opacity: 1;
  --tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1));
}

.focus\:ring-red-500\/30:focus{
  --tw-ring-color: rgb(239 68 68 / 0.3);
}

.group:hover .group-hover\:scale-105{
  --tw-scale-x: 1.05;
  --tw-scale-y: 1.05;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

@media (min-width: 640px){
  .sm\:grid-cols-2{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sm\:px-6{
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .sm\:text-sm{
    font-size: 0.875rem;
    line-height: 1.25rem;
  }
}

@media (min-width: 768px){
  .md\:flex{
    display: flex;
  }

  .md\:text-5xl{
    font-size: 3rem;
    line-height: 1;
  }

  .md\:text-xl{
    font-size: 1.25rem;
    line-height: 1.75rem;
  }
}

@media (min-width: 1024px){
  .lg\:ml-6{
    margin-left: 1.5rem;
  }

  .lg\:max-w-xs{
    max-width: 20rem;
  }

  .lg\:grid-cols-3{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lg\:justify-end{
    justify-content: flex-end;
  }

  .lg\:px-8{
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .lg\:text-6xl{
    font-size: 3.75rem;
    line-height: 1;
  }
}

@media (min-width: 1280px){
  .xl\:grid-cols-4{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Custom Scroll Reveal Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.storefront-hero {
  background: var(--bg-color);
}

.storefront-hero-content {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(214, 208, 196, 0.75);
  box-shadow: var(--shadow-md);
}

.about-page {
  background: var(--bg-color);
}

.about-page .about-eyebrow {
  color: #b45309;
}

.about-page .about-title {
  color: var(--text-primary);
}

.about-page .about-intro {
  color: var(--text-secondary);
}

.about-page .about-card {
  background: #fff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.about-page .about-card h3 {
  color: var(--text-primary);
}

.about-page .about-card p {
  color: var(--text-secondary);
}

.about-page .about-stats {
  border-color: var(--border-color);
}

.about-page .about-stats p {
  color: var(--text-secondary);
}

.contact-page {
  background: var(--bg-color);
}

.contact-background {
  background: linear-gradient(135deg, #fafafa 0%, #f4efe6 100%);
}

.contact-heading h2,
.contact-details {
  color: var(--text-primary);
}

.contact-heading p,
.contact-details p {
  color: var(--text-secondary);
}

.contact-card {
  border: 1px solid var(--border-color);
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.contact-details a {
  color: var(--text-primary);
  text-decoration: none;
}

.contact-details a:hover {
  color: #92400e;
}

.contact-details .fa-envelope,
.contact-details .fa-whatsapp {
  color: #b45309;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.contact-page a.contact-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 100%;
  gap: 8px;
  min-height: 40px;
  max-width: 100%;
  padding: 8px 16px;
  border: 2px solid transparent;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 6px rgb(0 0 0 / 12%);
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.contact-page a.contact-email-button {
  background-color: #333333;
  color: #ffffff;
}

.contact-page a.contact-email-button:hover {
  background-color: #1f2937;
  color: #ffffff;
  box-shadow: 0 4px 10px rgb(0 0 0 / 16%);
  transform: translateY(-1px);
}

.contact-page a.contact-whatsapp-button {
  background-color: #25D366;
  color: #ffffff;
}

.contact-page a.contact-whatsapp-button:hover {
  background-color: #1EBE5D;
  color: #ffffff;
  box-shadow: 0 4px 10px rgb(0 0 0 / 16%);
  transform: translateY(-1px);
}

.contact-action-button .fa-envelope,
.contact-action-button .fa-whatsapp {
  color: #ffffff;
  font-size: 1.35rem;
}

.contact-page a.contact-action-button:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}

.contact-trust-signals {
  border-color: var(--border-color);
}

.contact-trust-signals h5 {
  color: var(--text-primary);
}

.contact-form-card {
  border: 1px solid var(--border-color);
  background: #fafafa;
  box-shadow: var(--shadow-sm);
}

.contact-input {
  border: 1px solid #d6d3d1;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.contact-input:focus {
  border-color: #b45309;
  outline: 2px solid rgba(180, 83, 9, 0.2);
  outline-offset: 1px;
}

.contact-page .contact-form-card button[type="submit"] {
  background: #92400e;
}

.contact-page .contact-form-card button[type="submit"]:hover {
  background: #78350f;
}

.contact-page .contact-form-card button[type="submit"]:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}

.contact-page .feedback-msg.success {
  color: #166534;
}

.contact-page .feedback-msg.error {
  color: #b91c1c;
}

.cart-empty-state {
  display: grid;
  min-height: clamp(20rem, 42vh, 26rem);
  place-items: center;
  padding: 2rem 0;
  text-align: center;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: wrap;
}

button.quantity-stepper {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  place-items: center;
  padding: 0;
  border: 1px solid var(--button-primary) !important;
  border-radius: 50% !important;
  color: var(--button-primary) !important;
  background: transparent !important;
  font-size: 1.1rem;
  line-height: 1;
}

button.quantity-stepper:not(:disabled):hover {
  border-color: var(--button-primary-hover) !important;
  color: var(--button-primary-hover) !important;
  background: var(--button-secondary-hover) !important;
}

button.quantity-stepper:disabled {
  border-color: #d6d3d1 !important;
  color: #a8a29e !important;
  background: #f5f5f4 !important;
  opacity: 1;
}

.quantity-value {
  min-width: 1.5rem;
  color: var(--text-primary);
  font-weight: 600;
  text-align: center;
}

button.cart-remove-button,
button.mini-cart-remove {
  padding: 0.35rem 0.7rem;
  color: var(--button-primary) !important;
  font-size: 0.8rem;
  white-space: nowrap;
}

.mini-cart-item {
  align-items: center;
}

.mini-cart-item-details {
  min-width: 0;
}

.mini-cart-item-subtotal {
  margin: 0.25rem 0 0;
  color: var(--text-primary);
  font-weight: 600;
}

#section-checkout .content-container {
  max-width: 1200px;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
  align-items: start;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.checkout-address-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 0.32fr);
  gap: 0.75rem;
}

.checkout-address-fields textarea {
  grid-column: 1 / -1;
  min-height: 76px;
}

.checkout-area-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.checkout-area-details label {
  display: grid;
  gap: 0.25rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
}

.checkout-area-details input[readonly] {
  min-width: 0;
  padding: 0.55rem 0.75rem;
  background: #f7f6f3;
  color: var(--text-primary);
  cursor: default;
}

.checkout-split-shipping-breakdown {
  flex: 1 0 100%;
  margin: 0 0 0 2rem;
  padding-left: 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.checkout-form-card,
.checkout-shipping-card,
.checkout-trust-card,
.checkout-marketplace-card {
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.045);
}

.checkout-sidebar {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.checkout-trust-card {
  background: linear-gradient(145deg, #fffdf7, #fff);
}

.checkout-trust-badge {
  display: inline-flex;
  padding: 0.35rem 0.65rem;
  border: 1px solid #f1dfad;
  border-radius: 999px;
  color: #805c16;
  background: #fff8e5;
  font-size: 0.75rem;
  font-weight: 600;
}

.checkout-trust-card h3 {
  margin: 0.9rem 0 0.4rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1.25rem;
}

.checkout-trust-card p,
.checkout-marketplace-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.checkout-trust-stars {
  margin-top: 0.65rem;
  color: #d29a1e;
  font-size: 1.35rem;
  letter-spacing: 0.18rem;
  line-height: 1;
}

.checkout-marketplace-card {
  border-color: #eee8dc;
  box-shadow: none;
}

.marketplace-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px;
  width: 100%;
  margin-top: 0.85rem;
}

.marketplace-grid a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 10px 4px;
  box-sizing: border-box;
  border: 1px solid #e7dfd1;
  border-radius: 999px;
  color: #55504a;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.marketplace-grid a:hover {
  border-color: #c89737;
  color: #805c16;
  background: #fffaf0;
}

.marketplace-grid a:focus-visible {
  outline: 3px solid #f1d38a;
  outline-offset: 2px;
}

.consent-wrapper {
  margin-bottom: 20px;
  padding: 10px 15px;
  border-radius: 8px;
  background: #f9f9f9;
}

.consent-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.consent-label input {
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--accent-color);
}

.consent-main-text {
  color: #333;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}

.checkout-draft-status {
  min-height: 1.2rem;
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

@media (max-width: 820px) {
  .checkout-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .checkout-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 560px) {
  .checkout-address-fields {
    grid-template-columns: minmax(0, 1fr) minmax(80px, 0.4fr);
  }

  .checkout-area-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .checkout-form-card,
  .checkout-shipping-card,
  .checkout-trust-card,
  .checkout-marketplace-card {
    padding: 1rem;
  }

  .checkout-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

}

.checkout-line-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.checkout-line-details {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.15rem;
}

.checkout-item-name {
  color: var(--text-primary);
  font-weight: 500;
}

.checkout-item-unit-price {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.checkout-item-subtotal {
  color: var(--text-primary);
}

.cart-line-item > .quantity-control {
  margin-left: 1rem;
}

@media (max-width: 480px) {
  .checkout-line-item,
  .cart-line-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .cart-line-item > .quantity-control {
    margin-left: 0;
  }

  .mini-cart-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .mini-cart-item .quantity-control {
    justify-content: flex-start;
  }
}

.cart-empty-state.hidden {
  display: none;
}

.cart-recommendations img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cart-recommendation-card .product-card-actions {
  width: calc(100% - 2rem);
  margin: auto auto 0;
}

@media (max-width: 640px) {
  .cart-empty-state {
    min-height: 19rem;
    padding: 1.5rem 0;
  }
}

.marketplace-links {
  box-sizing: border-box;
  position: relative;
  width: 100%;
  min-width: 0;
}

.p2p-marketplace-links {
  margin-top: .75rem;
}

.cart-recommendation-marketplace-links {
  width: 100%;
  margin: .75rem 0 0;
}

.marketplace-links summary {
  list-style: none;
  border: 1px solid #d6d3d1;
  border-radius: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: #57534e;
  background: #fff;
  text-align: center;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.marketplace-links summary::-webkit-details-marker {
  display: none;
}

.marketplace-links summary::after {
  content: "+";
  margin-left: 0.45rem;
  color: #a8a29e;
}

.marketplace-links[open] summary::after {
  content: "−";
}

.marketplace-links summary:hover,
.marketplace-links summary:focus-visible {
  color: #92400e;
  border-color: #d97706;
  background: #fffbeb;
}

.marketplace-links-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 0.65rem 0.15rem 0.15rem;
}

.marketplace-links-menu a {
  display: inline-flex;
  flex: 1 1 7rem;
  min-width: 0;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--button-primary);
  border-radius: var(--radius-pill);
  color: var(--button-primary);
  background: transparent;
  font-size: 0.7rem;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.marketplace-links-menu a:hover {
  border-color: var(--button-primary-hover);
  color: var(--button-primary-hover);
  background: var(--button-secondary-hover);
  box-shadow: 0 2px 8px rgba(120, 53, 15, 0.12);
}

.marketplace-links-menu svg {
  width: 1rem;
  height: 1rem;
}

.mini-cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
  pointer-events: none;
}

.mini-cart-overlay[hidden] {
  display: none;
}

.mini-cart-overlay.is-open {
  visibility: visible;
  pointer-events: auto;
}

.mini-cart-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(17, 24, 39, 0.48);
  opacity: 0;
  transition: opacity 0.25s ease;
  cursor: pointer;
}

.mini-cart-overlay.is-open .mini-cart-backdrop {
  opacity: 1;
}

.mini-cart-panel {
  position: absolute;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  width: min(100%, 26rem);
  height: 100%;
  padding: 1.5rem;
  background: #fff;
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.18);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.mini-cart-overlay.is-open .mini-cart-panel {
  transform: translateX(0);
}

.mini-cart-header,
.mini-cart-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-cart-header {
  padding-bottom: 1rem;
  border-bottom: 1px solid #e7e5e4;
}

.mini-cart-header h2 {
  margin: 0;
  color: #1c1917;
  font-size: 1.25rem;
  font-weight: 600;
}

.mini-cart-close {
  border: 0;
  padding: 0.25rem 0.5rem;
  color: #78716c;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.mini-cart-items {
  flex: 1;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mini-cart-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f5f5f4;
}

.mini-cart-item-name {
  margin: 0;
  color: #292524;
  font-weight: 500;
}

.mini-cart-item-meta,
.mini-cart-footer p {
  margin: 0.35rem 0 0;
  color: #78716c;
  font-size: 0.875rem;
}

.mini-cart-remove {
  border: 0;
  padding: 0.25rem 0;
  color: #a8a29e;
  background: transparent;
  font-size: 0.8rem;
  cursor: pointer;
}

.mini-cart-remove:hover {
  color: #b91c1c;
}

.mini-cart-empty {
  padding: 2rem 0;
  color: #78716c;
  text-align: center;
}

.mini-cart-footer {
  padding-top: 1rem;
  border-top: 1px solid #e7e5e4;
}

.mini-cart-subtotal {
  color: #292524;
}

.mini-cart-subtotal strong {
  font-size: 1.1rem;
}

.mini-cart-checkout {
  display: block;
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-pill);
  color: #fff;
  background: #d97706;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease;
}

.mini-cart-checkout:hover {
  background: #b45309;
}

.contact-speed-dial {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  pointer-events: none;
}

.contact-speed-dial-actions,
.contact-speed-dial-toggle {
  pointer-events: auto;
}

.contact-speed-dial-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  visibility: hidden;
  opacity: 0;
  transform: translateY(0.75rem) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.contact-speed-dial.is-open .contact-speed-dial-actions {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.contact-speed-dial-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 10.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid #92400e;
  border-radius: 999px;
  color: #92400e;
  background: transparent;
  box-shadow: 0 4px 12px rgba(28, 25, 23, 0.12);
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.15s ease, color 0.15s ease;
}

.contact-speed-dial-link:hover {
  transform: translateX(-3px);
  color: #78350f;
  border-color: #78350f;
  background: #fffbeb;
}

.contact-speed-dial-link svg {
  width: 1.15rem;
  height: 1.15rem;
  color: #d97706;
}

.contact-speed-dial-link:first-child svg {
  color: #16a34a;
}

.contact-speed-dial-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.contact-speed-dial-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3.5rem;
  padding: 0.85rem 1.25rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #92400e;
  box-shadow: 0 8px 22px rgba(120, 53, 15, 0.28);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.contact-speed-dial-toggle:hover {
  background: #78350f;
  transform: translateY(-2px);
}

.contact-speed-dial-toggle:focus-visible,
.contact-speed-dial-link:focus-visible,
.mini-cart-close:focus-visible,
.mini-cart-checkout:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .contact-speed-dial {
    right: 1rem;
    bottom: 1rem;
  }

  .contact-speed-dial-toggle {
    min-height: 3.25rem;
    padding: 0.75rem 1rem;
  }

  .mini-cart-panel {
    padding: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-speed-dial-actions,
  .contact-speed-dial-link,
  .contact-speed-dial-toggle,
  .mini-cart-backdrop,
  .mini-cart-panel {
    transition: none;
  }
}

:root {
  --button-primary: #92400e;
  --button-primary-hover: #78350f;
  --button-secondary-hover: #fffbeb;
}

button:not(.mini-cart-backdrop) {
  border-radius: var(--radius-pill) !important;
  border: 1px solid var(--button-primary) !important;
  color: var(--button-primary) !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
}

button:not(.mini-cart-backdrop):hover {
  border-color: var(--button-primary-hover) !important;
  color: var(--button-primary-hover) !important;
  background: var(--button-secondary-hover) !important;
  box-shadow: 0 2px 8px rgba(120, 53, 15, 0.12);
}

button.danger-btn {
  border-color: var(--error-color) !important;
  color: var(--error-color) !important;
  background: transparent !important;
}

button.danger-btn:hover {
  border-color: var(--error-color) !important;
  color: var(--error-color) !important;
  background: #fef2f2 !important;
  box-shadow: 0 2px 8px rgba(153, 27, 27, 0.12);
}

:is(
  .primary-btn,
  .md3-btn.primary,
  .contact-speed-dial-toggle,
  .add-to-cart-btn,
  #checkoutButton,
  #emptyCartShopButton,
  #btnShowAddKategori,
  #adminBtnGetRates,
  .storefront-hero-content > button,
  .contact-page .contact-form-card button[type="submit"],
  button[type="submit"]:not(#searchButton),
  .filter-btn.active,
  .tab-btn.active
),
.mini-cart-checkout {
  border: 1px solid var(--button-primary) !important;
  color: #fff !important;
  background: var(--button-primary) !important;
  background-image: none !important;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

:is(
  .primary-btn,
  .md3-btn.primary,
  .contact-speed-dial-toggle,
  .add-to-cart-btn,
  #checkoutButton,
  #emptyCartShopButton,
  #btnShowAddKategori,
  #adminBtnGetRates,
  .storefront-hero-content > button,
  .contact-page .contact-form-card button[type="submit"],
  button[type="submit"]:not(#searchButton),
  .filter-btn.active,
  .tab-btn.active
):hover,
.mini-cart-checkout:hover {
  border-color: var(--button-primary-hover) !important;
  color: #fff !important;
  background: var(--button-primary-hover) !important;
  background-image: none !important;
  box-shadow: 0 4px 12px rgba(120, 53, 15, 0.2);
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  box-shadow: none !important;
  opacity: 0.6;
  transform: none !important;
}

.marketplace-links summary {
  border-color: var(--button-primary);
  border-radius: var(--radius-pill);
  color: var(--button-primary);
}

.marketplace-links summary:hover,
.marketplace-links summary:focus-visible {
  border-color: var(--button-primary-hover);
  color: var(--button-primary-hover);
  background: var(--button-secondary-hover);
  box-shadow: 0 2px 8px rgba(120, 53, 15, 0.12);
}

#section-admin .admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
  border-bottom: 1px solid var(--border-color);
}

#section-admin .admin-tabs button,
#section-admin .admin-tabs button:hover,
#section-admin .admin-tabs button.active,
#section-admin .admin-tabs button.active:hover {
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0.65rem 0;
  color: #4b5563 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  transform: none !important;
}

#section-admin .admin-tabs button:hover,
#section-admin .admin-tabs button.active,
#section-admin .admin-tabs button.active:hover {
  color: var(--button-primary) !important;
}

#section-admin .admin-tabs button.active {
  font-weight: 600;
}

#section-admin button.admin-btn-outline {
  margin: 0.12rem 0.2rem 0.12rem 0;
  padding: 0.32rem 0.7rem;
  border: 1px solid currentColor !important;
  border-radius: 999px !important;
  background: #fff !important;
  box-shadow: none !important;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  transform: none;
}

#section-admin button.admin-btn-primary {
  color: #92400e !important;
  border-color: #d97706 !important;
}

#section-admin button.admin-btn-primary:hover:not(:disabled) {
  color: #fff !important;
  background: #b45309 !important;
  border-color: #b45309 !important;
}

#section-admin button.admin-btn-danger {
  color: #b91c1c !important;
  border-color: #dc2626 !important;
}

#section-admin button.admin-btn-danger:hover:not(:disabled) {
  color: #fff !important;
  background: #b91c1c !important;
  border-color: #b91c1c !important;
}

#section-admin button.admin-btn-success {
  color: #047857 !important;
  border-color: #059669 !important;
}

#section-admin button.admin-btn-success:hover:not(:disabled) {
  color: #fff !important;
  background: #047857 !important;
  border-color: #047857 !important;
}

#panel-settings {
  max-width: 1120px;
  margin-inline: auto;
}

.store-settings-heading {
  margin-bottom: 1.25rem;
}

.store-settings-heading h3 {
  margin: 0;
  color: #1f2937;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.store-settings-heading p,
.store-settings-card-heading p {
  margin: 0.35rem 0 0;
  color: #6b7280;
  font-size: 0.92rem;
  line-height: 1.55;
}

#section-admin .store-settings-tabs {
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0.4rem;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
}

#section-admin .store-settings-tabs button,
#section-admin .store-settings-tabs button:hover,
#section-admin .store-settings-tabs button.active,
#section-admin .store-settings-tabs button.active:hover {
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  padding: 0.65rem 0.9rem;
  color: #6b7280 !important;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

#section-admin .store-settings-tabs button:hover,
#section-admin .store-settings-tabs button.active,
#section-admin .store-settings-tabs button.active:hover {
  color: #78350f !important;
  background: #fff !important;
}

#section-admin .store-settings-tabs button.active {
  border-color: #f3e8d4 !important;
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.07) !important;
}

.store-settings-section[hidden] {
  display: none;
}

.store-settings-section {
  display: grid;
  gap: 1.25rem;
}

.admin-card.store-settings-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0;
  padding: clamp(1.15rem, 3vw, 1.75rem);
  border-color: #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.045);
}

.store-settings-card-heading h4 {
  margin: 0;
  color: #1f2937;
  font-family: 'Outfit', sans-serif;
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.integration-guide-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
}

.integration-guide-trigger {
  box-sizing: border-box;
  appearance: none;
  display: inline-grid;
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  min-height: 1.25rem;
  flex: 0 0 1.25rem;
  place-items: center;
  padding: 0;
  border: 1px solid #a8a29e;
  border-radius: 50%;
  background: #fff;
  color: #78716c;
  font-family: inherit;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.integration-guide-trigger.help-icon-btn {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  min-width: 24px !important;
  max-width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  flex: 0 0 24px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

.integration-guide-modal {
  z-index: 10002;
}

.integration-guide-content {
  box-sizing: border-box;
  width: min(560px, calc(100% - 2rem));
  max-width: 560px;
  max-height: calc(100vh - 2rem);
  margin: 1rem auto;
  padding: clamp(1.25rem, 4vw, 2rem);
  overflow-y: auto;
}

.integration-guide-content h2 {
  margin: 0 2.5rem .75rem 0;
  color: #1f2937;
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
}

.integration-guide-content h3 {
  margin: 1.25rem 0 .5rem;
  color: #292524;
  font-size: 1rem;
}

.integration-guide-content ol {
  display: grid;
  gap: .6rem;
  padding-left: 1.35rem;
  color: #44403c;
  line-height: 1.55;
}

.integration-guide-content a {
  color: #92400e;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: .15em;
}

.integration-guide-close {
  position: absolute;
  top: .75rem;
  right: .85rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: #f5f5f4;
  color: #44403c;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.integration-guide-note {
  margin: 1.25rem 0 0;
  padding: .75rem;
  border-radius: .65rem;
  background: #fffbeb;
  color: #78350f;
  font-size: .85rem;
}

.orders-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.orders-table-controls {
  display: flex;
  min-width: min(100%, 24rem);
  flex: 1 1 24rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.orders-search-input {
  min-width: min(100%, 18rem);
  flex: 1 1 18rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.6rem;
  color: #1f2937;
  font: inherit;
}

.orders-courier-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.orders-courier-filter.is-active {
  color: #fff;
  border-color: #92400e;
  background: #92400e;
}

.orders-bulk-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.orders-table-wrap {
  margin-top: 0;
}

.shipping-panel-card .store-settings-card-heading p {
  max-width: 38rem;
}

.shipping-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 1rem;
}

.shipping-form-grid .form-group {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.4rem;
}

.shipping-form-grid .form-group label {
  color: #374151;
  font-size: 0.88rem;
  font-weight: 600;
}

.shipping-form-grid .styled-input {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  padding: 0.7rem 0.85rem;
  border-color: #d1d5db;
  border-radius: 10px;
  color: #1f2937;
  font-size: 0.95rem;
}

.admin-shipping-destination {
  position: relative;
}

.admin-shipping-destination-dropdown {
  position: absolute;
  z-index: 10;
  top: 100%;
  right: 0;
  left: 0;
  display: none;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #d1d5db;
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.shipping-form-grid > .admin-btn-outline {
  justify-self: start;
  min-height: 40px;
}

.admin-shipping-result {
  margin-top: 0;
  overflow-x: auto;
}

.admin-shipping-result h4 {
  margin-bottom: 0.75rem;
  color: #1f2937;
  font-family: 'Outfit', sans-serif;
}

.admin-shipping-rates-table {
  min-width: 620px;
}

.admin-orders-table .admin-order-id {
  font-size: 0.88rem;
  overflow-wrap: anywhere;
  white-space: normal;
}

.admin-orders-table .admin-order-customer {
  min-width: 160px;
  overflow-wrap: anywhere;
}

.admin-orders-table .admin-order-text-link {
  display: inline;
  max-width: 100%;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--text-primary, #292524) !important;
  background: transparent !important;
  font: inherit;
  text-align: left;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: baseline;
}

.admin-orders-table .admin-order-id .admin-order-text-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: inherit;
}

.admin-orders-table .admin-order-text-link:hover {
  border: 0 !important;
  color: var(--button-primary-hover) !important;
  background: transparent !important;
  text-decoration: underline;
  box-shadow: none;
}

@media (max-width: 640px) {
  .shipping-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.store-logo-preview {
  display: none;
  max-width: 220px;
  max-height: 120px;
  margin: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.75rem;
  object-fit: contain;
  background: #fff;
}

.store-logo-form {
  align-items: flex-start;
}

.store-logo-form .form-group,
.store-page-settings-form .form-group,
.store-logistics-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#panel-settings .form-group label {
  color: #374151;
  font-size: 0.88rem;
  font-weight: 600;
}

#panel-settings .styled-input,
#panel-settings .styled-form input:not([type="file"]),
#panel-settings .styled-form textarea,
#panel-settings .styled-form select {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.85rem;
  border-color: #d1d5db;
  border-radius: 10px;
  color: #1f2937;
  font-size: 0.95rem;
}

#panel-settings .styled-form textarea {
  min-height: 220px;
  line-height: 1.65;
}

#panel-settings .styled-form input[type="file"] {
  width: 100%;
  padding: 0.65rem;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  background: #f9fafb;
}

#panel-settings .form-group small {
  color: #6b7280;
  font-size: 0.8rem;
}

#panel-settings .styled-form button.primary-btn {
  align-self: flex-start;
  min-height: 44px;
  padding: 0.7rem 1.2rem;
  font-size: 0.92rem;
  font-weight: 650;
}

.store-address-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.store-communication-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1rem;
}

.store-secret-clear {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 46px;
  color: #6b7280;
  font-size: 0.84rem;
}

.store-secret-clear input {
  width: 16px !important;
  min-height: 16px !important;
  accent-color: #b45309;
}

.whatsapp-pairing-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.whatsapp-connection-status {
  margin: 0;
  color: #b91c1c;
  font-weight: 700;
}

.whatsapp-connection-status.is-connected {
  color: #15803d;
}

.whatsapp-pairing-help {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.whatsapp-qr-container {
  display: grid;
  width: fit-content;
  place-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.75rem;
  background: #fff;
}

.whatsapp-qr-container[hidden] {
  display: none;
}

.whatsapp-qr-container img {
  display: block;
  width: min(320px, 72vw);
  height: auto;
}

.whatsapp-pairing-error {
  color: #b91c1c;
  font-size: 0.9rem;
}

.store-street-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(110px, 0.55fr) minmax(0, 1.25fr);
  gap: 1rem;
}

.store-street-fields .form-group {
  min-width: 0;
}

.store-area-id-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.85rem;
}

.store-area-id-row .form-group {
  min-width: 0;
}

#section-admin button#resolveStoreOriginArea {
  min-height: 46px;
  margin-bottom: 0;
  padding: 0.65rem 1rem;
  font-size: 0.86rem;
  white-space: nowrap;
}

.store-map-card {
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.store-map-card .store-settings-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.store-origin-map {
  width: 100%;
  height: 320px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #eef2f7;
}

.store-map-status {
  margin: 0.7rem 0 0;
  color: #6b7280;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  #section-admin .store-settings-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .store-address-grid {
    grid-template-columns: 1fr;
  }

  .store-communication-grid {
    grid-template-columns: 1fr;
  }

  .store-street-fields {
    grid-template-columns: minmax(0, 1fr) minmax(90px, 0.5fr);
  }

  .store-street-fields .form-group:last-child {
    grid-column: 1 / -1;
  }

  .store-area-id-row {
    grid-template-columns: 1fr;
  }

  #section-admin button#resolveStoreOriginArea {
    justify-self: start;
  }

  .store-origin-map {
    height: 260px;
  }
}

#section-admin {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

#section-admin .admin-tabs {
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#section-admin .admin-tabs::-webkit-scrollbar {
  display: none;
}

#section-admin .admin-tabs button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.75rem 0.85rem;
  white-space: nowrap;
}

#panel-settings .styled-input,
#panel-settings .styled-form input:not([type="file"]),
#panel-settings .styled-form textarea,
#panel-settings .styled-form select {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  padding: 0.75rem 1rem;
}

#panel-settings .styled-form input[type="file"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding: 0.75rem;
}

#panel-settings .styled-form button.primary-btn,
#section-admin button.admin-btn-outline {
  min-height: 44px;
  padding: 0.75rem 1rem;
}

.store-identity-form .form-group:not(.store-feature-toggle) {
  width: 100%;
}

.store-feature-toggle {
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
}

@media (min-width: 768px) {
  #section-admin .admin-tabs-main,
  #section-admin .store-settings-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .store-identity-form .form-group {
    max-width: 36rem;
  }
}

.p2p-broker-tab {
  border-color: #b45309;
  color: #92400e;
  font-weight: 800;
}

.p2p-broker-panel {
  display: grid;
  gap: 1.5rem;
  --broker-accent: #b45309;
  --broker-accent-dark: #78350f;
}

.p2p-broker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 1.1rem;
  color: #fff;
  background: linear-gradient(120deg, #78350f 0%, #b45309 55%, #d97706 100%);
  box-shadow: 0 18px 40px rgb(120 53 15 / 18%);
}

.p2p-broker-heading h3 {
  margin: 0.35rem 0;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  color: inherit;
}

.p2p-broker-heading p {
  margin: 0;
  max-width: 42rem;
  color: rgb(255 255 255 / 82%);
}

.p2p-broker-eyebrow,
.broker-card-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: #b45309;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.p2p-broker-eyebrow {
  color: #ffedd5;
}

.p2p-broker-node-badge {
  flex: 0 0 auto;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 999px;
  background: rgb(255 255 255 / 12%);
  font-size: 0.78rem;
  font-weight: 700;
}

.broker-service-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  padding: 0.45rem;
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  background: #f5f5f4;
}

.broker-service-tab {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  padding: 1rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  color: #57534e;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease,
    box-shadow 180ms ease, transform 180ms ease;
}

.broker-service-tab:hover {
  color: #7c2d12;
  transform: translateY(-1px);
}

.broker-service-tab.active {
  border-color: #fed7aa;
  color: #7c2d12;
  background: #fff;
  box-shadow: 0 5px 16px rgb(120 53 15 / 10%);
}

.broker-service-tab:focus-visible {
  outline: 3px solid rgb(217 119 6 / 35%);
  outline-offset: 2px;
}

.broker-service-tab-icon {
  display: grid;
  flex: 0 0 2.6rem;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 0.8rem;
  color: #fff;
  background: linear-gradient(145deg, #b45309, #92400e);
  font-size: 1.1rem;
  font-weight: 800;
}

.broker-service-tab strong,
.broker-service-tab small {
  display: block;
}

.broker-service-tab strong {
  font-size: 0.98rem;
}

.broker-service-tab small {
  margin-top: 0.2rem;
  color: #78716c;
  font-size: 0.75rem;
}

.broker-service-panel {
  display: grid;
  gap: 1.15rem;
  animation: broker-panel-enter 220ms ease both;
}

.broker-service-panel[hidden] {
  display: none !important;
}

@keyframes broker-panel-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.broker-command-card {
  padding: clamp(1rem, 2vw, 1.6rem);
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 24px rgb(28 25 23 / 5%);
}

.broker-namecheap-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border: 1px solid #fed7aa;
  border-radius: 0.85rem;
  color: #7c2d12;
  background: #fff7ed;
  cursor: pointer;
}

.broker-namecheap-toggle input {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.12rem 0 0;
  accent-color: #c2410c;
}

.broker-namecheap-toggle strong,
.broker-namecheap-toggle small {
  display: block;
}

.broker-namecheap-toggle small {
  margin-top: 0.25rem;
  color: #78716c;
}

.store-feature-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: fit-content;
  cursor: pointer;
}

#panel-settings .store-feature-toggle-label input[type="checkbox"],
#panel-affiliate-center .store-feature-toggle-label input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1rem;
  min-height: 1rem;
  margin: 0;
  padding: 0;
  accent-color: #c2410c;
}

.affiliate-feature-form {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid #e7e5e4;
  border-radius: 0.75rem;
  background: #fff;
}

.store-feature-toggle-label strong,
.store-feature-toggle-label small {
  display: block;
}

.store-feature-toggle-label small {
  margin-top: 0.2rem;
  color: #78716c;
  font-size: 0.8rem;
  font-weight: 400;
}

.broker-command-card .store-settings-card-heading {
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.broker-command-card .store-settings-card-heading h4 {
  margin: 0.1rem 0 0.35rem;
  color: #292524;
  font-size: 1.12rem;
}

.broker-command-card .store-settings-card-heading p {
  margin: 0;
  color: #78716c;
  line-height: 1.5;
}

.broker-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.2rem;
}

.broker-config-grid .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  margin: 0;
}

.broker-config-grid .form-group > label {
  display: block;
  margin: 0;
  color: #44403c;
  font-size: 0.88rem;
  font-weight: 650;
}

.broker-config-grid .form-group > input,
.broker-config-grid .form-group > select,
.broker-config-grid .form-group .broker-copy-row {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.broker-config-grid .broker-copy-row .styled-input {
  box-sizing: border-box;
  width: 100%;
}

.broker-clear-midtrans-keys {
  align-self: start;
  margin: 0;
}

.broker-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f0eeeb;
}

.broker-form-footer p {
  margin: 0;
  color: #78716c;
  font-size: 0.86rem;
}

.broker-detected-ip {
  margin: 0.75rem 0 0;
  color: #57534e;
  font-size: 0.88rem;
}

.broker-form-footer .primary-btn,
.broker-domain-search button,
#syncBrokerPpobPrices {
  min-height: 44px;
  border-radius: 0.7rem;
  font-weight: 700;
}

.broker-status-badge {
  flex: 0 0 auto;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: #92400e;
  background: #ffedd5;
  font-size: 0.72rem;
  font-weight: 800;
}

.broker-status-badge.is-configured {
  color: #166534;
  background: #dcfce7;
}

.broker-copy-row,
.broker-domain-result {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.broker-copy-row .styled-input {
  min-width: 0;
  flex: 1;
}

.broker-webhook-url-group {
  grid-column: 1 / -1;
}

.broker-domain-search {
  display: grid;
  gap: 0.5rem;
}

.broker-domain-results {
  display: grid;
  gap: 0.5rem;
}

.broker-domain-result {
  justify-content: space-between;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.65rem;
}

.broker-purchase-form {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.broker-purchase-warning {
  color: #9a3412;
  font-weight: 600;
}

.p2p-domain-store {
  display: grid;
  gap: 1rem;
  margin: 0 auto 2rem;
  max-width: 58rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid #e7e5e4;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 12px 30px rgb(28 25 23 / 6%);
}

.p2p-domain-store[hidden] {
  display: none !important;
}

.p2p-product-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 16rem;
  overflow: hidden;
  background: #fafafa;
}

.p2p-product-image {
  display: block;
  width: 100%;
  height: 100%;
  padding: 1rem;
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
  transition: transform 500ms ease;
}

.p2p-product-image-container:hover .p2p-product-image {
  transform: scale(1.05);
}

.p2p-domain-store h2 {
  margin: 0 0 0.4rem;
  color: #292524;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

.p2p-domain-store p {
  margin-top: 0.4rem;
  color: #78716c;
}

.p2p-domain-store .broker-copy-row select {
  flex: 0 0 8rem;
}

.p2p-domain-store #marketplaceDomainSearchButton {
  min-height: 0;
  padding: 0.65rem 0.9rem;
  font-size: 0.93rem;
  line-height: 1.3;
}

.p2p-domain-store .broker-purchase-form[hidden] {
  display: none;
}

#section-marketplace.domain-checkout-active > div > .mb-10,
#section-marketplace.domain-checkout-active #marketplaceDomainSearchView,
#section-marketplace.domain-checkout-active #marketplaceStatus,
#section-marketplace.domain-checkout-active #networkResultsGrid {
  display: none;
}

#section-marketplace .marketplace-domain-checkout[hidden] {
  display: none;
}

.marketplace-domain-checkout {
  display: grid;
  gap: 2rem;
  width: min(100%, 54rem);
  margin: 0 auto 2rem;
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 1px solid #e7e5e4;
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0 20px 60px rgb(28 25 23 / 9%);
}

.marketplace-domain-back {
  justify-self: start;
  padding: 0.5rem 0;
  border: 0;
  background: transparent;
  color: #78716c;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.marketplace-domain-back:hover {
  color: #292524;
}

.marketplace-domain-checkout-header {
  text-align: center;
}

.marketplace-domain-checkout-header .marketplace-domain-eyebrow {
  margin: 0 0 0.5rem;
  color: #a16207;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.marketplace-domain-checkout-header h2 {
  margin: 0;
  color: #292524;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-weight: 750;
}

.marketplace-domain-checkout-header > p:not(.marketplace-domain-eyebrow) {
  margin: 0.65rem 0 0;
  color: #78716c;
}

.marketplace-domain-order-summary {
  display: inline-flex;
  justify-content: center;
  margin-top: 1.25rem;
  padding: 0.7rem 1rem;
  border: 1px solid #fde68a;
  border-radius: 0.85rem;
  background: #fffbeb;
  color: #78350f;
  font-weight: 700;
}

.marketplace-domain-checkout-form {
  display: grid;
  gap: 1.5rem;
}

.marketplace-registrant-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem 1rem;
}

.marketplace-registrant-grid .form-group {
  display: flex;
  min-width: 0;
  flex-direction: column;
  grid-column: span 6;
  gap: 0.45rem;
}

.marketplace-registrant-grid .marketplace-registrant-address,
.marketplace-registrant-grid .marketplace-registrant-email {
  grid-column: 1 / -1;
}

.marketplace-registrant-grid .marketplace-registrant-postal,
.marketplace-registrant-grid .marketplace-registrant-country,
.marketplace-registrant-grid .marketplace-registrant-phone {
  grid-column: span 4;
}

.marketplace-registrant-grid label {
  color: #44403c;
  font-size: 0.88rem;
  font-weight: 650;
}

.marketplace-registrant-grid .styled-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 3.1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid #d6d3d1;
  border-radius: 0.75rem;
  background: #fff;
  color: #292524;
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.marketplace-registrant-grid .styled-input:focus {
  border-color: #d97706;
  outline: none;
  box-shadow: 0 0 0 3px rgb(217 119 6 / 15%);
}

.marketplace-domain-checkout-form .broker-purchase-warning {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  background: #fff7ed;
  font-size: 0.9rem;
}

.marketplace-domain-checkout-form #marketplaceDomainCheckoutButton {
  justify-self: end;
  min-height: 3.25rem;
  padding: 0.85rem 1.6rem;
  border-radius: 0.8rem;
  font-size: 1rem;
  font-weight: 750;
}

.marketplace-domain-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.marketplace-domain-badge {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.marketplace-domain-badge.is-available {
  color: #166534;
  background: #dcfce7;
}

.marketplace-domain-badge.is-taken {
  color: #57534e;
  background: #f5f5f4;
}

.marketplace-domain-price {
  color: #292524;
  font-weight: 700;
}

.marketplace-domain-result > button {
  flex: 0 0 auto;
}

.broker-markup-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.broker-markup-form .form-group {
  flex: 1 1 10rem;
}

@media (max-width: 560px) {
  .broker-copy-row,
  .broker-form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .broker-service-tabs {
    gap: 0.35rem;
    padding: 0.3rem;
  }

  .broker-service-tab {
    gap: 0.55rem;
    padding: 0.7rem 0.55rem;
  }

  .broker-service-tab-icon {
    flex-basis: 2rem;
    width: 2rem;
    height: 2rem;
  }

  .broker-service-tab strong {
    font-size: 0.85rem;
  }

  .marketplace-domain-checkout {
    gap: 1.5rem;
    padding: 1.25rem;
    border-radius: 1rem;
  }

  .marketplace-registrant-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .marketplace-registrant-grid .form-group,
  .marketplace-registrant-grid .marketplace-registrant-address,
  .marketplace-registrant-grid .marketplace-registrant-postal,
  .marketplace-registrant-grid .marketplace-registrant-country,
  .marketplace-registrant-grid .marketplace-registrant-phone,
  .marketplace-registrant-grid .marketplace-registrant-email {
    grid-column: 1 / -1;
  }

  .marketplace-domain-checkout-form #marketplaceDomainCheckoutButton {
    width: 100%;
  }

  .broker-service-tab small {
    font-size: 0.65rem;
  }

  .broker-service-tabs,
  .broker-config-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .p2p-broker-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* CRITICAL CROSS-BROWSER LAYOUT OVERRIDES FOR PRODUCT FORM */
.product-form-fields .form-group {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
}

.product-form-fields .add-product-category-row {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
}

.product-form-fields .styled-input,
.add-product-category-row select.styled-input {
    width: 100% !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
    box-sizing: border-box !important;
    -webkit-appearance: none;
}

#btnShowAddKategori {
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.customer-orders-container {
  width: min(100% - 2rem, 960px);
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

.customer-orders-heading,
.customer-order-detail-heading {
  margin-bottom: 1.75rem;
}

.customer-orders-eyebrow {
  margin: 0 0 0.45rem;
  color: #a16207;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.customer-orders-heading h1,
.customer-order-detail-heading h1 {
  margin: 0;
  color: #292524;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
}

.customer-orders-heading > p:last-child,
.customer-order-detail-heading > p:not(.customer-orders-eyebrow) {
  margin: 0.7rem 0 0;
  color: #78716c;
}

.customer-orders-status {
  min-height: 1.5rem;
  margin: 1rem 0;
  color: #57534e;
}

.customer-orders-list {
  display: grid;
  gap: 1rem;
}

.customer-order-card,
.customer-order-panel,
.customer-orders-message {
  display: block;
  padding: 1.35rem;
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 5px 18px rgb(41 37 36 / 5%);
}

.customer-order-card {
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.customer-order-card:hover,
.customer-order-card:focus-visible {
  transform: translateY(-2px);
  border-color: #d6a44b;
  box-shadow: 0 10px 28px rgb(41 37 36 / 9%);
  outline: none;
}

.customer-order-card-top,
.customer-tracking-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.customer-order-id {
  overflow-wrap: anywhere;
  color: #292524;
  font-weight: 750;
}

.customer-order-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #f5f5f4;
  color: #57534e;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.customer-order-status.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.customer-order-status.status-paid,
.customer-order-status.status-processed {
  background: #dbeafe;
  color: #1e40af;
}

.customer-order-status.status-shipped {
  background: #ede9fe;
  color: #6b21a8;
}

.customer-order-status.status-delivered,
.customer-order-status.status-completed {
  background: #dcfce7;
  color: #166534;
}

.customer-order-status.status-canceled,
.customer-order-status.status-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.customer-order-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.customer-order-card-grid > span {
  display: grid;
  gap: 0.2rem;
  color: #292524;
  overflow-wrap: anywhere;
}

.customer-order-card-grid small {
  color: #78716c;
  font-size: 0.75rem;
}

.customer-order-summary {
  margin: 1rem 0 0;
  color: #57534e;
  font-size: 0.9rem;
}

.customer-order-open {
  display: block;
  margin-top: 1rem;
  color: #92400e;
  font-size: 0.85rem;
  font-weight: 700;
}

.customer-orders-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #57534e;
}

.customer-orders-message p {
  margin: 0;
}

.customer-orders-error {
  align-items: flex-start;
  flex-direction: column;
}

.customer-orders-error a,
.customer-orders-back {
  color: #92400e;
  font-weight: 700;
  text-decoration: none;
}

.customer-orders-back {
  display: inline-block;
  margin-bottom: 1.5rem;
}

.customer-order-detail-heading {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 0.75rem;
}

.customer-order-detail-heading h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.customer-order-detail-status {
  min-height: 2.25rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.95rem;
}

.customer-order-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 0 !important;
}

.customer-order-id-badge {
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 0.28rem 0.55rem;
  border: 1px solid #e7e5e4;
  border-radius: 0.45rem;
  background: #f5f5f4;
  color: #78716c;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 600;
}

.customer-order-panel {
  margin-top: 1.1rem;
}

.customer-order-panel h2,
.customer-tracking-heading h3 {
  margin: 0 0 1rem;
  color: #292524;
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
}

.customer-order-pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.customer-order-pipeline li {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  color: #a8a29e;
  font-size: 0.78rem;
  text-align: center;
}

.customer-order-pipeline li.is-complete,
.customer-order-pipeline li.is-current {
  color: #78350f;
  font-weight: 700;
}

.customer-order-step-marker {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 2px solid #d6d3d1;
  border-radius: 50%;
  background: #fff;
  color: inherit;
  font-size: 0.8rem;
}

.customer-order-pipeline li.is-complete .customer-order-step-marker,
.customer-order-pipeline li.is-current .customer-order-step-marker {
  border-color: #d97706;
  background: #fef3c7;
}

.customer-order-items {
  display: grid;
  gap: 0.75rem;
}

.customer-order-item,
.customer-order-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.customer-order-item {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f0eeeb;
  color: #44403c;
}

.customer-order-item small {
  color: #78716c;
}

.customer-order-breakdown {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  color: #57534e;
}

.customer-order-grand-total {
  padding-top: 0.9rem;
  border-top: 1px solid #e7e5e4;
  color: #292524;
  font-size: 1.05rem;
}

.customer-tracking-heading {
  align-items: center;
}

.customer-tracking-heading h3 {
  margin-bottom: 0.3rem;
}

.customer-tracking-heading p {
  margin: 0 0 0.5rem;
  color: #78716c;
}

.customer-tracking-refresh {
  flex: 0 0 auto;
  padding: 0.6rem 0.85rem;
  border: 1px solid #d6d3d1;
  border-radius: 0.65rem;
  background: #fff;
  color: #78350f;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.customer-tracking-timeline {
  display: grid;
  gap: 0;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.customer-tracking-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: 0.75rem;
  min-height: 4rem;
  color: #44403c;
}

.customer-tracking-timeline li:not(:last-child)::before {
  position: absolute;
  top: 0.7rem;
  bottom: -0.2rem;
  left: 0.43rem;
  width: 2px;
  background: #e7e5e4;
  content: '';
}

.customer-tracking-dot {
  z-index: 1;
  width: 0.9rem;
  height: 0.9rem;
  margin-top: 0.25rem;
  border: 2px solid #d97706;
  border-radius: 50%;
  background: #fff;
}

.customer-tracking-timeline strong {
  color: #292524;
}

.customer-tracking-timeline p,
.customer-tracking-timeline time,
.customer-tracking-empty,
.customer-tracking-error,
.customer-tracking-loading {
  display: block;
  margin: 0.25rem 0 0;
  color: #78716c;
  font-size: 0.88rem;
}

.customer-order-canceled {
  color: #991b1b;
  font-weight: 700;
}

@media (max-width: 640px) {
  .customer-orders-container {
    width: min(100% - 1.25rem, 960px);
    padding-top: 2rem;
  }

  .customer-order-card,
  .customer-order-panel,
  .customer-orders-message {
    padding: 1rem;
  }

  .customer-order-card-top,
  .customer-tracking-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .customer-order-card-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .customer-order-pipeline {
    grid-template-columns: repeat(5, minmax(5rem, 1fr));
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .customer-order-pipeline li {
    font-size: 0.68rem;
  }

  .customer-orders-message {
    align-items: flex-start;
    flex-direction: column;
  }
}

#btnShowAddKategori {
    min-width: 40px !important;
    border-radius: 8px !important;
    font-size: 18px;
    line-height: 1;
}

.product-category-editor .add-product-category-row > button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: auto;
    height: 40px;
    padding: 0 16px !important;
    border-radius: 8px !important;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
}
