/* Modern Resin Calculator Styles */

.calculator-container div.type-item label {
  width: 100%;
}

/* Base styles and layout */
.calculator-container {
  background: linear-gradient(to bottom right, #fef7ed, #fef3c7);
  border-radius: 1.5rem;
  /* box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); */
  max-width: 80rem;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}

.calculator-container * {
  box-sizing: border-box;
}

.calculator-header {
  text-align: center;
  margin-bottom: 2rem;
}

.calculator-header h3 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.calculator-header p {
  color: #4b5563;
}

.calculator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .calculator-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.calculator-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.calculator-card {
  background-color: white;
  border-radius: 1rem;
  padding: 1.5rem;
  /* box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); */
}

.calculator-card h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 6px;
}

/* Type selection grid */
.type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.type-item {
  cursor: pointer;
}

.type-item input {
  display: none;
  width: 100%;
}

.type-option {
  background-color: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.75rem;
  text-align: center;
  transition: all 0.3s ease;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.type-option:hover {
  background-color: #f3f4f6;
  /* box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); */
}

.type-option.selected {
  border-color: #10b981;
  background-color: #f0fdf4;
}

.type-option img {
  width: 90px;
  height: 90px;
  margin: 0 auto 0.5rem auto;
  border-radius: 0.5rem;
  object-fit: cover;
}

.type-option span {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  line-height: 1.2;
  text-align: center;
}

.type-custom {
  grid-column: span 2;
}

.type-custom .type-option {
  min-height: 100px;
}

.type-custom img {
  width: 6rem;
  height: 4rem;
  object-fit: cover;
}

/* Input styles */
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.input-group label.red {
  color: #dc2626;
}

.input-group input {
  width: 100%;
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 2px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.input-group input:focus {
  outline: none;
  border-color: #3b82f6;
  /* box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); */
}

.input-with-unit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-with-unit input {
  flex: 1;
}

.input-with-unit span {
  color: #6b7280;
  font-size: 0.875rem;
}

.input-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hidden {
  display: none !important;
}

/* Results section */
.results-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.result-card {
  border-radius: 0.5rem;
  padding: 1rem;
  border: 1px solid;
}

.result-card.total {
  background: linear-gradient(to right, #f0fdf4, #ecfdf5);
  border-color: #bbf7d0;
}

.result-card.component-a {
  background: linear-gradient(to right, #eff6ff, #eef2ff);
  border-color: #bfdbfe;
}

.result-card.component-b {
  background: linear-gradient(to right, #faf5ff, #fdf2f8);
  border-color: #e9d5ff;
}

.result-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-label {
  font-size: 1.125rem;
  font-weight: 500;
  color: #374151;
}

.result-value {
  font-weight: 700;
}

.result-value.total {
  font-size: 1.5rem;
  color: #16a34a;
}

.result-value.component-a {
  font-size: 1.25rem;
  color: #2563eb;
}

.result-value.component-b {
  font-size: 1.25rem;
  color: #9333ea;
}

.result-unit {
  color: #6b7280;
  margin-left: 0.25rem;
}

/* Information boxes */
.info-box {
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.875rem;
}

.info-box.amber {
  background-color: #fef3c7;
  color: #92400e;
}

.info-box.blue {
  background-color: #dbeafe;
  border: 1px solid #93c5fd;
  color: #1e40af;
}

/* Product suggestions */
.product-suggestions {
  margin-top: 2rem;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-item {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
}


.product-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.product-image {
  width: 5rem;
  height: 5rem;
  border-radius: 0.5rem;
  object-fit: cover;
}

.product-details h5 {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.product-details p {
  font-size: 0.875rem;
  color: #4b5563;
  margin-bottom: 0.5rem;
}

.product-details a {
  color: #2563eb;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.product-details a:hover {
  color: #1d4ed8;
}

/* Advertisement section */
.ad-section {
  margin-top: 2rem;
  background: linear-gradient(to right, #fef3c7, #fed7aa);
  border: 2px dashed #fdba74;
  border-radius: 1rem;
  padding: 1.5rem;
}

.ad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.ad-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ad-badge {
  background-color: #f97316;
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-weight: 500;
}

.ad-subtitle {
  font-size: 0.875rem;
  color: #4b5563;
}

.ad-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.ad-content p {
  color: #4b5563;
  margin-bottom: 1rem;
}

.ad-button {
  display: inline-block;
  background-color: #f97316;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.ad-button:hover {
  background-color: #ea580c;
}

/* Product categories */
.categories-section {
  margin-top: 2rem;
}

.categories-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  text-align: center;
  margin-bottom: 2rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background-color: white;
  border-radius: 1rem;
  padding: 1.5rem;
  /* box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); */
  text-align: center;
}


.category-image {
  width: 8rem;
  height: 8rem;
  margin: 0 auto 1rem auto;
  border-radius: 0.5rem;
  object-fit: cover;
}

.category-card h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.category-card p {
  color: #4b5563;
  margin-bottom: 1rem;
}

.category-button {
  background-color: #3b82f6;
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.category-button:hover {
  background-color: #2563eb;
}

/* FAQ section */
.faq-section {
  margin-top: 2rem;
  background-color: white;
  border-radius: 1rem;
  padding: 1.5rem;
  /* box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); */
}

.faq-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  text-align: center;
  margin-bottom: 2rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

.faq-toggle {
  width: 100%;
  text-align: left;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.faq-toggle:hover {
  background-color: #f9fafb;
}

.faq-toggle:focus {
  outline: none;
}

.faq-question {
  font-weight: 500;
  color: #1f2937;
}

.faq-icon {
  color: #6b7280;
  font-size: 1.25rem;
}

.faq-content {
  padding: 1rem;
  padding-top: 0;
  color: #4b5563;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .calculator-container {
    padding: 0.5rem;
  }
  
  .calculator-grid {
    grid-template-columns: 1fr;
  }
  
  .type-grid {
    grid-template-columns: 1fr;
  }
  
  .input-grid {
    grid-template-columns: 1fr;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .calculator-header h3 {
    font-size: 1.875rem;
  }
}

/* Transitions and animations */
.type-option {
  transition: all 0.3s ease;
}

.type-option:hover {
  transform: translateY(-2px);
}

.calculator-card {
  /* transition: box-shadow 0.2s ease; */
}

.product-item:hover {
  transform: translateY(-2px);
}

/* Custom scrollbar */
.calculator-container::-webkit-scrollbar {
  width: 8px;
}

.calculator-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.calculator-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.calculator-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}
