/* ==============================================================
   STAR COMPUTER - RAJSHAHI, BANGLADESH
   Modern Electronics & Computer E-Commerce Stylesheet
   Theme: Red & White Professional Bangladeshi Retail Brand
   ============================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Hind+Siliguri:wght@400;500;600;700&display=swap');

:root {
  --primary-red: #dc2626;
  --primary-red-hover: #b91c1c;
  --primary-red-dark: #991b1b;
  --primary-red-light: #fee2e2;
  --primary-red-tint: #fef2f2;
  --color-white: #ffffff;
  --color-dark: #090d16;
  --color-gray-900: #0f172a;
  --color-gray-800: #1e293b;
  --color-gray-700: #334155;
  --color-gray-600: #475569;
  --color-gray-500: #475569; /* Boosted for 5.5:1+ WCAG contrast */
  --color-gray-400: #64748b; /* Boosted from faint #94a3b8 */
  --color-gray-300: #cbd5e1;
  --color-gray-200: #e2e8f0;
  --color-gray-100: #f1f5f9;
  --color-gray-50: #f8fafc;
  --color-success: #15803d;
  --color-warning: #b45309;
  --color-blue: #1d4ed8;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15.5px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', 'Hind Siliguri', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f8fafc;
  color: #0f172a;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ==============================================================
   GLOBAL HIGH-CONTRAST & READABILITY OVERRIDES
   Ensures text is never washed-out, faint, or unreadable
   ============================================================== */
.text-slate-400, .text-gray-400 {
  color: #64748b !important; /* Min 4.6:1 contrast ratio against white */
}
.text-slate-500, .text-gray-500 {
  color: #475569 !important; /* Min 5.5:1 contrast ratio */
}
.text-slate-600, .text-gray-600 {
  color: #334155 !important; /* High contrast secondary copy */
}
.text-slate-700, .text-gray-700 {
  color: #1e293b !important; /* Deep dark slate */
}
.text-slate-800, .text-gray-800, .text-slate-900, .text-gray-900 {
  color: #090d16 !important; /* Maximum clarity headlines & body */
}

/* Avoid tiny illegible micro-text */
.text-\[9px\], .text-\[10px\] {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}
.text-\[11px\] {
  font-size: 12.5px !important;
  font-weight: 600 !important;
}
.text-xs {
  font-size: 13.5px !important;
  line-height: 1.5 !important;
}
.text-sm {
  font-size: 14.5px !important;
  line-height: 1.55 !important;
}
.text-base {
  font-size: 16px !important;
  line-height: 1.65 !important;
}

/* Bengali (বাংলা) Text Optimization: Larger, clear line-height for diacritics */
[lang="bn"], .bn-text, p, span {
  font-family: 'Plus Jakarta Sans', 'Hind Siliguri', system-ui, sans-serif;
}
p {
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Site Width Extension */
.max-w-7xl {
  max-width: 1720px !important;
  width: 100% !important;
}

/* Red & White Brand Accents */
.bg-brand-red { background-color: var(--primary-red) !important; }
.bg-brand-red-hover:hover { background-color: var(--primary-red-hover) !important; }
.text-brand-red { color: var(--primary-red) !important; }
.border-brand-red { border-color: var(--primary-red) !important; }
.bg-brand-tint { background-color: var(--primary-red-tint) !important; }
.bg-brand-light { background-color: var(--primary-red-light) !important; }

/* Announcement Bar */
.top-bar {
  background-color: #111827;
  color: #d1d5db;
  font-size: 0.8125rem;
  border-bottom: 2px solid var(--primary-red);
}

/* Header & Navigation */
.header-main {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.nav-bar {
  background-color: var(--primary-red);
  color: var(--color-white);
  position: relative;
}

.nav-link {
  color: #ffffff;
  padding: 0.75rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  background-color: var(--primary-red-hover);
  color: #ffffff;
}

/* Navigation Sub-Category Dropdowns */
.nav-item-dropdown {
  position: relative;
}

.nav-sub-menu {
  position: absolute;
  top: 100%;
  background: #ffffff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 20px 35px -5px rgba(0,0,0,0.18), 0 6px 16px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  border-top: 3px solid var(--primary-red);
  padding: 0.85rem 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
  z-index: 1050;
  pointer-events: none;
}

.nav-item-dropdown:hover .nav-sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-sub-menu.align-left {
  left: 0;
  right: auto;
}

.nav-sub-menu.align-right {
  right: 0;
  left: auto;
}

.nav-sub-menu-grid {
  display: grid;
  gap: 2px 12px;
}

.sub-menu-item-link {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.sub-menu-item-link:hover {
  color: var(--primary-red) !important;
  background-color: #fef2f2 !important;
  padding-left: 0.85rem;
}

.sub-menu-show-all {
  margin-top: 0.6rem;
  border-top: 1px solid #f1f5f9;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  color: var(--primary-red) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background-color: #fff1f2;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.sub-menu-show-all:hover {
  background-color: var(--primary-red) !important;
  color: #ffffff !important;
}

/* Mega Menu Dropdown */
.mega-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #ffffff;
  color: var(--color-gray-800);
  box-shadow: 0 15px 30px rgba(0,0,0,0.12);
  border-bottom: 3px solid var(--primary-red);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease-in-out;
  z-index: 1000;
}

.has-mega:hover .mega-dropdown {
  opacity: 1;
  visibility: visible;
}

/* Search Bar & Auto-suggest */
.search-container {
  position: relative;
  width: 100%;
  max-width: 600px;
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0.5rem 3rem 0.5rem 1rem;
  border: 2px solid var(--primary-red);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  outline: none;
  background-color: #ffffff;
}

.search-input:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.search-btn {
  position: absolute;
  right: 0;
  top: 0;
  height: 44px;
  width: 48px;
  background-color: var(--primary-red);
  color: #ffffff;
  border: none;
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background-color: var(--primary-red-hover);
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1050;
  max-height: 400px;
  overflow-y: auto;
  display: none;
}

/* Product Card */
.product-card {
  background: var(--color-white);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.4);
}

.product-image-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  background-color: #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem;
  border-bottom: 1px solid #f1f5f9;
}

.product-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
  margin: auto;
}

.product-card:hover .product-image-wrap img {
  transform: scale(1.08);
}

.product-card .card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card h3, .product-card h3 a {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #090d16 !important;
  line-height: 1.45 !important;
}

.product-card h3 a:hover {
  color: var(--primary-red) !important;
}

.product-price-current {
  color: var(--primary-red);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.product-price-old {
  color: #64748b;
  text-decoration: line-through;
  font-size: 0.9rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

/* Buttons */
.btn-red {
  background-color: var(--primary-red);
  color: #ffffff;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-red:hover {
  background-color: var(--primary-red-hover);
  color: #ffffff;
}

.btn-red-outline {
  background-color: #ffffff;
  color: var(--primary-red);
  border: 1.5px solid var(--primary-red);
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.btn-red-outline:hover {
  background-color: var(--primary-red-tint);
  border-color: var(--primary-red-hover);
  color: var(--primary-red-hover);
}

/* PC Builder Slot Styles */
.builder-slot {
  background: #ffffff;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color 0.15s ease;
}

.builder-slot:hover {
  border-color: var(--color-gray-300);
}

.builder-slot.selected {
  border-color: var(--primary-red);
  background-color: #fffafa;
}

/* Filter Sidebar */
.filter-card {
  background: #ffffff;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.filter-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #ffffff;
  border-top: 1px solid var(--color-gray-200);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 999;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-gray-600);
  text-decoration: none;
}

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

.mobile-nav-item i {
  font-size: 1.15rem;
  margin-bottom: 2px;
}

/* Floating Quick Contact */
.floating-contact-btn {
  position: fixed;
  bottom: 75px;
  right: 20px;
  background-color: #25d366;
  color: #ffffff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  z-index: 990;
  transition: transform 0.2s ease;
}

.floating-contact-btn:hover {
  transform: scale(1.1);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #ffffff;
  color: var(--color-gray-900);
  border-left: 4px solid var(--primary-red);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  animation: slideIn 0.2s ease-out;
}

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

/* ==============================================================
   OFFICIAL AUTHORIZED BRANDS - 1-LINE INFINITE SLIDER
   ============================================================== */
.brand-marquee-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0.5rem 0;
  mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
}

.brand-marquee-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 1.25rem;
  animation: brandMarqueeScroll 35s linear infinite;
  will-change: transform;
}

.brand-marquee-track:hover {
  animation-play-state: paused;
}

@keyframes brandMarqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.brand-card-slide {
  flex-shrink: 0;
  width: 170px;
  height: 80px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.brand-card-slide:hover {
  border-color: var(--primary-red);
  background-color: #ffffff;
  box-shadow: 0 8px 20px -4px rgba(220, 38, 38, 0.15);
  transform: translateY(-3px);
}

.brand-card-slide .brand-logo-img {
  height: 36px;
  max-width: 110px;
  object-fit: contain;
  filter: grayscale(70%) opacity(80%);
  transition: all 0.25s ease;
}

.brand-card-slide:hover .brand-logo-img {
  filter: grayscale(0%) opacity(100%);
  transform: scale(1.08);
}

.brand-card-slide .brand-badge-text {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-top: 4px;
  transition: color 0.2s ease;
}

.brand-card-slide:hover .brand-badge-text {
  color: var(--primary-red);
}

/* Product Description Rich Typography */
.product-description-content {
  color: #1e293b;
  font-size: 0.95rem;
  line-height: 1.75;
}

.product-description-content p {
  margin-bottom: 1rem;
  color: #334155;
}

.product-description-content strong, 
.product-description-content b {
  font-weight: 700;
  color: #0f172a;
}

.product-description-content h2, 
.product-description-content h3, 
.product-description-content h4 {
  font-weight: 800;
  color: #0f172a;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.product-description-content h2 { font-size: 1.35rem; }
.product-description-content h3 { font-size: 1.15rem; }
.product-description-content h4 { font-size: 1rem; }

.product-description-content ul, 
.product-description-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.product-description-content ul { list-style-type: disc; }
.product-description-content ol { list-style-type: decimal; }

.product-description-content li {
  margin-bottom: 0.35rem;
  color: #334155;
}

.product-description-content table {
  width: 100%;
  margin: 1.25rem 0;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.product-description-content th, 
.product-description-content td {
  padding: 0.6rem 0.85rem;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.product-description-content th {
  background-color: #f8fafc;
  font-weight: 700;
  color: #0f172a;
}

@media print {
  .header-main, .nav-bar, .top-bar, .footer-main, .mobile-bottom-nav, .floating-contact-btn, .no-print {
    display: none !important;
  }
  body {
    background: #ffffff !important;
  }
}

/* Smooth mobile horizontal scrolling without ugly scrollbars */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

