/* Storefront Styling - Dr. Helmy Badawy Pharmacies */
@import url('/public/design-system.css');

html, body {
  scroll-padding-top: 100px;
  scroll-padding-bottom: 96px;
  overflow-x: hidden;
  max-width: 100vw;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Fail-Safe Primary View State Management (Strict Mutually Exclusive Views) */
.view {
  display: none !important;
  max-width: 100%;
  overflow-x: hidden;
}

.view.active {
  display: block !important;
}

/* Main Layout & App Container */
.store-container {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-4) var(--space-8) var(--space-4);
  width: 100%;
  box-sizing: border-box;
}

/* Header & Navigation */
.site-topbar {
  background: linear-gradient(90deg, #F8FAFC 0%, #F0FDFA 50%, #F8FAFC 100%);
  color: var(--color-text-subtle);
  font-size: var(--text-xs);
  padding: 7px 0;
  border-bottom: 1px solid var(--color-border);
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-weight: var(--font-medium);
}

.brand-topbar-en {
  font-family: var(--font-family-latin, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.02em;
}

.site-header {
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
  gap: var(--space-4);
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text-main);
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.brand-identity:hover {
  opacity: 0.95;
}

.brand-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0D9488 0%, #0F766E 50%, #064E3B 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.brand-identity:hover .brand-logo-mark {
  transform: scale(1.04);
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.45);
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-name-ar {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: #0F172A;
  line-height: 1.2;
}

.brand-name-en {
  font-family: var(--font-family-latin, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  font-size: var(--text-xs);
  font-weight: 600;
  color: #0D9488;
  letter-spacing: 0.025em;
}

.main-navigation {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-link-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text-main);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 40px;
}

.nav-link-btn:hover {
  background-color: var(--color-surface-hover);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.nav-link-btn.btn-cart-highlight {
  background-color: var(--color-primary-surface);
  border-color: var(--color-primary-light);
  color: var(--color-primary);
  box-shadow: 0 1px 4px rgba(13, 148, 136, 0.12);
}

.nav-link-btn.btn-cart-highlight:hover {
  background-color: var(--color-primary-light);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.2);
}

.cart-count-badge {
  background: linear-gradient(135deg, #0D9488 0%, #0F766E 100%);
  color: white;
  border-radius: var(--radius-full);
  padding: 0.15rem 0.55rem;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  font-family: var(--font-family-latin, sans-serif);
  box-shadow: 0 1px 4px rgba(13, 148, 136, 0.3);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  z-index: 900;
  padding: var(--space-1) var(--space-2);
  padding-bottom: calc(var(--space-1) + env(safe-area-inset-bottom, 0px));
}

.mobile-nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-1);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: none;
  padding: var(--space-1);
  color: var(--color-text-subtle);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  cursor: pointer;
  min-height: 48px;
  position: relative;
}

.mobile-nav-item.active {
  color: var(--color-primary);
}

.mobile-cart-badge {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-18px);
  background-color: var(--color-primary);
  color: white;
  font-size: 10px;
  font-weight: bold;
  border-radius: 99px;
  padding: 1px 5px;
}

/* Hero Section */
/* Hero Section */
.hero-banner {
  background: radial-gradient(circle at 10% 20%, rgba(20, 184, 166, 0.3) 0%, transparent 45%),
              radial-gradient(circle at 90% 80%, rgba(5, 150, 105, 0.28) 0%, transparent 45%),
              linear-gradient(135deg, #0F766E 0%, #115E59 55%, #064E3B 100%);
  color: white;
  border-radius: 22px;
  padding: var(--space-8) var(--space-8);
  margin: var(--space-6) 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px -6px rgba(15, 118, 110, 0.25), 0 4px 12px -2px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-banner-inner {
  display: grid;
  grid-template-columns: 1.28fr 0.82fr;
  gap: var(--space-8);
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 100%;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-3);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hero-title {
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: var(--text-base);
  opacity: 0.94;
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.hero-feature-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
}

.btn-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: #FFFFFF;
  color: #0F766E;
  font-weight: 700;
  font-size: var(--text-base);
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-lg);
  border: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  background: #F0FDFA;
}

.btn-hero-cta:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.hero-card-badge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  color: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform 200ms ease, background 200ms ease;
}

.hero-card-badge:hover {
  transform: translateX(-4px);
  background: rgba(255, 255, 255, 0.18);
}

.hero-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-badge-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-badge-text strong {
  font-size: var(--text-sm);
  font-weight: 700;
}

.hero-badge-text span {
  font-size: var(--text-xs);
  opacity: 0.88;
}

/* Discovery & Search Bar */
.discovery-container {
  margin-bottom: var(--space-6);
}

.search-box-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 0.65rem var(--space-3);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
  display: flex;
  gap: var(--space-3);
  align-items: center;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.search-box-card:focus-within {
  border-color: var(--color-primary-light);
  box-shadow: 0 8px 24px -2px rgba(13, 148, 136, 0.12);
}

.search-input-wrapper {
  position: relative;
  flex: 2;
  display: flex;
  align-items: center;
}

.search-icon-svg {
  position: absolute;
  right: var(--space-3);
  color: var(--color-text-subtle);
  pointer-events: none;
}

.search-field {
  width: 100%;
  padding: 0.75rem var(--space-8) 0.75rem var(--space-3);
  font-family: var(--font-family-arabic);
  font-size: var(--text-base);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-bg);
  transition: all var(--transition-fast);
}

.search-field:focus {
  background-color: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.category-dropdown {
  flex: 1;
  min-width: 180px;
  padding: 0.75rem var(--space-3);
  font-family: var(--font-family-arabic);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-bg);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-inline-start: 12px;
  padding-inline-end: 34px;
  transition: all var(--transition-fast);
}

.category-dropdown:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
  background-color: var(--color-surface);
}

.btn-search-trigger {
  padding: 0.75rem var(--space-6);
  border-radius: var(--radius-md);
  font-weight: var(--font-bold);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}

/* Category Quick Filter Chips */
.category-chips-bar {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-2) var(--space-4);
  scroll-padding: 0 var(--space-4);
  margin-top: var(--space-3);
  scrollbar-width: none;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
}
.category-chips-bar::-webkit-scrollbar {
  display: none;
}

.category-chip {
  scroll-snap-align: start;
  flex-shrink: 0;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 180ms cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.category-chip:hover {
  border-color: var(--color-primary-light);
  color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(13, 148, 136, 0.12);
}

.category-chip.active {
  background: linear-gradient(135deg, #0D9488 0%, #0F766E 100%);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
  font-weight: 700;
}

/* Products Grid & Elevated Product Cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-12);
}

.product-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: var(--space-4);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

.product-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.08);
  transform: translateY(-3px);
}

.product-image-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding-top: 75%; /* 4:3 Aspect Ratio */
  background: radial-gradient(circle at center, #FFFFFF 0%, #F8FAFC 100%);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-3);
  cursor: pointer;
  border: 1px solid var(--color-border-subtle);
}

.product-image-el {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-3);
  transition: transform var(--transition-normal);
  display: block;
}

.product-card:hover .product-image-el {
  transform: scale(1.04);
}

.product-availability-tag {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 2;
}

.product-meta-header {
  margin-bottom: var(--space-2);
}

.product-category-name {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: var(--font-bold);
  margin-bottom: 2px;
}

.product-name-ar {
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  color: var(--color-text-main);
  line-height: 1.35;
  margin-bottom: 4px;
}

.product-name-en {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
  line-height: 1.2;
  font-family: var(--font-family-latin, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}

.product-ingredient-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: var(--color-surface-hover);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.product-units-section {
  margin: var(--space-3) 0 var(--space-2);
}

.unit-selector-label {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--color-text-subtle);
  margin-bottom: 4px;
  display: block;
}

.unit-packaging-info {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 4px;
  min-height: 18px;
}

.product-pricing-bar {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.price-main {
  font-size: var(--text-xl);
  font-weight: var(--font-black);
  color: #0F172A;
  font-family: var(--font-family-latin, -apple-system, sans-serif);
  font-variant-numeric: tabular-nums;
}

.price-currency {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--color-primary);
  margin-inline-start: 4px;
}

.product-card-ctas {
  display: flex;
  gap: var(--space-2);
}


/* Product Details Modal Improvements */
.modal-product-details-body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-6);
}

.modal-details-img-box {
  width: 100%;
  height: 260px;
  background-color: var(--color-bg);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.modal-details-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.modal-spec-row {
  display: flex;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.modal-spec-label {
  font-weight: var(--font-semibold);
  color: var(--color-text-subtle);
  width: 120px;
  flex-shrink: 0;
}

.modal-spec-val {
  color: var(--color-text-main);
  flex: 1;
}

/* Cart Page Styles & Item Contract */
.cart-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-6);
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

.cart-item-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: var(--space-4);
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-3);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.cart-item-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.cart-item-media {
  width: 88px;
  height: 88px;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-thumb {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cart-item-name-ar {
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  color: var(--color-text-main);
  margin: 0;
  line-height: 1.35;
}

.cart-item-name-en {
  font-family: var(--font-family-latin, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

.cart-item-unit-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0;
}

.cart-unit-badge {
  display: inline-block;
  background-color: var(--color-primary-surface);
  color: var(--color-primary);
  border: 1px solid var(--color-primary-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
}

.cart-item-price-breakdown {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 3px;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-surface);
}

.stepper-btn {
  min-width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  color: var(--color-text-main);
  transition: background-color var(--transition-fast);
}

.stepper-btn:hover {
  background-color: var(--color-bg);
}

.stepper-input {
  min-width: 40px;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-main);
}

.btn-outline-danger {
  background: transparent;
  color: var(--color-danger);
  border: 1.5px solid var(--color-danger-border);
  border-radius: var(--radius-md);
  min-height: 38px;
  padding: 0 var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-outline-danger:hover {
  background-color: var(--color-danger-bg);
}

.cart-summary-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: var(--space-6);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 100px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.summary-row.total-row {
  border-top: 1.5px dashed var(--color-border);
  margin-top: var(--space-3);
  padding-top: var(--space-4);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--color-text-main);
}

.total-amount-display {
  font-size: var(--text-2xl);
  font-weight: var(--font-black);
  color: var(--color-primary);
  font-family: var(--font-family-latin, -apple-system, sans-serif);
  font-variant-numeric: tabular-nums;
}

.empty-cart-container {
  padding: var(--space-8) 0;
}

.empty-cart-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
}

/* Authentication Composition & Intentional Styled Components */
.auth-card {
  max-width: 480px;
  margin: var(--space-8) auto;
  padding: var(--space-8) var(--space-6);
  border-radius: 24px;
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08);
  background: var(--color-surface);
}

.auth-subtitle {
  font-family: var(--font-family-latin, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.auth-subview {
  display: block;
}

.auth-subview.hidden {
  display: none !important;
}

.social-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 48px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
  user-select: none;
  text-decoration: none;
}

.btn-oauth-google {
  background-color: #FFFFFF;
  color: #1F2937;
  border: 1.5px solid #E5E7EB;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-oauth-google:hover {
  background-color: #F9FAFB;
  border-color: #D1D5DB;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.btn-oauth-google:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.btn-oauth-apple {
  background-color: #000000;
  color: #FFFFFF;
  border: 1.5px solid #000000;
}

.btn-oauth-apple:hover {
  background-color: #1F2937;
  border-color: #1F2937;
}

.btn-oauth-apple:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.3);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: var(--space-4) 0;
  color: var(--color-text-subtle);
  font-size: var(--text-xs);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--color-border);
}

.auth-divider span {
  padding: 0 var(--space-3);
  white-space: nowrap;
}

.btn-auth-email-trigger {
  min-height: 48px;
  font-weight: var(--font-semibold);
}

.auth-segmented-control {
  display: flex;
  background-color: var(--color-bg);
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  gap: 4px;
}

.auth-segment-btn {
  flex: 1;
  min-height: 40px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.auth-segment-btn.active {
  background-color: var(--color-surface);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  font-weight: var(--font-bold);
}

.btn-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  cursor: pointer;
  padding: 4px 0;
}

.btn-back-link:hover {
  text-decoration: underline;
}

#link-forgot-password,
#link-back-to-signin {
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 600;
  transition: color var(--transition-fast);
}

#link-forgot-password:hover,
#link-back-to-signin:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

.form-input-auth {
  min-height: 44px;
  font-size: var(--text-sm);
}

/* Container Bounding for Desktop Forms */
.max-w-500,
.form-container-bounded {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

#checkout-view .max-w-500 {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

#profile-view .max-w-500 {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

#orders-view {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

#checkout-form {
  border-radius: 20px;
  box-shadow: 0 4px 24px -2px rgba(15, 23, 42, 0.06);
  border: 1px solid var(--color-border);
  padding: var(--space-6);
  background: var(--color-surface);
}

.checkout-input {
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  padding: 0.75rem var(--space-3);
  transition: all var(--transition-fast);
  font-family: var(--font-family-arabic);
}

.checkout-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
  background-color: #FFFFFF;
}

.file-upload-box {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--color-bg);
}

.file-upload-box:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-surface);
}

/* Checkout Step-based UI */
.checkout-steps-nav {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-6);
}

.checkout-step-pill {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--color-text-muted);
}

.checkout-step-pill.active {
  background-color: var(--color-primary-surface);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.payment-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
  margin: var(--space-3) 0;
}

.payment-card-option {
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  background-color: var(--color-surface);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.payment-card-option:hover {
  border-color: var(--color-primary-light);
}

.payment-card-option.active {
  border-color: var(--color-primary);
  background-color: var(--color-primary-surface);
}

/* Order History / My Orders */
.order-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}

@media (max-width: 480px) {
  .order-card {
    padding: var(--space-3);
    max-width: 100%;
    overflow-x: hidden;
  }
  .modal-spec-row {
    flex-wrap: wrap;
    gap: var(--space-1);
  }
  .modal-spec-label {
    width: 100%;
    margin-bottom: 2px;
  }
  .modal-spec-val {
    width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .modal-spec-val .badge,
  .order-card .badge {
    white-space: normal;
    word-break: break-word;
    text-align: right;
    line-height: 1.35;
    max-width: 100%;
  }
}

.order-items-list {
  list-style: none;
  background-color: var(--color-bg);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin: var(--space-3) 0;
}

.order-items-list li {
  padding: var(--space-1) 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: var(--text-sm);
}
.order-items-list li:last-child {
  border-bottom: none;
}

/* Responsive Overrides */
@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .modal-product-details-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-banner-inner {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .hero-visual {
    display: none;
  }
  .site-topbar {
    display: none; /* Hide dense promotional topbar on mobile viewports */
  }
  .site-header {
    padding: 0;
  }
  .main-navigation {
    display: none; /* Replaced by bottom nav on mobile */
  }
  .mobile-bottom-nav {
    display: block;
  }
  .store-container, main {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px) + var(--space-8)) !important;
  }
  .hero-banner {
    padding: var(--space-4) var(--space-4);
    margin: var(--space-2) 0 var(--space-3);
    border-radius: 16px;
  }
  .hero-title {
    font-size: var(--text-lg);
    line-height: 1.35;
    margin-bottom: 0;
  }
  .hero-subtitle,
  .hero-features,
  .hero-actions {
    display: none;
  }
  .search-box-card {
    flex-direction: column;
  }
  .category-dropdown {
    width: 100%;
  }
  .btn-search-trigger {
    width: 100%;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-4);
  }
  .product-card {
    padding: var(--space-4);
  }
  .product-name-ar {
    font-size: var(--text-base);
  }
}

@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .product-card {
    padding: var(--space-3);
    scroll-margin-top: 110px;
    scroll-margin-bottom: 96px;
  }
  .product-image-container {
    height: 105px;
    padding-top: 0;
  }
  .product-name-ar {
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    line-height: 1.35;
  }
  .product-name-en {
    font-size: var(--text-xs);
    color: var(--color-text-subtle);
    margin-bottom: 4px;
  }
  .product-ingredient-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    font-size: var(--text-xs);
    margin-top: 2px;
  }
  .product-units-section {
    margin: var(--space-2) 0;
  }
  .unit-selector {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  .unit-pill {
    min-height: 40px;
    padding: 0.45rem 1rem;
    font-size: var(--text-xs);
  }
  .unit-packaging-info {
    font-size: var(--text-xs);
    margin-top: 4px;
  }
  .product-pricing-bar {
    padding-top: var(--space-2);
    margin: var(--space-2) 0 var(--space-3) 0;
  }
  .product-card-ctas {
    display: flex;
    flex-direction: row;
    gap: var(--space-2);
  }
  .product-card-ctas .btn {
    min-height: 44px;
    flex: 1;
  }
  /* Mobile Cart Card Responsiveness */
  .cart-layout {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .cart-summary-card {
    padding: var(--space-4);
  }
  .cart-item-card {
    grid-template-columns: 72px 1fr;
    gap: var(--space-3);
    padding: var(--space-3);
  }
  .cart-item-media {
    width: 72px;
    height: 72px;
  }
  .cart-item-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px dashed var(--color-border);
  }
  .cart-price-formula {
    display: inline-block;
    word-break: break-word;
  }
}

@media (max-width: 360px) {
  .store-container, main {
    padding-left: var(--space-2) !important;
    padding-right: var(--space-2) !important;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px) + var(--space-8)) !important;
  }
  .brand-logo-mark {
    width: 36px;
    height: 36px;
  }
  .brand-name-ar {
    font-size: var(--text-sm);
  }
  .brand-name-en {
    font-size: 0.65rem;
  }
  .products-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .product-card {
    padding: var(--space-3);
    scroll-margin-top: 110px;
    scroll-margin-bottom: 96px;
  }
  .product-image-container {
    height: 95px;
  }
  .product-card-ctas {
    flex-direction: column;
    gap: var(--space-2);
  }
  .product-card-ctas .btn {
    width: 100%;
    min-height: 44px;
  }
  .cart-item-card {
    padding: var(--space-2);
    gap: var(--space-2);
  }
  .cart-item-media {
    width: 64px;
    height: 64px;
  }
}

/* =============================================================================
   GATE 9: AUTHENTICATED CUSTOMER CONSULTATION CHAT STYLES
   ============================================================================= */
.chat-widget-container {
  position: fixed;
  bottom: 84px;
  left: 20px;
  z-index: 1050;
  direction: rtl;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .chat-widget-container {
    bottom: 28px;
    left: 28px;
  }
}

.chat-launcher-btn {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary, #0D9488) 0%, #0f766e 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.chat-launcher-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.5);
}

.chat-launcher-btn:active {
  transform: scale(0.96);
}

.chat-unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background-color: var(--color-danger, #ef4444);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-sizing: border-box;
}

.chat-panel {
  position: fixed;
  bottom: 150px;
  left: 20px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 180px);
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  z-index: 1051;
  border: 1px solid var(--color-border, #e5e7eb);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 480px) {
  .chat-panel {
    bottom: 74px;
    left: 8px;
    right: 8px;
    width: auto;
    max-width: calc(100vw - 16px);
    height: calc(100vh - 150px);
    max-height: 520px;
  }
}

.chat-panel.hidden {
  display: none !important;
}

.chat-panel-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, #0D9488 0%, #115E59 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.chat-panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.chat-panel-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  display: block;
}

.chat-close-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.chat-close-btn:hover {
  opacity: 1;
}

.chat-disclaimer-banner {
  background-color: #F0FDF4;
  border-bottom: 1px solid #BBF7D0;
  padding: 10px 14px;
  font-size: 11px;
  color: #166534;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-disclaimer-text {
  line-height: 1.4;
}

.btn-chat-to-rx {
  background-color: #ffffff;
  color: #0D9488;
  border: 1px solid #0D9488;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.btn-chat-to-rx:hover {
  background-color: #F0FDFA;
}

.chat-closed-banner {
  background-color: #FEF2F2;
  border-bottom: 1px solid #FECACA;
  color: #991B1B;
  padding: 8px 14px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
  background-color: #F8FAFC;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-messages-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-message-row {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  box-sizing: border-box;
}

.chat-message-row.customer-message {
  align-self: flex-start;
}

.chat-message-row.staff-message {
  align-self: flex-end;
}

.chat-message-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
  position: relative;
  box-sizing: border-box;
}

.customer-message .chat-message-bubble {
  background-color: #0D9488;
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.staff-message .chat-message-bubble {
  background-color: #ffffff;
  color: #1E293B;
  border: 1px solid #E2E8F0;
  border-bottom-left-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chat-message-time {
  font-size: 10px;
  color: #94A3B8;
  margin-top: 3px;
  padding: 0 4px;
}

.customer-message .chat-message-time {
  align-self: flex-start;
}

.staff-message .chat-message-time {
  align-self: flex-end;
}

/* Chat Product Card */
.chat-product-card {
  background-color: #ffffff;
  border: 1px solid #0D9488;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  box-sizing: border-box;
}

.chat-product-card-header {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-product-card-img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  background-color: #F1F5F9;
  border: 1px solid #E2E8F0;
  flex-shrink: 0;
}

.chat-product-card-meta {
  flex: 1;
  min-width: 0;
}

.chat-product-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-product-card-unit {
  font-size: 11px;
  color: #64748B;
  margin: 0;
}

.chat-product-card-price {
  font-size: 14px;
  font-weight: 800;
  color: #0D9488;
  margin-top: 2px;
}

.chat-product-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.btn-card-add-cart {
  flex: 1;
  background-color: #0D9488;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.15s ease;
}

.btn-card-add-cart:hover {
  background-color: #0f766e;
}

.btn-card-view-prod {
  background-color: #F8FAFC;
  color: #475569;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-card-view-prod:hover {
  background-color: #E2E8F0;
}

/* Composer */
.chat-composer-wrapper {
  padding: 10px 14px;
  background-color: #ffffff;
  border-top: 1px solid #E2E8F0;
}

.chat-composer-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.chat-message-input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 20px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.chat-message-input:focus {
  border-color: #0D9488;
}

.btn-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #0D9488;
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
}

.btn-chat-send:hover {
  background-color: #0f766e;
}

.btn-chat-send:active {
  transform: scale(0.95);
}

.btn-chat-send:disabled {
  background-color: #CBD5E1;
  cursor: not-allowed;
}

/* Gate 10: Protected Chat Attachment Styling */
.btn-chat-attach {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #F1F5F9;
  color: #475569;
  border: 1px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-chat-attach:hover {
  background-color: #E2E8F0;
  color: #0D9488;
  border-color: #0D9488;
}

.chat-attachment-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background-color: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #166534;
}

.chat-attachment-preview-info {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attachment-preview-name {
  font-weight: 600;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-attachment-preview-size {
  color: #4B5563;
  font-size: 11px;
}

.btn-chat-attachment-cancel {
  background: none;
  border: none;
  color: #DC2626;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

/* Chat Attachment Card in Message Stream */
.chat-attachment-card {
  width: 250px;
  max-width: 100%;
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  box-sizing: border-box;
}

.chat-attachment-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-attachment-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: #E6FFFA;
  color: #0D9488;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-attachment-card-meta {
  flex: 1;
  min-width: 0;
}

.chat-attachment-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-attachment-card-sub {
  font-size: 11px;
  color: #64748B;
  margin: 2px 0 0 0;
}

.btn-chat-attachment-view {
  width: 100%;
  background-color: #0D9488;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.15s ease;
}

.btn-chat-attachment-view:hover {
  background-color: #0f766e;
}

.chat-attachment-deleted-badge {
  background-color: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

/* Secure Viewer Modal */
.chat-attachment-modal-card {
  max-width: 700px;
  width: 90%;
  margin: auto;
}

.chat-attachment-modal-img-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 65vh;
  overflow: hidden;
}

.chat-attachment-modal-img {
  max-height: 65vh;
  max-width: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
