/* ==========================================================
   🛍️ SHOP & CATEGORY GRID CLEANUP
   ========================================================== */

/* Desktop: keep category thumbs tidy */
@media (min-width: 1025px) {
  .woocommerce ul.products li.product.product-category a img {
    max-height: 220px;
    width: auto;
    object-fit: contain;
    margin-inline: auto;
    display: block;
  }
}

/* Tablet/Mobile: category name below image */
@media (max-width: 1024px) {
  .woocommerce ul.products li.product.product-category a {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .woocommerce .product-category .woocommerce-loop-category__title {
    position: static !important;
    transform: none !important;
    background: transparent !important;
    margin: 0.5rem 0 0 !important;
    padding: 0 !important;
    text-align: center !important;
    width: 100% !important;
  }

  .woocommerce .product-category .woocommerce-loop-category__title::before,
  .woocommerce .product-category .woocommerce-loop-category__title::after {
    display: none !important;
    content: none !important;
  }
}

/* Product grid alignment & equal tiles */
.woocommerce ul.products li.product {
  display: flex;
  flex-direction: column;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  min-height: 2.8em;
}

.woocommerce ul.products li.product .price {
  min-height: 1.6em;
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart {
  margin-top: auto;
}

/* Let images size naturally unless overwritten elsewhere */
.woocommerce ul.products li.product a img {
  height: auto;
  max-height: none;
  display: block;
}

/* Equal thumbnails for real products only */
.woocommerce ul.products li.product:not(.product-category) a img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: contain;
  background: #fff;
  padding: 8px;
  border-radius: 8px;
}

/* ==========================================================
   🏷️ CATEGORY SECTION / SEE MORE BUTTON
   ========================================================== */

.category-section {
  position: relative;
  margin-bottom: 50px;
}

.section-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

/* Hide top "See more" button in shortcode areas */
.section-header .see-more-btn {
  display: none !important;
}

.see-more-wrapper {
  text-align: right;
  margin-top: 10px;
}

.see-more-btn {
  display: inline-block;
  background: #000;
  color: #fff !important;
  padding: 6px 14px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none !important;
  transition: background 0.2s ease-in-out;
}

.see-more-btn:hover {
  background: #333;
  color: #fff !important;
}

/* ==========================================================
   🦶 FOOTER ALIGNMENT
   ========================================================== */

.ast-builder-grid-row-container.ast-builder-grid-row-tablet-3
  .ast-builder-grid-row > .site-footer-focus-item {
  vertical-align: top;
}

.ast-builder-grid-row > .site-footer-focus-item {
  margin-top: 0 !important;
}

.footer-bottom,
.ast-footer-copyright {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  margin: 0 !important;
}

.site-footer a:hover,
.ast-footer-widget-area a:hover,
.ast-footer a:hover {
  color: #ffffff !important;
}

/* Category Header - Smaller & More Compact */
.woocommerce-products-header h1,
.woocommerce-products-header .woocommerce-products-header__title,
.page-header h1,
.ast-archive-description h1 {
  font-size: 28px !important;
  line-height: 1.3 !important;
  margin-bottom: 15px !important;
  font-weight: 600 !important;
}

/* Category Description - Smaller Text */
.woocommerce-products-header p,
.term-description,
.ast-archive-description p {
  font-size: 16px !important;
  line-height: 1.6 !important;
  margin-bottom: 20px !important;
  max-width: 900px;
  color: #666 !important;
}

/* Reduce Overall Category Header Spacing */
.woocommerce-products-header,
.ast-archive-description {
  padding-top: 20px !important;
  padding-bottom: 20px !important;
  margin-bottom: 30px !important;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .woocommerce-products-header h1,
  .page-header h1 {
    font-size: 20px !important;
    margin-bottom: 10px !important;
  }

  .woocommerce-products-header p,
  .term-description {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  .woocommerce-products-header,
  .ast-archive-description {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    margin-bottom: 20px !important;
  }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
  .woocommerce-products-header h1 {
    font-size: 24px !important;
  }

  .woocommerce-products-header p {
    font-size: 14px !important;
  }
}

.afrfq-pdf-download img {
  filter: brightness(0) invert(1);
  width: 16px;
  height: auto;
}

/* ================================
   HOMEPAGE HERO OPTIMIZATIONS
   ================================ */

/* 1. Hero Background Image */
.wp-block-cover__image-background,
.wp-block-cover__video-background {
  object-fit: cover;
  will-change: transform;
}

/* 2. Hero Headline Typography - Prevent "DYNAMICCOM" from breaking */
.uagb-heading-text {
  line-height: 1.2;
}

/* Keep brand name on one line */
.uagb-heading-text span {
  white-space: nowrap;
}

/* Improve mobile scaling */
@media (max-width: 768px) {
  .uagb-heading-text {
    font-size: clamp(1.5rem, 5vw, 3rem) !important;
  }
}

/* 4. Breadcrumb Navigation Styling */
.ast-breadcrumbs-wrapper {
  padding: 12px 0;
  font-size: 14px;
  color: #666;
}

.ast-breadcrumbs-wrapper a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.2s;
}

.ast-breadcrumbs-wrapper a:hover {
  color: #004499;
  text-decoration: underline;
}

/* 5. Hero CTA Button Enhancement */
.wp-block-button__link {
  font-weight: 600;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Floating AI button */
.dc-ai-chat-toggle {
  position: fixed;
  bottom: 90px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #111827;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  z-index: 99999;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

/* Chat panel */
.dc-ai-chat-panel {
  position: fixed;
  bottom: 150px;
  right: 16px;
  width: 340px;
  max-width: 100%;
  max-height: 80vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  overflow: hidden;
  display: none;
  z-index: 99998;
}

/* Visible state */
.dc-ai-chat-panel.is-open {
  display: block;
}

/* ======================================
   NEW SNIPPET-BASED TRUST BADGES
   ====================================== */

.dc-trust-badges {
  margin-top: 15px;
  padding: 16px 20px;
  border-radius: 8px;
  background: #101010;
  color: #ffffff;
}

.dc-trust-badges ul {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-content: space-between;
}

.dc-trust-badges li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 180px;
  min-width: 150px;
  max-width: 260px;
}

.dc-trust-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.dc-trust-icon img {
  width: 100%;
  height: auto;
  display: block;
}

.dc-trust-badges li strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.dc-trust-badges li span {
  display: block;
  font-size: 12px;
  opacity: 0.8;
}

/* Mobile: keep two in a row if space allows, icon + text inline */
@media (max-width: 768px) {
  .dc-trust-badges {
    padding: 14px 16px;
  }

  .dc-trust-badges ul {
    gap: 12px 8px;
    justify-content: space-between;
  }

  .dc-trust-badges li {
    flex: 1 1 48%;   /* allow 2 per row on mobile */
    min-width: 0;
    max-width: none;
  }
}

/* Homepage trust badge overlay on hero (mobile) */
@media (max-width: 768px) {
  /* Make hero a positioning context */
  .home .wp-block-cover:first-of-type {
    position: relative;
  }

  /* Position the lightbox over the hero */
  .home .dc-trust-badges {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 700px;
    box-sizing: border-box;
  }
}

/* Keep normal flow on larger screens */
@media (min-width: 769px) {
  .home .dc-trust-badges {
    position: static;
    transform: none;
    width: auto;
  }
}

/* ======================================
   TRUST STRIP INFINITE CAROUSEL
   ====================================== */

.dc-trust-carousel {
  width: 100%;
  overflow: hidden;
  background: #101010;
  color: #ffffff;
  padding: 14px 0;
}

.dc-trust-track {
  display: flex;
  gap: 32px;
  width: max-content;
  animation: dc-trust-slide 35s linear infinite;
}

.dc-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  padding: 0 10px;
}

.dc-trust-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.dc-trust-icon img {
  width: 100%;
  height: auto;
  display: block;
}

.dc-trust-text strong {
  font-size: 14px;
  display: block;
}

.dc-trust-text span {
  font-size: 12px;
  opacity: 0.8;
  display: block;
}

/* Mobile */
@media (max-width: 768px) {
  .dc-trust-carousel {
    padding: 10px 0;
  }

  .dc-trust-text strong {
    font-size: 13px;
  }

  .dc-trust-text span {
    font-size: 11px;
  }
}

@keyframes dc-trust-slide {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
