/* ═══════════════════════════════════════════════
   TMD B2B — Brand Cards + Category Icons + WooCommerce Product Grid
   Append to tmd-b2b-design.css
   ═══════════════════════════════════════════════ */

/* ── § Brands Grid ─────────────────────────── */
.tmd-brands { padding: 4rem 0; }

.tmd-brands__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.tmd-brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, #0a1628 0%, #122040 100%);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tmd-brand-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #2563eb, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tmd-brand-card:hover {
  border-color: rgba(37, 99, 235, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.15);
  color: #fff;
  text-decoration: none;
}

.tmd-brand-card:hover::before { opacity: 1; }

.tmd-brand-card__name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}

.tmd-brand-card__count {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.tmd-brand-card__tag {
  font-size: 0.7rem;
  color: #64748b;
  padding: 0.2rem 0.6rem;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 20px;
  white-space: nowrap;
}

/* ── § Category Cards with Icons ────────────── */
.tmd-categories__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.tmd-cat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #0a1628 0%, #0f1d35 100%);
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
  position: relative;
}

.tmd-cat-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.12);
  color: #fff;
  text-decoration: none;
}

/* Remove old background-image cards styling */
.tmd-cat-card__bg,
.tmd-cat-card__overlay { display: none; }

.tmd-cat-card__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 8px;
  color: #2563eb;
}

.tmd-cat-card__icon svg {
  width: 20px;
  height: 20px;
}

.tmd-cat-card__content { flex: 1; min-width: 0; }

.tmd-cat-card__count {
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1;
  margin-bottom: 0.15rem;
}

.tmd-cat-card__name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tmd-cat-card__arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #475569;
  transition: color 0.3s, transform 0.3s;
}

.tmd-cat-card:hover .tmd-cat-card__arrow {
  color: #2563eb;
  transform: translateX(3px);
}

.tmd-cat-card__arrow svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* ── § WooCommerce Product Grid on Homepage ── */
.tmd-products .woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding: 0 !important;
  margin: 0 !important;
}

.tmd-products .woocommerce ul.products li.product {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  background: linear-gradient(135deg, #0a1628 0%, #0f1d35 100%);
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.tmd-products .woocommerce ul.products li.product:hover {
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.12);
}

.tmd-products .woocommerce ul.products li.product a img {
  border-radius: 10px 10px 0 0;
  margin-bottom: 0 !important;
}

.tmd-products .woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: #e2e8f0 !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  padding: 0.75rem 1rem 0.25rem !important;
  line-height: 1.3 !important;
}

.tmd-products .woocommerce ul.products li.product .price {
  color: #2563eb !important;
  padding: 0 1rem 0.75rem !important;
  font-size: 0.9rem !important;
}

.tmd-products .woocommerce ul.products li.product .button,
.tmd-products .woocommerce ul.products li.product .add_to_cart_button {
  margin: 0 1rem 1rem !important;
  background: #2563eb !important;
  color: #fff !important;
  border-radius: 6px !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.8rem !important;
  transition: background 0.3s !important;
}

.tmd-products .woocommerce ul.products li.product .button:hover {
  background: #1d4ed8 !important;
}

/* CTA under product grids */
.tmd-products__cta {
  text-align: center;
  margin-top: 2rem;
}

.tmd-products--arrivals {
  padding-bottom: 3rem;
}

/* ── § Responsive ────────────────────────── */
@media (max-width: 1024px) {
  .tmd-brands__grid { grid-template-columns: repeat(3, 1fr); }
  .tmd-categories__grid { grid-template-columns: repeat(3, 1fr); }
  .tmd-products .woocommerce ul.products { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 768px) {
  .tmd-brands__grid { grid-template-columns: repeat(2, 1fr); }
  .tmd-categories__grid { grid-template-columns: repeat(2, 1fr); }
  .tmd-products .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; }
  .tmd-brand-card { padding: 1.5rem 1rem; }
  .tmd-brand-card__name { font-size: 1.1rem; }
}

@media (max-width: 480px) {
  .tmd-brands__grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .tmd-categories__grid { grid-template-columns: 1fr; }
  .tmd-products .woocommerce ul.products { grid-template-columns: 1fr !important; }
}
