/* ============================================================
   CONNIXTECH — Custom Component Styles
   Only mega menu + single product layout.
   All global/theme styles live in style.css.
   ============================================================ */

/* ============================================================
   1. CATEGORIES MEGA MENU
   ============================================================ */

.cx-categories-trigger .sub-menu { display: none !important; }

/* Remove hover underline on Categories nav item */
.cx-categories-trigger > a::after,
.cx-categories-trigger > a::before { display: none !important; width: 0 !important; }
.cx-categories-trigger > a { border-bottom: none !important; }

/* Pull all nav dropdowns to header bottom level — desktop only */
@media (min-width: 992px) {
  .tp-main-menu > nav > ul > li > ul.submenu { margin-top: 22px !important; }
}
@media (max-width: 991px) {
  .tp-main-menu > nav > ul > li > ul.submenu { margin-top: 0 !important; }
}

.cx-mega-menu {
  display: none;
  position: fixed;
  left: 0;
  width: 100%;
  z-index: 99999;
  background: #ffffff;
  border-top: 3px solid var(--tp-theme-1);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.cx-mega-menu.cx-mega-visible { display: block; }

.cx-mega-inner {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 340px;
}

/* Left column */
.cx-mega-left {
  width: 240px;
  flex-shrink: 0;
  background: var(--tp-grey-1, #F7F9FC);
  border-right: 1px solid rgba(26,86,160,.10);
  padding: 6px 0;
  overflow-y: auto;
  max-height: 72vh;
}

.cx-mega-all-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--tp-theme-1, #1A56A0) !important;
  border-bottom: 1px solid rgba(26,86,160,.10);
  margin-bottom: 4px;
  text-decoration: none !important;
  transition: background .15s;
}
.cx-mega-all-link:hover { background: rgba(26,86,160,.06); }

.cx-mega-left-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-left: 3px solid transparent;
  transition: all .15s ease;
  cursor: pointer;
}
.cx-mega-left-item a {
  display: block;
  padding: 9px 0;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--tp-heading-primary, #0F172A) !important;
  text-decoration: none !important;
  font-weight: 500;
  flex: 1;
  transition: color .15s;
}
.cx-mega-left-item:hover { background: rgba(26,86,160,.05); border-left-color: rgba(26,86,160,.3); }
.cx-mega-left-item:hover a { color: var(--tp-theme-1, #1A56A0) !important; }
.cx-mega-left-item.active { background: rgba(26,86,160,.08); border-left-color: var(--tp-theme-1, #1A56A0); }
.cx-mega-left-item.active a { color: var(--tp-theme-1, #1A56A0) !important; font-weight: 600; }

.cx-mega-arrow {
  color: var(--tp-theme-1, #1A56A0);
  font-size: 16px;
  line-height: 1;
  opacity: .6;
}
.cx-mega-left-item.active .cx-mega-arrow,
.cx-mega-left-item:hover .cx-mega-arrow { opacity: 1; }

/* Right panel */
.cx-mega-right {
  flex: 1;
  padding: 28px 36px;
  overflow-y: auto;
  max-height: 72vh;
  background: #ffffff;
}

.cx-mega-panel { display: none; }
.cx-mega-panel.active { display: block; animation: cx-fade-in .15s ease; }

@keyframes cx-fade-in {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.cx-mega-cols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 28px 32px;
}

.cx-mega-col { display: flex; flex-direction: column; gap: 4px; }

.cx-mega-col-head {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--tp-heading-primary, #0F172A) !important;
  text-decoration: none !important;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(26,86,160,.12);
  margin-bottom: 6px;
  transition: color .15s, border-color .15s;
}
.cx-mega-col-head:hover { color: var(--tp-theme-1, #1A56A0) !important; border-bottom-color: var(--tp-theme-1, #1A56A0); }

.cx-mega-col-item {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--tp-text-body, #64748B) !important;
  text-decoration: none !important;
  padding: 3px 0;
  transition: all .15s;
  line-height: 1.6;
}
.cx-mega-col-item:hover { color: var(--tp-theme-1, #1A56A0) !important; padding-left: 5px; }

@media (max-width: 991px) { .cx-mega-menu { display: none !important; } }


/* ============================================================
   2. SINGLE PRODUCT — AUTO LAYOUT
   ============================================================ */

.cx-single-product {
  max-width: 1280px;
  margin: 40px auto;
  padding: 0 30px 60px;
  font-family: 'Inter', sans-serif;
  color: var(--tp-text-body, #64748B);
}

/* Top: Gallery + Summary */
.cx-product-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  margin-bottom: 60px;
}

/* Gallery */
.cx-gallery { position: sticky; top: 100px; }
.cx-gallery-main {
  background: #ffffff;
  border: 1px solid rgba(26,86,160,.12);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cx-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  transition: transform .4s ease;
}
.cx-gallery-main:hover img { transform: scale(1.04); }
.cx-gallery-thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.cx-thumb {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #ffffff;
  border: 2px solid rgba(26,86,160,.15);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  transition: all .2s ease;
}
.cx-thumb:hover,
.cx-thumb.active { border-color: var(--tp-theme-1, #1A56A0); box-shadow: 0 0 0 2px rgba(26,86,160,.15); }

/* Summary */
.cx-brand-badge {
  display: inline-block;
  background: rgba(26,86,160,.08);
  border: 1px solid rgba(26,86,160,.2);
  color: var(--tp-theme-1, #1A56A0);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.cx-product-title {
  font-size: clamp(22px, 3vw, 32px) !important;
  font-family: 'Inter', sans-serif !important;
  color: var(--tp-heading-primary, #0F172A) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
  margin: 0 0 10px !important;
}
.cx-sku { font-size: 13px; color: var(--tp-text-body, #64748B); margin-bottom: 20px; }
.cx-sku strong { color: var(--tp-heading-primary, #0F172A); }

/* Price box */
.cx-price-box {
  background: var(--tp-grey-1, #F7F9FC);
  border: 1px solid rgba(26,86,160,.12);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}
.cx-price-box .price {
  font-size: 28px !important;
  font-weight: 700 !important;
  color: var(--tp-theme-1, #1A56A0) !important;
  display: block;
  margin-bottom: 16px;
}
.cx-price-box .single_add_to_cart_button {
  background: var(--tp-theme-1, #1A56A0) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 14px 32px !important;
  cursor: pointer;
  transition: all .2s ease !important;
  width: 100%;
}
.cx-price-box .single_add_to_cart_button:hover {
  background: var(--tp-theme-2, #0D3A6E) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,86,160,.3) !important;
}
.cx-trade-only { font-size: 15px; color: var(--tp-text-body, #64748B); margin: 0; }
.cx-trade-only a { color: var(--tp-theme-1, #1A56A0); font-weight: 700; }

.cx-short-desc {
  font-size: 14px;
  line-height: 1.75;
  color: var(--tp-text-body, #64748B);
  border-top: 1px solid rgba(26,86,160,.10);
  padding-top: 20px;
}

/* Spec highlights bar */
.cx-spec-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 48px;
}
.cx-highlight-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #091F3A;
  border: 1px solid rgba(45,212,191,.15);
  border-radius: 10px;
  padding: 18px 24px;
  min-width: 120px;
  text-align: center;
  flex: 1 1 120px;
  transition: all .2s ease;
}
.cx-highlight-chip:hover { border-color: #2DD4BF; box-shadow: 0 4px 20px rgba(45,212,191,.2); }
.cx-highlight-value {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #2DD4BF;
  line-height: 1.1;
}
.cx-highlight-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.65);
  margin-top: 6px;
}

/* Section headings */
.cx-box-section h2,
.cx-spec-tables h2,
.cx-key-features h2,
.cx-full-description h2 {
  font-family: 'Inter', sans-serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--tp-heading-primary, #0F172A) !important;
  text-transform: none !important;
  margin: 0 0 20px !important;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--tp-theme-1, #1A56A0);
  display: inline-block;
}

/* What's in the box */
.cx-box-section { margin-bottom: 48px; }
.cx-box-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.cx-box-list li {
  background: #ffffff;
  border: 1px solid rgba(26,86,160,.12);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--tp-heading-primary, #0F172A);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .2s ease;
}
.cx-box-list li::before { content: ''; width: 8px; height: 8px; background: var(--tp-theme-1, #1A56A0); border-radius: 50%; flex-shrink: 0; }
.cx-box-list li:hover { border-color: var(--tp-theme-1, #1A56A0); background: rgba(26,86,160,.03); }

/* Spec tables */
.cx-spec-tables { margin-bottom: 48px; }
.cx-tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.cx-spec-table-block { background: #ffffff; border: 1px solid rgba(26,86,160,.12); border-radius: 12px; overflow: hidden; }
.cx-spec-table-block h3 {
  font-family: 'Inter', sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  color: #ffffff !important;
  background: #091F3A;
  border-bottom: none;
  padding: 14px 20px;
  margin: 0;
}
.cx-spec-table { width: 100%; border-collapse: collapse; }
.cx-spec-table tr { border-bottom: 1px solid rgba(26,86,160,.08); }
.cx-spec-table tr:last-child { border-bottom: none; }
.cx-spec-table tr:nth-child(even) { background: rgba(26,86,160,.03); }
.cx-spec-table th, .cx-spec-table td { padding: 10px 20px; font-size: 13px; vertical-align: top; line-height: 1.5; }
.cx-spec-table th { color: var(--tp-text-body, #64748B); font-weight: 500; width: 44%; text-align: left; }
.cx-spec-table td { color: #0D9488; font-weight: 600; }

/* Key features */
.cx-key-features { margin-bottom: 48px; }
.cx-features-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.cx-features-grid li {
  background: #ffffff;
  border: 1px solid rgba(26,86,160,.12);
  border-left: 3px solid #2DD4BF;
  border-radius: 8px;
  padding: 12px 16px 12px 14px;
  font-size: 14px;
  color: var(--tp-text-body, #64748B);
  line-height: 1.6;
  transition: all .2s ease;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.cx-features-grid li::before { content: '✓'; color: #2DD4BF; font-weight: 800; flex-shrink: 0; margin-top: 1px; }
.cx-features-grid li:hover { background: rgba(13,57,110,.03); color: var(--tp-heading-primary, #0F172A); }

/* Full description */
.cx-full-description {
  background: #ffffff;
  border: 1px solid rgba(26,86,160,.12);
  border-radius: 12px;
  padding: 32px;
}
.cx-full-description p { color: var(--tp-text-body, #64748B); line-height: 1.8; margin-bottom: 14px; }
.cx-full-description ul { padding-left: 20px; color: var(--tp-text-body, #64748B); }
.cx-full-description ul li { margin-bottom: 6px; line-height: 1.7; }

/* Responsive */
@media (max-width: 991px) {
  .cx-product-top { grid-template-columns: 1fr; gap: 32px; }
  .cx-gallery { position: static; }
  .cx-highlight-chip { flex: 1 1 100px; }
}
@media (max-width: 600px) {
  .cx-single-product { padding: 0 16px 40px; }
  .cx-tables-grid { grid-template-columns: 1fr; }
  .cx-features-grid { grid-template-columns: 1fr; }
  .cx-box-list { grid-template-columns: 1fr; }
  .cx-highlight-chip { flex: 1 1 80px; padding: 10px 12px; }
  .cx-highlight-value { font-size: 18px; }
}
