/* ========================================
   PRODUCT MODALS
   ======================================== */

.product-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.product-modal.active {
  display: flex;
}

.product-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  cursor: pointer;
  animation: fadeIn 0.3s ease;
}

.product-modal__content {
  position: relative;
  background: white;
  border-radius: 25px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

@media (max-width: 768px) {
  .product-modal__content {
    max-height: 95vh;
    border-radius: 20px 20px 0 0;
    margin-top: auto;
  }
}

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Close Button */
.product-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  z-index: 10;
}

.product-modal__close:hover {
  background: #f8f9fa;
  transform: rotate(90deg);
}

.product-modal__close svg {
  stroke: #2c3e50;
}

/* Modal Header */
.product-modal__header {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 25px 25px 0 0;
}

@media (max-width: 768px) {
  .product-modal__header {
    height: 250px;
  }
}

.product-modal__header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-modal__badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.product-modal__badge--popular {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

/* Modal Body */
.product-modal__body {
  padding: 40px;
}

@media (max-width: 640px) {
  .product-modal__body {
    padding: 30px 20px;
  }
}

.product-modal__body h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 15px;
}

@media (max-width: 640px) {
  .product-modal__body h2 {
    font-size: 1.6rem;
  }
}

.product-modal__price {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 30px;
  display: inline-block;
}

.product-modal__description {
  color: #555;
  line-height: 1.8;
}

.product-modal__description h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2c3e50;
  margin-top: 25px;
  margin-bottom: 15px;
}

.product-modal__description p {
  margin-bottom: 20px;
}

.product-modal__description ul {
  list-style: none;
  padding: 0;
  margin-bottom: 25px;
}

.product-modal__description ul li {
  padding-left: 30px;
  position: relative;
  margin-bottom: 12px;
  color: #555;
}

.product-modal__description ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #667eea;
  font-weight: 700;
  font-size: 1.2rem;
}

/* Modal Footer */
.product-modal__footer {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #f0f0f0;
}

/* ========================================
   FORM MODAL STYLES
   ======================================== */

.product-modal--form .product-modal__content {
  max-width: 600px;
}

.form-header {
  text-align: center;
  margin-bottom: 35px;
}

.form-header__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.form-header__icon svg {
  stroke: white;
}

.form-header h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.form-header p {
  color: #7f8c8d;
  font-size: 1rem;
}

/* Form Styles */
.meditation-form {
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e1e8ed;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%232c3e50' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 45px;
}

.form-group--checkbox {
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #667eea;
}

.checkbox-label span {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-actions {
  margin-top: 30px;
}

/* Form Success State */
.form-success {
  text-align: center;
  padding: 40px 20px;
}

.form-success svg {
  stroke: #10b981;
  margin-bottom: 20px;
}

.form-success h3 {
  font-size: 1.8rem;
  color: #2c3e50;
  margin-bottom: 10px;
}

.form-success p {
  color: #7f8c8d;
  font-size: 1.05rem;
}

/* Hide form when success is shown */
.meditation-form.submitted {
  display: none;
}

.meditation-form.submitted + .form-success {
  display: block !important;
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */

.product-modal__content::-webkit-scrollbar {
  width: 8px;
}

.product-modal__content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.product-modal__content::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
}

.product-modal__content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

@keyframes modalSlideUp {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.product-modal:focus-within {
  outline: none;
}

.product-modal__close:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}
