/* Machine Carousel Styles */

.machine-carousel-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
}

.machine-carousel-wrapper {
  position: relative;
  overflow: hidden;
  padding: 60px 0 100px;
}

.machine-carousel-inner {
  overflow: visible;
  margin: -60px 0 -100px;
  padding: 60px 0 100px;
}

.machine-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  align-items: center;
}

.machine-slide {
  flex: 0 0 33.333%;
  padding: 0 15px;
  transition: all 0.5s ease;
  transform: scale(0.8);
  opacity: 0.6;
}

.machine-slide.active {
  transform: scale(1.05);
  opacity: 1;
  z-index: 10;
}

.machine-title {
	font-size:14px!important
}

.machine-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 400px;
  height: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border: 2px solid rgba(255, 204, 0, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.machine-slide.active .machine-card {
  border-color: rgba(255, 204, 0, 0.9);
  box-shadow: 0 20px 60px rgba(255, 204, 0, 0.3);
}

.machine-card:hover {
  border-color: rgba(255, 204, 0, 0.8);
  box-shadow: 0 20px 60px rgba(255, 204, 0, 0.2);
}

.machine-info {
  padding: 25px 20px;
  text-align: center;
  background: transparent;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.machine-image {
  width: 100%;
  flex: 1;
  overflow: hidden;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.machine-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.machine-card:hover .machine-image img {
  transform: scale(1.05);
}

.machine-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  color: #666;
  font-size: 18px;
}

.machine-info h3 {
  margin: 0;
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.machine-details-btn {
  background: #ffcc00;
  color: #000;
  border: none;
  padding: 12px 30px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.machine-details-btn:hover {
  background: #ffd633;
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(255, 204, 0, 0.5);
}

/* Navigation Buttons */
.carousel-navigation {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 100;
}

.carousel-button {
  width: 50px;
  height: 50px;
  background: #ffcc00;
  border: none;
  border-radius: 50%;
  color: #000;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.carousel-button svg {
  width: 24px;
  height: 24px;
  stroke-width: 3;
}

.carousel-button:hover {
  background: #ffd633;
  transform: scale(1.1);
	color: #000!important;
}

.carousel-button:focus {
  background: #ffd633;
  transform: scale(1.1);
	color: #000!important;
}


/* Modal Styles */
.machine-modal {
  display: none;
  position: fixed;
  z-index: 999999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.95);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.machine-modal.show {
  display: block;
}

.machine-modal-content {
  background-color: #2a2a2a;
  margin: 2% auto;
  padding: 0;
  border: none;
  width: 90%;
  max-width: 1200px;
  border-radius: 10px;
  overflow: hidden;
  animation: slideDown 0.3s ease;
  position: relative;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.machine-modal-close {
  color: #000!important;
  position: absolute;
  right: 15px;
  top: 15px;
  z-index: 10;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  border: none;
  border-radius: 50%;
  padding: 0;
}

.machine-modal-close svg {
  width: 24px;
  height: 24px;
  stroke-width: 3;
}

.machine-modal-close:hover,
.machine-modal-close:focus {
  color: #000!important;
  background: #ffcc00;
  transform: rotate(90deg);
}

/* Modal Navigation Buttons */
.modal-nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: #ffcc00;
  border: none;
  border-radius: 50%;
  color: #000!important;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.modal-nav-button svg {
  width: 28px;
  height: 28px;
  stroke-width: 3;
}

.modal-nav-button:hover {
  background: #ffd633;
  transform: translateY(-50%) scale(1.1);
	  color: #000!important;
}

.modal-nav-button:focus {
  background: #ffd633;
  transform: translateY(-50%) scale(1.1);
	  color: #000!important;
}

.modal-nav-prev {
  left: 20px;
}

.modal-nav-next {
  right: 20px;
}

.machine-modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
}

.machine-modal-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
  padding: 40px;
}

.machine-modal-image img {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
}

.machine-modal-details {
  color: #fff;
  display: flex;
  flex-direction: column;
  background: #2a2a2a;
  padding: 40px;
}

.machine-modal-title {
  font-size: 20px;
  font-weight: bold;
  color: #ffcc00;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.machine-modal-description {
  font-size: 14px;
  line-height: 1.7;
  color: #ccc;
  margin-bottom: 30px;
}

.machine-specs h3 {
  display: none;
}

.specs-table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: collapse;
}

.specs-table thead {
  background: #ffcc00;
}

.specs-table thead th {
  padding: 12px;
  font-size: 14px;
  font-weight: bold;
  color: #000;
  text-transform: uppercase;
  text-align: left;
}

.specs-table thead th:first-child {
  border-radius: 0;
}

.specs-table thead th:last-child {
  border-radius: 0;
}

.specs-table tbody tr {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.specs-table tbody tr:last-child {
  border-bottom: none;
}

.specs-table th {
  text-align: left;
  padding: 12px;
  font-weight: 600;
  color: #fff;
  width: 35%;
  border-radius: 0;
  font-size: 14px;
}

.specs-table td {
  padding: 12px;
  color: #ddd;
  background: #f5f5f5!important;
  color: #333;
  border-radius: 0;
  font-size: 14px;
  line-height: 1.6;
}

.machine-features h4 {
  font-size: 14px;
  color: #ffcc00;
  margin: 0 0 15px 0;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.features-list li {
  padding: 10px 15px;
  margin-bottom: 8px;
  background: rgba(255, 204, 0, 0.1);
  border-left: 3px solid #ffcc00;
  color: #fff;
  font-size: 14px;
  border-radius: 5px;
}

.features-list li:before {
  content: "✓ ";
  color: #ffcc00;
  font-weight: bold;
  margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .machine-slide {
    flex: 0 0 50%;
  }

  .machine-slide.active {
    transform: scale(1.03);
  }

  .machine-modal-body {
    grid-template-columns: 1fr;
  }

  .machine-modal-image {
    padding: 30px;
    max-height: 400px;
  }

  .machine-modal-details {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  .machine-slide {
    flex: 0 0 100%;
  }

  .machine-slide.active {
    transform: scale(1.02);
  }

  .machine-card {
    height: 550px;
  }

  .machine-modal-content {
    width: 95%;
    margin: 5% auto;
  }

  .machine-modal-image {
    padding: 20px;
  }

  .machine-modal-details {
    padding: 25px 20px;
  }

  .machine-modal-title {
    font-size: 24px;
  }

  .machine-modal-description {
    font-size: 14px;
  }

  .specs-table thead th {
    padding: 12px 15px;
    font-size: 14px;
  }

  .specs-table th,
  .specs-table td {
    padding: 12px 15px;
    font-size: 13px;
  }

  .machine-modal-close {
    right: 10px;
    top: 10px;
    width: 40px;
    height: 40px;
  }

  .machine-modal-close svg {
    width: 20px;
    height: 20px;
  }

  .modal-nav-button {
    width: 40px;
    height: 40px;
    padding: 0;
  }

  .modal-nav-button svg {
    width: 24px;
    height: 24px;
  }

  .modal-nav-prev {
    left: 10px;
  }

  .modal-nav-next {
    right: 10px;
  }

  .carousel-navigation {
    bottom: 10px;
  }

  .carousel-button {
    width: 40px;
    height: 40px;
    padding: 0;
  }

  .carousel-button svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .machine-carousel-container {
    padding: 20px 10px;
  }

  .machine-card {
    height: 500px;
  }

  .specs-table th {
    font-size: 13px;
  }

  .specs-table td {
    font-size: 14px;
  }
}

/* 3D Carousel Styles */
.modal-carousel-wrapper {
  position: relative;
  width: 100%;
  height: 55.3vh;
  display: block;
  margin-top: 2.8vh;
  margin-bottom: 5.5vh;
  padding-bottom: 3.4vh;
}

@media (min-width: 768px) {
  .modal-carousel-wrapper {
    height: 58.8vh;
    margin-top: 5.5vh;
    margin-bottom: 6.9vh;
  }
}

.modal-carousel-container {
  margin: 0 auto;
  width: 250px;
  height: 48.4vh;
  position: relative;
  perspective: 1200px;
}

@media (min-width: 768px) {
  .modal-carousel-container {
    height: 51.8vh;
    perspective: 1400px;
  }
}

.modal-carousel {
  height: 100%;
  width: 100%;
  position: absolute;
  transform-style: preserve-3d;
  transition: transform 1s;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: pan-y pinch-zoom;
  cursor: grab;
}

.modal-carousel-item {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -100px;
  margin-top: -20.75vh;
  background: #111;
  width: 200px;
  height: 41.5vh;
  text-align: center;
  color: #fff;
  border: 2px solid #222;
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: rgba(250, 204, 21, 0.05) 0px 4px 8px 1px, rgba(250, 204, 21, 0.05) 0px 8px 16px 2px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: manipulation;
  padding: 12px;
  transform-style: preserve-3d;
  backface-visibility: visible;
  pointer-events: auto;
}

@media (min-width: 768px) {
  .modal-carousel-item {
    width: 250px;
    height: 44.9vh;
    margin-left: -125px;
    margin-top: -22.45vh;
  }
}

.modal-carousel-item:hover {
  box-shadow: 0 8px 20px rgba(255, 213, 2, 0.3);
  /* transform handled by JavaScript - don't override */
}

.modal-carousel-item .machine-info {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  height: calc(30% - 8px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: center;
  z-index: 2;
}

.modal-carousel-item img {
  width: calc(100% - 16px);
  height: calc(70% - 8px);
  object-fit: contain;
  position: absolute;
  bottom: 8px;
  left: 8px;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

.machine-title {
  font-size: 9px;
  font-weight: bold;
  color: #fff;
  margin: 0 0 6px 0;
  line-height: 1.2;
}

.machine-description {
  font-size: 8px;
  color: #ccc;
  margin: 0;
  line-height: 1.2;
  opacity: 0.9;
  margin-bottom: 4px;
}

.machine-description:not(.expanded) {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.machine-description.expanded {
  display: block;
}

.more-details-btn {
  background: #FFD502;
  border: none;
  color: #000;
  font-size: 7px;
  cursor: pointer;
  padding: 4px 8px;
  margin-top: 8px;
  border-radius: 4px;
  font-weight: bold;
  transition: all 0.2s ease;
  align-self: center;
  flex-shrink: 0;
  position: relative;
}

.more-details-btn:hover {
  background: #FFC107;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(255, 213, 2, 0.3);
	color: #000!important;
}

@media (min-width: 768px) {
  .machine-title {
    font-size: 11px;
    margin: 0 0 10px 0;
  }

  .machine-description {
    font-size: 11px;
    line-height: 1.3;
    margin-bottom: 6px;
  }

  .more-details-btn {
    font-size: 9px;
    padding: 5px 10px;
    margin-top: 10px;
    border-radius: 5px;
  }

  .modal-carousel-item .machine-info {
    padding: 24px;
    top: 12px;
    left: 12px;
    right: 12px;
    height: calc(30% - 12px);
    justify-content: flex-start;
  }

  .modal-carousel-item img {
    width: calc(100% - 36px)!important;
    height: calc(70% - 24px)!important;
    bottom: 12px;
    left: 12px;
    object-fit: contain;
  }
}

/* Position items in 3D space - now dynamically calculated via inline styles */
/* Items are positioned using inline style transform with rotateY and translateZ */

/* 3D Carousel Navigation */
.carousel-3d-navigation {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  position: relative;
  z-index: 10;
}

.carousel-3d-button {
  display: flex;
  height: 3rem;
  width: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #FFD502;
  color: #000!important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 10;
}

.carousel-3d-button:hover {
  transform: scale(1.1);
  background: #FFC107;
	  color: #000!important;
}


.carousel-3d-button:focus {
  transform: scale(1.1);
  background: #FFC107;
	  color: #000!important;
}
/* 3D Modal Specific Styles */
.machine-modal-3d .machine-modal-content {
  width: min(90vw, 1200px);
  height: min(85vh, 800px);
  max-width: 1200px;
  max-height: 85vh;
  background-color: #1a1a1a;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.machine-modal-3d .machine-modal-body {
  display: flex;
  min-height: 100%;
}

.machine-modal-3d .machine-modal-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #2a2a2a;
  padding: 40px;
  position: relative;
}

.machine-modal-3d .machine-modal-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.machine-modal-3d .machine-modal-details {
  flex: 1;
  padding: 40px;
  color: #fff;
}

/* Small laptops and tablets */
@media (max-width: 1024px) and (min-width: 769px) {
  .machine-modal-3d .machine-modal-content {
    width: min(85vw, 900px);
    height: min(75vh, 600px);
    max-height: 75vh;
  }
}

/* Small screens and mobile */
@media (max-width: 768px) {
  .machine-modal-3d .machine-modal-content {
    width: 95vw;
    height: min(80vh, 600px);
    max-height: 80vh;
  }

  .machine-modal-3d .machine-modal-body {
    flex-direction: column;
    min-height: auto;
  }

  .machine-modal-3d .machine-modal-image {
    padding: 20px;
  }

  .machine-modal-3d .machine-modal-details {
    padding: 20px;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .machine-modal-3d .machine-modal-content {
    width: 98vw;
    height: min(85vh, 700px);
    max-height: 85vh;
  }
}

/* Large screens */
@media (min-width: 1400px) {
  .machine-modal-3d .machine-modal-content {
    width: min(80vw, 1400px);
    height: min(80vh, 900px);
    max-height: 80vh;
  }
}
