/* ==========================================================================
   Home Page & WooCommerce Products Showcase Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Product Category Sub-Navigation Bar
   -------------------------------------------------------------------------- */
.home-categories-nav-wrap {
  background-color: var(--color-white);
  border-bottom: 1px solid #eaeaea;
  padding: 0.85rem 0;
  position: relative;
  z-index: 10;
}

.home-categories-nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 1.5rem;
}

.home-categories-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.75rem 2.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-category-item a {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.75px;
  text-transform: uppercase;
  color: #111111;
  text-decoration: none;
  padding: 0.4rem 0;
  position: relative;
  transition: color var(--transition-speed) ease;
}

.home-category-item a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary, #c41e28);
  transition: width var(--transition-speed) ease;
}

.home-category-item a:hover,
.home-category-item.current-cat a {
  color: var(--color-primary, #c41e28);
}

.home-category-item a:hover::after,
.home-category-item.current-cat a::after {
  width: 100%;
}

/* Category Search Trigger */
.home-category-search-toggle {
  background: none;
  border: none;
  color: #111111;
  cursor: pointer;
  padding: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-speed) ease;
}

.home-category-search-toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.home-category-search-toggle:hover {
  color: var(--color-primary, #c41e28);
}

/* Expandable Category Search Form */
.home-category-search-bar {
  display: none;
  width: 100%;
  padding-top: 0.75rem;
}

.home-category-search-bar.is-active {
  display: block;
}

.home-category-search-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
}

.home-category-search-input {
  flex: 1;
  padding: 0.5rem 1rem;
  border: 1px solid #cccccc;
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-size: 0.875rem;
  outline: none;
}

.home-category-search-input:focus {
  border-color: var(--color-primary, #c41e28);
}

.home-category-search-submit {
  padding: 0.5rem 1.25rem;
  background-color: #111111;
  color: #ffffff;
  border: 1px solid #111111;
  border-radius: 0 4px 4px 0;
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  cursor: pointer;
}

.home-category-search-submit:hover {
  background-color: var(--color-primary, #c41e28);
  border-color: var(--color-primary, #c41e28);
}

/* --------------------------------------------------------------------------
   2. Section Headers with Side Lines
   -------------------------------------------------------------------------- */
.home-products-section {
  padding: 2.5rem 0 1.5rem;
}

.home-section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 0 auto 2.5rem;
}

.home-section-title-wrap::before,
.home-section-title-wrap::after {
  content: "";
  display: inline-block;
  width: 60px;
  height: 1.5px;
  background-color: #222222;
  margin: 0 1.25rem;
}

.home-section-title {
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #111111;
  margin: 0;
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   3. Products 3-Column Grid
   -------------------------------------------------------------------------- */
.home-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 2.25rem;
  margin-bottom: 3.5rem;
}

/* --------------------------------------------------------------------------
   4. Product Card Styling (As per Mockup)
   -------------------------------------------------------------------------- */
.home-product-card {
  display: flex;
  flex-direction: column;
  background-color: transparent;
  transition: transform var(--transition-speed) ease;
}

.home-product-card:hover {
  transform: translateY(-3px);
}

/* Thumbnail Container */
.product-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #d5d4cb;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-thumb-wrap a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.product-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.home-product-card:hover .product-thumb-wrap img {
  transform: scale(1.04);
}

.product-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #8c8b82;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Product Info Container */
.product-info-wrap {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding-top: 1rem;
}

/* Brand Tag (Red text as per mockup) */
.product-brand-tag {
  color: #d32f2f;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  margin-bottom: 0.45rem;
  line-height: 1.2;
}

/* Product Title */
.product-item-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111111;
  text-transform: uppercase;
  line-height: 1.35;
  margin: 0 0 0.85rem 0;
  min-height: 2.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-item-title a {
  color: #111111;
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

.product-item-title a:hover {
  color: var(--color-primary, #c41e28);
}

/* Price Box with Top and Bottom Divider Lines */
.product-price-box {
  border-top: 1px solid #111111;
  border-bottom: 1px solid #111111;
  padding: 0.55rem 0;
  margin: 0.4rem 0 1rem 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #111111;
  line-height: 1.3;
}

.product-price-box .price {
  color: #111111;
  font-weight: 700;
}

.product-price-box del {
  color: #888888;
  font-weight: 400;
  font-size: 0.9375rem;
  margin-right: 0.4rem;
}

.product-price-box ins {
  text-decoration: none;
  color: #111111;
}

/* Product Card Actions: BUY NOW (Green) & ADD TO CART */
.product-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}

/* Green BUY NOW Button (Mockup Style) */
.btn-buy-now {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.6rem 1rem;
  background-color: transparent;
  border: 1.5px solid #00897b;
  color: #00897b !important;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 2px;
}

.btn-buy-now:hover,
.btn-buy-now:focus {
  background-color: #00897b;
  color: #ffffff !important;
}

/* Complementary ADD TO CART Button */
.btn-add-to-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.55rem 1rem;
  background-color: #1a1a1a;
  border: 1.5px solid #1a1a1a;
  color: #ffffff !important;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.75px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 2px;
}

.btn-add-to-cart:hover,
.btn-add-to-cart:focus {
  background-color: var(--color-primary, #c41e28);
  border-color: var(--color-primary, #c41e28);
  color: #ffffff !important;
}

/* WooCommerce Added State Feedback */
.btn-add-to-cart.loading {
  opacity: 0.65;
  cursor: wait;
}

.btn-add-to-cart.added::after {
  content: " \2713";
  margin-left: 0.35rem;
}

/* --------------------------------------------------------------------------
   5. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .home-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.5rem;
  }
  
  .home-categories-list {
    gap: 1.25rem 1.5rem;
  }

  .home-category-item a {
    font-size: 0.8125rem;
  }
}

@media (max-width: 600px) {
  .home-products-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .home-section-title-wrap::before,
  .home-section-title-wrap::after {
    width: 35px;
    margin: 0 0.75rem;
  }

  .home-section-title {
    font-size: 1.05rem;
    letter-spacing: 1px;
  }

  .home-categories-list {
    gap: 0.75rem 1rem;
    justify-content: center;
  }
}
