/*
Template Name: Dashtrap - Custom Styles for ADVUTU
Author: ADVUTU
File: Custom CSS File
*/

/* Custom Scrollbar Fix for ADVUTU */
html, body {
  overflow: hidden;
  height: 100%;
}

/* Global app font override */
body {
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem; /* increase base from ~14px to 16px */
}

/* Global app background override */
body,
.wrapper,
.page-content {
  background-color: #e9ecf5 !important;
}

/* Use full content width inside Dashtrap main area */
.page-content main {
  max-width: 1290px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

.page-content main > .container {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Inline button group: flex row with gap (reusable) */
.btn-group-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* Login page background — brand purple, magenta & gold */
body.login-page {
  background-color: #562e91;
  background-image:
    radial-gradient(ellipse 90% 70% at 0% 0%, rgba(255, 209, 0, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 80% 65% at 100% 100%, rgba(146, 39, 143, 0.55) 0%, transparent 50%),
    radial-gradient(ellipse 55% 45% at 85% 10%, rgba(255, 209, 0, 0.18) 0%, transparent 45%),
    linear-gradient(145deg, #562e91 0%, #92278f 52%, #ffd100 100%);
  background-attachment: fixed;
  min-height: 100vh;
}


/* Sidebar submenu: vertical line + blue accent on hover/active (Benefits-style) */
#app-menu .sidebar-submenu {
  padding-left: 2.25rem;
  margin-left: 1.35rem;
  border-left: 2px solid rgba(255, 255, 255, 0.22);
}
#app-menu .sidebar-submenu .menu-item {
  list-style: none;
}
#app-menu .sidebar-submenu .sidebar-submenu-link {
  position: relative;
  display: flex;
  margin-left: -2px;
}
#app-menu .sidebar-submenu .sidebar-submenu-link::before {
  content: "";
  position: absolute;
  left: -2.25rem;
  top: 0;
  bottom: 0;
  width: 0;
  background: #41aaf5;
  transition: width 0.2s ease;
  border-radius: 0 2px 2px 0;
}
#app-menu .sidebar-submenu .sidebar-submenu-link:hover,
#app-menu .sidebar-submenu .sidebar-submenu-link.sidebar-submenu-link-active {
  background: rgba(255, 255, 255, 0.05) !important;
}
#app-menu .sidebar-submenu .sidebar-submenu-link:hover::before,
#app-menu .sidebar-submenu .sidebar-submenu-link.sidebar-submenu-link-active::before {
  width: 2px;
}

/* Primary button colour override */
.btn.bg-primary,
.btn-primary {
  background-color: #41aaf5 !important;
  border-color: #41aaf5 !important;
}

.btn.bg-primary:hover,
.btn-primary:hover {
  background-color: #3174c8 !important; /* slightly darker hover */
  border-color: #3174c8 !important;
}


/* Settings Branding: preview boxes (fixed size, Dashtrap-safe) */
.branding-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.branding-preview {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.branding-preview--logo {
  width: 160px;
  height: 80px;
}
.branding-preview--favicon {
  width: 80px;
  height: 80px;
}
.branding-preview-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.branding-preview-placeholder {
  font-size: 12px;
  color: #94a3b8;
}
.branding-preview-placeholder i {
  font-size: 24px;
}
.branding-upload {
  flex: 1;
  min-width: 200px;
}

/* Button secondary style (white + grey border) - use across app */
.btn-2 {
  background-color: #fff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}
.btn-2:hover {
  background-color: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #1e293b !important;
}

/* Footer background to match page */
.footer {
  background-color: #e9ecf5 !important;
}


.wrapper {
  height: 100vh;
  overflow: hidden;
}

.page-content {
  overflow-y: auto;
  height: 100%;
}

/* Additional custom styles can be added below */

/* Strong card shadow (app-wide, Dashtrap) */
.card {
    box-shadow: 0 2px 2px rgb(0 0 0 / 6%),
    0 2px 8px rgb(0 0 0 / 4%);
}

/* Sidebar: single consistent dark blue/purple (same colour app-wide) */
#app-menu,
aside#app-menu.hs-overlay {
  background-color: #201c3d !important;
}

/* Hide sidebar scrollbars/sliders */
#app-menu,
#app-menu .overflow-y-auto {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#app-menu::-webkit-scrollbar,
#app-menu .overflow-y-auto::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* ─── Responsive nav breakpoint override: 570px instead of Tailwind lg (1024px) ─── */

/* Below 570px: hamburger visible, mini-toggle hidden, no sidebar margin */
#topbar-hamburger  { display: flex; }
#topbar-mini-toggle { display: none; }

/* Topbar container always spans full page-content width so the toggle button
   stays at the far left (right next to the sidebar), not shifted by centering */
.app-header .container {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 1rem !important;
  padding-right: 1.5rem !important;
}

@media (min-width: 570px) {
  /* Above 570px: hamburger hidden, mini-toggle visible */
  #topbar-hamburger  { display: none !important; }
  #topbar-mini-toggle { display: flex !important; }

  /* Sidebar becomes a permanent fixture (overrides Tailwind's lg:block / lg:translate-x-0) */
  #app-menu {
    display: block !important;
    transform: translateX(0) !important;
    z-index: 30 !important;     /* below topbar z-50, matches Dashtrap's lg:z-30 */
    bottom: 0 !important;
    inset-inline-end: auto !important;
  }
}

/* 570–1023px: Dashtrap doesn't apply a sidebar margin in this range — we do it here.
   body.sidebar-mini (always active here via JS) overrides this to 4.5rem via !important. */
@media (min-width: 570px) and (max-width: 1023px) {
  aside + .page-content {
    margin-inline-start: 280px;
  }
}

/* Mobile overlay mode (body.mobile-nav added by JS when < 570px)
   The sidebar's own Tailwind classes (hidden / hs-overlay-open:translate-x-0) handle
   show/hide on mobile — we only need to reset the page-content margin. */
body.mobile-nav aside + .page-content {
  margin-inline-start: 0 !important;
}

/* ─── Sidebar mini mode — layout only; text hiding handled by JS (applySidebarMini) ─── */
@media (min-width: 570px) {
  body.sidebar-mini #app-menu {
    width: 4.5rem;
    min-width: 4.5rem;
    overflow-x: hidden;
  }

  body.sidebar-mini aside + .page-content {
    margin-inline-start: 4.5rem !important;
  }

  /* Mini mode: keep the sticky header visible but swap to the favicon/initial */
  body.sidebar-mini #app-menu .sidebar-logo-full { display: none; }
  body.sidebar-mini #app-menu .sidebar-logo-mini { display: flex !important; }

  /* Full mode: show full logo, hide mini icon */
  #app-menu .sidebar-logo-mini { display: none; }

  /* Centre each nav item icon */
  body.sidebar-mini #app-menu .admin-menu .menu-item > a,
  body.sidebar-mini #app-menu .admin-menu .menu-item > button {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  /* Remove extra left padding on page content */
  body.sidebar-mini .page-content {
    padding-left: 0 !important;
    border-start-start-radius: 0 !important;
    border-end-start-radius: 0 !important;
  }

  /* Centred max-width cap for content when sidebar is mini */
  body.sidebar-mini main {
    max-width: 1290px !important;
    width: 100% !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.sidebar-mini .page-content > .container,
  body.sidebar-mini .app-header .container {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

/* Sidebar menu font size (slightly larger) */
.admin-menu .menu-item > a,
.admin-menu .menu-item > button {
  font-size: 0.95rem;
  font-weight: 400;
}

/* Sidebar menu icon transparency (not media images, including dropdown items) */
/* Collapsed by default; Preline toggles via .active + inline display (no Tailwind hidden — it uses !important). */
.admin-menu .hs-accordion:not(.active) > .hs-accordion-content {
  display: none;
}

.admin-menu .menu-item > a i,
.admin-menu .menu-item > button i,
.admin-menu .hs-accordion-content a i,
.admin-menu .hs-accordion > .hs-accordion-toggle i {
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.admin-menu .menu-item > a:hover i,
.admin-menu .menu-item > button:hover i,
.admin-menu .hs-accordion > .hs-accordion-toggle:hover i {
  opacity: 1;
}

/* Selected/active menu item: stronger icon opacity */
.admin-menu .menu-item.active > a i,
.admin-menu .menu-item.active > button i,
.admin-menu .hs-accordion.active > .hs-accordion-toggle i {
  opacity: 1;
}

/* Sidebar media icons: consistent, slightly larger size (Dashtrap-safe) */
.sidebar-media-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;   /* ~28px */
  height: 1.75rem;
  flex-shrink: 0;
}
.sidebar-media-icon img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.sidebar-media-fallback-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* Selected/active menu item background stronger */
.admin-menu a.active {
  background-color: rgb(255 255 255 / 0.07);
}


/* Remove curves at top and bottom of sidebar (page-content rounded corners) */
@media (min-width: 1024px) {
  .page-content {
    border-start-start-radius: 0 !important;
    border-end-start-radius: 0 !important;
  }
}

/* Topbar header shadow */
.app-header {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Custom Login Form Width */
.login-container {
  max-width: 600px; /* Slightly bigger than before */
}

/* Tab System Styles */
.tab-button {
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-bottom: 3px solid transparent;
  border-radius: 8px 8px 0 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  margin-right: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tab-button:hover {
  color: #475569;
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tab-button.active {
  color: #3b82f6;
  background: #ffffff;
  border-color: #e2e8f0;
  border-bottom-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.15);
  z-index: 10;
}

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
  border-radius: 2px;
}

.tab-button i {
  transition: transform 0.2s ease;
}

.tab-button.active i {
  transform: scale(1.1);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Google Ad Preview Styles */
.google-ad-preview {
  border: 1px solid #e8eaed;
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  font-family: arial, sans-serif;
  max-width: 600px;
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.1);
  transition: box-shadow 0.2s ease;
}

.google-ad-preview:hover {
  box-shadow: 0 2px 10px rgba(32, 33, 36, 0.15);
}

.google-ad-badge {
  display: inline-block;
  background: #34a853;
  color: white;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 2px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.google-ad-headline {
  color: #1a0dab;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 4px;
  cursor: pointer;
  text-decoration: none;
}

.google-ad-headline:hover {
  text-decoration: underline;
}

.google-ad-url {
  color: #006621;
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 400;
}

.google-ad-description {
  color: #4d5156;
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
}

.google-ad-subheadline {
  color: #1a0dab;
  font-size: 16px;
  margin-bottom: 4px;
  font-weight: 400;
}

/* Form Preview Container */
.ad-form-preview-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .ad-form-preview-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Empty State */
.google-ad-empty {
  color: #5f6368;
  font-style: italic;
  text-align: center;
  padding: 24px;
  border: 2px dashed #dadce0;
  border-radius: 8px;
  background: #f8f9fa;
}

/* Real-time Preview Label */
.preview-label {
  font-size: 12px;
  color: #5f6368;
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Custom Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
  background-color: #2563eb;
}

input:focus + .toggle-slider {
  box-shadow: 0 0 1px #2563eb;
}

input:checked + .toggle-slider:before {
  -webkit-transform: translateX(20px);
  -ms-transform: translateX(20px);
  transform: translateX(20px);
}

.toggle-slider:hover {
  background-color: #b3b3b3;
}

input:checked + .toggle-slider:hover {
  background-color: #1d4ed8;
}

/* Hosting Header Icon Spacing */
.hosting-icon-container {
  margin-right: 1rem !important;
}

.hosting-text-container {
  padding-left: 1rem !important;
}

/* Modal Styles */
.modal-large {
  max-width: 800px;
}

/* Hosting Package Cards */
.hosting-package-card {
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
  position: relative;
  overflow: visible;
}

/* Fix dropdown z-index in package cards */
.hosting-package-card {
  z-index: 1;
  isolation: isolate;
}

/* Package dropdown menu positioning */
.package-dropdown-menu {
  position: absolute !important;
  right: 0 !important;
  top: 100% !important;
  z-index: 999999 !important;
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.hosting-package-card .hs-dropdown-open {
  z-index: 999998 !important;
  position: relative !important;
}

.hosting-package-card .hs-dropdown-open .package-dropdown-menu {
  z-index: 999999 !important;
}

.hosting-package-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hosting-package-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: #d1d5db;
}

.hosting-package-card:hover::before {
  opacity: 1;
}

.hosting-package-card .card-body {
  position: relative;
  z-index: 1;
}

/* Package Feature Values */
.package-feature-value {
  font-weight: 600;
  color: #059669;
}

.package-feature-value:contains("Unlimited") {
  color: #7c3aed;
}

/* Package Detail Card */
.hosting-package-detail-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
}

.hosting-package-detail-card .card-body {
  background: rgba(255, 255, 255, 0.95);
  color: #1f2937;
  border-radius: 0.5rem;
  margin: 1rem;
}

/* Package Limit Fields */
.package-limit-field {
  position: relative;
}

.package-limit-field .unlimited-btn {
  min-width: 80px;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.package-limit-field .unlimited-btn:hover {
  transform: scale(1.05);
}

/* Package Cards Grid */
.hosting-package-card .card-body h3 {
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.hosting-package-card .text-primary {
  color: #3b82f6 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hosting-package-card {
    margin-bottom: 1rem;
  }

  .package-limit-field .flex {
    flex-direction: column;
    gap: 0.5rem;
  }

  .package-limit-field .unlimited-btn {
    align-self: flex-start;
  }
}

/* Feature Icons */
.hosting-package-card i.ti {
  width: 20px;
  text-align: center;
}

/* Status Badges */
.hosting-package-card .bg-success\/20 {
  background-color: rgba(16, 185, 129, 0.2);
}

.hosting-package-card .bg-danger\/20 {
  background-color: rgba(239, 68, 68, 0.2);
}

/* Generic status chip used across admin (invoices, etc.) */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

.status-chip-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
}

.status-chip--paid {
  border-color: #bbf7d0;
  background-color: #ecfdf3;
  color: #166534;
}

.status-chip--paid .status-chip-dot {
  background-color: #22c55e;
}

.status-chip--unpaid {
  border-color: #fed7aa;
  background-color: #fffbeb;
  color: #92400e;
}

.status-chip--unpaid .status-chip-dot {
  background-color: #f97316;
}

/* Package Actions */
.hosting-package-card .hs-dropdown-menu {
  min-width: 160px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Empty State */
.hosting-package-empty {
  text-align: center;
  padding: 3rem 2rem;
  color: #6b7280;
}

.hosting-package-empty i {
  color: #d1d5db;
  margin-bottom: 1rem;
}

/* Price Display */
.hosting-package-card .text-2xl {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* Custom Checkbox Styling for Package Forms */
.package-checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  transition: all 0.2s ease;
  cursor: pointer;
}

.package-checkbox-wrapper:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.package-checkbox-wrapper.checked {
  border-color: #3b82f6;
  background: #dbeafe;
}

.package-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.package-checkbox:checked {
  background: #3b82f6;
  border-color: #3b82f6;
}

.package-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -60%) rotate(45deg);
}

.package-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.package-checkbox-label {
  flex: 1;
  cursor: pointer;
}

.package-checkbox-label .main-text {
  font-weight: 500;
  color: #374151;
  margin-bottom: 2px;
}

.package-checkbox-label .sub-text {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.3;
}

/* Popular Package Styling */
.hosting-package-card.popular-package {
  border: 2px solid #f59e0b;
  position: relative;
}

/* Page Content Prose Styles */
.prose {
  color: #374151;
  line-height: 1.75;
  max-width: none;
}

.prose h1 {
  color: #111827;
  font-weight: 800;
  font-size: 2.25em;
  margin-top: 0;
  margin-bottom: 0.8888889em;
  line-height: 1.1111111;
}

.prose h2 {
  color: #111827;
  font-weight: 700;
  font-size: 1.5em;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3333333;
}

.prose h3 {
  color: #111827;
  font-weight: 600;
  font-size: 1.25em;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.6;
}

.prose h4, .prose h5, .prose h6 {
  color: #111827;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.6;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose a {
  color: #3b82f6;
  text-decoration: underline;
  font-weight: 500;
}

.prose a:hover {
  color: #1d4ed8;
}

.prose strong {
  color: #111827;
  font-weight: 600;
}

.prose ul, .prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.625em;
}

.prose ul > li {
  position: relative;
  padding-left: 0.375em;
}

.prose ul > li::before {
  content: "";
  position: absolute;
  background-color: #d1d5db;
  border-radius: 50%;
  width: 0.375em;
  height: 0.375em;
  top: calc(0.875em - 0.1875em);
  left: -1.125em;
}

.prose ol > li {
  position: relative;
  padding-left: 0.375em;
}

.prose ol > li::before {
  content: counter(list-item, decimal) ".";
  position: absolute;
  font-weight: 400;
  color: #6b7280;
  left: -1.625em;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose blockquote {
  font-weight: 500;
  font-style: italic;
  color: #111827;
  border-left-width: 0.25rem;
  border-left-color: #e5e7eb;
  quotes: "\201C""\201D""\2018""\2019";
  margin-top: 1.6em;
  margin-bottom: 1.6em;
  padding-left: 1em;
}

.prose table {
  width: 100%;
  table-layout: auto;
  text-align: left;
  margin-top: 2em;
  margin-bottom: 2em;
  font-size: 0.875em;
  line-height: 1.7142857;
  border-collapse: collapse;
}

.prose thead {
  color: #111827;
  font-weight: 600;
  border-bottom-width: 1px;
  border-bottom-color: #d1d5db;
}

.prose thead th {
  vertical-align: bottom;
  padding-right: 0.5714286em;
  padding-bottom: 0.5714286em;
  padding-left: 0.5714286em;
}

.prose tbody tr {
  border-bottom-width: 1px;
  border-bottom-color: #e5e7eb;
}

.prose tbody td {
  vertical-align: top;
  padding-top: 0.5714286em;
  padding-right: 0.5714286em;
  padding-bottom: 0.5714286em;
  padding-left: 0.5714286em;
}

.prose hr {
  border-color: #e5e7eb;
  border-top-width: 1px;
  margin-top: 3em;
  margin-bottom: 3em;
}

.prose code {
  color: #111827;
  font-weight: 600;
  font-size: 0.875em;
  background-color: #f3f4f6;
  padding: 0.125em 0.25em;
  border-radius: 0.25rem;
}

.prose pre {
  color: #e5e7eb;
  background-color: #1f2937;
  overflow-x: auto;
  font-size: 0.875em;
  line-height: 1.7142857;
  margin-top: 1.7142857em;
  margin-bottom: 1.7142857em;
  border-radius: 0.375rem;
  padding-top: 0.8571429em;
  padding-right: 1.1428571em;
  padding-bottom: 0.8571429em;
  padding-left: 1.1428571em;
}

.prose pre code {
  background-color: transparent;
  border-width: 0;
  border-radius: 0;
  padding: 0;
  font-weight: 400;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
}

/* Page Header Styles */
.page-header {
  margin-bottom: 2rem;
}

.page-breadcrumb {
  margin-bottom: 1rem;
}

.page-breadcrumb a {
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
}

.page-breadcrumb a:hover {
  color: #3b82f6;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

/* Page Footer Styles */
.page-footer {
  margin-top: 2rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
}

/* Responsive adjustments for prose */
@media (max-width: 768px) {
  .prose {
    font-size: 0.9rem;
  }

  .prose h1 {
    font-size: 1.8rem;
  }

  .prose h2 {
    font-size: 1.4rem;
  }

  .prose h3 {
    font-size: 1.2rem;
  }

  .page-title {
    font-size: 1.5rem;
  }
}

.hosting-package-card.popular-package {
  border-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.1);
}

.hosting-package-card.popular-package:hover {
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.2);
}

.hosting-package-card.popular-package::before {
  background: linear-gradient(90deg, #f97316, #dc2626);
  opacity: 0.1;
}

/* ========== Invoice form (New / Edit) – professional layout ========== */
.invoice-form-page .invoice-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.invoice-form-page .invoice-page-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.invoice-form-page .invoice-page-subtitle {
  margin-top: 0.35rem;
  font-size: 0.9375rem;
  color: #64748b;
}

.invoice-form-page .invoice-page-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.invoice-form-page .invoice-form-tabs {
  margin-bottom: 1.25rem;
}

.invoice-form-page .invoice-form-tabs-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.35rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.invoice-form-page .tab-button {
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  transition: all 0.18s ease;
}

.invoice-form-page .tab-button:hover {
  color: #334155;
  background: #f8fafc;
}

.invoice-form-page .tab-button.active {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.14);
}

.invoice-form-page .tab-content {
  display: none;
}

.invoice-form-page .tab-content.active {
  display: block;
}

.invoice-form-page .invoice-main-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.invoice-form-page .invoice-card-section {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.invoice-form-page .invoice-card-section:last-child {
  border-bottom: none;
}

.invoice-form-page .invoice-file-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
}

.invoice-form-page .invoice-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 1rem;
}

/* Customer + Invoice details row */
.invoice-form-page .invoice-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .invoice-form-page .invoice-top-row {
    grid-template-columns: 1fr;
  }
}

.invoice-form-page .invoice-customer-box {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  background: #fafbfc;
  min-height: 120px;
}

.invoice-form-page .invoice-customer-box label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.5rem;
}

.invoice-form-page .invoice-customer-box select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9375rem;
  background: #fff;
  color: #1e293b;
}

.invoice-form-page .invoice-details-col .form-group {
  margin-bottom: 1rem;
}

.invoice-form-page .invoice-details-col .form-group:last-child {
  margin-bottom: 0;
}

.invoice-form-page .invoice-details-col label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.35rem;
}

.invoice-form-page .invoice-details-col input,
.invoice-form-page .invoice-details-col select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9375rem;
  color: #1e293b;
}

/* Items section */
.invoice-form-page .invoice-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.invoice-form-page .invoice-items-heading {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.invoice-form-page .invoice-add-item-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #2563eb;
  background: transparent;
  border: 1px solid #2563eb;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.invoice-form-page .invoice-add-item-btn:hover {
  background: #2563eb;
  color: #fff;
}

.invoice-form-page .invoice-lines-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.invoice-form-page .invoice-lines-table thead {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.invoice-form-page .invoice-lines-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: #475569;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.invoice-form-page .invoice-lines-table th.text-right {
  text-align: right;
}

.invoice-form-page .invoice-lines-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.1s;
}

.invoice-form-page .invoice-lines-table tbody tr:hover {
  background: #fafbfc;
}

.invoice-form-page .invoice-lines-table td {
  padding: 0.6rem 1rem;
  vertical-align: middle;
}

.invoice-form-page .invoice-lines-table td.text-right {
  text-align: right;
}

.invoice-form-page .invoice-lines-table input[type="text"],
.invoice-form-page .invoice-lines-table input[type="number"],
.invoice-form-page .invoice-lines-table select {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.8125rem;
}

.invoice-form-page .invoice-lines-table .row-remove {
  color: #dc2626;
  font-size: 0.8125rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
}

.invoice-form-page .invoice-lines-table .row-remove:hover {
  text-decoration: underline;
}

.invoice-form-page .invoice-lines-tfoot {
  background: #f8fafc;
  border-top: 2px solid #e2e8f0;
}

.invoice-form-page .invoice-lines-tfoot td {
  padding: 1rem;
  font-weight: 600;
  color: #1e293b;
}

.invoice-form-page .invoice-amount-due {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

/* Summary block (Subtotal / Total / Amount due) */
.invoice-form-page .invoice-summary {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  max-width: 320px;
  margin-left: auto;
}

.invoice-form-page .invoice-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  font-size: 0.9375rem;
  color: #475569;
}

.invoice-form-page .invoice-summary-row.invoice-summary-total {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #e2e8f0;
}

.invoice-form-page .invoice-summary-row.invoice-summary-due {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 0.25rem;
}

/* Collapsible legacy section */
.invoice-form-page .invoice-collapse-bar {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 0;
  user-select: none;
}

.invoice-form-page .invoice-collapse-bar:hover {
  background: #e2e8f0;
}

.invoice-form-page .invoice-collapse-bar .ti-chevron-down {
  transition: transform 0.2s ease;
}

.invoice-form-page .invoice-collapse-bar.collapsed .ti-chevron-down {
  transform: rotate(-90deg);
}

.invoice-form-page .invoice-collapse-content {
  padding: 1rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.invoice-form-page .invoice-collapse-content.hidden {
  display: none;
}

/* Notes / Terms */
.invoice-form-page .invoice-notes-section label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.5rem;
}

.invoice-form-page .invoice-notes-section textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9375rem;
  min-height: 80px;
  resize: vertical;
}

/* Primary submit button */
.invoice-form-page .btn-invoice-primary {
  background: #2563eb;
  color: #fff;
  padding: 0.5rem 1.25rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.15s;
}

.invoice-form-page .btn-invoice-primary:hover {
  background: #1d4ed8;
  color: #fff;
}

.invoice-form-page .btn-invoice-secondary {
  background: #fff;
  color: #475569;
  padding: 0.5rem 1rem;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.invoice-form-page .btn-invoice-secondary:hover {
  background: #f8fafc;
  color: #1e293b;
}

/* Product admin pages */
.product-admin-page .product-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.product-admin-page .product-page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  margin: 0;
}

.product-admin-page .product-page-subtitle {
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.95rem;
}

.product-admin-page .product-page-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.product-admin-page .product-form-shell,
.product-admin-page .product-media-card,
.product-admin-page .product-details-card {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.05);
}

.product-admin-page .product-form-grid,
.product-admin-page .product-view-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .product-admin-page .product-form-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }

  .product-admin-page .product-view-grid {
    grid-template-columns: 320px minmax(0, 1fr);
  }
}

.product-admin-page .product-soft-panel,
.product-admin-page .product-image-panel {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.7));
  padding: 1.25rem;
}

.product-admin-page .product-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1rem;
}

.product-admin-page .product-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

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

@media (min-width: 640px) {
  .product-admin-page .product-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.product-admin-page .product-info-item {
  padding: 0.9rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.product-admin-page .product-description-block {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.product-admin-page .product-thumb {
  width: 250px;
  height: 250px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.product-admin-page .product-thumb img {
  width: 100%;
  height: 100%;
}

.product-admin-page .product-thumb--contain img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}

.product-admin-page .product-thumb--main {
  margin-left: auto;
  margin-right: auto;
}

.product-admin-page .product-thumb--editable {
  overflow: visible;
}

.product-admin-page .product-delete-icon {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  cursor: pointer;
}

.product-admin-page .product-delete-icon input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.product-admin-page .product-delete-icon span {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e2e8f0;
  color: #dc2626;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.product-admin-page .product-delete-icon:hover span {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
  transform: translateY(-1px);
}

.product-admin-page .product-delete-icon input:checked + span {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.product-admin-page .product-thumb-label {
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
  margin-top: 0.4rem;
}

.product-admin-page .product-thumb-label--left {
  text-align: left;
}

.product-admin-page .product-gallery-grid,
.product-admin-page .product-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.product-admin-page .product-preview-grid {
  margin-top: 0.9rem;
}

.product-admin-page .product-image-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  background: #fff;
  min-height: 160px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-admin-page .product-image-dropzone:hover {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(239, 246, 255, 0.7);
}

.product-admin-page .product-existing-media-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .product-admin-page .product-page-header {
    flex-direction: column;
  }

  .product-admin-page .product-page-actions,
  .product-admin-page .product-form-actions {
    width: 100%;
  }

  .product-admin-page .product-thumb {
    width: 160px;
    height: 160px;
  }
}

/* Admin invoice show page */
.invoice-show-page {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

.invoice-show-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.invoice-show-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
}

.invoice-show-meta {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.invoice-show-actions {
  flex-shrink: 0;
}

.invoice-show-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 860px) {
  .invoice-show-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
    gap: 1.5rem;
  }
}

.invoice-show-main .card {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.invoice-show-main-card {
  overflow: hidden;
}

.invoice-show-main .card-body {
  padding: 1.5rem 1.75rem;
}

.invoice-show-top-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .invoice-show-top-card {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.invoice-show-section {
  border-radius: 12px;
}

.invoice-show-attachment {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.invoice-show-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 860px) {
  .invoice-show-sidebar {
    position: sticky;
    top: 1.5rem;
  }
}

.invoice-show-sidebar-card {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.invoice-show-sidebar .card-body {
  padding: 1.25rem 1.5rem;
}

.invoice-form-page #csv-form .card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.invoice-form-page #csv-form .card-body {
  padding: 1.5rem 1.75rem;
}

/* ======================================================
   ORDER / INVOICE SHOW PAGE  (.ord-*)
   ====================================================== */

/* Page wrapper */
.ord-page {
  padding-bottom: 3rem;
}

/* ── Page header ── */
.ord-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.ord-page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.ord-page-breadcrumb a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s;
}

.ord-page-breadcrumb a:hover {
  color: #3b82f6;
}

.ord-page-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.2rem;
  line-height: 1.2;
}

.ord-page-date {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.ord-page-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── Buttons ── */
.ord-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  line-height: 1.4;
}

.ord-btn i { font-size: 1rem; }

.ord-btn--secondary {
  background: #ffffff;
  color: #374151;
  border-color: #d1d5db;
}

.ord-btn--secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}

.ord-btn--primary {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.ord-btn--primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

/* ── Body layout ── */
.ord-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 860px) {
  .ord-body {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (min-width: 1100px) {
  .ord-body {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

/* ── Shared card shell ── */
.ord-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.ord-card:last-child {
  margin-bottom: 0;
}

.ord-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbfc;
}

.ord-card-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

.ord-card-body {
  padding: 1.25rem;
}

.ord-card-body--flush {
  padding: 0;
}

.ord-card-body--meta {
  padding: 0;
}

/* ── Parties strip ── */
.ord-parties {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.ord-party {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}

.ord-parties-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  flex-shrink: 0;
  color: #d1d5db;
  font-size: 1.1rem;
  background: #f9fafb;
  border-left: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
}

.ord-party-logo {
  width: 3rem;
  height: 3rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
}

.ord-party-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ord-party-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 10px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.9375rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ord-party-avatar--customer {
  background: #fce7f3;
  color: #9d174d;
}

.ord-party-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin: 0 0 0.15rem;
}

.ord-party-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.1rem;
}

.ord-party-sub {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0;
}

/* ── Details grid (legacy order) ── */
.ord-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 2rem;
}

@media (max-width: 600px) {
  .ord-details-grid {
    grid-template-columns: 1fr;
  }
}

.ord-detail-item--full {
  grid-column: 1 / -1;
}

.ord-detail-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

.ord-detail-value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #111827;
}

/* ── Notes text ── */
.ord-notes-text {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.65;
  margin: 0;
  white-space: pre-line;
}

.ord-notes-text--internal {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

.ord-notes-empty {
  font-size: 0.875rem;
  color: #9ca3af;
  font-style: italic;
  margin: 0;
}

/* ── Sidebar ── */
.ord-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
}

@media (min-width: 860px) {
  .ord-sidebar {
    position: sticky;
    top: 1.5rem;
  }
}

/* ── Amount hero card ── */
.ord-amount-card {
  text-align: center;
  padding: 2rem 1.5rem 1.5rem;
  background: linear-gradient(160deg, #1e40af 0%, #2563eb 100%);
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.ord-amount-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
  margin: 0 0 0.35rem;
}

.ord-amount-value {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.9rem;
  line-height: 1;
}

.ord-amount-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* ── Status badge ── */
.ord-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ord-badge--paid {
  background: #059669;
  color: #fff;
  border: none;
}

.ord-badge--pending {
  background: #d97706;
  color: #fff;
  border: none;
}

.ord-badge--overdue {
  background: #dc2626;
  color: #fff;
  border: none;
}

.ord-badge--cancelled {
  background: #4b5563;
  color: #fff;
  border: none;
}

.ord-due-text {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
}

/* ── Meta rows ── */
.ord-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}

.ord-meta-row:last-child {
  border-bottom: none;
}

.ord-meta-row--link {
  flex-wrap: nowrap;
}

.ord-meta-label {
  font-size: 0.8rem;
  color: #6b7280;
  flex-shrink: 0;
}

.ord-meta-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  text-align: right;
}

.ord-meta-value.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
}

.ord-meta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #2563eb;
  text-decoration: none;
}

.ord-meta-link:hover {
  text-decoration: underline;
}

/* ======================================================
   INVOICE CREATE / EDIT FORM  (.inv-form-*)
   ====================================================== */

/* Tab nav */
.inv-tabs {
  display: flex;
  gap: 0.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.3rem;
  margin-bottom: 1.5rem;
  width: fit-content;
  box-shadow: 0 1px 3px rgba(15,23,42,.04);
}

.inv-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
}

.inv-tab:hover { background: #f9fafb; color: #374151; }

.inv-tab.active {
  background: #eff6ff;
  color: #2563eb;
  border-color: #dbeafe;
  font-weight: 600;
}

.inv-tab i { font-size: 1rem; }

/* Alert boxes */
.inv-error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

.inv-success-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

/* Customer + details grid */
.inv-top-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .inv-top-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.inv-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

/* Form fields */
.inv-field { display: flex; flex-direction: column; gap: 0.3rem; }

.inv-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  letter-spacing: 0.01em;
}

.inv-required { color: #ef4444; margin-left: 1px; }

.inv-hint-inline {
  font-size: 0.75rem;
  font-weight: 400;
  color: #9ca3af;
  margin-left: 0.25rem;
}

.inv-hint {
  font-size: 0.75rem;
  color: #9ca3af;
}

.inv-error-msg {
  font-size: 0.75rem;
  color: #ef4444;
}

.inv-input,
.inv-textarea {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #111827;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}

.inv-input:focus,
.inv-textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}

.inv-input--error { border-color: #fca5a5; }

.inv-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.55;
}

.inv-file-input {
  width: 100%;
  font-size: 0.8rem;
  color: #374151;
  padding: 0.4rem 0;
  cursor: pointer;
}

.inv-checkbox-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.6rem;
}

.inv-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: #2563eb;
  cursor: pointer;
  flex-shrink: 0;
}

.inv-checkbox-label {
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
}

/* Add item button */
.inv-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  cursor: pointer;
  transition: all .15s;
}

.inv-add-btn:hover { background: #dbeafe; border-color: #93c5fd; }
.inv-add-btn i { font-size: 0.95rem; }

/* Line items form table */
.inv-table-wrap { overflow-x: auto; }

.inv-form-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  min-width: 700px;
}

/* Table header */
.inv-fth {
  padding: 0.6rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b7280;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
  text-align: left;
}

.inv-fth--product { width: 170px; }
.inv-fth--desc   { min-width: 140px; }
.inv-fth--num    { width: 90px; text-align: right; }
.inv-fth--ads    { width: 180px; }
.inv-fth--del    { width: 44px; }

/* Table body rows */
.inv-ftr { border-bottom: 1px solid #f3f4f6; }
.inv-ftr:last-child { border-bottom: none; }
.inv-ftr:hover { background: #fafbfc; }

.inv-ftd {
  padding: 0.55rem 0.75rem;
  vertical-align: top;
}

.inv-ftd--num { text-align: right; }
.inv-ftd--del { text-align: center; vertical-align: middle; }

/* Inputs inside table cells */
.inv-finput {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: #111827;
  background: #fff;
  outline: none;
  transition: border-color .15s;
}

.inv-finput:focus { border-color: #93c5fd; }
.inv-finput--num  { text-align: right; }
.inv-finput--sm   { font-size: 0.75rem; padding: 0.3rem 0.5rem; margin-bottom: 0.3rem; display: block; }

/* Delete row button */
.inv-del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid #fee2e2;
  background: #fff5f5;
  color: #ef4444;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
  font-size: 0.95rem;
}

.inv-del-btn:hover { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }

/* Table footer */
.inv-ftfoot td {
  padding: 0.65rem 0.75rem;
  font-size: 0.875rem;
  color: #374151;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.inv-ftfoot--total td {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #111827;
  border-top: 2px solid #e5e7eb;
}

.inv-ftfoot-label { text-align: right; }
.inv-ftfoot-amount { text-align: right; font-weight: 600; white-space: nowrap; }

/* Collapse (legacy single amount) */
.inv-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  background: #fafbfc;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}

.inv-collapse-btn:hover { background: #f3f4f6; color: #374151; }

.inv-collapse-btn i {
  transition: transform .2s;
  font-size: 1rem;
  flex-shrink: 0;
}

.inv-collapse-btn[aria-expanded="true"] i { transform: rotate(180deg); }

.inv-collapse-body { border-top: 1px solid #f3f4f6; }

.inv-legacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 600px) {
  .inv-legacy-grid { grid-template-columns: 1fr; }
}

/* Sidebar actions */
.inv-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0;
}

.inv-btn-full { width: 100%; justify-content: center; }

/* Existing PDF indicator */
.inv-pdf-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  font-size: 0.78rem;
  color: #6b7280;
  margin-top: 0.4rem;
}

.inv-pdf-link {
  color: #2563eb;
  font-size: 0.78rem;
  text-decoration: none;
  white-space: nowrap;
}

.inv-pdf-link:hover { text-decoration: underline; }

/* ======================================================
   INVOICE LINE ITEMS TABLE  (.inv-*)
   ====================================================== */

.inv-items-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

/* Column widths */
.inv-th--desc   { width: auto; }
.inv-th--num    { width: 90px; }
.inv-th--amount { width: 110px; }

/* Header */
.inv-th {
  padding: 0.65rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.inv-th--desc   { text-align: left;  padding-left: 1.25rem; }
.inv-th--num    { text-align: right; }
.inv-th--amount { text-align: right; padding-right: 1.25rem; }

/* Body rows */
.inv-tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s;
}

.inv-tr:last-child { border-bottom: none; }
.inv-tr:hover { background: #fafbfc; }

/* Body cells */
.inv-td {
  padding: 0.85rem 1rem;
  vertical-align: top;
  font-size: 0.875rem;
  color: #374151;
}

.inv-td--desc   { padding-left: 1.25rem; }
.inv-td--num    { text-align: right; white-space: nowrap; color: #6b7280; }
.inv-td--amount { text-align: right; padding-right: 1.25rem; white-space: nowrap; font-weight: 600; color: #111827; }

/* Description cell inner layout */
.inv-desc-cell {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

/* Product thumbnail */
.inv-thumb {
  flex-shrink: 0;
  display: block;
  width: 2.75rem;   /* 44px */
  height: 2.75rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  background: #f3f4f6;
}

.inv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Invisible placeholder keeps alignment when some rows have no image */
.inv-thumb-placeholder {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
}

/* Text block */
.inv-desc-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 0.1rem;
  min-width: 0;
}

.inv-desc-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #111827;
  line-height: 1.4;
}

.inv-desc-sub {
  font-size: 0.78rem;
  color: #9ca3af;
  line-height: 1.4;
}

/* Footer total row */
.inv-tr-total {
  background: #f9fafb;
  border-top: 2px solid #e5e7eb;
}

.inv-tfoot-label {
  padding: 0.8rem 1rem;
  text-align: right;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.inv-tfoot-amount {
  padding: 0.8rem 1.25rem 0.8rem 1rem;
  text-align: right;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}

/* ======================================================
   PRODUCT PAGES  (.prod-*)
   ====================================================== */

/* Stats strip (show page) */
.prod-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
  .prod-stats { grid-template-columns: repeat(4, 1fr); }
}

.prod-stat {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(15,23,42,.05);
}

.prod-stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #9ca3af;
  margin: 0 0 .3rem;
}

.prod-stat-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  margin: 0;
}

.prod-stat-value--price { color: #2563eb; }

/* Status badge on show page */
.prod-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.prod-badge--active   { background: #dcfce7; color: #166534; }
.prod-badge--inactive { background: #fee2e2; color: #991b1b; }
.prod-badge--digital  { background: #eff6ff; color: #1d4ed8; }
.prod-badge--physical { background: #fef9c3; color: #854d0e; }
.prod-badge--service  { background: #f5f3ff; color: #5b21b6; }

/* Image column on show page */
.prod-main-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prod-main-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.prod-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: .6rem;
  margin-top: .75rem;
}

.prod-gallery-item {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  background: #f9fafb;
}

.prod-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Meta table on show page */
.prod-meta-table { width: 100%; }

.prod-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.prod-meta-row:last-child { border-bottom: none; }

.prod-meta-label {
  font-size: .8rem;
  color: #6b7280;
  flex-shrink: 0;
  min-width: 100px;
}

.prod-meta-value {
  font-size: .875rem;
  font-weight: 500;
  color: #111827;
  text-align: right;
}

.prod-meta-value--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .8rem;
  word-break: break-all;
}

/* Form page: dropzone */
.prod-dropzone {
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  background: #fafbfc;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  min-height: 110px;
}

.prod-dropzone:hover,
.prod-dropzone.drag-over {
  border-color: #93c5fd;
  background: #eff6ff;
}

.prod-dropzone i { font-size: 1.75rem; color: #9ca3af; margin-bottom: .35rem; }
.prod-dropzone-title { font-size: .875rem; color: #374151; font-weight: 500; }
.prod-dropzone-hint  { font-size: .75rem;  color: #9ca3af; margin-top: .15rem; }

/* Existing image thumbnails in edit page */
.prod-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: .6rem;
  margin-bottom: .75rem;
}

.prod-thumb-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  background: #f9fafb;
}

.prod-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prod-thumb-del {
  position: absolute;
  top: .3rem;
  right: .3rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  border: 1px solid #e5e7eb;
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  cursor: pointer;
  transition: all .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

.prod-thumb-del:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* Digital options conditional panel */
.prod-digital-panel {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}

.prod-digital-title {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #0369a1;
  margin-bottom: 1rem;
}

/* Active toggle row */
.prod-active-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  cursor: pointer;
}

.prod-active-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #2563eb;
  flex-shrink: 0;
  cursor: pointer;
}

.prod-active-label { font-size: .9rem; font-weight: 500; color: #111827; cursor: pointer; }
.prod-active-hint  { font-size: .78rem; color: #6b7280; margin: .2rem 0 0 1.75rem; }

/* New image preview thumbnails (client-side before upload) */
.prod-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: .5rem;
  margin-top: .6rem;
}

.prod-preview-item {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  overflow: hidden;
  background: #eff6ff;
}

.prod-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Section inside sidebar form card */
.prod-sidebar-section {
  border-bottom: 1px solid #f3f4f6;
  padding: 1rem 1.25rem;
}

.prod-sidebar-section:last-child { border-bottom: none; }
.prod-sidebar-section-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b7280;
  margin-bottom: .75rem;
}

/* Info card on edit sidebar */
.prod-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .4rem 0;
  font-size: .8rem;
  border-bottom: 1px solid #f3f4f6;
}

.prod-info-row:last-child { border-bottom: none; }
.prod-info-key   { color: #9ca3af; }
.prod-info-value { color: #374151; font-weight: 500; text-align: right; }

/* Licenses table */
.prod-lic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8375rem;
}

.prod-lic-th {
  padding: .6rem 1rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b7280;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap;
}

.prod-lic-tr { border-bottom: 1px solid #f3f4f6; }
.prod-lic-tr:last-child { border-bottom: none; }
.prod-lic-tr:hover { background: #fafbfc; }

.prod-lic-td {
  padding: .7rem 1rem;
  vertical-align: middle;
  color: #374151;
}

/* ── Mobile tweaks ── */
@media (max-width: 860px) {
  .ord-parties {
    flex-direction: column;
  }
  .ord-parties-divider {
    width: auto;
    height: 2rem;
    border-left: none;
    border-right: none;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
  }
  .ord-amount-value {
    font-size: 2rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   PRODUCT SHOW PAGE — unified image grid (admin)
   ═══════════════════════════════════════════════════════════════ */
.prod-show-img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 300px));
  gap: 1rem;
}

.prod-show-img-item {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.prod-show-img-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.prod-show-img-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #111827;
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   CUSTOMER SHOP — INDEX PAGE  (.shop-*)
   ═══════════════════════════════════════════════════════════════ */
.shop-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* Hero */
.shop-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #0f172a 100%);
  border-radius: 16px;
  padding: 3.5rem 3rem;
  margin-bottom: 2.25rem;
  position: relative;
  overflow: hidden;
}
.shop-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(59,130,246,.18) 0%, transparent 60%);
  pointer-events: none;
}
.shop-hero-inner { position: relative; z-index: 1; }
.shop-hero-eyebrow {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #60a5fa;
  margin: 0 0 .6rem;
}
.shop-hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 .75rem;
  line-height: 1.15;
}
.shop-hero-sub {
  font-size: 1.0625rem;
  color: #94a3b8;
  margin: 0;
  max-width: 520px;
}

/* Filter bar */
.shop-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.shop-search-form { flex-shrink: 0; }
.shop-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.shop-search-icon {
  position: absolute;
  left: .875rem;
  color: #9ca3af;
  font-size: 1rem;
  pointer-events: none;
}
.shop-search-input {
  height: 40px;
  width: 260px;
  padding: 0 2.25rem 0 2.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: .875rem;
  color: #111827;
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
.shop-search-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.shop-search-clear {
  position: absolute;
  right: .65rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: .875rem;
  padding: .2rem;
  display: flex;
  align-items: center;
}
.shop-search-clear:hover { color: #374151; }

.shop-cats {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.shop-cat-pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 1rem;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  font-size: .8125rem;
  font-weight: 500;
  color: #374151;
  background: #fff;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.shop-cat-pill:hover { border-color: #3b82f6; color: #2563eb; background: #eff6ff; }
.shop-cat-pill--active {
  background: #1e40af;
  border-color: #1e40af;
  color: #fff;
}
.shop-cat-pill--active:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

.shop-results-meta {
  font-size: .8125rem;
  color: #6b7280;
  margin: 0 0 1.25rem;
}

/* Product grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

/* Product card */
.shop-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.shop-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.1);
  border-color: #d1d5db;
}

.shop-card-img-wrap {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f8fafc;
  text-decoration: none;
}
.shop-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.shop-card:hover .shop-card-img { transform: scale(1.04); }

.shop-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: #94a3b8;
  font-size: 3.5rem;
}

.shop-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .22s;
}
.shop-card:hover .shop-card-overlay { opacity: 1; }

.shop-card-view-btn {
  background: #41aaf5;
  color: #fff;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .6rem 1.4rem;
  border-radius: 8px;
  text-transform: uppercase;
}

.shop-card-cat {
  font-size: .72rem;
  font-weight: 600;
  color: #41aaf5;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: -.1rem 0 0;
}

.shop-card-body {
  padding: 1.125rem 1.125rem .875rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .4rem;
}
.shop-card-name {
  font-size: .9375rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shop-card-desc {
  font-size: .8125rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shop-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid #f3f4f6;
}
.shop-card-price {
  font-size: 1.0625rem;
  font-weight: 800;
  color: #0f172a;
}
.shop-card-price--contact {
  font-size: .8125rem;
  font-weight: 500;
  color: #6b7280;
}
.shop-card-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  height: 32px;
  padding: 0 .875rem;
  background: #41aaf5;
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  border-radius: 7px;
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap;
}
.shop-card-btn:hover { background: #3174c8; color: #fff; }

/* Pagination */
.shop-pagination { display: flex; justify-content: center; margin-top: 2rem; }

/* Empty state */
.shop-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: #6b7280;
}
.shop-empty-icon {
  font-size: 4rem;
  color: #d1d5db;
  margin-bottom: 1.25rem;
}
.shop-empty-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #374151;
  margin: 0 0 .5rem;
}
.shop-empty-sub { font-size: .9375rem; margin: 0; }
.shop-empty-sub a { color: #2563eb; text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   CUSTOMER SHOP — DETAIL PAGE  (.shopd-*)
   ═══════════════════════════════════════════════════════════════ */
.shopd-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  overflow-x: hidden;
}

/* Card wrapper for entire product view */
.shopd-card.ord-card {
  border-radius: 14px;
  overflow: hidden;
  max-width: 100%;
}
.shopd-card-body.ord-card-body {
  padding: 1.75rem 2rem;
  overflow-x: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

/* Breadcrumb */
.shopd-breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8125rem;
  color: #6b7280;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.shopd-breadcrumb a { color: #2563eb; text-decoration: none; }
.shopd-breadcrumb a:hover { text-decoration: underline; }
.shopd-breadcrumb i { font-size: .75rem; }

/* Main layout */
.shopd-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3.5rem;
  margin-bottom: 0;
  min-width: 0;
}

/* Gallery */
.shopd-gallery {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-width: 0;
  overflow-x: hidden;
}

.shopd-main-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shopd-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.shopd-img-placeholder {
  font-size: 5rem;
  color: #94a3b8;
}

.shopd-thumbs {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}
.shopd-thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  overflow: hidden;
  background: #f9fafb;
  cursor: pointer;
  padding: 0;
  transition: border-color .15s;
  position: relative;
  flex-shrink: 0;
}
.shopd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shopd-thumb:hover { border-color: #94a3b8; }
.shopd-thumb--active { border-color: #41aaf5; }

.shopd-thumb-main-badge {
  position: absolute;
  bottom: 3px;
  right: 3px;
  background: #41aaf5;
  color: #fff;
  font-size: .5rem;
  font-weight: 700;
  padding: .1rem .3rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Info panel */
.shopd-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
  overflow-x: hidden;
}

.shopd-cat-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: .2rem .65rem;
  border-radius: 20px;
  align-self: flex-start;
}

.shopd-product-name {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  margin: 0;
}

/* Badges row */
.shopd-badges { display: flex; gap: .5rem; flex-wrap: wrap; }
.shopd-type-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  font-weight: 600;
  padding: .28rem .75rem;
  border-radius: 6px;
}
.shopd-type-digital  { background: #eff6ff; color: #1d4ed8; }
.shopd-type-physical { background: #fef9c3; color: #854d0e; }
.shopd-type-service  { background: #f5f3ff; color: #5b21b6; }
.shopd-version-badge {
  display: inline-flex;
  align-items: center;
  font-size: .75rem;
  font-weight: 600;
  padding: .28rem .75rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}
.shopd-license-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  font-weight: 600;
  padding: .28rem .75rem;
  border-radius: 6px;
  background: #ecfdf5;
  color: #059669;
}

/* Price block */
.shopd-price-block {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.shopd-price {
  font-size: 2.25rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}
.shopd-price-contact {
  font-size: 1.375rem;
  font-weight: 700;
  color: #374151;
}
.shopd-price-note {
  font-size: .8125rem;
  color: #64748b;
}

/* Product details block (under price) */
.shopd-details-block {
  padding: 1.25rem 0 0;
  border-top: 1px solid #f1f5f9;
  margin-top: .5rem;
}
.shopd-details-title {
  font-size: 1.0625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #374151;
  margin: 0 0 .75rem;
}
.shopd-details-body {
  font-size: 1.0625rem;
  color: #374151;
  line-height: 1.75;
  white-space: pre-line;
  margin-bottom: .75rem;
}
.shopd-detail-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem 0;
  font-size: 1.0625rem;
}
.shopd-detail-label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 600;
  color: #6b7280;
  min-width: 100px;
  font-size: 1.0625rem;
}
.shopd-detail-value {
  color: #111827;
  font-weight: 500;
  font-size: 1.0625rem;
}

/* Description (legacy, kept for any refs) */
.shopd-desc-title {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #374151;
  margin: 0 0 .5rem;
}
.shopd-desc-body {
  font-size: .9375rem;
  color: #374151;
  line-height: 1.75;
  white-space: pre-line;
}

/* CTA row */
.shopd-cta { display: flex; gap: .75rem; flex-wrap: wrap; }

.shopd-btn-cart {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  height: 46px;
  padding: 0 1.75rem;
  background: #41aaf5;
  color: #fff;
  font-size: .9375rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, transform .15s;
  text-decoration: none;
}
.shopd-btn-cart:hover { background: #3174c8; transform: translateY(-1px); }
.shopd-btn-cart:active { transform: translateY(0); }

.shopd-btn-partner { background: #fff; color: #41aaf5; border: 2px solid #41aaf5; }
.shopd-btn-partner:hover { background: #f0f9ff; color: #3174c8; border-color: #3174c8; }

.shopd-cart-hint { margin: .5rem 0 0; font-size: .8125rem; color: #6b7280; }

.shopd-btn-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  height: 46px;
  padding: 0 1.25rem;
  background: #fff;
  color: #374151;
  font-size: .9375rem;
  font-weight: 600;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.shopd-btn-back:hover { border-color: #9ca3af; color: #111827; }

/* Quick facts */
.shopd-facts {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}
.shopd-fact {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .65rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}
.shopd-fact:last-child { border-bottom: none; }
.shopd-fact-label {
  font-size: .8125rem;
  color: #6b7280;
  min-width: 90px;
  font-weight: 500;
}
.shopd-fact-value {
  font-size: .875rem;
  color: #111827;
  font-weight: 600;
}
.shopd-fact-mono { font-family: ui-monospace, monospace; font-size: .8125rem; }

/* Related products */
.shopd-related { margin-top: 1rem; }
.shopd-related-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid #f1f5f9;
}
.shopd-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.shopd-rel-card {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  text-decoration: none;
  background: #fff;
  transition: transform .2s, box-shadow .2s;
}
.shopd-rel-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,.09);
}
.shopd-rel-img-wrap {
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  overflow: hidden;
}
.shopd-rel-img { width: 100%; height: 100%; object-fit: cover; }
.shopd-rel-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8; font-size: 2.5rem;
}
.shopd-rel-body { padding: .875rem; }
.shopd-rel-name {
  font-size: .875rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 .3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shopd-rel-price {
  font-size: .875rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

/* ─── Cart Toast ─── */
.shopd-cart-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .875rem 1.5rem;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  transform: translateY(120%);
  opacity: 0;
  transition: transform .3s, opacity .3s;
  z-index: 9999;
}
.shopd-cart-toast--show {
  transform: translateY(0);
  opacity: 1;
}
.shopd-cart-toast i { color: #4ade80; font-size: 1.1rem; }

/* ─── Cart Drawer ─── */
.shopd-cart-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1040;
}
.shopd-cart-backdrop--show { display: block; }

.shopd-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 380px;
  max-width: 95vw;
  background: #fff;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 30px rgba(0,0,0,.15);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.shopd-cart-drawer--open { transform: translateX(0); }

.shopd-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
}
.shopd-cart-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.shopd-cart-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  font-size: 1.1rem;
  padding: .3rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
}
.shopd-cart-close:hover { background: #f1f5f9; color: #111827; }

.shopd-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.shopd-cart-empty { font-size: .875rem; color: #9ca3af; text-align: center; padding: 2rem 0; }

.shopd-cart-item {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .75rem;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  background: #fafafa;
}
.shopd-ci-img {
  width: 52px;
  height: 52px;
  border-radius: 7px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 1.4rem;
}
.shopd-ci-img img { width: 100%; height: 100%; object-fit: cover; }
.shopd-ci-info { flex: 1; min-width: 0; }
.shopd-ci-name {
  font-size: .875rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 .2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shopd-ci-price { font-size: .8125rem; color: #6b7280; margin: 0; }
.shopd-ci-del {
  background: none;
  border: none;
  cursor: pointer;
  color: #d1d5db;
  font-size: 1rem;
  padding: .3rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color .15s;
}
.shopd-ci-del:hover { color: #ef4444; }

.shopd-cart-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid #f1f5f9;
}
.shopd-cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: .9375rem;
  color: #374151;
  margin-bottom: .875rem;
}
.shopd-cart-total-row strong { font-size: 1.125rem; color: #0f172a; }
.shopd-cart-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  height: 44px;
  background: #41aaf5;
  color: #fff;
  font-size: .9375rem;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  transition: background .15s;
}
.shopd-cart-checkout-btn:hover { background: #3174c8; color: #fff; }
.shopd-cart-note {
  font-size: .75rem;
  color: #9ca3af;
  text-align: center;
  margin: .6rem 0 0;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .shopd-body { grid-template-columns: 1fr; gap: 2rem; }
  .shopd-main-img { max-width: 480px; }
  .shop-hero { padding: 2.25rem 1.5rem; }
  .shop-hero-title { font-size: 1.625rem; }
  .shop-filter-bar { flex-direction: column; align-items: flex-start; }
  .shop-search-input { width: 100%; }
}
@media (max-width: 600px) {
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
  .shopd-product-name { font-size: 1.5rem; }
  .shopd-price { font-size: 1.75rem; }
}

/* ─── Related product category label ─── */
.shopd-rel-cat {
  font-size: .7rem;
  font-weight: 600;
  color: #41aaf5;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin: 0 0 .2rem;
}

/* ═══════════════════════════════════════════════════════════════
   SHOP DETAIL — TABS  (.shopd-tabs-*)
   ═══════════════════════════════════════════════════════════════ */
.shopd-tabs-wrap {
  margin: 2.5rem 0 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  min-width: 0;
  max-width: 100%;
}
.shopd-card-body .shopd-tabs-wrap {
  margin-top: 1.75rem;
}

.shopd-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 0 .5rem;
  gap: 0;
}

.shopd-tab {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  height: 52px;
  padding: 0 1.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #6b7280;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
  margin-bottom: -1px;
}
.shopd-tab:hover { color: #41aaf5; }
.shopd-tab--active {
  color: #41aaf5;
  border-bottom-color: #41aaf5;
}

.shopd-tab-panel {
  display: none;
  padding: 1.75rem 2rem;
  overflow-x: hidden;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.shopd-tab-panel--active { display: block; }

.shopd-tab-content-body {
  font-size: 1.0625rem;
  color: #374151;
  line-height: 1.8;
  white-space: pre-line;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.shopd-features-body {
  white-space: pre-line;
  overflow-wrap: break-word;
  word-break: break-word;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.shopd-tab-fact-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .65rem 0;
  border-top: 1px solid #f1f5f9;
  margin-top: .75rem;
}
.shopd-tab-fact-label {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .8125rem;
  font-weight: 600;
  color: #6b7280;
  min-width: 100px;
}
.shopd-tab-fact-value {
  font-size: .9rem;
  color: #111827;
  font-weight: 500;
}

