﻿/* ==========================================================================
   ToolsBazaar - Modern SaaS Stylesheet
   Brand Colors: Primary #2563EB | Secondary #10B981 | Accent #F97316
   Font: Poppins
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --tb-primary: #2563eb;
  --tb-primary-rgb: 37, 99, 235;
  --tb-secondary: #10b981;
  --tb-secondary-rgb: 16, 185, 129;
  --tb-accent: #f97316;
  --tb-gradient: linear-gradient(135deg, #2563eb 0%, #10b981 100%);
  --tb-gradient-hover: linear-gradient(135deg, #1d4ed8 0%, #059669 100%);
  --tb-gradient-light: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
  --tb-card-bg: #ffffff;
  --tb-card-border: rgba(226, 232, 240, 0.8);
  --tb-surface: #f8fafc;
  --tb-text-main: #0f172a;
  --tb-text-muted: #64748b;
  --tb-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --tb-shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --tb-shadow-lg: 0 20px 35px -10px rgba(37, 99, 235, 0.12);
  --tb-radius-lg: 20px;
  --tb-radius-md: 14px;
  --tb-radius-sm: 8px;
}

[data-bs-theme="dark"] {
  --tb-card-bg: #1e293b;
  --tb-card-border: rgba(51, 65, 85, 0.7);
  --tb-surface: #0f172a;
  --tb-text-main: #f8fafc;
  --tb-text-muted: #94a3b8;
  --tb-shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
  --tb-shadow-lg: 0 20px 35px -10px rgba(0, 0, 0, 0.5);
  background-color: #0f172a !important;
  color: #f8fafc;
}

[data-bs-theme="dark"] .brand-text-main {
  fill: #f8fafc !important;
}

[data-bs-theme="dark"] .bg-white {
  background-color: #1e293b !important;
}

[data-bs-theme="dark"] .bg-light {
  background-color: #0f172a !important;
}

[data-bs-theme="dark"] .border {
  border-color: rgba(51, 65, 85, 0.7) !important;
}

[data-bs-theme="dark"] .text-dark {
  color: #f8fafc !important;
}

[data-bs-theme="dark"] .text-muted {
  color: #94a3b8 !important;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--tb-text-main);
  background-color: var(--tb-surface);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Glassmorphism Classes */
.glass-header {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--tb-card-border);
  transition: all 0.3s ease;
}
[data-bs-theme="dark"] .glass-header {
  background: rgba(15, 23, 42, 0.85);
}

.glass-card {
  background: var(--tb-card-bg);
  border: 1px solid var(--tb-card-border);
  border-radius: var(--tb-radius-lg);
  box-shadow: var(--tb-shadow-md);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tb-shadow-lg);
}

/* Brand Buttons */
.btn-tb-primary {
  background: var(--tb-gradient);
  color: #ffffff !important;
  border: none;
  font-weight: 600;
  padding: 0.65rem 1.6rem;
  border-radius: var(--tb-radius-md);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.25s ease;
}
.btn-tb-primary:hover {
  background: var(--tb-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-tb-outline {
  background: transparent;
  color: var(--tb-primary) !important;
  border: 2px solid var(--tb-primary);
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: var(--tb-radius-md);
  transition: all 0.25s ease;
}
.btn-tb-outline:hover {
  background: var(--tb-primary);
  color: #ffffff !important;
  transform: translateY(-2px);
}

/* Gradients & Badges */
.text-gradient {
  background: var(--tb-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-tb {
  background: var(--tb-gradient-light);
  color: var(--tb-primary);
  font-weight: 600;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 30px;
  padding: 0.4rem 0.9rem;
}

.badge-savings {
  background: #d1fae5;
  color: #065f46;
  font-weight: 700;
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
[data-bs-theme="dark"] .badge-savings {
  background: #064e3b;
  color: #6ee7b7;
}

/* Tool Workstation Area */
.tool-workstation {
  background: var(--tb-card-bg);
  border: 1px solid var(--tb-card-border);
  border-radius: 24px;
  box-shadow: var(--tb-shadow-lg);
  padding: 2.5rem;
  position: relative;
}

/* Upload Dropzone */
.tb-dropzone {
  border: 2px dashed rgba(37, 99, 235, 0.4);
  background: var(--tb-gradient-light);
  border-radius: 20px;
  padding: 3.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}
.tb-dropzone:hover, .tb-dropzone.dragover {
  border-color: var(--tb-primary);
  background: rgba(37, 99, 235, 0.12);
  transform: scale(1.01);
}
.tb-dropzone-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
  color: var(--tb-primary);
  font-size: 2rem;
  transition: transform 0.3s ease;
}
[data-bs-theme="dark"] .tb-dropzone-icon {
  background: #1e293b;
}
.tb-dropzone:hover .tb-dropzone-icon {
  transform: translateY(-4px) scale(1.08);
}

/* Batch File Queue */
.tb-file-queue {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}
.tb-file-item {
  background: var(--tb-surface);
  border: 1px solid var(--tb-card-border);
  border-radius: var(--tb-radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  animation: fadeIn 0.3s ease-in-out;
}
.tb-file-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--tb-radius-sm);
  object-fit: cover;
  background: #e2e8f0;
}

/* Split Slider (Background Remover) */
.tb-split-slider {
  position: relative;
  width: 100%;
  max-width: 700px;
  height: 420px;
  margin: 0 auto;
  border-radius: var(--tb-radius-lg);
  overflow: hidden;
  box-shadow: var(--tb-shadow-lg);
  user-select: none;
  background: repeating-conic-gradient(#cbd5e1 0% 25%, #ffffff 0% 50%) 50% / 20px 20px;
}
.tb-split-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.tb-split-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  border-right: 3px solid #ffffff;
}
.tb-split-before .tb-split-img {
  width: 700px;
  max-width: none;
}
.tb-split-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  margin-left: -22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  color: var(--tb-primary);
  font-size: 1.2rem;
  z-index: 10;
}

/* Canvas Cropper Container */
.tb-cropper-wrapper {
  max-width: 100%;
  max-height: 500px;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  border-radius: var(--tb-radius-md);
  position: relative;
}
#cropperCanvas {
  max-width: 100%;
  max-height: 480px;
  display: block;
}

/* Mega Menu */
.tb-megamenu {
  width: 650px;
  padding: 1.5rem;
  border-radius: var(--tb-radius-lg);
  box-shadow: var(--tb-shadow-lg);
}

/* Sticky Mobile Bottom Navigation */
.tb-mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--tb-card-bg);
  border-top: 1px solid var(--tb-card-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1030;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.06);
}
.tb-mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  color: var(--tb-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.tb-mobile-nav-item i {
  font-size: 1.3rem;
  margin-bottom: 2px;
}
.tb-mobile-nav-item.active, .tb-mobile-nav-item:hover {
  color: var(--tb-primary);
}

@media (max-width: 767.98px) {
  body {
    padding-bottom: 74px;
  }
}

/* Back To Top Button */
.btn-back-to-top {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--tb-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  z-index: 1020;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s;
}
.btn-back-to-top:hover {
  transform: scale(1.1);
  color: #ffffff;
}

/* Cookie Consent */
.tb-cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 520px;
  background: var(--tb-card-bg);
  border: 1px solid var(--tb-card-border);
  border-radius: var(--tb-radius-lg);
  box-shadow: var(--tb-shadow-lg);
  padding: 1.5rem;
  z-index: 1050;
  display: none;
  animation: slideUp 0.4s ease-out;
}

/* Advertisement Container */
.tb-ad-container {
  overflow: hidden;
  margin: 1.5rem auto;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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