@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600;700;800;900&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --color-brand: #ea580c;
  --color-brand-light: #f97316;
  --color-brand-dark: #c2410c;
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --font-family-base: 'Golos Text', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, ::before, ::after {
  font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  -webkit-text-size-adjust: 100%;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  transition: background-color 0.3s ease, color 0.3s ease;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  position: relative;
  box-sizing: border-box;
}

/* Fluid Media Safety */
img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

/* Prevent text/code overflow */
pre, code, kbd, samp {
  white-space: pre-wrap !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

/* Responsive Table & Container Boundaries */
.table-responsive-container,
.overflow-x-auto {
  max-width: 100% !important;
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-x: contain;
}

/* Modal Content Responsive Boundaries */
.modal-content,
#compareModalRoot > div,
#catalogProductDetailModal > div:last-child {
  max-width: calc(100vw - 1rem) !important;
  box-sizing: border-box !important;
}

@media (min-width: 640px) {
  .modal-content,
  #compareModalRoot > div,
  #catalogProductDetailModal > div:last-child {
    max-width: calc(100vw - 2rem) !important;
  }
}

/* Social Proof & Toast containment - Ultra Compact, never blocks the screen */
#setap-social-proof-container {
  position: fixed !important;
  bottom: 0.75rem !important;
  left: 0.75rem !important;
  z-index: 40 !important;
  width: auto !important;
  max-width: 270px !important;
  pointer-events: none !important;
  box-sizing: border-box !important;
}
#setap-social-proof-container > div {
  width: auto !important;
  max-width: 270px !important;
  box-sizing: border-box !important;
}

@media (min-width: 640px) {
  #setap-social-proof-container {
    bottom: 1.25rem !important;
    left: 1.25rem !important;
    max-width: 310px !important;
  }
  #setap-social-proof-container > div {
    max-width: 310px !important;
  }
}

#toast-container {
  max-width: calc(100vw - 2rem) !important;
  right: 1rem !important;
}
#toast-container .toast {
  max-width: calc(100vw - 2rem) !important;
  box-sizing: border-box !important;
}

/* Product Detail Features Table Responsiveness */
.product-tab-content {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.product-tab-content table {
  width: 100% !important;
  max-width: 100% !important;
  border-collapse: collapse;
}
.product-tab-content table td,
.product-tab-content table th {
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

/* Ensure all elements, headings, forms and Tailwind font-sans strictly use Golos Text */
button, input, select, textarea, optgroup, p, span, a, h1, h2, h3, h4, h5, h6, table, th, td, label, div, li, ul, ol, nav, header, footer, section, .font-sans {
  font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

code, kbd, samp, pre, .font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

/* Symmetrical Single-Line Navigation Rules */
.nav-link-item {
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

/* Glassmorphism & Modern Card Surfaces (Light Aesthetic) */
.glass-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px -2px rgba(15, 23, 42, 0.05);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
  box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.09), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #e2e8f0;
}

/* Ambient Glow Blobs (Disabled for clean corporate look) */
.ambient-glow {
  display: none;
}

.glow-orange { background: #ea580c; }
.glow-blue { background: #3b82f6; }

/* Custom Brand Buttons */
.btn-brand {
  background: #ea580c;
  color: #ffffff !important;
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  transition: background-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-brand:hover {
  background: #c2410c;
}

.btn-brand:active {
  transform: none;
}

.btn-secondary {
  background-color: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Category Bento Grid Cards */
.category-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(234, 88, 12, 0.5);
  box-shadow: 0 14px 30px -8px rgba(234, 88, 12, 0.15), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
}

/* Badges */
.badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  background-color: #fff7ed;
  color: #ea580c;
  border: 1px solid #ffedd5;
}

.badge-emerald {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  background-color: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

/* Status Dot */
.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #16a34a;
  border-radius: 9999px;
}

/* Custom Modal Styles (Light Surface) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1rem;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  max-width: 36rem;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  transform: scale(0.95);
  transition: transform 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-backdrop.active .modal-content {
  transform: scale(1);
}

/* Product Detail Modal Backdrop */
.product-modal-backdrop {
  backdrop-filter: blur(8px);
  background: rgba(15, 23, 42, 0.6);
}

/* ==========================================================================
   Range Slider Custom Full-Width & Modern Styling (Light Theme)
   ========================================================================== */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
  margin: 0.5rem 0;
}

input[type="range"]:focus {
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ea580c;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.4);
  border: 3px solid #ffffff;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #f97316;
}

input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ea580c;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.4);
  border: 3px solid #ffffff;
  cursor: pointer;
}

/* Dual-Thumb Range Slider (Min / Max) */
.dual-range-container {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
  margin: 0.5rem 0;
}

.dual-range-track {
  position: relative;
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.dual-range-progress {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, #ea580c, #f97316);
  border-radius: 9999px;
  left: 0%;
  right: 0%;
}

.dual-range-input {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: transparent !important;
  pointer-events: none;
  margin: 0 !important;
  z-index: 3;
}

.dual-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ea580c;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
  cursor: grab;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.dual-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.45);
}

.dual-range-input::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.22);
}

.dual-range-input::-moz-range-thumb {
  pointer-events: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ea580c;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
  cursor: grab;
}

/* Active Price Preset Button */
.price-preset-active {
  background-color: #ea580c !important;
  color: #ffffff !important;
  border-color: #ea580c !important;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.35) !important;
}

/* Stepper Buttons for Calculator */
.calc-stepper-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background-color: #f1f5f9;
  color: #1e293b;
  font-weight: 800;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  transition: all 0.15s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.calc-stepper-btn:hover {
  background-color: #ea580c;
  color: #ffffff;
  border-color: #ea580c;
  transform: scale(1.05);
}

.calc-stepper-btn:active {
  transform: scale(0.95);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background-color: #ffffff;
  border: 1px solid rgba(234, 88, 12, 0.3);
  color: #0f172a;
  padding: 0.75rem 1.25rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
  animation: slide-in 0.3s ease;
}

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Mobile Sticky Bottom Nav */
.mobile-bottom-bar {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    z-index: 40;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
  }
}

/* ==========================================================================
   WYSIWYG Live On-Page Visual Editor Highlights
   ========================================================================== */
body.live-edit-active [data-editable] {
  outline: 1.5px dashed rgba(234, 88, 12, 0.45) !important;
  outline-offset: 2px !important;
  cursor: text !important;
  transition: outline-color 0.15s ease, background-color 0.15s ease;
}

body.live-edit-active [data-editable]:hover {
  outline-color: rgba(234, 88, 12, 1) !important;
  background-color: rgba(234, 88, 12, 0.08) !important;
  border-radius: 4px;
}

body.live-edit-active [data-editable]:focus {
  outline: 2px solid #ea580c !important;
  background-color: rgba(234, 88, 12, 0.12) !important;
}

/* Logo Alignment Classes */
.logo-align-left {
  justify-content: flex-start;
}

.logo-align-center {
  margin-left: auto;
  margin-right: auto;
}

.logo-align-right {
  justify-content: flex-end;
  order: 2;
}

/* Product Card Photo Box & Live Image Hover Effect (Light) */
.prod-photo-box {
  position: relative;
  overflow: hidden;
  background-color: #f8fafc;
  border: 1px solid #f1f5f9;
}

.prod-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.prod-photo-box:hover img {
  transform: scale(1.06);
}

/* Nav Active Link Highlighting */
.nav-link-item.active-page {
  color: #ea580c !important;
  font-weight: 700 !important;
  background: #fff7ed;
}

/* Filter Tag Pill Buttons (Light Theme) */
.filter-tag-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.filter-tag-btn:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

.filter-tag-btn.active-filter {
  background: #ea580c;
  color: #ffffff !important;
  border-color: #ea580c;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

/* Password Criteria Step Stages & Bulge Animation */
.crit-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.45rem 0.65rem !important;
  border-radius: 0.75rem !important;
  border: 1.5px solid #e2e8f0 !important;
  background-color: #ffffff !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.crit-item .crit-icon {
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  display: inline-block !important;
  min-width: 14px !important;
  text-align: center !important;
}

/* 1. Pending (Default Gray / Boz) */
.crit-item.is-pending {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}
.crit-item.is-pending .crit-icon {
  color: #94a3b8 !important;
}

/* 2. Valid (Green / Yaşıl) */
.crit-item.is-valid {
  background-color: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.15) !important;
}
.crit-item.is-valid .crit-icon {
  color: #059669 !important;
  font-weight: 900 !important;
}

/* 3. Invalid on Save (Red / Qırmızı + Bulge) */
.crit-item.is-invalid {
  background-color: #fff1f2 !important;
  border-color: #f43f5e !important;
  color: #9f1239 !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(244, 63, 94, 0.2) !important;
}
.crit-item.is-invalid .crit-icon {
  color: #e11d48 !important;
  font-weight: 900 !important;
}

@keyframes criterionBulge {
  0% { transform: scale(1); }
  25% { transform: scale(1.12); }
  50% { transform: scale(0.92); }
  75% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@keyframes inputShakeError {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.criterion-bulge {
  animation: criterionBulge 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.input-shake-error {
  animation: inputShakeError 0.4s ease-in-out !important;
  border-color: #f43f5e !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.25) !important;
}

/* Interactive Engaging Experience Animations */
@keyframes toastSlideUp {
  0% { transform: translateY(16px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInScale {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-toast-slide {
  animation: toastSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in {
  animation: fadeInScale 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Setap.az Sales Toast Countdown Progress Bar */
@keyframes setapToastCountdown {
  0% { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}

.setap-toast-progress-active {
  transform-origin: left;
  animation: setapToastCountdown 6s linear forwards;
}

.setap-toast-progress-paused {
  animation-play-state: paused !important;
}

.setap-toast-progress-running {
  animation-play-state: running !important;
}

/* ==========================================================================
   Smooth Carousel Slide Transitions (Yeni Gələn Məhsullar & Sliders)
   ========================================================================== */
@keyframes carouselSlideInRight {
  0% {
    opacity: 0;
    transform: translateX(35px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes carouselSlideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-35px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.carousel-slide-active {
  animation: carouselSlideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.carousel-slide-active-prev {
  animation: carouselSlideInLeft 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

