.pm-projects-wrapper {
  max-width: 1500px;
  margin: 0 auto;
}
.pm-projects-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
}
@media (max-width:1024px) {
  .pm-projects-grid {
    grid-template-columns: repeat(2,1fr);
  }
  .pm-project-slider {
    height: 350px;
  }
}
@media (max-width:768px) {
  .pm-projects-grid {
    grid-template-columns: repeat(1,1fr);
  }
}
.pm-project-slider {
  position: relative;
  height: 400px;
  overflow: hidden;
}
.pm-project-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pm-project-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}
.pm-project-card .pm-project-products {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 1;
}
.pm-project-card .pm-project-products a,
.pm-project-card .pm-project-products img {
  display: block;
}
.pm-project-card .pm-project-products img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}
.pm-project-card .pm-project-products img:hover {
  transform: scale(1.1);
}
.pm-project-card .pm-project-products-more {
  display: inline-flex;
  background: #dddddd;
  color: #222;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 12px;
  text-align: center;
  line-height: 1;
}
.pm-project-slider {
  width: 100% !important;
}
.pm-project-slider .swiper-wrapper {
  display: flex !important;
}
.pm-project-slider .swiper-slide {
  flex-shrink: 0;
  flex-basis: 100% !important;
  width: 100% !important;
}

/* ==== White arrows and bullets ==== */
.pm-project-slider .swiper-button-next,
.pm-project-slider .swiper-button-prev,
.pm-modal .swiper-button-next,
.pm-modal .swiper-button-prev {
  color: #fff !important;
}

.pm-project-slider .swiper-button-next::after,
.pm-project-slider .swiper-button-prev::after,
.pm-modal .swiper-button-next::after,
.pm-modal .swiper-button-prev::after {
  color: #fff !important;
}

.pm-project-slider .swiper-pagination-bullet, .pm-modal .swiper-pagination-bullet {
  background: #fff !important;
  opacity: 0.6;
}

.pm-project-slider .swiper-pagination-bullet-active, .pm-modal .swiper-pagination-bullet-active {
  background: #fff !important;
  opacity: 1;
}

.swiper-pagination-bullet {
    width: 11px!important;
    height: 11px!important;
}
.pm-load-more-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
.pm-load-more {
  width: min(100%, 400px);
  height: 55px;
  border-radius: 8px!important;
  position: relative;
}

.pm-load-more.loading, .pm-detail-form button.loading {
  color: transparent !important;
}
.pm-load-more.loading::after, .pm-detail-form button.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: pm-spin 0.6s linear infinite;
}
@keyframes pm-spin {
  to { transform: rotate(360deg); }
}
/* ==== Modal ==== */
.pm-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9999999999;
}
.pm-modal-overlay {
  position: absolute;
  top:0; left:0;
  width:100%; height:100%;
  background: rgba(0,0,0,0.5);
}
.pm-modal-content {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 90%; height: 90%;
  max-width: 1100px; max-height: 600px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #ffffff;;
}
@media (max-width:768px) {
  .pm-modal-content {
    width: 95%; height: 95%;
    max-width: none; max-height: none;
  }
}
.pm-modal-close {
    position: absolute;
    top: 11px;
    right: 11px;
    background: #e3e3e3;
    border: none;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    height: 30px;
    width: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 3px;
}

.pm-modal-close:hover {
    background: #e5c6c6;
}

/* Modal inner layout */
.pm-modal-body {
  width: 100%; height: 100%;
  display: flex;
  overflow: hidden;
}
.pm-modal-inner {
  display: flex;
  width: 100%; height: 100%;
}
.pm-modal-left, .pm-modal-right {
  overflow-y: auto;
  position: relative;
}
.pm-modal-left {
  overflow-y: auto;
  position: relative;
  scrollbar-width: none;
}
.pm-modal-left {
  flex: 1 1 70%;
  background: #ffffff;
  margin-right: -20px;
}
.pm-modal-right {
  flex: 1 1 30%;
  padding: 30px;
  background: #ffffff;
  border-radius: 20px;
  z-index: 1;
}
/* Detail slider in modal */
.pm-detail-slider {
  width: 100%;
  height: 100%;
}
.pm-detail-slider .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Product list in modal */
.pm-detail-product-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  text-decoration: none;
  color: inherit;
}
.pm-detail-product-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.pm-detail-product-info {
  display: flex;
  flex-direction: column;
}
.pm-modal-product-name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 4px;
}
.pm-view-product {
  display: inline-block;
  font-size: 0.85rem;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid #000;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  width: fit-content;
  line-height: 18px;
}
.pm-detail-product-item:hover .pm-view-product {
  background: #000;
  color: #fff;
}
/* Inquiry form */
.pm-detail-form input,
.pm-detail-form textarea {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 10px!important;
  box-shadow: none!important;
}
.pm-detail-form button {
  width: 100%;
  padding: 10px 20px;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 0!important;
}
.pm-detail-form button.loading {
  opacity: 0.6;
}
.pm-success {
  color: green;
  font-weight: bold;
}
.pm-error {
  color: red;
  font-weight: bold;
}
.pm-modal .swiper-button-next {
  right: 50px!important;
}
.pm-modal .swiper-button-prev {
  left: 30px!important;
}
.pm-modal-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid rgba(0,0,0,0.1);
  border-top-color: #000;
  border-radius: 50%;
  animation: pm-spin 0.8s linear infinite;
  z-index: 20;
}
.pm-modal-project-title {
  font-size: 19px;
  line-height: 20px;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 15px;
}
.pm-detail-text {
  font-size: 16px;
  line-height: 20px;
}
@media (max-width:1100px) {
  .pm-modal-inner {
    overflow-x: hidden;
    flex-direction: column;
  }
  .pm-modal-left, .pm-modal-right {
    overflow-y: visible;
  }
  .pm-modal-left {
    max-height: 70%;  
  }
}
.pm-detail-form {
  margin-bottom:0!important;
}
.pm-detail-form textarea {
  min-height: 100px;
}

body.single-product .pm-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: transparent !important;
  box-shadow: none !important;
  padding: 0;
}

body.single-product .pm-modal-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

body.single-product .pm-modal-left {
  background: transparent;
  margin: 0;
  max-width: 1500px;
  max-height: 800px;
  width: auto;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

body.single-product .pm-modal-right {
  display: none;
}

body.single-product .pm-detail-slider {
  width: auto !important;
  height: auto !important;
  max-width: 1500px !important;
  max-height: 800px !important;
}

body.single-product .pm-detail-slider .swiper-wrapper {
  display: flex !important;
}

body.single-product .pm-detail-slider .swiper-slide {
  flex: none !important;
  width: auto !important;
  height: auto !important;
  display: flex;
  justify-content: center;
  align-items: center;
}

body.single-product .pm-detail-slider .swiper-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: auto;
}

@media (max-width: 768px) {
  body.single-product .pm-modal-left, body.single-product .pm-detail-slider img {
    max-width: 95vw!important;
    max-height: 95vh!important;
  }
}

.pm-related-projects {
  padding: 20px;
}

.pm-related-projects .related-products-title {
  font-size: 22px;
  text-align: center;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 40px;
}
