/**
 * Chaicon Design System Theme for SialkotSources.com
 * Replicating https://chaicon.com/ B2B Wholesale Mandi & Marketplace Look & Feel
 */

:root {
  /* Chaicon Official Color Palette */
  --chaicon-top-bg: #17191D;
  --chaicon-second-header-bg: #142B4A;
  --chaicon-warning: #D62828;
  --chaicon-warning-dark: #b71c1c;
  --chaicon-warning-light: #ef4444;
  --chaicon-tertiary: #17191D;
  --chaicon-tertiary-dark: #0d1e35;
  --chaicon-pink: #D62828;
  --chaicon-pink-dark: #b71c1c;
  --chaicon-text: #0F172A;
  --chaicon-text-muted: #64748b;
  --chaicon-bg: #F4F6F8;
  --chaicon-card-bg: #ffffff;
  --chaicon-border: #e2e8f0;
  --chaicon-border-dark: #cbd5e1;

  /* Harmonized Fallbacks for legacy references */
  --mic-red: #D62828;
  --mic-red-hover: #b71c1c;
  --mic-orange: #D62828;
  --mic-orange-hover: #b71c1c;
  --mic-dark: #17191D;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--chaicon-text);
  background-color: var(--chaicon-bg);
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

/* Container constraints matching Chaicon */
.container,
.container-lg,
.container-md,
.container-sm,
.container-xl,
.container-xxl {
  max-width: 1240px;
  padding-left: 15px;
  padding-right: 15px;
}

/* ==========================================================================
   1. CHAICON TOP BAR & SEARCH HEADER
   ========================================================================== */
.chaicon-top-nav {
  background-color: var(--chaicon-top-bg) !important;
  border-bottom: 1px solid #d5d5d5;
  padding: 10px 0;
  position: relative;
  z-index: 1020;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.chaicon-brand {
  text-decoration: none;
  display: inline-block;
  line-height: 1.1;
}
.chaicon-brand-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--chaicon-tertiary);
  letter-spacing: -0.5px;
  position: relative;
  display: inline-flex;
  align-items: center;
}
.chaicon-brand-beta {
  font-size: 10px;
  background-color: var(--chaicon-pink);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: super;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.chaicon-brand-sub {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--chaicon-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

/* Signature Chaicon Search Bar Capsule */
.chaicon-search-bar {
  display: flex;
  align-items: center;
  border: 1px solid #cccccc;
  border-radius: 4px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  height: 44px;
}
.chaicon-search-dropdown-box {
  background-color: #f8f9fa;
  border-right: 1px solid #dddddd;
  padding: 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
}
.chaicon-search-select {
  border: none;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: #333333;
  outline: none;
  cursor: pointer;
  padding-right: 6px;
}
.chaicon-search-input {
  flex-grow: 1;
  border: none;
  padding: 8px 14px;
  font-size: 13.5px;
  outline: none;
  color: #222222;
}
.chaicon-search-input::placeholder {
  color: #999999;
  font-size: 13px;
}
.chaicon-search-btn {
  background-color: #000000;
  border: none;
  color: #ffffff;
  padding: 0 20px;
  height: 100%;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.chaicon-search-btn:hover {
  background-color: #222222;
  color: #ffffff;
}

/* Header Action Buttons */
.chaicon-currency-toggle {
  border: 1px solid var(--chaicon-warning);
  color: var(--chaicon-warning) !important;
  font-weight: 700;
  font-size: 12.5px;
  padding: 5px 10px;
  border-radius: 4px;
  background: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chaicon-currency-toggle:hover {
  background: var(--chaicon-warning);
  color: #000000 !important;
}

.btn-chaicon-seller {
  background-color: #000000;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.btn-chaicon-seller:hover {
  background-color: #222222;
}

.btn-chaicon-rfq {
  background-color: var(--chaicon-warning);
  color: #000000 !important;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.btn-chaicon-rfq:hover {
  background-color: var(--chaicon-warning-dark);
}

/* Chaicon Official Action Button Style (my-btn-active2) */
.my-btn-active2 {
  background-color: var(--chaicon-warning) !important;
  border: 1px solid var(--chaicon-warning) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: all 0.15s ease;
}
.my-btn-active2:hover {
  background-color: var(--chaicon-warning-dark) !important;
  border-color: var(--chaicon-warning-dark) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   2. CHAICON SECOND HEADER (Deep Black Bar)
   ========================================================================== */
.second-header {
  background-color: var(--chaicon-second-header-bg) !important;
  border-bottom: 2px solid var(--chaicon-warning);
  padding: 0;
}
.second-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}
.second-header-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 991.98px) {
  .second-header-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px 0;
  }
  .second-header-inner::-webkit-scrollbar {
    display: none;
  }
  .second-header-links {
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 12px;
  }
}
.second-header-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
}
.second-header-links a:hover {
  color: var(--chaicon-warning);
}
.second-header-links .nav-products-btn {
  background-color: #1f2937;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid #374151;
  transition: all 0.15s ease;
}
.second-header-links .nav-products-btn:hover,
.second-header-links .nav-products-btn.active {
  background-color: var(--chaicon-warning) !important;
  border-color: var(--chaicon-warning) !important;
  color: #000000 !important;
}
.second-header-divider {
  color: #666666;
  font-size: 12px;
}
.second-header-machines {
  color: #ffc107 !important;
  font-weight: 700 !important;
}
.second-header-machines:hover {
  color: #ffffff !important;
}

/* ==========================================================================
   3. CHAICON 2-COLUMN HOMEPAGE LAYOUT (.big-small-sections)
   ========================================================================== */
.big-small-sections {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.small-section.filter-card {
  width: 290px;
  flex-shrink: 0;
}
.big-section {
  flex: 1;
  min-width: 0;
}

@media (max-width: 991.98px) {
  .big-small-sections {
    flex-direction: column;
  }
  .small-section.filter-card,
  .big-section {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ==========================================================================
   4. CHAICON CARDS & SIDEBAR STYLING
   ========================================================================== */
.chaicon-card {
  background: var(--chaicon-card-bg);
  border: 1px solid var(--chaicon-border);
  border-radius: 6px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 14px;
}
.chaicon-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--chaicon-tertiary);
  margin-bottom: 8px;
  text-transform: capitalize;
}
.chaicon-card hr {
  margin: 8px 0 12px;
  border-color: #eeeeee;
  opacity: 1;
}

/* Chaicon Live Stats Badges */
.live-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.my-bg-color2 {
  background-color: var(--chaicon-warning) !important;
  color: var(--chaicon-tertiary) !important;
  font-weight: 700;
  font-size: 12.5px;
  padding: 6px 10px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.my-bg-color2 .badge {
  font-size: 12px;
  background-color: #000000;
  color: #ffffff;
  padding: 3px 7px;
  border-radius: 3px;
}

/* Sidebar Filter Links */
.filter-sub-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--chaicon-tertiary);
  margin-bottom: 6px;
}
.filter-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 0;
}
.filter-link-item a {
  color: #333333;
  text-decoration: underline;
  font-size: 12.5px;
  transition: color 0.12s ease;
}
.filter-link-item a:hover {
  color: var(--chaicon-warning-dark);
}
.filter-link-count {
  font-size: 11px;
  color: #888888;
}

/* ==========================================================================
   5. CHAICON SECTION HEADINGS & BANNER
   ========================================================================== */
.section-heading {
  background-color: var(--chaicon-warning);
  color: #ffffff;
  padding: 10px 14px !important;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.section-heading.heading-navy {
  background-color: var(--chaicon-tertiary);
}
.section-heading.heading-black {
  background-color: #000000;
}
.section-heading.heading-blue {
  background-color: #1e40af;
}
.section-heading h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  letter-spacing: 0.2px;
  text-transform: capitalize;
}
.section-heading a {
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.section-heading a:hover {
  text-decoration: underline !important;
}

/* Chaicon Hero Sourcing Showcase */
.chaicon-hero-banner {
  background: linear-gradient(135deg, #142B4A 0%, #0F172A 100%);
  border-radius: 6px;
  padding: 24px 28px;
  color: #ffffff;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.chaicon-hero-badge {
  background-color: rgba(247, 147, 30, 0.2);
  border: 1px solid var(--chaicon-warning);
  color: var(--chaicon-warning);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 8px;
}
.chaicon-hero-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 8px;
}
.chaicon-hero-desc {
  font-size: 13.5px;
  color: #cbd5e1;
  max-width: 650px;
  line-height: 1.55;
  margin-bottom: 16px;
}

/* ==========================================================================
   6. CHAICON PRODUCT CARDS
   ========================================================================== */
.product-card-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 1200px) {
  .product-card-container {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .product-card-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

.product-card {
  background: #ffffff;
  border: 1px solid var(--chaicon-border);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.product-card .card-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  background: #ffffff;
  border: 1px solid #eeeeee;
  color: var(--chaicon-pink);
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.product-card .card-icon:hover {
  background: var(--chaicon-pink);
  color: #ffffff;
}

.product-card-image-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.product-card-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.product-card:hover .product-card-image-box img {
  transform: scale(1.04);
}

.product-card-location {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.product-card-body {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}
.product-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #222222;
  line-height: 1.35;
  height: 35px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-decoration: none;
  margin-bottom: 6px;
}
.product-card-title:hover {
  color: var(--chaicon-warning-dark);
}

.product-card-price {
  font-size: 14px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.price-pkr {
  color: #111111;
  font-weight: 700;
}
.price-usd {
  color: var(--chaicon-text-muted);
  font-size: 12px;
  font-weight: 500;
}

.product-card-moq {
  font-size: 11.5px;
  color: #666666;
  margin-bottom: 6px;
}

.product-card-supplier {
  font-size: 11.5px;
  color: #142B4A;
  text-decoration: underline;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  margin-bottom: 8px;
}
.product-card-supplier:hover {
  color: var(--chaicon-warning-dark);
}

.product-card-btn {
  background-color: #000000;
  color: #ffffff !important;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 3px;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: background 0.15s ease;
}
.product-card-btn:hover {
  background-color: var(--chaicon-warning);
  color: #000000 !important;
}

/* ==========================================================================
   7. CHAICON SUPPLIER & MACHINE CARDS
   ========================================================================== */
.supplier-card {
  background: #ffffff;
  border: 1px solid var(--chaicon-border);
  border-radius: 4px;
  padding: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.supplier-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.supplier-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.supplier-card-logo {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #eeeeee;
  background: #f8fafc;
}
.supplier-card-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--chaicon-tertiary);
  text-decoration: none;
  line-height: 1.25;
  display: block;
}
.supplier-card-name:hover {
  color: var(--chaicon-warning-dark);
}
.supplier-card-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
}

/* Machine Card */
.machine-card {
  background: #ffffff;
  border: 1px solid var(--chaicon-border);
  border-radius: 4px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.machine-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.machine-card-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
}

/* ==========================================================================
   8. CHAICON FOOTER (.main-footer)
   ========================================================================== */
.main-footer {
  background-color: var(--chaicon-tertiary);
  color: #cbd5e1;
  font-size: 13px;
  border-top: 3px solid var(--chaicon-warning);
  margin-top: 40px;
  padding: 40px 0 20px;
}
.main-footer h3 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}
.main-footer a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-block;
}
.main-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}
.footer-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-text ul {
  padding-left: 0;
  list-style: none;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 18px;
  margin-top: 30px;
  color: #8da2bb;
  font-size: 12.5px;
}
