/* Product Gallery Styles */
.product-gallery {
  margin: 40px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  position: relative;
  cursor: pointer;
}

.gallery-item:hover,
.gallery-item-link:hover,
.gallery-item-link:hover .gallery-item {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 20px 40px rgba(212, 175, 55, 0.2),
    0 8px 25px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(212, 175, 55, 0.3);
  border-color: rgba(212, 175, 55, 0.5);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  padding: 15px;
  text-align: center;
}

.gallery-caption h4 {
  margin: 0 0 8px 0;
  color: var(--primary);
  font-size: 1.1rem;
}

.gallery-caption p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  opacity: 0;
  transition: opacity 0.3s;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-content {
  background-color: white;
  margin: auto;
  max-width: 800px;
  width: 90%;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  animation: modalIn 0.4s;
}

@keyframes modalIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-header {
  padding: 20px;
  background: var(--primary);
  color: white;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
}

.modal-body {
  display: flex;
  flex-direction: column;
  padding: 20px;
}

@media (min-width: 768px) {
  .modal-body {
    flex-direction: row;
  }
}

.modal-image {
  flex: 1;
  text-align: center;
}

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

.modal-details {
  flex: 1;
  padding: 0 0 0 20px;
}

.modal-details h4 {
  color: var(--primary);
  margin: 0 0 15px 0;
  font-size: 1.3rem;
}

.modal-details p {
  margin: 0 0 15px 0;
  line-height: 1.6;
}

.modal-details ul {
  padding-left: 20px;
  margin-bottom: 20px;
}

.modal-details li {
  margin-bottom: 8px;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.modal-close:hover {
  transform: scale(1.2);
}

.modal-footer {
  padding: 15px 20px;
  background: #f5f5f5;
  text-align: right;
}

.modal-btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 8px 20px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 50px;
  transition: all 0.3s;
  border: 2px solid var(--primary);
}

.modal-btn:hover {
  background: transparent;
  color: var(--primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }
  
  .modal-body {
    flex-direction: column;
  }
  
  .modal-image {
    width: 100%;
    margin-bottom: 20px;
  }

  .modal-image img {
    width: 100%;
    max-height: 400px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
  }
  
  .modal-details {
    padding: 20px 0 0 0;
  }

  .modal-content {
    max-height: 90vh;
    overflow-y: auto;
  }
}

@media (max-width: 480px) {
  .modal-image img {
    max-height: 350px;
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .modal-content {
    width: 95%;
    max-height: 85vh;
  }
}
