:root {
  /* Default theme (neutral) */
  --primary-color: #ce4a0d;
  --secondary-color: #e08054;
  --headers-color: #cecece;
  --text-color: #fff;
  --background-color: #000;
}

/* === GRIMME THEME === */
.theme-grimme {
  --primary-color: #e60101;
  --secondary-color: #ee2929;
  --headers-color: #000000;
  --text-color: #4d4d4d;
  --background-color: #ffffff;

}

/* === KUBOTA THEME === */
.theme-kubota {
  --primary-color: #ff6c00;
  --secondary-color: #ff9233;
  --headers-color: #000000;
  --text-color: #000000;
  --background-color: #ffffff;
}

section {
  padding: 2rem 0;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 2rem 1rem;
}

#backgroundVideo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.397);
  z-index: -1;
}

.hero-content {
  color: #fff;
  text-align: center;
  width: 100%;
  position: relative;
}

.hero-content img {
  width: 90%;
}

.hero-content h1 {
  display: none;
}

.hero-content .animated-hr {
  background: linear-gradient(to right,
      rgba(206, 74, 13, 0) 0%,
      var(--primary-color) 20%,
      var(--secondary-color) 80%,
      rgba(250, 146, 81, 0) 100%);
  max-width: 70%;
  margin: 0 auto 3rem;
}

.hero-content h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.2rem;
}


/*------------------------------------------------Filters section------------------------------------------*/

#productCategory {
  padding: 0;
}

.category-hero {
  padding: 1rem 1rem;
  text-align: start;
  margin: 0;
  width: 100%;
  background-color: var(--background-color);
}


.hero-text {
  text-align: center;
  gap: 1rem;
  z-index: -1;
  margin: 0 auto;
  height: 300px;
}

.hero-text hr {
  margin: 1rem 0;
}

.hero-text h2 {
  font-size: 1.5rem;
  color: var(--headers-color);
}

.hero-text p {
  color: var(--text-color);
}

#productCategory {
  background-color: #000000a8;
}

.category-menu-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* hides scrollbar overflow */
}

.category-menu-wrapper::before,
.category-menu-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  width: 5rem;
  height: calc(100% - 8px);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.category-menu-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #ebebeb 0%, #ebebebe0 64%, #ebebeb00 100%);
  opacity: 0;
  /* hidden by default */
}

.category-menu-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #ebebeb 0%, #ebebebe0 64%, #ebebeb00 100%);
  opacity: 1;
  /* visible by default */
}

.category-menu-wrapper.fade-left::before {
  opacity: 1;
}

.category-menu-wrapper.fade-right::after {
  opacity: 1;
}

.category-menu-wrapper:not(.fade-left)::before {
  opacity: 0;
}

.category-menu-wrapper:not(.fade-right)::after {
  opacity: 0;
}

.category-menu {
  background-color: #ebebeb;
  width: 100%;
  border-bottom: 1px solid #ddd;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: var(--primary-color);
  display: inline-flex;
  gap: 2rem;
  white-space: nowrap;
  padding: 2rem 3rem 1rem;
  scroll-behavior: smooth;
  scroll-margin-top: 20px;
}


.category-menu::-webkit-scrollbar,
.subcategory-menu::-webkit-scrollbar {
  height: 8px;
}

.category-menu::-webkit-scrollbar-thumb,
.subcategory-menu::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
}

.category-menu::-webkit-scrollbar-track,
.subcategory-menu::-webkit-scrollbar-track {
  background: #f0f0f0;
}

.category-card {
  position: relative;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  height: 100px;
  min-width: 215px;
  border-radius: 10px;
  cursor: pointer;
  color: #fff;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  filter: grayscale(0.7);
}

.category-card-text {
  z-index: 10;
  font-size: 1rem;
  text-align: center;
  pointer-events: none;
  padding: 2rem;
}


.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  border-radius: inherit;
  transition: background 0.3s ease;
}



.category-card.active {
  transform: scale(1.1) translateY(-8px);
  filter: grayscale(0);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

#productCategory .filter-buttons {
  background: #ffffff;
  padding: 1rem;
  display: flex;
  overflow-x: auto;
  gap: 2rem;
  white-space: nowrap;
  border-bottom: 1px solid #ddd;
}

.subcategory-text-btn {
  background: none;
  border: none;
  font-weight: 600;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
}

.subcategory-text-btn.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--secondary-color);
}

.sub-subcategory-menu {
  margin: 1rem;
  display: flex;
  gap: 1rem;
}

.sub-subcategory-btn {
  border: 2px solid var(--primary-color);
  padding: 10px 15px;
  border-radius: 10px;
  background: none;
  color: var(--primary-color);
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sub-subcategory-btn.active {
  background: var(--primary-color);
  color: #ffffff;
}




.products-grid {
  display: grid;
  grid-template-columns: repeat(
  auto-fit,
  minmax(280px, clamp(280px, 25vw, 340px)));
  gap: 2rem;
  justify-content: center;
  width: auto;
  padding: 1rem;
  position: relative;
}

.no-products{
  text-align: center;
  font-size: 1.5rem;
}

.product-card {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  height: 300px; 
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:not(.hidden) {
  opacity: 1;
}

.product-card.hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  position: absolute;
}


.grimme-products .product-card:before {
  background: #ffffffb2;

}

.kubota-products .product-card:before {
  background: #ffffffb2;
}

.product-card .stamp {
  position: absolute;
  text-transform: uppercase;
  top: 25%;
  left: 10%;
  font-size: 5em;
  transform: rotate(60deg);
  font-weight: 800;
  font-style: italic;
  color: rgba(0, 0, 0, 0.123);

}

.product-card .imgBx {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60%;
  transition: .5s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card .imgBx img {

  max-width: 150px;
  max-height: 150px;
}

.product-card .contentBx {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 165px;
  text-align: center;
  transition: 1s;
  z-index: 90;
}

.product-card .contentBx h2 {
  position: relative;
  font-weight: 900;
  letter-spacing: 2px;
  color: #000000;
  margin-bottom: 0;
  text-transform: uppercase;
  font-size: 16px;
}

.product-card .contentBx .product-function {
  display: flex;
  justify-content: center;
  align-items: center;
  transition: .5s;
  text-transform: uppercase;
  font-size: 10px;
  padding: 0 10px;
  font-weight: 500;
  margin-bottom: 10px;
  letter-spacing: 2px;
  margin: 0;
  color: #000;
}

.open-modal-btn {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 4px;
  padding: 10px 20px;
  font-weight: 600;
  text-decoration: none;
  color: #111;
  z-index: 500;
  transition: all 0.4s ease;
  border: 2px solid #111;
}



/* ----------------------Modal-------------------------------- */

/* Overlay background */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2999;
  animation: fadeIn 0.3s ease;
}

/* Close button */
.modal-close {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  color: var(--primary-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-color: #ffffffc7;
  transition: all 0.3s ease;
}

.open-lead-modal-btn {
  background: var(--primary-color);
  border-radius: 4px;
  padding: 5px 10px;
  max-width: 200px;
  width: 200px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  color: #ffffff;
  transition: transform 0.4s ease;
  z-index: 1000;
}




/* Smooth fade animation */
.product-img {
  transition: opacity 0.4s ease;
  opacity: 1;
}

.product-img.fade-out {
  opacity: 0;
}

.product-img.fade-in {
  opacity: 1;
}

/* Disabled nav state */
.navigation .disabled {
  opacity: 0.4;
  pointer-events: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-card {
  width: 100%;
  height: auto;
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-items: center;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  overflow-y: hidden;

}

.modal-card .left {
  width: 100%;
  height: 25%;
  background: #444;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card .left .wordmark {
  max-width: 100%;
  opacity: 0.6;
}

.modal-card .right {
  width: 95%;
  height: auto;
  margin: 0 auto;
  background: #d4d4d4;
  transform: translateY(-20px);
  position: relative;
  border-radius: 23px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 30px;
  padding-bottom: 20px;
}

.modal-card .right .product-img {
  position: absolute;
  top: 0;
  left: 50%;
  max-width: 200px;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;

}

.product-img.fade-out {
  opacity: 0;
}

.product-img.fade-in {
  opacity: 1;
}

.modal-card .right .productInfo {
  width: 90%;
  max-height: 70svh;
  margin: 1rem auto;
  color: #000000;
  text-align: left;
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
}

.modal-card .right .header-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-transform: uppercase;
  gap: 1rem;
}

.modal-card .right .title-button-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

.modal-card .right .header-wrapper .link-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;

}


.modal-card .right .header-wrapper .link-wrapper a {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  color: var(--primary-color);
  transform: translateY(2px);
  gap: 0.5rem;
}

.modal-card .right .header-wrapper a i {
  animation: PulseNavIcons 1s infinite;
}

@keyframes PulseNavIcons {
  0% {
    transform: scale(1);
    opacity: 0.5;

  }

  50% {
    transform: scale(1.1);
    opacity: 1;

  }

  100% {
    transform: scale(1);
    opacity: 0.5;
  }
}

.modal-card .right .productInfo h2 {
  font-weight: 800;
  line-height: 46px;
  font-size: 25px;
  margin-bottom: 15px;
  width: 100%;

}

.modal-card .right .productInfo .details {
  flex: 1;
  max-height: 60svh;
  display: flex;
  flex-direction: column;
  list-style: none;
  overflow-y: auto;
  padding-right: 1rem;
  -webkit-overflow-scrolling: touch;
}
.modal-card .right .productInfo .details::-webkit-scrollbar {
  width: 8px;
  height: 120%;
}

.modal-card .right .productInfo .details::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 10px;
}

.modal-card .right .productInfo .details::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 10px;
}


.modal-card .right .productInfo .details ul {
  padding: 0;
  margin: 0;
}

.modal-card .right .productInfo .details li {
  list-style: none;
}

.modal-card .right .productInfo .details p {
  margin-bottom: 1rem;
  text-justify: auto;

}

.modal-card .right .productInfo .images-nav {
  position: absolute;
  width: 100%;
  top: 1rem;
  right: 0;
}

.modal-card .right .productInfo .images-nav ul {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 10px;
  list-style: none;
  padding: 0;
}

.modal-card .right .productInfo .images-nav ul li {
  cursor: pointer;
  border-radius: 10px;
  display: block;
  z-index: 10;
}

.modal-card .right .productInfo .images-nav ul li img {
  border-radius: 10px;
  width: 100px;
  padding: 2px 4px;
  transition: all 0.2s ease-in-out;
  background-color: #dddddd57;
  opacity: 0;

}

.modal-card .right .productInfo .images-nav ul li img.active {
  transition: all 0.2s ease-in-out;
  border-radius: 10px;
  background-color: #ffffff;
}

.navigation {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translate(-50%, 0);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  z-index: 1000;
  padding: 1rem;
}

.navigation .prev-btn,
.navigation .next-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  line-height: 70px;
  text-align: center;
  color: #e08054;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  font-size: 3rem;
  font-weight: 900;
  transition: all 0.3s ease-in-out;
}


.navigation .disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* ----------- Medium Mobile (480px–768px) ----------- */
@media (min-width: 480px) {

  .hero-content img {
    width: 70%;
  }

  .modal-card .right {
    padding-top: 50px;
  }

  .modal-card .right .product-img {
    max-width: 300px;
  }

  .modal-card .right .productInfo {
    margin-top: 3rem;
  }
}

/* ----------- Tablets (768px–1200px) ----------- */
@media (min-width: 768px) {

  .hero-content img {
    width: 50%;
  }

  .hero-content h2 {
    font-size: 1.7rem;
  }

  .hero-content p {
    font-size: 1.5rem;
  }

  .modal-card .right .product-img {
    max-width: 400px;

  }

  .modal-card .left .wordmark {
    height: 100%;
  }

  .products-grid{
    justify-content: start;
  }
}

/* ----------- Desktop (1200px–1600px) ----------- */
@media (min-width: 1200px) {

  .hero-content img {
    width: 30%;
  }

  .hero-content h2 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1.8rem;
  }

  .category-hero .hero-text{
    text-align: start;
    height: 180px;
  }

  #productCategory .filter-buttons {
   padding: 1rem 4rem;
}
.sub-subcategory-menu {
  margin: 2rem 4rem 1rem;
 
}

.subcategory-content{
  padding: 0;
}

.category-menu{
  padding: 2rem 4rem 1rem;
}

.category-hero{
  padding: 1rem 4rem;
}

  .category-card:hover {
    transform: scale(1.05) translateY(-5px);
    filter: grayscale(0);
  }

  .subcategory-text-btn:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
  }

  .sub-subcategory-btn:hover {
    background: var(--primary-color);
    color: #ffffff;

  }

  .product-card:hover .imgBx {
    top: 0%;
    transform: translateY(-10%) scale(1.1);
  }

  .products-grid {
    max-width: 100%;
    padding: 1rem 4rem;
  }

  .product-card {
    height: 420px;
  }

  .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  }

  .grimme-products .product-card:hover:before {
    background: #d3d3d3;

    clip-path: circle(100% at 100% 0);
  }

  .kubota-products .product-card:hover:before {
    background: #ffffff;
    clip-path: circle(100% at 100% 0);
  }

  .product-card .stamp {
    top: 30%;
    left: -20%;
    font-size: 7em;
  }

  .product-card .imgBx {
    top: 50%;
    transform: translateY(-40%);
    height: 100%;
    transition: .5s;
  }

  .product-card .imgBx img {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 230px;
    max-height: 230px;
  }

  .product-card .contentBx {
    height: 100px;
  }

  .product-card .contentBx h2 {

    font-size: 24px;
  }

  .product-card:hover .contentBx {
    height: 200px;
  }

  .product-card:hover img {
    transform: scale(1.2), translate(-50%, -50%);
  }

  .product-card .contentBx .product-function {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: .5s;
    opacity: 0;
    visibility: hidden;
    font-size: 12px;
    margin: 1rem 0;
  }

  .product-card:hover .contentBx .product-function {
    opacity: 1;
    visibility: visible;
    transition-delay: .5s;
  }

  .open-lead-modal-btn {
    position: absolute;
    bottom: 4rem;
    right: 3rem;
    cursor: pointer;
    will-change: auto;
    font-weight: 300;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);

  }

  .open-lead-modal-btn:hover {
    transform: scale(1.1);
  }


  .open-modal-btn {
    transform: translateX(-50%) translateY(50px);
    opacity: 0;
    cursor: pointer;
  }

  .product-card:hover .open-modal-btn {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .open-modal-btn:hover {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: #fff;
  }

  .modal-close {
    position: absolute;
    top: 5.1%;
    right: 2%;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: #ffffff;
    transition: all 0.3s ease;
  }

  .modal-close:hover {
    background-color: var(--primary-color);
    color: #fff;
  }

  .modal-card {
    overflow: visible;
  }

  .modal-card .left {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 25%;
    height: 80%;
    border-radius: 23px;

  }

  .modal-card .left .wordmark {
    transform: rotate(-90deg) scale(1.2);
    margin-left: -90px;
    height: auto;
  }

  .modal-card .right {
    width: 80%;
    height: 90%;
    position: absolute;
    top: 50%;
    padding: 0;
    left: 10%;
    transform: translate(10%, -50%);
  }



  .modal-card .right .product-img {
    top: 50%;
    left: 0;
    max-width: 400px;
    transform: translate(-35%, -50%);
  }

 .modal-card .right .productInfo {
    width: 70%;
    max-height: 70%;
    margin: 1rem 0 0 270px;
  }

  .modal-card .right .header-wrapper {
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
  }

  .modal-card .right .header-wrapper h2 {
    font-size: 30px;
  }

  .modal-card .right .header-wrapper .link-wrapper {
    justify-content: space-between;
    gap: 2rem;
  }

  .modal-card .right .header-wrapper .link-wrapper a {
    font-size: 16px;

  }

  .modal-card .right .header-wrapper a:hover {
    transform: scale(1.1);
  }


  .modal-card .right .header-wrapper a:hover {
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
  }

  .modal-card .right .productInfo .images-nav {
    top: auto;
    bottom: 1rem;
  }

  .modal-card .right .productInfo .images-nav ul li img {
    opacity: 1;
  }

  .modal-card .right .productInfo .images-nav ul li img:hover {
    background-color: #dddddd;
  }

  .navigation {
    top: 50%;
    transform: translate(-50%, -50%);
    justify-content: center;
    gap: 250px;
    z-index: 500;
  }

  .navigation .prev-btn,
  .navigation .next-btn {
    background: #fff;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.425);
    cursor: pointer;
    margin: 4rem;
    font-size: 1.2rem;
  }


  .navigation .next-btn:hover,
  .navigation .prev-btn:hover {
    transform: scale(1.1);
    background-color: #d86b395d;
    color: #fff;

  }

}

/* ----------- Large Desktop (1600px+) ----------- */

@media (min-width: 1600px) {

  .products-grid {
    gap: auto;
  }

  .product-card {
    height: 500px;
  }

  .product-card .stamp {
    top: 27%;
    left: 0;
    font-size: 9em;
    transform: rotate(60deg);
  }

  .contentBx h2 {
    font-size: 35px;
  }

  .contentBx .product-function {
    font-size: 20px;
  }


}