/* Custom Styles for MotoRepuestos Pro - Dark & Animated Theme */

/* --- CSS Variables --- */
:root {
  --primary-color: #f59e0b; /* yellow-500 */
  --primary-color-light: #fbbf24; /* yellow-400 */
  --dark-bg: #111827; /* gray-900 */
  --medium-dark-bg: #1f2937; /* gray-800 */
  --light-bg: #374151; /* gray-700 */
  --text-light: #f3f4f6;
  --text-muted: #9ca3af;
  --border-radius: 0.75rem;
  --transition-speed: 300ms;
  --transition-long: 500ms;
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3),
    0 4px 6px -4px rgb(0 0 0 / 0.3);
  --header-height: 90px;
}

/* --- Global Styles & Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body.body--dark-theme {
  font-family: "Poppins", sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-light);
  line-height: 1.7;
}

h1,
h2,
h3 {
  line-height: 1.3;
  font-weight: 700;
}
h1 {
  font-size: 2.8rem;
}
h2 {
  font-size: 2.25rem;
}
h3 {
  font-size: 1.2rem;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-weight: 800;
}

/* Section scroll offset for fixed header */
.featured-products,
.catalog,
.testimonials,
.about,
.contact {
  scroll-margin-top: var(--header-height);
}

/* --- Components --- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease;
  border: 2px solid transparent;
}
.btn--primary {
  background: var(--primary-color);
  color: var(--dark-bg);
  box-shadow: 0 4px 20px -5px var(--primary-color);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 25px -5px var(--primary-color);
}
.btn--outline {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}
.btn--outline:hover {
  background-color: rgba(245, 158, 11, 0.1);
  transform: translateY(-3px);
}
.btn--secondary {
  background: var(--light-bg);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
}
.btn--secondary:hover {
  background: var(--primary-color);
  color: var(--dark-bg);
}

/* --- Header --- */
.header {
  background-color: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
  border-bottom: 1px solid var(--medium-dark-bg);
  height: var(--header-height);
  display: flex;
  align-items: center;
}
.header__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header__logo {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 1px;
}
.header__logo--highlight {
  color: var(--primary-color);
}
.header__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.header__link {
  font-weight: 500;
  transition: color var(--transition-speed);
}
.header__link:hover {
  color: var(--primary-color);
}

/* Mobile Nav Toggle */
.header__nav-toggle-input {
  display: none;
}
.header__nav-toggle-label {
  display: none;
  cursor: pointer;
  z-index: 101;
}

/* --- Hero Section --- */
.hero {
  padding: 5rem 0;
  background: linear-gradient(
    180deg,
    var(--dark-bg) 0%,
    var(--medium-dark-bg) 100%
  );
  overflow: hidden;
}
.hero__container {
  display: flex;
  align-items: center;
  gap: 3rem;
}
.hero__content {
  flex: 1;
}
.hero__title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.hero__title--highlight {
  color: var(--primary-color);
}
.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
}
.hero__cta {
  display: flex;
  gap: 1rem;
}
.hero__image-container {
  flex: 1;
  color: var(--dark-bg);
}
.hero__image {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

/* --- Features Section --- */
.features {
  padding: 4rem 0;
  background-color: var(--medium-dark-bg);
}
.features__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(3, 1fr);
}
.feature-item {
  text-align: center;
}
.feature-item__icon-wrapper {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(145deg, var(--light-bg), var(--dark-bg));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-speed),
    box-shadow var(--transition-speed);
}
.feature-item:hover .feature-item__icon-wrapper {
  transform: scale(1.1);
  box-shadow: 0 0 30px -5px var(--primary-color);
}
.feature-item__icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--primary-color);
}
.feature-item__title {
  margin-bottom: 0.5rem;
}
.feature-item__text {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Shared Product Card Styles --- */
.product-card {
  background: var(--medium-dark-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.5);
}
.product-card__image-wrapper img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.product-card__content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.product-card__title {
  font-size: 1.1rem;
  flex-grow: 1;
}
.product-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}
.product-card__price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* --- Featured Products (Carousel) --- */
.featured-products {
  padding: 5rem 0;
  overflow: hidden;
}
.featured-products__container {
  position: relative;
}

.swiper-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  padding: 50px 0;
}

.swiper-wrapper {
  display: flex;
}

.swiper-slide {
  flex: 0 0 auto;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.swiper-slide .product-card {
  width: 100%;
  max-width: 320px;
}

.swiper-pagination-bullet {
  background: var(--light-bg);
  opacity: 0.7;
}
.swiper-pagination-bullet-active {
  background: var(--primary-color);
  opacity: 1;
}
.swiper-button-next,
.swiper-button-prev {
  color: var(--primary-color);
  width: 50px;
  height: 50px;
  background-color: rgba(17, 24, 39, 0.7);
  border-radius: 50%;
  transition: background-color var(--transition-speed);
  top: 50%;
  transform: translateY(-50%);
}
.swiper-button-next:hover,
.swiper-button-prev:hover {
  background-color: var(--medium-dark-bg);
}
.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 1.5rem;
  font-weight: 800;
}

/* --- Catalog Section --- */
.catalog {
  padding: 5rem 0;
  background-color: var(--medium-dark-bg);
}
.catalog__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.catalog__cta {
  text-align: center;
  margin-top: 3rem;
}

/* --- Testimonials Section --- */
.testimonials {
  padding: 5rem 0;
  background-color: var(--dark-bg);
}
.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}
.testimonial-card {
  background: var(--medium-dark-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-top: 4px solid var(--primary-color);
}
.testimonial-card__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border: 3px solid var(--light-bg);
}
.testimonial-card__text {
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}
.testimonial-card__name {
  font-weight: 700;
  color: var(--text-light);
}
.testimonial-card__status {
  font-size: 0.9rem;
  color: var(--primary-color-light);
}

/* --- About Us Section --- */
.about {
  padding: 5rem 0;
  background-color: var(--medium-dark-bg);
}
.about__container {
  display: flex;
  align-items: center;
  gap: 4rem;
}
.about__image-container {
  flex: 1;
}
.about__image {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}
.about__content {
  flex: 1.2;
}
.about__content .section-title {
  text-align: left;
}
.about__content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* --- Contact Section --- */
.contact {
  padding: 5rem 0;
  background-color: var(--dark-bg);
}
.contact__container {
  max-width: 600px;
  text-align: center;
}
.contact__subtitle {
  margin-bottom: 2rem;
  color: var(--text-muted);
}
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.form-group {
  position: relative;
}
.form-group__input,
.form-group__textarea {
  width: 100%;
  padding: 1rem;
  background: var(--medium-dark-bg);
  border: 2px solid var(--light-bg);
  border-radius: var(--border-radius);
  color: var(--text-light);
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  transition: border-color var(--transition-speed);
}
.form-group__input:focus,
.form-group__textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}
.form-group__input::placeholder,
.form-group__textarea::placeholder {
  color: transparent;
  transition: color var(--transition-speed);
}
.form-group__input:focus::placeholder,
.form-group__textarea:focus::placeholder {
  color: var(--text-muted);
}
.form-group__label {
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: top var(--transition-speed), font-size var(--transition-speed),
    color var(--transition-speed);
}
.form-group__input:focus ~ .form-group__label,
.form-group__input:not(:placeholder-shown) ~ .form-group__label,
.form-group__textarea:focus ~ .form-group__label,
.form-group__textarea:not(:placeholder-shown) ~ .form-group__label {
  top: -0.75rem;
  left: 0.75rem;
  font-size: 0.75rem;
  color: var(--primary-color);
  background-color: var(--dark-bg);
  padding: 0 0.25rem;
}
.contact__btn {
  margin-top: 1rem;
}
.form-success-message {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
  color: var(--primary-color-light);
}

/* --- Footer --- */
.footer {
  background: var(--dark-bg);
  padding: 4rem 0 2rem 0;
  border-top: 1px solid var(--medium-dark-bg);
}
.footer__main {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
  text-align: left;
}
.footer__title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}
.footer__about p,
.footer__contact-details p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.footer__social-links {
  display: flex;
  gap: 1rem;
}
.footer__social-link {
  color: var(--text-muted);
  transition: color var(--transition-speed);
}
.footer__social-link:hover {
  color: var(--primary-color);
}
.footer__social-link svg {
  width: 1.5rem;
  height: 1.5rem;
}
.footer__bottom {
  border-top: 1px solid var(--light-bg);
  padding-top: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- WhatsApp Float Button --- */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px #999;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}
.whatsapp-float:hover {
  transform: scale(1.1);
}
.whatsapp-float svg {
  width: 32px;
  height: 32px;
}

/* --- Animations --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.btn.pop {
  animation: btnPop 0.3s ease;
}
@keyframes btnPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* --- Responsive Styles --- */
@media (max-width: 1200px) {
  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }
}
@media (max-width: 992px) {
  h1 {
    font-size: 2.5rem;
  }
  .hero__container,
  .about__container {
    flex-direction: column;
    text-align: center;
  }
  .about__content .section-title {
    text-align: center;
  }
  .hero__content,
  .about__content {
    order: 2;
  }
  .hero__image-container,
  .about__image-container {
    order: 1;
    margin-bottom: 2rem;
  }
  .hero__cta {
    justify-content: center;
  }
  .catalog__grid,
  .testimonials__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header__nav-toggle-label {
    display: flex;
    flex-direction: column;
    width: 30px;
    height: 30px;
    justify-content: space-around;
  }
  .header__nav-toggle-label span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 3px;
    transition: transform var(--transition-speed),
      opacity var(--transition-speed);
  }
  .header__nav-toggle-input:checked
    ~ .header__nav-toggle-label
    span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
  }
  .header__nav-toggle-input:checked
    ~ .header__nav-toggle-label
    span:nth-child(2) {
    opacity: 0;
  }
  .header__nav-toggle-input:checked
    ~ .header__nav-toggle-label
    span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .header__nav {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--dark-bg);
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 1rem 5%;
    border-top: 1px solid var(--medium-dark-bg);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition-speed) ease,
      opacity var(--transition-speed) ease;
  }
  .header__nav-toggle-input:checked ~ .header__nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .features__grid,
  .testimonials__grid {
    grid-template-columns: 1fr;
  }
  .footer__main {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer__social-links {
    justify-content: center;
  }

  .swiper-slide {
    transform: scale(1);
    opacity: 1;
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }
  .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 576px) {
  .features__grid,
  .catalog__grid {
    grid-template-columns: 1fr;
  }
  .hero__title {
    font-size: 2rem;
  }
  h2,
  .section-title {
    font-size: 1.8rem;
  }
}
