* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 30px 20px;
  background: #0b1120;
  color: #e5e7eb;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body > * {
  width: 100%;
  max-width: 1400px;
}

header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin-bottom: 35px;
  padding: 20px;
  background: #111827;
  border-bottom: 1px solid #1f2937;
  border-radius: 8px;
}

.logo-title {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid #1f2937;
}

.logo {
  height: 48px;
}

header h1 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 600;
  text-align: left;
}

.header-controls {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
}

#search {
  width: 100%;
  grid-column: 1 / -1;
}

.header-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

input,
select,
button {
  padding: 10px 14px;
  border: 1px solid #1f2937;
  border-radius: 6px;
  background: #111827;
  color: #e5e7eb;
  font-size: 0.95rem;
  outline: none;
}

input::placeholder {
  color: #6b7280;
}

input:focus,
select:focus,
button:focus {
  border-color: #334155;
  background: #0f172a;
}

button {
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

select {
  min-width: 0;
  width: 100%;
}

#loader {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
  margin-bottom: 15px;
  color: #9ca3af;
  font-size: 1rem;
}

#itemCount {
  margin-bottom: 15px;
  color: #6b7280;
  font-size: 0.9rem;
}

#itemsContainer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.item-card-list {
  padding: 15px;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  align-items: start;
}

.item-card-list-image {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 6px;
}

.item-card-list-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-card-list-name {
  font-size: 1rem;
  font-weight: 600;
  color: #e5e7eb;
  line-height: 1.3;
}

.item-card-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
}

.item-card-list-id {
  padding: 3px 8px;
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 4px;
  color: #9ca3af;
}

.item-card-list-category {
  padding: 3px 8px;
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 4px;
  color: #60a5fa;
}

.item-card-list-trend {
  padding: 3px 8px;
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 4px;
  font-weight: 500;
}

.item-card-list-trend.rising {
  color: #4ade80;
}

.item-card-list-trend.falling {
  color: #f87171;
}

.item-card-list-trend.stable {
  color: #facc15;
}

.item-card-list-trend.unstable {
  color: #fb923c;
}

.item-card-list-prices {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
}

.currency {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.currency-icon {
  width: 1em;
  height: 1em;
  object-fit: contain;
}

.rising {
  color: #4ade80;
  font-weight: 500;
}

.falling {
  color: #f87171;
  font-weight: 500;
}

.stable {
  color: #facc15;
  font-weight: 500;
}

.unstable {
  color: #fb923c;
  font-weight: 500;
}

#tradeCalculator {
  margin-top: 40px;
}

.calculator-title {
  text-align: center;
  margin-bottom: 30px;
}

.calculator-title h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #e5e7eb;
  letter-spacing: 1px;
}

.calculator-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.calc-copy-btn {
  padding: 16px;
  border: 1px solid #1f2937;
  border-radius: 6px;
  background: #111827;
  color: #e5e7eb;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  line-height: 1.6;
  transition: all 0.2s;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calc-copy-items {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calc-copy-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e5e7eb;
}

.calculator-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.action-btn {
  padding: 12px;
  border: 1px solid #1f2937;
  border-radius: 6px;
  background: #111827;
  color: #e5e7eb;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.share-trade-btn {
  width: 100%;
  padding: 14px;
  margin-bottom: 20px;
  border: 1px solid #1f2937;
  border-radius: 6px;
  background: #111827;
  color: #e5e7eb;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.share-trade-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#calculatorContent {
  background: #0b1120;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #1f2937;
}

.export-header {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid #1f2937;
}

.export-logo {
  height: 40px;
}

.export-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #e5e7eb;
}

.export-watermark {
  display: none;
  padding: 12px;
  margin-top: 15px;
  text-align: center;
  background: #0f172a;
  border-top: 1px solid #1f2937;
  border-radius: 0 0 6px 6px;
}

.watermark-text {
  font-size: 0.85rem;
  color: #9ca3af;
}

.difference-bar {
  margin-bottom: 20px;
  padding: 16px 20px;
  border: 1px solid #1f2937;
  border-radius: 8px;
  background: #111827;
  text-align: center;
}

.difference-content {
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.calculator-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.offer-column {
  border: 1px solid #1f2937;
  border-radius: 8px;
  background: #111827;
  padding: 16px;
  transition: all 0.2s;
}

.offer-column.drag-over {
  border-color: #60a5fa;
  background: #0f1a2e;
}

.offer-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #1f2937;
}

.offer-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 10px;
  text-align: center;
}

.offer-totals {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 0.9rem;
  font-weight: 500;
}

.items-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  min-height: 60px;
}

.drop-zone {
  border: 2px dashed transparent;
  border-radius: 6px;
  padding: 8px;
  margin: -8px;
  transition: all 0.2s;
}

.drop-zone.drag-over {
  border-color: #60a5fa;
  background: rgba(96, 165, 250, 0.05);
}

.item-card {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #1f2937;
  border-radius: 6px;
  background: #0f172a;
  transition: all 0.2s;
}

.item-card-image {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.item-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.item-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-card-prices {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
  color: #9ca3af;
}

.item-card-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}

.item-card-qty {
  width: 50px;
  padding: 5px 8px;
  text-align: center;
  border: 1px solid #1f2937;
  border-radius: 4px;
  background: #111827;
  color: #e5e7eb;
  font-size: 0.85rem;
}

.item-card-qty:focus {
  border-color: #334155;
  background: #0f172a;
}

.item-card-remove {
  padding: 5px 10px;
  background: #111827;
  border: 1px solid #991b1b;
  border-radius: 4px;
  color: #fca5a5;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.add-item-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 1px dashed #374151;
  border-radius: 6px;
  background: #0f172a;
  cursor: pointer;
  transition: all 0.2s;
}

.add-icon {
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 6px;
  color: #9ca3af;
}

.add-text {
  font-size: 0.8rem;
  color: #6b7280;
}

.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 17, 32, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.modal-close,
.modal-close-history,
.modal-close-quick {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.8rem;
  color: #6b7280;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
  z-index: 10;
}

.modal-content h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: #e5e7eb;
}

.modal-content input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #1f2937;
  border-radius: 6px;
  background: #0f172a;
  color: #e5e7eb;
  font-size: 0.95rem;
}

.modal-content input:focus {
  border-color: #334155;
  background: #111827;
}

.modal-results {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-result-item {
  display: grid;
  grid-template-columns: 50px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #1f2937;
  border-radius: 6px;
  background: #0f172a;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-result-image {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.modal-watermelon {
  display: flex;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid #1f2937;
}

.modal-watermelon input {
  flex: 1;
}

.modal-watermelon button {
  padding: 10px 14px;
  border: 1px solid #1f2937;
  border-radius: 6px;
  background: #111827;
  color: #e5e7eb;
  font-size: 0.95rem;
  cursor: pointer;
}

.recommendations {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid #1f2937;
  border-radius: 8px;
  background: #111827;
}

.recommendations h3 {
  margin: 0 0 15px 0;
  font-size: 1.1rem;
  color: #e5e7eb;
}

#recommendationsContent {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.recommendation-item {
  padding: 12px;
  border: 1px solid #1f2937;
  border-radius: 6px;
  background: #0f172a;
  cursor: grab;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.recommendation-item:active {
  cursor: grabbing;
  opacity: 0.5;
}

.recommendation-item.dragging {
  opacity: 0.5;
}

.recommendation-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.recommendation-info {
  flex: 1;
}

.recommendation-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #e5e7eb;
  margin-bottom: 4px;
}

.recommendation-price {
  font-size: 0.8rem;
  color: #9ca3af;
}

.history-list {
  max-height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  padding: 15px;
  border: 1px solid #1f2937;
  border-radius: 6px;
  background: #0f172a;
  cursor: pointer;
  transition: all 0.2s;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.history-date {
  font-size: 0.85rem;
  color: #9ca3af;
}

.history-delete {
  padding: 4px 8px;
  border: 1px solid #991b1b;
  border-radius: 4px;
  background: #111827;
  color: #fca5a5;
  font-size: 0.8rem;
  cursor: pointer;
}

.history-trade {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
}

.history-side {
  font-size: 0.85rem;
}

.history-side strong {
  display: block;
  margin-bottom: 5px;
  color: #e5e7eb;
}

.history-items {
  color: #9ca3af;
}

.history-arrow {
  font-size: 1.2rem;
  color: #6b7280;
}

.preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 17, 32, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.preview-modal-content {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 30px;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
}

.preview-modal-content h3 {
  margin: 0 0 20px 0;
  color: #e5e7eb;
  font-size: 1.4rem;
  text-align: center;
}

.preview-image-container {
  margin: 20px 0;
  border: 1px solid #1f2937;
  border-radius: 8px;
  overflow: hidden;
  background: #0b1120;
}

.preview-image-container img {
  width: 100%;
  height: auto;
  display: block;
}

.preview-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.preview-btn {
  padding: 12px 24px;
  border: 1px solid #1f2937;
  border-radius: 6px;
  background: #111827;
  color: #e5e7eb;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
}

.quick-view-modal {
  max-width: 1000px;
  max-height: 90vh;
}

.quick-view-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 30px;
  margin-bottom: 30px;
}

.quick-view-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 30px;
  min-height: 300px;
}

.quick-view-image img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.quick-view-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quick-view-details h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #e5e7eb;
  line-height: 1.2;
}

.quick-view-meta {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.quick-view-id {
  padding: 6px 12px;
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #9ca3af;
}

.quick-view-category {
  padding: 6px 12px;
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #60a5fa;
}

.quick-view-trend {
  padding: 6px 12px;
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.quick-view-trend.rising {
  color: #4ade80;
}

.quick-view-trend.falling {
  color: #f87171;
}

.quick-view-trend.stable {
  color: #facc15;
}

.quick-view-trend.unstable {
  color: #fb923c;
}

.quick-view-prices {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 8px;
  flex-wrap: wrap;
}

.quick-view-price-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #e5e7eb;
}

.currency-icon-large {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.quick-view-description {
  padding: 20px;
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 8px;
}

.quick-view-description h3 {
  margin: 0 0 10px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.5px;
}

.quick-view-description p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e5e7eb;
}

.quick-view-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quick-view-btn {
  padding: 14px 20px;
  border: 1px solid #1f2937;
  border-radius: 6px;
  background: #111827;
  color: #e5e7eb;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-view-similar {
  padding-top: 30px;
  border-top: 1px solid #1f2937;
}

.quick-view-similar h3 {
  margin: 0 0 20px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #e5e7eb;
}

.similar-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.similar-item-card {
  padding: 12px;
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.similar-item-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.similar-item-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: #e5e7eb;
}

.similar-item-price {
  font-size: 0.75rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 4px;
}

.similar-item-price img {
  width: 14px;
  height: 14px;
}

footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #1f2937;
  color: #6b7280;
  font-size: 0.85rem;
  text-align: center;
}

footer a {
  color: #60a5fa;
  text-decoration: none;
}

@media (hover: hover) {
  button:hover {
    background: #0f172a;
    border-color: #334155;
  }

  .calc-copy-btn:hover {
    background: #0f172a;
    border-color: #334155;
  }

  .action-btn:hover {
    background: #0f172a;
    border-color: #334155;
  }

  .share-trade-btn:hover {
    background: #0f172a;
    border-color: #334155;
  }

  .item-card-list:hover {
    background: #0f172a;
    border-color: #334155;
  }

  .item-card:hover {
    background: #1a1f2e;
    border-color: #374151;
  }

  .item-card-remove:hover {
    background: #7f1d1d;
    border-color: #b91c1c;
  }

  .add-item-box:hover {
    border-color: #4b5563;
    background: #1a1f2e;
  }

  .modal-close:hover,
  .modal-close-history:hover,
  .modal-close-quick:hover {
    color: #e5e7eb;
  }

  .modal-result-item:hover {
    background: #1a1f2e;
    border-color: #374151;
  }

  .modal-watermelon button:hover {
    background: #0f172a;
    border-color: #334155;
  }

  .recommendation-item:hover {
    background: #1a1f2e;
    border-color: #60a5fa;
    transform: translateY(-2px);
  }

  .history-item:hover {
    background: #1a1f2e;
    border-color: #60a5fa;
  }

  .history-delete:hover {
    background: #7f1d1d;
  }

  .preview-btn:hover {
    background: #0f172a;
    border-color: #334155;
  }

  .quick-view-btn:hover {
    background: #0f172a;
    border-color: #334155;
  }

  .similar-item-card:hover {
    background: #1a1f2e;
    border-color: #60a5fa;
    transform: translateY(-2px);
  }

  footer a:hover {
    text-decoration: underline;
  }
}

@media (max-width: 1440px) {
  body > * {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  header {
    padding: 15px;
  }

  .logo {
    height: 40px;
  }

  header h1 {
    font-size: 1.2rem;
  }

  #itemsContainer {
    grid-template-columns: 1fr;
  }

  .calculator-title h2 {
    font-size: 1.5rem;
  }

  .calculator-header {
    grid-template-columns: 1fr;
  }

  .calc-copy-btn {
    min-height: 70px;
    padding: 12px;
  }

  .calculator-actions {
    grid-template-columns: 1fr 1fr;
  }

  .action-btn {
    padding: 10px;
    font-size: 0.85rem;
  }

  .calculator-body {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .offer-column {
    padding: 12px;
  }

  .offer-title {
    font-size: 1rem;
  }

  .offer-totals {
    font-size: 0.85rem;
    gap: 12px;
  }

  .item-card {
    grid-template-columns: 45px 1fr;
    gap: 8px;
  }

  .item-card-image {
    width: 45px;
    height: 45px;
  }

  .item-card-name {
    font-size: 0.85rem;
  }

  .item-card-prices {
    font-size: 0.7rem;
    gap: 6px;
  }

  .item-card-controls {
    grid-column: 1 / -1;
    margin-top: 6px;
    justify-content: flex-end;
  }

  .item-card-qty {
    width: 45px;
    padding: 4px 6px;
    font-size: 0.8rem;
  }

  .item-card-remove {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .add-item-box {
    padding: 16px;
  }

  .add-icon {
    font-size: 1.5rem;
  }

  .add-text {
    font-size: 0.75rem;
  }

  #recommendationsContent {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 20px;
    max-height: 90vh;
  }

  .preview-modal {
    padding: 10px;
  }

  .preview-modal-content {
    padding: 20px;
  }

  .preview-buttons {
    flex-direction: column;
  }

  .preview-btn {
    width: 100%;
  }

  .quick-view-content {
    grid-template-columns: 1fr;
  }

  .quick-view-image {
    min-height: 200px;
    padding: 20px;
  }

  .quick-view-image img {
    max-height: 250px;
  }

  .quick-view-details h2 {
    font-size: 1.5rem;
  }

  .quick-view-prices {
    flex-direction: column;
    gap: 12px;
  }

  .quick-view-actions {
    grid-template-columns: 1fr;
  }

  .similar-items-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  header h1 {
    font-size: 1rem;
  }

  .calculator-title h2 {
    font-size: 1.2rem;
  }

  .calculator-actions {
    grid-template-columns: 1fr;
  }

  .action-btn {
    font-size: 0.8rem;
    padding: 8px;
  }

  .modal-content {
    padding: 15px;
  }

  .modal-content h3 {
    font-size: 1.2rem;
  }

  .quick-view-details h2 {
    font-size: 1.2rem;
  }

  .similar-items-grid {
    grid-template-columns: 1fr 1fr;
  }
}
