/* ===== FRONT PAGE ===== */

/* Remove default padding for front page */
body.home .site-main,
body.page-template-front-page .site-main {
  padding: 0 !important;
  max-width: none !important;
}

/* ===== HERO SLIDER ===== */
.home-hero {
  /* Slider plugin handles all styling */
}

/* ===== PRODUCT CATEGORIES ===== */
.home-categories {
  background: var(--gb-navy);
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.03)"/></svg>');
  background-size: 20px 20px;
  padding: 4rem 2rem;
  position: relative;
}

.home-categories .section-heading {
  text-align: center;
  font-size: 2.25rem;
  font-weight: 400;
  color: var(--gb-white);
  margin-bottom: 2.5rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 0;
}

.category-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 160px;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
}

.category-image img {
  width: 200px;
  height: 160px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.category-image:hover img {
  transform: scale(1.05);
}

.category-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.category-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gb-white);
  margin: 0 0 1rem;
}

.category-products {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  width: 100%;
}

.category-products li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.category-products li:last-child {
  border-bottom: none;
}

.category-products li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  text-decoration: none;
}

.category-products li a:hover .product-name {
  text-decoration: underline;
}

.product-name {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  flex-shrink: 1;
}

.product-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gb-white);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}

.category-cta {
  margin-top: auto;
}

/* Shared button style */
.btn-gold {
  display: inline-block;
  background: var(--gb-gold);
  color: var(--gb-white);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.3s ease;
}

.btn-gold:hover {
  background: var(--gb-navy);
  color: var(--gb-white);
}

/* ===== SELL SECTION ===== */
.home-sell {
  background: var(--gb-white);
  padding: 4rem 2rem;
}

.home-sell .section-heading {
  color: var(--gb-navy);
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

/* ===== LATEST PRODUCTS ===== */
.home-products {
  background: var(--gb-white);
  padding: 4rem 2rem;
}

.home-products .section-heading {
  text-align: center;
  font-size: 2rem;
  color: var(--gb-navy);
  margin-bottom: 2rem;
}

/* Products grid */
.home-products ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Remove WooCommerce float clearing pseudo-elements */
.home-products ul.products::before,
.home-products ul.products::after {
  display: none !important;
  content: none !important;
}

/* Product card styling - matches shop pages */
.home-products ul.products li.product {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  background: var(--gb-white);
  border: 1px solid var(--gb-border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.home-products ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.home-products ul.products li.product a.woocommerce-LoopProduct-link {
  display: block;
  text-decoration: none;
}

.home-products ul.products li.product img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  margin-bottom: 0.75rem;
  border-radius: 4px;
  background: #f9f9f9;
}

.home-products ul.products li.product .woocommerce-loop-product__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gb-navy);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* Hide add to cart buttons */
.home-products .add_to_cart_button,
.home-products .button.product_type_simple,
.home-products .button.product_type_variable,
.home-products .added_to_cart {
  display: none !important;
}

/* "from" prefix: small, dark, normal weight */
.home-products .gbpm-from-price-prefix {
  color: var(--gb-text);
  font-size: 0.85rem;
  font-weight: 400;
}

/* Price amount: gold */
.home-products ul.products li.product .price .woocommerce-Price-amount {
  color: var(--gb-gold);
  font-size: 1rem;
  font-weight: 700;
}

/* ===== OTHER SERVICES ===== */
.home-services {
  background: var(--gb-gray);
  padding: 4rem 2rem;
}

.home-services-inner {
  text-align: center;
}

.home-services .services-intro {
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.home-services .section-heading {
  font-size: 2rem;
  color: var(--gb-navy);
  margin-bottom: 1.5rem;
}

.services-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--gb-text);
}

.services-content p {
  margin-bottom: 1rem;
}

.services-content p:last-child {
  margin-bottom: 0;
}

/* Service Cards within WYSIWYG */
.services-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
  text-align: left;
}

.service-card {
  background: var(--gb-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.service-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.service-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.service-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.service-card:hover .service-card-image img {
  transform: scale(1.05);
}

.service-card-content {
  padding: 1.5rem;
}

.service-card-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gb-navy);
  margin: 0 0 0.75rem;
}

.service-card-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--gb-text);
  margin: 0;
}

/* Affiliations Section */
.services-affiliations {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gb-border);
  text-align: center;
}

.services-affiliations img {
  max-width: 400px;
  height: auto;
  margin-bottom: 1.5rem;
}

.services-affiliations p {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.7;
}

/* ===== LATEST ARTICLES ===== */
.home-articles {
  background: var(--gb-white);
  padding: 4rem 2rem;
}

.home-articles .section-heading {
  text-align: center;
  font-size: 2rem;
  color: var(--gb-navy);
  margin-bottom: 2rem;
}

/* Articles Carousel */
.articles-carousel {
  position: relative;
  margin-bottom: 2rem;
}

.articles-track {
  overflow: hidden;
}

.articles-grid {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
}

.article-card {
  background: var(--gb-gray);
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 calc(25% - 1.5rem);
  margin-right: 2rem;
  min-width: 0;
}

.article-card:last-child {
  margin-right: 0;
}

.article-image {
  display: block;
  height: 180px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-image:hover img {
  transform: scale(1.05);
}

.article-content {
  padding: 1.25rem;
}

.article-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

.article-title a {
  color: var(--gb-navy);
}

.article-title a:hover {
  color: var(--gb-gold);
}

.article-date {
  font-size: 0.85rem;
  color: #666;
}

/* Carousel Arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gb-navy);
  color: var(--gb-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background 0.3s ease, opacity 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.carousel-arrow:hover {
  background: var(--gb-gold);
}

.carousel-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-arrow:disabled:hover {
  background: var(--gb-navy);
}

.carousel-prev {
  left: -24px;
}

.carousel-next {
  right: -24px;
}

.articles-cta-wrap {
  text-align: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .categories-grid {
    gap: 5rem;
  }

  .home-products ul.products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 5rem;
  }

  .category-card:last-child {
    grid-column: span 2;
    max-width: 50%;
    margin: 0 auto;
  }

  /* Articles: 2 visible on tablet */
  .article-card {
    flex: 0 0 calc(50% - 1rem);
  }

  .carousel-prev {
    left: -16px;
  }

  .carousel-next {
    right: -16px;
  }
}

@media (max-width: 1024px) {
  .services-cards {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 992px) {
  .home-products ul.products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .home-categories,
  .home-sell,
  .home-products,
  .home-services,
  .home-articles {
    padding: 3rem 1.5rem;
  }

  .home-categories .section-heading {
    font-size: 1.5rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .home-products ul.products {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .category-card:last-child {
    grid-column: span 1;
    max-width: 100%;
  }

  .category-content {
    align-items: center;
  }

  .category-cta {
    align-self: center;
  }

  .category-heading {
    font-size: 1.25rem;
  }

  .section-heading {
    font-size: 1.5rem !important;
  }

  /* Articles: 1 visible on mobile */
  .article-card {
    flex: 0 0 100%;
    margin-right: 1.5rem;
  }

  .articles-carousel {
    padding: 0 2rem;
  }

  .carousel-arrow {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .carousel-prev {
    left: -8px;
  }

  .carousel-next {
    right: -8px;
  }

  .article-image {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .home-products ul.products {
    grid-template-columns: 1fr;
  }
}
