:root {
  --primary-color: #333;
  --accent-color: #15f1e8;
  --light-gray: #f5f5f5;
  --dark-gray: #555;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--primary-color);
  background-color: white;
}

/* Preview container styles */
.preview-container {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background-color: var(--light-gray);
  background-size: cover;
  background-position: center;
  transition: background-image 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile-specific styles */
@media (max-width: 767px) {
  /* Fixed preview section for mobile only */
  .preview-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: white;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  }

  .preview-container {
    height: 250px; /* Reduced height for mobile */
    margin-bottom: 15px;
  }

  /* Spacer to prevent content from jumping when preview becomes fixed */
  .preview-spacer {
    height: 270px; /* Should match preview container height + padding */
    display: none; /* Hidden by default, shown when preview is fixed */
  }

  /* Content padding to account for fixed header */
  .content-padding {
    padding-top: 270px; /* Should match preview container height + padding */
    display: none; /* Hidden by default, shown when preview is fixed */
  }
}

.frame-container {
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  background-color: white;
  transition: all 0.3s ease;
  overflow: hidden; /* Prevent image overflow */
  bottom: 150px !important;
}

/* Tablet and mobile (max-width: 1024px) */
@media screen and (max-width: 1024px) {
  .frame-container {
    bottom: 45px !important;
  }
}

/* Adjust frame scaling based on screen size */
@media (min-width: 768px) {
  .frame-container {
    transform: scale(1.5);
  }
}

@media (max-width: 767px) {
  .frame-container {
    transform: scale(1.0); /* Reduced scale for mobile */
    margin-top: -20px; /* Move frame higher on mobile */
  }
}

.poster-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: move;
  z-index: 1;
}

.upload-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--dark-gray);
  font-size: 1.2rem;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  text-align: center;
}

.frame-options {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  padding: 15px 0;
  margin-bottom: 30px;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.frame-option {
  min-width: 100px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 10px;
  border-radius: 8px;
}

/* Smaller frame options on mobile */
@media (max-width: 767px) {
  .frame-option {
    min-width: 80px;
    padding: 8px;
  }

  .frame-options {
    margin-bottom: 20px;
  }
}

.frame-option.active {
  border-color: var(--accent-color);
  transform: scale(1.05);
}

.color-swatch {
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
}

/* Smaller swatches on mobile */
@media (max-width: 767px) {
  .color-swatch {
    width: 50px;
    height: 50px;
    margin-bottom: 8px;
  }
}

.frame-name {
  font-size: 0.9rem;
  text-align: center;
  font-weight: 700;
}

@media (max-width: 767px) {
  .frame-name {
    font-size: 0.8rem;
  }
}

.background-options {
  display: flex;
  overflow-x: auto;
  gap: 15px;
  padding: 15px 0;
  margin-bottom: 30px;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.bg-option {
  min-width: 100px;
  height: 100px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  background-size: cover;
  background-position: center;
}

/* Smaller background options on mobile */
@media (max-width: 767px) {
  .bg-option {
    min-width: 80px;
    height: 80px;
  }

  .background-options {
    margin-bottom: 20px;
    gap: 10px;
  }
}

.bg-option.active {
  border-color: var(--accent-color);
  transform: scale(1.05);
}

.product-info {
  padding: 20px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.product-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.product-price {
  font-size: 1.8rem;
  color: var(--accent-color);
  font-weight: 700;
  margin-bottom: 20px;
}

.product-description {
  color: var(--dark-gray);
  margin-bottom: 30px;
  line-height: 1.6;
}

/* Adjust text sizes on mobile */
@media (max-width: 767px) {
  .product-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  .product-price {
    font-size: 1.6rem;
    margin-bottom: 15px;
  }

  .product-description {
    margin-bottom: 20px;
    font-size: 0.95rem;
  }
}

.btn-primary {
  background-color: var(--accent-color);
  border: none;
  padding: 12px 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: black;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-outline {
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
  padding: 12px 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  background-color: transparent;
}

.btn-outline:hover {
  background-color: var(--accent-color);
  color: white;
}

.file-input {
  display: none;
}

.upload-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--light-gray);
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.2s ease;
  width: 100%;
  text-align: center;
}

.upload-btn:hover {
  background-color: black !important;
}

.specifications {
  margin-top: 30px;
}

.specs-title {
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.specs-list {
  padding-left: 20px;
}

.specs-list li {
  margin-bottom: 0;
  color: var(--dark-gray);
}

/* Adjust specs on mobile */
@media (max-width: 767px) {
  .specifications {
    margin-top: 20px;
  }

  .specs-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }

  .specs-list li {
    margin-bottom: 6px;
    font-size: 0.9rem;
  }
}

/* Updated size options for 3-column grid with new design */
.size-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 30px;
}

/* 2-column grid on mobile */
@media (max-width: 576px) {
  .size-options {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 20px;
  }
}

.size-option {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: white;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Smaller padding on mobile */
@media (max-width: 767px) {
  .size-option {
    padding: 10px 8px;
  }
}

.size-option.active {
  border-color: #15f1e8;
  border-width: 2px;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.size-dimension {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.size-category {
  font-size: 0.9rem;
  color: #15f1e8;
  font-weight: 500;
}

/* Smaller text on mobile */
@media (max-width: 767px) {
  .size-dimension {
    font-size: 1rem;
    margin-bottom: 3px;
  }

  .size-category {
    font-size: 0.8rem;
  }
}

.landscape-label {
  font-weight: normal;
  color: var(--dark-gray);
}

.image-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(255, 255, 255, 0.8);
  padding: 10px 15px;
  border-radius: 20px;
  display: flex;
  gap: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 5;
}

.control-btn {
  background: none;
  border: none;
  color: var(--dark-gray);
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.control-btn:hover {
  color: var(--accent-color);
}

.size-slider-container {
  position: relative;
  margin-top: 15px;
  padding: 0 10px;
  margin-bottom: 20px;
}

.size-slider {
  width: 100%;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: #ddd;
  outline: none;
  border-radius: 5px;
}

.size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
}

.size-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  border: none;
}

.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #4caf50;
  color: white;
  padding: 15px 20px;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.toast-notification.show {
  opacity: 1;
}

#designCanvas {
  display: none;
}

/* Button container for inline buttons */
.button-container {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

/* Stack buttons on mobile */
@media (max-width: 576px) {
  .button-container {
    flex-direction: column;
  }
  .button-container .btn {
    width: 100%;
  }
}

/* Add more meaning section */
.add-meaning {
  margin-top: 20px;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.add-meaning-title {
  color: #000000;
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 1rem;
}

.add-meaning-subtitle {
  color: #000000;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

/* Add styles for the mounting options section */
.mounting-options {
  margin-top: 20px;
  margin-bottom: 20px;
}

.mounting-options h5 {
  font-weight: 600;
  margin-bottom: 5px;
}

.mounting-options p {
  color: var(--dark-gray);
  font-size: 0.9rem;
}

.mounting-options .border-danger {
  border-color: #000000 !important;
  border-width: 2px !important;
}

.form-check-input:checked {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.form-check-label {
  font-size: 0.9rem;
  color: var(--dark-gray);
}

.form-check-label strong {
  color: var(--primary-color);
  font-weight: 600;
}

@media (max-width: 767px) {
  .mounting-options p {
    font-size: 0.85rem;
  }

  .form-check-label {
    font-size: 0.85rem;
  }
}
