/* ==========================================================================
   UNIFIED HOMEPAGE STYLESHEET
   ========================================================================== */

:root {
  --tb-blue: #034c8c;
  --tb-amber: #f29f05;
  --tb-crimson: #bf3617;
  --tb-dark: #111827;
  --tb-text: #444444;
  --tb-border: #d1d5db;
}

.tb-hero-section {
  position: relative;
  width: 100%;
  height: 620px;
  background-color: var(--tb-dark);
  overflow: hidden;
}

/* 1. Swiper Engine & Transitions */
.tb-hero-slider {
  width: 100%;
  height: 100%;
}

.tb-hero-slider .swiper-slide {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.tb-slide-content-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: flex-end; /* Pushes content right, balancing left floating card */
}

.tb-slide-content {
  max-width: 580px;
  color: #ffffff;
  z-index: 5;
  padding-bottom: 20px;
}

/* 2. Hero Component Typography */
.tb-slide-tag {
  display: inline-block;
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
}
.tb-tag-amber {
  background-color: var(--tb-amber);
  color: var(--tb-dark);
}
.tb-tag-crimson {
  background-color: var(--tb-crimson);
}

.tb-slide-title {
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
  color: var(--tb-blue) !important;
  line-height: 1.15;
  margin: 0 0 30px 0;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.tb-slide-title .highlight {
  font-size: 0.45em;
  font-weight: 400;
  opacity: 0.9;
  display: block;
  margin-top: 10px;
  text-transform: none;
  letter-spacing: 0px;
  color: #e5e7eb;
}

.tb-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  color: var(--tb-dark);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  text-transform: uppercase;
  padding: 16px 36px;
  border-radius: 4px;
  transition: all 0.25s ease-in-out;
  box-shadow: 0 4px 14px rgba(3, 76, 140, 0.3);
}

.tb-btn-primary:hover {
  background: var(--tb-dark);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242, 159, 5, 0.4);
}

/* 3. Floating Widget Card Layout */
.tb-ymm-container {
  position: absolute;
  top: 50%;
  left: 5%;
  transform: translateY(-50%);
  z-index: 20;
  width: 380px;
}

.tb-ymm-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  border-top: 4px solid var(--tb-amber);
}

.tb-ymm-header {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--tb-blue);
  margin-bottom: 6px;
}

.tb-ymm-card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--tb-dark);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.tb-ymm-subtitle {
  margin: 0 0 24px 0;
  font-size: 13px;
  color: var(--tb-text);
}

.tb-form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.tb-select-wrapper label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--tb-dark);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

/* 4. Complete Clean Overrides for Select2 UI Components */
.tb-ymm-card .select2-container--default .select2-selection--single {
  height: 46px !important;
  border: 1px solid var(--tb-border) !important;
  border-radius: 4px !important;
  display: flex;
  align-items: center;
  background-color: #f9fafb !important;
}

.tb-ymm-card
  .select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  color: var(--tb-dark) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding-left: 14px !important;
}

.tb-ymm-card
  .select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  height: 44px !important;
  right: 10px !important;
}

/* Global Select2 Dropdown Popover Customization */
.select2-dropdown {
  border: 1px solid var(--tb-border) !important;
  border-radius: 4px !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1) !important;
  z-index: 9999999 !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid var(--tb-border) !important;
  border-radius: 4px !important;
  padding: 8px !important;
  outline: none !important;
}

.select2-container--default
  .select2-results__option--highlighted[aria-selected] {
  background-color: var(--tb-blue) !important;
}

/* Form Action Submit Button */
.tb-ymm-search-btn {
  width: 100%;
  background: var(--tb-amber) !important;
  color: var(--tb-dark);
  border: none;
  padding: 16px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s ease;
}

.tb-ymm-search-btn:hover {
  background: var(--tb-dark) !important;
  color: #ffffff;
}

/* Navigation Slider Accents */
.tb-swiper-nav {
  color: #ffffff !important;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.tb-swiper-nav:hover {
  opacity: 1;
}
.tb-swiper-nav::after {
  font-size: 24px !important;
  font-weight: 900;
}
.tb-swiper-pagination .swiper-pagination-bullet {
  background: #ffffff !important;
  opacity: 0.4;
}
.tb-swiper-pagination .swiper-pagination-bullet-active {
  background: var(--tb-amber) !important;
  opacity: 1 !important;
}

/* Responsive Grid Fallbacks */
@media (max-width: 991px) {
  .tb-hero-section {
    height: auto;
    display: flex;
    flex-direction: column-reverse;
  }
  .tb-ymm-container {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    padding: 30px;
    box-sizing: border-box;
  }
  .tb-ymm-card {
    box-shadow: none;
    border: 1px solid var(--tb-border);
  }
  .tb-hero-slider {
    height: 420px;
  }
  .tb-slide-content-container {
    justify-content: center;
    padding: 0 20px;
  }
  .tb-slide-content {
    text-align: center;
  }
  .tb-form-grid {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .tb-select-wrapper {
    flex: 1 1 calc(33.33% - 12px);
    min-width: 150px;
  }
}

@media (max-width: 640px) {
  .tb-form-grid {
    flex-direction: column;
  }
}

/* ==========================================================================
   FEATURED CATEGORIES SECTION
   ========================================================================== */

.tb-featured-categories-section {
  width: 100%;
  background-color: #ffffff;
  padding: 60px 0;
  border-bottom: 1px solid #f3f4f6;
}

.tb-categories-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
  box-sizing: border-box;
}

.tb-section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--tb-dark);
  text-align: center;
  margin: 0 0 40px 0;
  letter-spacing: -0.02em;
}

/* Perfect Horizontal Row Distribution */
.tb-categories-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
}

/* Individual Interactive Circle Card */
.tb-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  flex: 1;
  min-width: 0; /* Prevents overflow sizing bugs */
  group-hover: pointer;
}

.tb-category-image-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid var(--tb-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  box-sizing: border-box;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tb-category-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

/* Modern Letter Avatar Fallback Graphic */
.tb-category-fallback-avatar {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tb-category-fallback-avatar span {
  font-size: 28px;
  font-weight: 800;
  color: var(--tb-blue);
  letter-spacing: -0.02em;
}

.tb-category-name {
  margin: 14px 0 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--tb-dark);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  transition: color 0.2s ease;
}

/* Hover Accent Ring Transitions matching Mobex Mockup */
.tb-category-card:hover .tb-category-image-wrapper {
  border-color: var(--tb-amber);
  box-shadow: 0 0 0 2px var(--tb-amber);
}

.tb-category-card:hover .tb-category-img {
  transform: scale(1.08);
}

.tb-category-card:hover .tb-category-name {
  color: var(--tb-blue);
}

/* Responsive Breakpoints for Grid Sizing */
@media (max-width: 1100px) {
  .tb-categories-grid {
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px 20px;
  }
  .tb-category-card {
    flex: 0 1 calc(20% - 16px); /* 5 items per row */
  }
}

@media (max-width: 768px) {
  .tb-categories-grid {
    gap: 24px 16px;
  }
  .tb-category-card {
    flex: 0 1 calc(33.33% - 12px); /* 3 items per row */
  }
  .tb-category-image-wrapper {
    width: 90px;
    height: 90px;
  }
}

/* ==========================================================================
   SECTION: FEATURED PRODUCTS IN (TAB BED DISPLAY)
   ========================================================================== */

.tb-featured-products-section {
  width: 100%;
  background-color: #f9fafb;
  padding: 60px 0;
}

.tb-products-container {
  width: 100%;
  max-width: 1240px;
  /* margin: 0 auto; */
  padding: 0 60px;
  box-sizing: border-box;
}

.tb-products-section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--tb-dark);
  text-align: center;
  margin: 0 0 24px 0;
  letter-spacing: -0.02em;
}

/* Tab Button Row Navigation Configuration */
.tb-products-tabs-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.tb-tab-btn {
  background: #ffffff;
  border: 1px solid var(--tb-border);
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--tb-dark);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.tb-tab-btn:hover {
  border-color: var(--tb-blue);
  color: var(--tb-blue);
}

.tb-tab-btn.active {
  background-color: transparent;
  border: 2px solid var(--tb-blue);
  color: var(--tb-blue);
}

/* Master 2x4 Product Layout Grid Wrapper Context */
.tb-products-grid-wrapper {
  position: relative;
  width: 100%;
  min-height: 300px;
}

.tb-products-grid-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
}

/* Elegant Premium Split-Card Mechanics */
.tb-product-split-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--tb-border);
  border-radius: 4px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
  transition: box-shadow 0.2s ease;
}

.tb-product-split-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

/* Badges Layout Positions */
.tb-card-badges-container {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 10;
}

.tb-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  color: #ffffff;
  display: inline-block;
  line-height: 1;
  text-align: center;
}
.tb-badge-sale {
  background-color: var(--tb-amber);
  color: var(--tb-dark);
}
.tb-badge-popular {
  background-color: var(--tb-blue);
}
.tb-badge-new {
  background-color: #10b981;
}

/* Image Left Frame */
.tb-card-image-left {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tb-card-image-left img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Information Container Right Frame */
.tb-card-details-right {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-width: 0; /* Prevents text bounds breaking layout */
}

.tb-product-card-title {
  margin: 0 0 16px 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.tb-product-card-title a {
  color: var(--tb-dark);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tb-product-card-title a:hover {
  color: var(--tb-blue);
}

/* Bottom Price + Cart Interaction Block */
.tb-details-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

/* Clean WooCommerce Native Price Cleanup Override */
.tb-product-card-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--tb-crimson);
}
.tb-product-card-price del {
  font-size: 13px;
  color: #9ca3af;
  font-weight: 500;
  margin-right: 6px;
}
.tb-product-card-price ins {
  text-decoration: none;
}

/* Action Inline Call to Action link styling matching Mobex */
.tb-card-add-to-cart {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--tb-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
  width: fit-content;
}

.tb-card-add-to-cart:hover {
  color: var(--tb-amber);
}

/* AJAX Loading Mask Animations overlay definitions */
.tb-grid-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(249, 250, 251, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 30;
}
.tb-products-grid-wrapper.loading .tb-grid-loader {
  opacity: 1;
  pointer-events: auto;
}
.tb-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--tb-border);
  border-top-color: var(--tb-blue);
  border-radius: 50%;
  animation: tbSpin 0.6s linear infinite;
}

/* ==========================================================================
   TABS VISIBILITY ENGINE SETUP
   ========================================================================== */

.tb-tab-panel {
  display: none !important;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}

.tb-tab-panel.active {
  display: grid !important;
  opacity: 1;
}

.tb-no-products-found {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: #6b7280;
  font-size: 15px;
  background: #ffffff;
  border: 1px dashed var(--tb-border);
  border-radius: 4px;
}
@keyframes tbSpin {
  to {
    transform: rotate(360deg);
  }
}

/* System Responsive Grid Adaptation rulesets */
@media (max-width: 1200px) {
  .tb-products-grid-inner {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .tb-products-grid-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .tb-products-grid-inner {
    grid-template-columns: 1fr;
  }
  .tb-products-tabs-nav {
    flex-wrap: wrap;
  }
}

.tb-testimonials-section {
  padding: 60px 20px;
  background-color: #f8fafc;
}

.tb-testimonials-header {
  text-align: center;
  margin-bottom: 40px;
}

.tb-testimonials-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 8px 0;
}

.tb-testimonials-subtitle {
  font-size: 1rem;
  color: #64748b;
  margin: 0;
}

.tb-testimonials-subtitle strong {
  color: #0f172a;
}

/* Slider Bounds Alignment */
.tb-testimonials-slider {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 4px 45px 4px !important;
}

/* Structural Card Alignment */
.tb-testimonial-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.tb-card-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tb-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.tb-profile-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 2px 0;
}

.tb-stars {
  color: #f59e0b;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.tb-testimonial-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #475569;
  margin: 0;
}

/* Pagination Adjustments */
.tb-testimonials-pagination .swiper-pagination-bullet-active {
  background: #0f172a !important;
}

/* FAQ Global Structural Frame */
.tb-faq-section {
  padding: 80px 20px;
  background-color: #ffffff;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

.tb-faq-container {
  max-width: 820px;
  margin: 0 auto;
}

/* Header Elements Styling */
.tb-faq-header {
  text-align: center;
  margin-bottom: 50px;
}

.tb-faq-badge {
  display: inline-block;
  background-color: #eff6ff;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.tb-faq-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
}

.tb-faq-header p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #64748b;
  margin: 0;
}

/* Accordion Component Framework Layout */
.tb-faq-accordion-wrapper {
  border-top: 1px solid #e2e8f0;
}

.tb-faq-item {
  border-bottom: 1px solid #e2e8f0;
  background-color: #ffffff;
  transition: background-color 0.25s ease;
}

/* Button Trigger Architecture */
.tb-faq-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  padding: 24px 8px;
  cursor: pointer;
  text-align: left;
  outline: none;
  gap: 20px;
}

.tb-faq-question-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  transition: color 0.2s ease;
}

.tb-faq-trigger:hover .tb-faq-question-text {
  color: #1d4ed8;
}

/* SVG Transform Matrices */
.tb-faq-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.2s ease;
  flex-shrink: 0;
}

.tb-faq-item.tb-active .tb-faq-icon {
  transform: rotate(135deg);
  color: #1d4ed8;
}

.tb-faq-item.tb-active .tb-faq-question-text {
  color: #1d4ed8;
}

/* Content Panel Animation Matrix */
.tb-faq-panel {
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tb-faq-inner-content {
  padding: 0 8px 24px 8px;
}

.tb-faq-inner-content p {
  font-size: 0.975rem;
  line-height: 1.65;
  color: #475569;
  margin: 0;
}

/* Responsive Scaling Overrides */
@media (max-width: 640px) {
  .tb-faq-section {
    padding: 50px 16px;
  }
  .tb-faq-header h2 {
    font-size: 1.75rem;
  }
  .tb-faq-question-text {
    font-size: 1rem;
  }
}
