/* Brand Page Styles */
.brand-hero {
  background: linear-gradient(135deg, #2d5016 0%, #4a7c2a 100%);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}

.brand-hero-content {
  max-width: 1200px;
  margin: 0 auto;
}

.brand-image {
  margin-bottom: 2rem;
}

.brand-image img {
  height: 80px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
}

.brand-hero h1 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.brand-description {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Category Section */
.category-section {
  padding: 4rem 2rem;
  background-color: #ffffff;
  min-height: 80vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.category-tabs-container {
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

/* Clean Text Tab Styles */
.category-tabs {
  display: flex;
  background: transparent;
  position: relative;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2rem 2rem 5px 2rem;
  gap: 2rem;
  margin-bottom: 0;
}

.category-tabs::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(45, 80, 22, 0.15);
  z-index: 0;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.tab-button {
  background: transparent;
  border: none;
  color: #6c757d;
  padding: 1rem 0;
  font-size: 1.3rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 0;
  margin-right: 0;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
  transition: color 0.25s ease;
  white-space: nowrap;
  min-width: auto;
  text-align: center;
  box-shadow: none;
  overflow: visible;
  font-weight: 600;
}

.tab-button::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 0;
  background: rgba(45, 80, 22, 0.4);
  border-radius: 2px;
  z-index: 2;
  transition: height 0.25s ease, background 0.25s ease;
}



@media (max-width: 768px) {
  .category-tabs {
    padding: 1rem 1rem 5px 1rem;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .tab-button {
    padding: 0.8rem 0;
    min-width: auto;
    font-size: 1rem;
  }

  .products-container {
    padding: 0 1rem;
  }

  .product-grid {
    gap: 1rem;
  }

  .product-grid.active .product-card {
    animation-delay: calc(var(--card-index) * 30ms);
  }
}

.tab-button:hover {
  color: #2d5016;
  transform: none;
}

.tab-button:hover::after {
  height: 5px;
}

.tab-button.active {
  color: #2d5016;
  font-weight: 700;
}

.tab-button.active::after {
  height: 12px;
  background: #2d5016;
}

.tab-button.switching {
  pointer-events: none;
  opacity: 0.7;
}

/* Products Container */
.products-container {
  padding: 2rem;
  min-height: 500px;
  position: relative;
  overflow: hidden;
  will-change: contents;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  width: 100%;
  pointer-events: none;
}

.product-grid.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
  pointer-events: auto;
}

.product-grid.active .product-card {
  animation: cardFadeIn 0.4s ease-out forwards;
  animation-delay: calc(var(--card-index) * 50ms);
  opacity: 0;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Product Cards */
.product-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #f1f3f4;
  opacity: 0;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: #2d5016;
}

.product-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f8f9fa;
  position: relative;
}

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

.placeholder-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: bold;
  color: #6c757d;
  text-transform: uppercase;
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

.product-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
}

.product-info h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2d5016;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.product-description {
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
  word-break: break-word;
  margin-bottom: 1rem;
}

.product-arrow {
  font-size: 1.5rem;
  color: #2d5016;
  transition: all 0.3s ease;
  opacity: 0.6;
  position: absolute;
  bottom: 2rem;
  right: 2rem;
}

.product-card:hover .product-arrow {
  opacity: 1;
  transform: translateX(4px) translateY(-2px);
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background: #2d5016;
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-primary:hover {
  background: #1f3910;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: #2d5016;
  padding: 1rem 2rem;
  text-decoration: none;
  border: 2px solid #2d5016;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-secondary:hover {
  background: #2d5016;
  color: white;
}

/* Contact Section */
.contact-section {
  background: white;
  padding: 4rem 2rem;
  text-align: center;
  border-top: 1px solid #e9ecef;
}

.contact-section h2 {
  font-size: 2rem;
  color: #2d5016;
  margin-bottom: 1rem;
}

.contact-section p {
  font-size: 1.1rem;
  color: #6c757d;
  margin-bottom: 2rem;
}

/* No Products State */
.no-products {
  text-align: center;
  padding: 4rem 2rem;
  color: #6c757d;
}

.no-products p {
  font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .brand-hero {
    padding: 2rem 1rem;
  }

  .brand-hero h1 {
    font-size: 2rem;
  }

  .category-section {
    padding: 2rem 1rem;
  }

  .category-tabs {
    padding: 1rem 1rem 1rem 1rem;
    gap: 1rem;
  }

  .products-container {
    padding: 1rem;
  }

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

  .product-grid.active .product-card {
    animation-delay: calc(var(--card-index) * 30ms);
  }

  .tab-button {
    padding: 0.8rem 0;
    min-width: auto;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .tab-button {
    padding: 0.6rem 0;
    font-size: 0.9rem;
    min-width: auto;
  }

  .category-tabs {
    gap: 0.8rem;
    padding: 1rem;
  }

  .products-container {
    padding: 0.5rem;
  }
}

/* Brand Cards Grid - Catalogue Page */
.brand-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  padding: 3rem 0;
  max-width: 1000px;
  margin: 0 auto;
}

.brand-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #f1f3f4;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  padding: 3.5rem 3rem;
  align-items: center;
  text-align: center;
  opacity: 0;
  animation: cardFadeIn 0.5s ease-out forwards;
  animation-delay: calc(var(--card-index) * 80ms);
  min-height: 320px;
}

.brand-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(45, 80, 22, 0.18);
  border-color: #2d5016;
}

.brand-logo-container {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  background: #f8f9fa;
  border-radius: 16px;
  padding: 2rem;
  transition: background 0.3s ease;
}

.brand-card:hover .brand-logo-container {
  background: #e9ecef;
}

.brand-logo-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.brand-card:hover .brand-logo-container img {
  transform: scale(1.08);
}

.brand-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2d5016 0%, #4a7c2a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  font-weight: bold;
  color: white;
  text-transform: uppercase;
  border-radius: 12px;
}

.brand-card-info {
  width: 100%;
}

.brand-card-info h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2d5016;
  margin: 0;
  transition: color 0.3s ease;
}

.brand-card:hover .brand-card-info h3 {
  color: #1f3910;
}

/* Responsive Design for Brand Cards */
@media (max-width: 768px) {
  .brand-cards-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0;
  }

  .brand-card {
    padding: 3rem 2.5rem;
    min-height: 280px;
  }

  .brand-logo-container {
    height: 180px;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
  }

  .brand-placeholder {
    font-size: 4rem;
  }

  .brand-card-info h3 {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .brand-cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0;
  }

  .brand-card {
    padding: 2.5rem 2rem;
    min-height: 240px;
  }

  .brand-logo-container {
    height: 140px;
    padding: 1rem;
  }

  .brand-placeholder {
    font-size: 3rem;
  }

  .brand-card-info h3 {
    font-size: 1.4rem;
  }
}
