.product-editor {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background-color: transparent;
  border-radius: 8px;
  position: relative;
}

/* Template buttons styles */
.template-buttons {
  display: flex;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  margin-bottom: 0;
  z-index: 2;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: auto;
  transform: none;
  height: 54px;
  position: relative;
  padding-left: 1rem;
}

.template-button {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: auto;
  min-width: 160px;
  max-width: 240px;
  padding: 0 0.8rem;
  height: 48px;
  background-color: #f5f5f5;
  color: #8F8E8E;
  border-radius: 8px 8px 0 0;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  margin: 0;
  position: relative;
  bottom: 0;
}

.template-thumbnail {
  height: 36px;
  width: 36px;
  object-fit: contain;
  margin-right: 8px;
  border-radius: 3px;
  flex-shrink: 0;
}

.template-button.selected {
  background-color: #D6D8F2;
  color: #4E4E4E;
  height: 54px;
  padding-top: 0;
  padding-left: 1.2rem;
  padding-right: 1.2rem;
  min-width: 180px;
  max-width: 280px;
  transform: translateY(-6px);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.15);
  z-index: 3;
  font-weight: bold;
  bottom: 0;
}

.template-name {
  font-size: 16px;
  font-weight: 700;
}

/* Main layout */
.main-editor-layout {
  display: flex;
  gap: 1rem;
  margin-top: -6px;
  position: relative;
  z-index: 1;
  padding-left: 0;
}

/* Editor container */
.editor-container {
  flex: 1;
  background-color: #f5f5f5;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0;
  position: relative;
  z-index: 1;
}

/* Canvas area */
.canvas-area {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #ffffff;
  border-radius: 4px;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

/* Mobile Bottom Toolbar Styles */
.mobile-bottom-toolbar {
  display: flex;
  background-color: #ffffff;
  border-top: 1px solid #e0e0e0;
  padding: 5px 10px;
  width: 100%;
  box-sizing: border-box;
  z-index: 5;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

body.has-preview-modal-open .mobile-bottom-toolbar {
  display: none;
}

/* Responsive layout */
@media (max-width: 480px) {
  .main-editor-layout {
    flex-direction: column;
  }

  .editor-container {
    padding: 0.5rem;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .editor-container.has-bottom-padding {
    padding-bottom: 85px;
  }

  .canvas-area {
    padding: 0.5rem;
  }

  .template-buttons {
    transform: none;
    margin-left: 0;
    margin-right: 0;
    max-width: none;
    padding: 0;
    height: 42px;
    justify-content: center;
    width: 100%;
  }

  .template-button {
    width: auto;
    padding: 0.4rem 0.6rem;
    font-size: 14px;
    flex-grow: 0;
    min-width: 80px;
    max-width: 120px;
    height: 36px;
    justify-content: center;
    transition: all 0.15s cubic-bezier(0.4, 0.0, 0.2, 1);
  }

  .template-button.selected {
    height: 42px;
    padding-top: 0;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    min-width: 90px;
    max-width: 140px;
  }

  .template-thumbnail {
    display: none;
  }

  .template-name {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
