/**
 * Tenbit Addon - WooCommerce Products Grid Widget Styles
 * Author: Team Tenbit Solution
 * Website: tenbitsol.com
 */

:root {
  --tenbit-brand-red: #c91818;
  --tenbit-brand-red-hover: #a81212;
  --tenbit-brand-gold: #e5a93c;
  --tenbit-text-main: #1d1e20;
  --tenbit-text-muted: #67696e;
  --tenbit-border-color: #e2ddd4;
  --tenbit-radius-sm: 4px;
  --tenbit-radius-md: 8px;
  --tenbit-radius-full: 9999px;
  --tenbit-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tenbit-wc-products-wrapper {
  position: relative;
  box-sizing: border-box;
  font-family: inherit;
  width: 100%;
}

.tenbit-wc-products-wrapper * {
  box-sizing: border-box;
}

/* Grid Layout */
.tenbit-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: 100%;
}

/* Product Card */
.tenbit-product-card {
  background: #ffffff;
  border-radius: var(--tenbit-radius-md);
  border: 1px solid var(--tenbit-border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--tenbit-transition);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  position: relative;
}

.tenbit-product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  border-color: #cbd5e1;
}

.tenbit-product-card.featured {
  border: 2px solid var(--tenbit-brand-red);
}

/* Media Box */
.tenbit-product-media-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  background: #111111;
}

.tenbit-product-img-link {
  display: block;
  width: 100%;
  height: 100%;
}

.tenbit-product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  display: block;
}

.tenbit-product-card:hover .tenbit-product-img {
  transform: scale(1.06);
}

.tenbit-product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--tenbit-brand-red);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.85rem;
  border-radius: var(--tenbit-radius-full);
  z-index: 5;
  box-shadow: 0 4px 10px rgba(201, 24, 24, 0.3);
}

/* Card Body */
.tenbit-product-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.65rem;
}

.tenbit-product-cat {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tenbit-brand-red);
}

.tenbit-product-cat a {
  color: inherit;
  text-decoration: none;
}

.tenbit-product-title {
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #1d1e20;
  margin: 0;
  line-height: 1.2;
}

.tenbit-product-title a {
  color: inherit;
  text-decoration: none;
  transition: var(--tenbit-transition);
}

.tenbit-product-title a:hover {
  color: var(--tenbit-brand-red);
}

/* Rating */
.tenbit-product-rating {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tenbit-stars {
  color: var(--tenbit-brand-gold);
  letter-spacing: 2px;
  font-size: 0.85rem;
}

.tenbit-rating-score {
  font-size: 0.8rem;
  color: var(--tenbit-text-muted);
  font-weight: 600;
}

/* Description */
.tenbit-product-desc {
  font-size: 0.85rem;
  color: var(--tenbit-text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Price */
.tenbit-product-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--tenbit-brand-red);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.tenbit-product-price del {
  color: #9a9da6;
  font-size: 0.95rem;
  font-weight: 600;
}

.tenbit-product-price ins {
  color: var(--tenbit-brand-red);
  text-decoration: none;
}

/* Add to Cart Actions */
.tenbit-product-actions {
  margin-top: 0.5rem;
}

.tenbit-add-to-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1.25rem;
  background-color: var(--tenbit-brand-red);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--tenbit-radius-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--tenbit-transition);
}

.tenbit-add-to-cart-btn:hover {
  background-color: var(--tenbit-brand-red-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 24, 24, 0.35);
}

/* ==========================================================================
   PAGINATION STYLES
   ========================================================================== */
.tenbit-products-pagination-wrap {
  margin-top: 3.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.tenbit-pagination-numbers {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tenbit-page-num {
  min-width: 42px;
  height: 42px;
  border-radius: var(--tenbit-radius-sm);
  border: 1px solid var(--tenbit-border-color);
  background: #ffffff;
  color: #1d1e20;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  transition: var(--tenbit-transition);
}

.tenbit-page-num:hover,
.tenbit-page-num.active {
  background: var(--tenbit-brand-red);
  border-color: var(--tenbit-brand-red);
  color: #ffffff;
}

.tenbit-load-more-btn {
  padding: 0.95rem 2.75rem;
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--tenbit-brand-red);
  color: #ffffff;
  border: none;
  border-radius: var(--tenbit-radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--tenbit-transition);
}

.tenbit-load-more-btn:hover {
  background: var(--tenbit-brand-red-hover);
}

.tenbit-btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: tenbitSpin 0.6s linear infinite;
}

@keyframes tenbitSpin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .tenbit-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

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