/* AutoPecas Catalogo - Minimal core styles */
:root {
  --primary-color: #e8181f;
  --secondary-color: #1a1a2e;
  --text-color: #222;
  --muted-color: #6b7280;
  --border-color: #e5e7eb;
  --bg-soft: #f8fafc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text-color);
  background: #fff;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--primary-color);
}

img {
  max-width: 100%;
  display: block;
}

.section--padding {
  padding: 72px 0;
}

.mb-15 {
  margin-bottom: 15px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-25 {
  margin-bottom: 25px;
}

.mb-30 {
  margin-bottom: 30px;
}

.pt-0 {
  padding-top: 0;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 9999;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.ctn-preloader {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid #ddd;
  border-top-color: var(--primary-color);
  animation: spin 0.8s linear infinite;
}

.txt-loading,
.loader-section {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Header */
.header__section {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border-color);
}

.main__header--inner {
  min-height: 78px;
}

.main__logo--img {
  max-height: 42px;
}

.header__menu--wrapper {
  list-style: none;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.header__menu--link {
  font-weight: 600;
  font-size: 0.95rem;
}

.header__search--form {
  border: 1px solid var(--border-color);
  background: #fff;
  overflow: hidden;
}

.header__select--inner,
.header__search--input {
  border: 0;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.header__search--input {
  min-width: 240px;
}

.header__search--button {
  border: 0;
  padding: 0 14px;
  background: var(--primary-color);
  color: #fff;
  font-weight: 600;
}

.bg__primary {
  background: var(--primary-color);
}

.text-white {
  color: #fff;
}

.text__secondary {
  color: var(--primary-color);
}

.primary__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 0;
  background: var(--primary-color);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 4px;
  cursor: pointer;
}

.primary__btn:hover {
  background: #c9151b;
  color: #fff;
}

/* Breadcrumb */
.breadcrumb__section {
  position: relative;
  padding: 56px 0;
}

.breadcrumb__section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, 0.55);
}

.breadcrumb__content {
  position: relative;
  z-index: 1;
}

.breadcrumb__content--title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.breadcrumb__content--menu {
  list-style: none;
  gap: 10px;
  margin: 0;
  padding: 0;
  color: #fff;
  font-size: 0.92rem;
}

.breadcrumb__content--menu__items + .breadcrumb__content--menu__items::before {
  content: ">";
  margin-right: 10px;
  color: rgba(255, 255, 255, 0.8);
}

/* Widgets and sidebar */
.shop__sidebar--widget {
  position: sticky;
  top: 94px;
}

.single__widget {
  margin-bottom: 20px;
}

.widget__bg {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #fff;
  padding: 16px;
}

.widget__title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
}

.widget__form--check {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget__form--check__list {
  position: relative;
  margin-bottom: 8px;
}

.widget__form--check__label {
  display: block;
  padding-left: 26px;
  font-size: 0.9rem;
  cursor: pointer;
}

.widget__form--check__input {
  position: absolute;
  opacity: 0;
}

.widget__form--checkmark {
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border: 1px solid #c9ced7;
  border-radius: 3px;
}

.widget__form--check__input:checked + .widget__form--checkmark {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.price__filter--form__inner {
  gap: 10px;
}

.price__filter--group {
  flex: 1;
}

.price__filter--label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted-color);
  margin-bottom: 5px;
}

.price__filter--input {
  border: 1px solid var(--border-color);
  padding: 6px 8px;
  background: #fff;
}

.price__filter--currency {
  font-size: 0.8rem;
  color: var(--muted-color);
  margin-right: 6px;
}

.price__filter--input__field {
  width: 100%;
}

.price__filter--btn {
  width: 100%;
}

/* Shop toolbar */
.shop__header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
}

.product__view--label {
  font-size: 0.86rem;
  color: var(--muted-color);
  margin-right: 8px;
}

.product__view--select {
  border: 1px solid var(--border-color);
  padding: 7px 10px;
  font-size: 0.86rem;
  background: #fff;
}

.product__showing--count {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted-color);
}

/* Product card */
.product__card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  height: 100%;
}

.product__card--thumbnail {
  position: relative;
  background: var(--bg-soft);
}

.product__card--thumbnail__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.product__secondary--img {
  display: none;
}

.product__badge {
  position: absolute;
  left: 10px;
  top: 10px;
  background: rgba(26, 26, 46, 0.9);
  color: #fff;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
}

.product__card--content {
  padding: 14px;
}

.product__card--title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.35;
}

.product__card--price {
  margin-bottom: 12px;
}

.current__price {
  font-weight: 700;
  color: var(--primary-color);
}

.old__price {
  font-size: 0.86rem;
  color: #9ca3af;
  text-decoration: line-through;
  margin-left: 6px;
}

/* Product details */
.product__details--info__title {
  font-size: 1.7rem;
  line-height: 1.2;
  margin-top: 0;
}

.product__details--info__desc {
  color: #4b5563;
  font-size: 0.95rem;
}

.product__details--info__meta {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
}

.product__details--info__meta li {
  margin-bottom: 5px;
}

.quantity__box {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.quantity__value {
  width: 34px;
  height: 34px;
  border: 0;
  background: #f3f4f6;
  cursor: pointer;
}

.quantity__number {
  width: 52px;
  text-align: center;
  border: 0;
  height: 34px;
}

.product__media--preview,
.product__media--nav {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
}

.product__media--preview__items--img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.product__media--nav__items--img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Tabs */
.product__details--tab__list {
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 8px;
  flex-wrap: wrap;
}

.product__details--tab__btn {
  border: 1px solid var(--border-color);
  background: #fff;
  color: #374151;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.86rem;
  cursor: pointer;
}

.product__details--tab__btn.active {
  border-color: var(--primary-color);
  background: rgba(232, 24, 31, 0.1);
  color: var(--primary-color);
}

.tab_pane {
  display: none;
}

.tab_pane.active.show {
  display: block;
}

.additional__info {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border-color);
}

.additional__info th,
.additional__info td {
  border-bottom: 1px solid var(--border-color);
  padding: 10px 12px;
  font-size: 0.9rem;
}

.additional__info th {
  width: 34%;
  background: #f9fafb;
  font-weight: 600;
}

/* Related products slider */
.product__items {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.product__items--thumbnail {
  background: var(--bg-soft);
}

.product__items--img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.product__items--content {
  padding: 12px;
}

.product__items--content__title {
  font-size: 0.92rem;
  margin: 0 0 8px;
}

/* Footer */
.footer__section {
  margin-top: 30px;
  border-top: 1px solid var(--border-color);
  background: #fff;
}

.main__footer {
  padding: 20px 0;
}

.copyright__content {
  margin: 0;
  text-align: center;
  color: #6b7280;
  font-size: 0.88rem;
}

/* Scroll top */
#scroll__top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--primary-color);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 80;
}

#scroll__top.active {
  opacity: 1;
  visibility: visible;
}

/* Helpers */
.border-radius-5 {
  border-radius: 5px;
}

.display-block {
  display: block;
}

.section__heading {
  margin-bottom: 20px;
}

.section__heading--maintitle {
  margin: 0;
  font-size: 1.35rem;
}

/* Responsive */
@media (max-width: 991.98px) {
  .section--padding {
    padding: 56px 0;
  }

  .shop__sidebar--widget {
    position: static;
  }

  .breadcrumb__content--title {
    font-size: 1.6rem;
  }

  .product__details--info__title {
    font-size: 1.35rem;
    margin-top: 20px;
  }
}

@media (max-width: 575.98px) {
  .main__header--inner {
    min-height: 66px;
  }

  .product__view--label {
    display: none;
  }

  .shop__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
