/* MECRAAF Industrial Design System - Custom CSS & Component Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --brand-navy: #141852;
  --brand-blue: #232A82;
  --brand-gold: #F8B018;
  --brand-gold-light: #FFC83B;
  --brand-gold-dark: #D99307;
  --slate-bg: #F8FAFC;
}

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

html {
  overflow-x: clip;
  width: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #F8FAFC;
  color: #0F172A;
  font-weight: 400;
  overflow-x: clip;
  width: 100%;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Brand Logo Responsive Sizing */
.brand-logo-img {
  height: 32px;
  max-height: 32px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

@media (min-width: 640px) {
  .brand-logo-img {
    height: 42px;
    max-height: 42px;
  }
}

/* Mobile Filter Bar Sticky Behavior Across All Scrolls */
.mobile-sticky-filter-bar {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 3.5rem !important;
  /* 56px, aligns under mobile header */
  z-index: 30 !important;
}

@media (min-width: 640px) {
  .mobile-sticky-filter-bar {
    top: 4rem !important;
    /* 64px on tablet */
  }
}

/* Desktop Facets Sticky Behavior */
@media (min-width: 1024px) {
  #shopFacetsSidebar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 5.5rem !important;
    align-self: flex-start !important;
    max-height: calc(100vh - 6.5rem) !important;
    overflow-y: auto !important;
    display: block !important;
    transform: none !important;
    z-index: 20 !important;
  }
}

/* Mobile Slide-in Drawer */
@media (max-width: 1023px) {
  #shopFacetsSidebar.drawer-open {
    display: block !important;
    animation: drawerSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
}

@keyframes drawerSlideIn {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 600;
  letter-spacing: -0.015em;
}

b,
strong {
  font-weight: 600;
}

button,
input,
select,
textarea {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Reduced font-weight utilities */
.font-black {
  font-weight: 700 !important;
}

.font-extrabold {
  font-weight: 600 !important;
}

.font-bold {
  font-weight: 600 !important;
}

.font-semibold {
  font-weight: 500 !important;
}

/* Hero Mesh & Patterns */
.hero-mesh {
  background-color: #141852;
  background-image:
    radial-gradient(at 0% 0%, rgba(35, 42, 130, 0.95) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(248, 176, 24, 0.22) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(20, 24, 82, 0.98) 0px, transparent 50%);
}

.grid-pattern {
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
}

.subtle-grid {
  background-image: linear-gradient(to right, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 8px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 8px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Text clamp utilities */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Glassmorphism & UI Accents */
.glass-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-dark {
  background: rgba(20, 24, 82, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-backdrop {
  background: rgba(12, 14, 51, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Shimmer Animation for Badges */
.shimmer-badge {
  position: relative;
  overflow: hidden;
}

.shimmer-badge::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.4) 20%, rgba(255, 255, 255, 0.8) 60%, rgba(255, 255, 255, 0));
  animation: shimmer 2.2s infinite;
  content: '';
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Card hover transitions */
.hover-lift {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

/* Print Styles for Official GST Tax Invoice */
@media print {
  body * {
    visibility: hidden;
  }

  #invoicePrintArea,
  #invoicePrintArea * {
    visibility: visible;
  }

  #invoicePrintArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 20px;
    background: white;
    color: black;
  }

  .no-print {
    display: none !important;
  }
}