/* Aggiungi questi stili al tuo grid.css esistente */

/* Mobile Panel Toggle Button */
.mobile-panel-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #3b0f62, #ec9a34);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  z-index: 1001;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-panel-toggle:active {
  transform: translateX(-50%) scale(0.95);
}

.mobile-panel-toggle .icon {
  display: inline-block;
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.mobile-panel-toggle.open .icon {
  transform: rotate(180deg);
}

/* Mobile Panel Container */
.mobile-panel-wrapper {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 20px 20px 0 0;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(100%);
  max-height: 70vh;
  overflow: hidden;
}

.mobile-panel-wrapper.open {
  transform: translateY(0);
}

/* Panel Header con handle per drag */
.mobile-panel-header {
  padding: 12px;
  text-align: center;
  cursor: grab;
  user-select: none;
}

.mobile-panel-header:active {
  cursor: grabbing;
}

.panel-handle {
  width: 40px;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  margin: 0 auto 8px;
}

.panel-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

/* Panel Content */
.mobile-panel-content {
  padding: 0 20px 20px;
  overflow-y: auto;
  max-height: calc(70vh - 60px);
}

/* Form mobile ottimizzato */
.mobile-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-form label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  display: block;
}

.mobile-form input,
.mobile-form select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e5e5;
  border-radius: 12px;
  font-size: 16px; /* Previene zoom su iOS */
  transition: border-color 0.3s ease;
}

.mobile-form input:focus,
.mobile-form select:focus {
  outline: none;
  border-color: #3b0f62;
}

/* Bottoni mobile */
.mobile-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.mobile-buttons button {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-choose-image {
  background: #f0f0f0;
  color: #333;
}

.btn-buy {
  background: linear-gradient(135deg, #3b0f62, #ec9a34);
  color: white;
}

/* Prezzo display */
.mobile-price {
  text-align: center;
  padding: 16px;
  background: #f8f8f8;
  border-radius: 12px;
  margin-top: 16px;
}

.mobile-price .label {
  font-size: 14px;
  color: #666;
}

.mobile-price .amount {
  font-size: 28px;
  font-weight: 700;
  color: #3b0f62;
}

/* Media query per mobile */
@media (max-width: 768px) {
  /* Nascondi toolbar desktop */
  .im-toolbar {
    display: none !important;
  }
  
  /* Mostra elementi mobile */
  .mobile-panel-toggle,
  .mobile-panel-wrapper {
    display: block;
  }
  
  /* Adatta canvas */
  .im-canvas-wrap {
    top: 150px;
    bottom: 80px; /* Spazio per toggle button */
    border-radius:0!important;
  }
  
  /* Legend più piccola su mobile */
  .im-legend {
    font-size: 11px;
    padding: 6px 12px;
    bottom: 60px; /* Sopra il toggle button */
  }
}

/* Animazione smooth per apertura panel */
@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Overlay scuro quando panel è aperto */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.show {
  display: block;
  opacity: 1;
}

/* Previeni scroll del body quando panel è aperto */
body.panel-open {
  overflow: hidden;
}

/* Stili per stato collapsed del panel */
.mobile-panel-wrapper.collapsed {
  transform: translateY(calc(100% - 60px));
}

.mobile-panel-wrapper.collapsed .mobile-panel-content {
  display: none;
}

/* Mini preview quando collapsed */
.panel-preview {
  display: none;
  padding: 8px 20px;
  font-size: 14px;
  color: #666;
}

.mobile-panel-wrapper.collapsed .panel-preview {
  display: block;
}





.hero-section {
    padding: 2rem 2rem 4rem;
    background: linear-gradient(to bottom, var(--light) 0%, var(--white) 100%);
    text-align: center;
    margin-top: -60%;
}