@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #1F4A85; /* Lighter shade of logo (#143159) */
  --primary-2: #143159; 
  --bs-primary: #1F4A85;
  --bs-primary-rgb: 31, 74, 133;
  --primary-hover: #143159;
  
  --secondary: #F5F5F5;
  --bs-secondary: #F5F5F5;
  
  --bg-main: #FFFFFF;
  --bg: #FFFFFF; 
  --bg-subtle: #FAFAFA; /* Off-white for slight contrast */
  --paper-2: #FAFAFA; 
  --bg-glass: rgba(255, 255, 255, 0.9);
  
  --text-dark: #1A1A1A;
  --ink: #1A1A1A; 
  --text-muted: #737373;
  --muted: #737373; 
  
  --border-subtle: rgba(0, 0, 0, 0.08);
  --line: rgba(0, 0, 0, 0.08); 
  --border-radius: 6px; /* Unified curve slightly larger than before */
  --border-radius-sm: 4px;
  
  --shadow-soft: none;
  --shadow-hover: none;
  
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-main);
  color: var(--text-dark);
}

/* Headings Typography - clean, gentle, and modern */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1, .h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.45rem) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.025em !important;
}

h2, .h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem) !important;
  font-weight: 700 !important;
  line-height: 1.28 !important;
  letter-spacing: -0.02em !important;
}

h3, .h3 {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}

/* Glass Navbar */
.navbar-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: var(--transition);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  color: var(--text-dark) !important;
}

.nav-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-dark) !important;
  opacity: 1;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-dark) !important;
  opacity: 0.65;
}

.navbar .nav-link.active {
  color: var(--text-dark) !important;
  opacity: 1;
}

.nav-pills .nav-link.active, 
.nav-pills .show > .nav-link {
  color: #FFFFFF !important;
  background-color: var(--primary) !important;
  box-shadow: none !important;
}

/* Dropdown Hover */
@media (min-width: 992px) {
  .dropdown-hover:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
  }
}

.dropdown-menu {
  overflow: hidden;
  border-radius: var(--border-radius);
}

/* Breadcrumbs */
.breadcrumb,
.product-breadcrumb .breadcrumb {
  display: flex !important;
  align-items: center;
  gap: 0 !important;
  margin-bottom: 1rem;
}

.breadcrumb-item,
.product-breadcrumb .breadcrumb-item {
  display: inline-flex;
  align-items: center;
  padding-left: 0 !important;
  font-size: 0.85rem;
}

.breadcrumb-item + .breadcrumb-item::before,
.product-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
  float: none !important;
  color: #94a3b8 !important;
  content: "/" !important;
}

.breadcrumb-item.active {
  color: var(--text-dark) !important;
  font-weight: 500;
}

/* Buttons */
.btn {
  box-shadow: none !important;
}
.btn.rounded-circle {
  min-height: auto;
  aspect-ratio: 1 / 1;
}
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  border-radius: var(--border-radius);
  padding: 0.75rem 1.75rem;
  font-weight: 500;
  letter-spacing: 0px;
  transition: var(--transition);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #FFFFFF;
  box-shadow: none;
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
  border-radius: var(--border-radius);
  padding: 0.75rem 1.75rem;
  font-weight: 500;
}

.btn-outline-primary:hover {
  background-color: #EBEBEB;
  color: var(--primary);
  border-color: var(--primary);
}

/* Category navigation chips / pills */
.category-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.15rem;
  border-radius: 50rem !important;
  font-size: 0.88rem;
  font-weight: 500;
  color: #374151;
  background-color: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.12);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
  user-select: none;
}

.category-chip:hover {
  background-color: #F3F4F6;
  color: var(--primary);
  border-color: var(--primary);
  text-decoration: none;
}

.category-chip.active {
  background-color: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(31, 74, 133, 0.25);
  font-weight: 600;
}

/* Filter tags / chips */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 50rem !important;
  font-size: 0.82rem;
  font-weight: 500;
  color: #334155;
  background-color: #F1F5F9;
  border: 1px solid #E2E8F0;
  line-height: 1.4;
  transition: var(--transition);
}

.filter-chip .btn-close {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0.2rem;
  margin-left: 0.2rem;
  opacity: 0.5;
  transition: opacity 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}

.filter-chip .btn-close:hover {
  opacity: 1;
  transform: scale(1.15);
}

.filter-chip .btn-close:focus {
  box-shadow: none;
  outline: none;
}

.btn-clear-filters {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.9rem;
  border-radius: 50rem !important;
  font-size: 0.82rem;
  font-weight: 600;
  color: #DC2626;
  background-color: #FEF2F2;
  border: 1px solid #FECACA;
  text-decoration: none;
  transition: var(--transition);
}

.btn-clear-filters:hover {
  background-color: #FEE2E2;
  color: #991B1B;
  border-color: #FCA5A5;
  text-decoration: none;
}

.sidebar-clear-btn {
  min-height: auto !important;
  line-height: 1 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* Hero Section */
.hero-section {
  background: var(--bg-main);
  padding: 120px 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-section h1.display-3 {
  font-weight: 700;
  letter-spacing: -1.5px;
}

.hero-cat-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
}

.hero-cat-card img {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-cat-card:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 1px var(--primary) !important;
}

.hero-cat-card:hover img {
  /* removed scale */
}

/* Cards */
.card, .glass-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--border-radius);
  transition: var(--transition);
  box-shadow: none;
}
.card:hover, .glass-card:hover {
  box-shadow: var(--shadow-soft);
}
.card.no-hover:hover {
  transform: none;
  box-shadow: none;
}

.shape-card:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 1px var(--primary) !important;
}

/* Product Cards */
.product-card {
  background: #FFFFFF !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--border-radius) !important;
  box-shadow: none !important;
  transition: var(--transition);
  overflow: hidden !important;
  padding: 0 !important;
  height: 100%;
  display: flex !important;
  flex-direction: column !important;
}

.product-card:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 1px var(--primary) !important;
}

.product-img-wrapper {
  background: var(--bg-subtle);
  padding: 0 !important;
  margin: 0 !important;
  text-align: center;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  width: 100%;
  flex-shrink: 0;
  display: block;
}

.product-img-wrapper a {
  display: block;
  width: 100%;
  height: 100%;
}

.product-img-wrapper img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center;
  transition: transform 0.4s ease;
  mix-blend-mode: normal !important;
  display: block;
}

.product-card:hover .product-img-wrapper img {
  transform: scale(1.04);
}

.badge-custom {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: #FFFFFF;
  color: var(--text-dark);
  padding: 0.3rem 0.65rem;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 0.75rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  z-index: 2;
}

/* Prescription Configurator */
.configurator-wrapper {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-bottom: 2rem;
}

.configurator-step {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.configurator-step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.option-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  background: #FFFFFF;
  height: 100%;
  color: var(--text-dark);
}

.option-card:hover {
  border-color: var(--primary);
  background: var(--bg-subtle);
}

.option-card.selected {
  border-color: var(--primary);
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px var(--primary);
}

.option-icon {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

/* Input Styles */
.form-control, .form-select {
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
  background-color: var(--bg-subtle);
  color: var(--text-dark);
}

.form-control:focus, .form-select:focus {
  box-shadow: none;
  border-color: var(--primary);
  background-color: #FFFFFF;
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* Floating Labels (clean, transparent - no background box behind label) */
.form-floating > label {
  background: transparent !important;
  background-color: transparent !important;
}

.form-floating > label::after,
.form-floating > .form-control:focus ~ label::after,
.form-floating > .form-control:not(:placeholder-shown) ~ label::after,
.form-floating > .form-control-plaintext ~ label::after,
.form-floating > .form-select ~ label::after {
  display: none !important;
  content: none !important;
  background: transparent !important;
  background-color: transparent !important;
}

/* Upload Area */
.upload-area {
  border: 1px dashed var(--border-subtle);
  border-radius: var(--border-radius);
  padding: 3rem 2rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  background: var(--bg-subtle);
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary);
  background: #FFFFFF;
}

.upload-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  transition: var(--transition);
}

.upload-area:hover .upload-icon {
  color: var(--text-dark);
}

/* Cart & Checkout */
.cart-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
}

.cart-item:last-child {
  border-bottom: none;
}

.summary-card {
  background: #FAFAFA;
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: none;
  position: sticky;
  top: 100px;
}

/* Footer */
.footer-custom {
  background: #FFFFFF;
  color: var(--text-dark);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-custom a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-custom a:hover {
  color: var(--text-dark);
}

/* Utilities override */
.bg-light { background-color: var(--bg-subtle) !important; }
.bg-white { background-color: #FFFFFF !important; }
.text-dark { color: var(--text-dark) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--primary) !important; }

/* Accordion overrides */
.accordion-item {
  background-color: #FFFFFF !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--border-radius) !important;
  margin-bottom: 0.5rem;
}
.accordion-button {
  background-color: transparent !important;
  color: var(--text-dark) !important;
  font-weight: 500;
}
.accordion-button:not(.collapsed) {
  color: var(--text-dark) !important;
  box-shadow: none !important;
}
.accordion-button:focus {
  box-shadow: none !important;
}

@keyframes heart-pulse {
  0% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(0.9); }
  75% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.heart-pulse-anim {
  animation: heart-pulse 0.4s ease-in-out;
}

/* =========================================================
   CLEAN MINIMALIST STOREFRONT LAYOUT & COMPONENTS
   ========================================================= */
.surface-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.surface-subtle {
  background: #f9fafb;
  border: none;
  border-radius: 8px;
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.65rem;
}

.clean-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #111827;
  font-size: 0.78rem;
  font-weight: 600;
  flex-shrink: 0;
}

.rx-config-section {
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

#collapsePrescription #prescriptionAccordionItem > .rx-config-section:first-child,
#collapsePrescription > .rx-config-section:first-child {
  margin-top: 1rem;
  padding-top: 0;
  border-top: none;
}

.rx-panel-inner:not(.is-hidden),
.rx-design-wrapper:not(.is-hidden),
.rx-index-wrapper:not(.is-hidden),
.rx-lens-config:not(.is-hidden) {
  animation: rxFadeSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes rxFadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rx-table-clean {
  min-width: 480px;
}

.rx-table-clean th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.rx-table-clean td {
  padding: 0.75rem 0.5rem;
  vertical-align: middle;
  border-bottom: none;
}

.rx-table-clean td:first-child,
.rx-table-clean th:first-child {
  padding-left: 0;
}

.rx-table-clean td:last-child,
.rx-table-clean th:last-child {
  padding-right: 0;
}

.rx-params-card {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

.rx-choice-grid,
.rx-method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  .rx-choice-grid,
  .rx-method-grid {
    grid-template-columns: 1fr;
  }
}

.rx-option-card,
.rx-method-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.15rem 1.25rem;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
  height: 100%;
}

.rx-option-card:hover,
.rx-method-card:hover {
  border-color: #9ca3af;
}

.rx-option-card.selected,
.rx-method-card.selected {
  border-color: var(--primary);
  background: #f8fafc;
  box-shadow: 0 0 0 1px var(--primary);
}

.lens-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.15rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  background: #ffffff;
  transition: border-color 150ms ease, background 150ms ease;
  margin-bottom: 0;
}

.lens-option-row:hover {
  border-color: #9ca3af;
}

.lens-option-row:has(input:checked),
.lens-option-row.selected {
  border-color: var(--primary);
  background: #f8fafc;
  box-shadow: 0 0 0 1px var(--primary);
}

.lens-option-row input[type='radio'] {
  display: none !important;
}

.price-breakdown-panel {
  background: transparent;
  border: none;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 1rem 0;
  margin: 1.25rem 0;
}

.product-bottom-cta-card {
  background: #ffffff;
  border: none;
  border-top: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 2rem 0 0;
}

.rx-params-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1.25rem 0;
  opacity: 1;
}

.rx-control {
  border-color: #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  background-color: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rx-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(31, 74, 133, 0.12);
}

.account-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #4b5563 !important;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.account-nav-link:hover {
  background-color: #f9fafb;
  color: #111827 !important;
  opacity: 1 !important;
}

.account-nav-link.active,
.account-nav-link.is-active {
  background-color: #f3f4f6;
  color: var(--primary) !important;
  font-weight: 600;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  background: #f3f4f6;
  color: #374151;
  border: none;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

.status-pill.status-paid,
.status-pill.status-completed,
.status-pill.status-shipped {
  background: #dcfce7;
  color: #15803d;
}

.status-pill.status-cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

.status-pill.status-pending {
  background: #fef3c7;
  color: #b45309;
}

.order-card {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.order-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.gap-2\.5 {
  gap: 0.65rem !important;
}

.gap-3\.5 {
  gap: 1.25rem !important;
}

.p-3\.5 {
  padding: 1.25rem !important;
}

.dl-clean {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem 1.5rem;
  margin: 0;
}

.dl-clean dt {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.dl-clean dd {
  font-size: 0.92rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 0;
}

/* Lightbox Modal & Photo Browser */
.lightbox-modal .modal-content {
  background: #0b1120 !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85);
}

.lightbox-nav-btn {
  width: 48px;
  height: 48px;
  background: rgba(15, 23, 42, 0.7) !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  transition: all 0.2s ease;
  cursor: pointer;
}

.lightbox-nav-btn:hover {
  background: rgba(31, 74, 133, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  transform: scale(1.08);
}

.lightbox-thumb-item {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-thumb-item:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.15);
}

.lightbox-thumb-item.is-active {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.55);
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-image-wrapper {
  overflow: hidden;
  transition: all 0.2s ease;
}

.lightbox-image-wrapper img {
  transition: transform 0.25s cubic-bezier(0.2, 0, 0.2, 1);
}

.lightbox-image-wrapper img.is-zoomed {
  transform: scale(1.9);
  cursor: zoom-out !important;
}

.gallery-expand-badge {
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gallery-expand-badge:hover {
  opacity: 1;
  transform: scale(1.04);
}
