@import "./variables.css";

.card-product {
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card-product:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card);
}

.card-product img.card-img-top {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  object-fit: cover;
  height: 250px;
}

.card-body {
  padding: 1rem 1.25rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  min-height: 3rem;
  margin-bottom: 0.5rem;
}

.price {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
  color: var(--danger-color);
}

.stars {
  color: var(--warning-color);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.card-text small.text-muted {
  opacity: 0.7;
}

.btn-outline-primary {
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: var(--white-color);
  box-shadow: var(--shadow-lg);
}

.card-product .total-price {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
}

.card-product .total-price .price,
.card-product .total-price .old-price {
  white-space: nowrap;
  margin: 0;
}

.card-product .total-price .old-price {
  font-size: 0.85rem;
  color: #6c757d;
  text-align: right;
}

.card-product .total-price .discount {
  color: #dc3545;
  margin-left: 0.15rem;
}

.title-product {
  text-decoration: none;
  color: var(--black-color);
  font-size: 16px;
}

.title-product:hover {
  color: var(--primary-color);
}

.title-warranty {
  color: var(--warranty-color);
  font-size: 14px;
  font-weight: 300;
}

.empty-products {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 30px 20px;
}

.empty-products i {
  font-size: 3.5rem;
  color: var(--icon-color);
  margin-bottom: 0.75rem;
}

.empty-products h4 {
  color: var(--dark-heading);
  font-weight: 600;
  font-size: 1.25rem;
}

.empty-products p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.btn-home-compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white-color) !important;
  background-color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition-fast) ease-in-out;
}

.btn-home-compact i {
  font-size: 0.85rem;
  margin: 0;
  color: var(--white-color) !important;
}

.btn-home-compact:hover {
  color: var(--white-color) !important;
  background-color: var(--primary-hover);
  border-color: var(--primary-active);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-home-compact:hover i {
  color: var(--white-color) !important;
}

.product-info {
  margin-top: 0;
  padding-left: 2rem;
  padding-right: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.thumb-scroll-wrapper img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  cursor: pointer;
  margin-right: 8px;
  border: 2px solid transparent;
  transition: border-color var(--transition-normal);
  border-radius: var(--radius-sm);
}

.thumb-scroll-wrapper img.border-primary,
.thumb-scroll-wrapper img:hover {
  border-color: var(--primary-color) !important;
}

.product-info .stars {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.car-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.price-box {
  margin-bottom: 0.5rem;
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.current-price {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--danger-color);
  white-space: nowrap;
}

.discount-badge {
  font-size: 1.35rem;
  white-space: nowrap;
}

.original-price {
  color: #6c757d;
  text-decoration: line-through;
}

.btn-consult {
  background: var(--gradient-btn);
  color: var(--white-color);
  font-weight: 600;
  padding: 12px 0;
  font-size: 1.1rem;
  border-radius: var(--radius-md);
  transition: background var(--transition-normal), transform 0.2s ease;
  width: 200px;
  margin: 2rem auto 0;
  box-shadow: var(--shadow-md);
}

.btn-consult:hover {
  background: var(--gradient-btn-hover);
  transform: translateY(-2px);
}

.table-bordered {
  box-shadow: var(--shadow-sm);
}

.table th,
.table td {
  vertical-align: middle;
}

h2 {
  font-size: 2rem;
  font-weight: bold;
  color: var(--dark-color);
  margin-bottom: 0.8rem;
}

.title-related-product {
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.title-product-sub {
  color: var(--primary-color);
  text-decoration: none;
}

.title-product-sub:hover {
  color: var(--primary-color);
}

#productTab .nav-link {
  color: var(--primary-color);
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all var(--transition-fast);
}

#productTab .nav-link.active {
  color: var(--white-color);
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

#productTab .nav-link:hover:not(.active) {
  color: var(--primary-color);
  background-color: var(--primary-light);
}

.tiktok-player-container {
  width: 100%;
  max-width: 360px;
  height: 640px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-tiktok);
  background: var(--black-color);
}

.tiktok-player-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 768px) {
  .product-info {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
    height: auto;
  }

  h2 {
    font-size: 1.6rem;
    margin-top: 15px;
  }

  .car-options {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .car-options::-webkit-scrollbar {
    display: none;
  }

  .car-option {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: center;
  }

  .car-option:first-child {
    margin-left: auto;
  }

  .car-option:last-child {
    margin-right: auto;
  }

  .price-row {
    justify-content: center;
  }

  .current-price {
    font-size: clamp(1.2rem, 6vw, 1.6rem);
  }

  .discount-badge {
    font-size: clamp(0.8rem, 3.6vw, 1rem);
  }

  .btn-consult {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 575.98px) {
  .card-product .total-price {
    gap: 0.3rem;
  }

  .card-product .total-price .price {
    font-size: clamp(0.95rem, 4.6vw, 1.1rem);
  }

  .card-product .total-price .old-price {
    font-size: clamp(0.72rem, 3.3vw, 0.85rem);
  }
}

@media (max-width: 359.98px) {
  .card-product .total-price .price {
    font-size: 0.9rem;
  }

  .card-product .total-price .old-price {
    font-size: 0.7rem;
  }
}
