:root {
  --brand: #d96041;
  --brand-weak: #f8f4e0;
  --line: #ddd;
  --muted: #777;
}

.page-phone-detail {
  padding-bottom: 80px;
  background: #fafafa;
  color: #222;
}

.page-phone-detail .wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
}

/* Ürün üst alanı */
.top {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.top > * {
  min-width: 0;
}

.gallery .main img {
  display: block;
  width: 100%;
  max-width: 300px;
  max-height: 330px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.thumbs img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
}

.info h1 {
  margin: 0 0 10px;
  font-size: 22px;
}

.info .meta {
  margin-bottom: 12px;
  color: var(--muted);
}

.pricebox {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
}

.score {
  width: 80px;
  height: 80px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: conic-gradient(
          var(--brand) calc(var(--score, 0) * 1%),
          var(--brand-weak) 0
  );
  font-size: 20px;
  font-weight: 700;
}

.score span {
  width: 60px;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
}

.score span::after {
  content: "puan";
  margin-top: 2px;
  color: #777;
  font-size: 11px;
  font-weight: 400;
}

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
}

.summary div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.summary strong {
  display: block;
  margin-bottom: 4px;
  color: #555;
  font-size: 12px;
}

/* Karşılaştırma alt barı */
.compare-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: #d3542e;
  color: #fff;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, .2);
}

.compare-title {
  margin-right: 12px;
  font-weight: 700;
}

.compare-items {
  display: flex;
  flex: 1;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
}

.compare-items img {
  width: 40px;
  height: 60px;
  flex: 0 0 auto;
  object-fit: contain;
  padding: 2px;
  border: 1px solid #fff;
  border-radius: 4px;
  background: #fff;
}

.compare-btn,
.compare-clear {
  border: 0;
  cursor: pointer;
}

.compare-bar .compare-btn,
.compare-clear {
  margin-left: 8px;
  padding: 6px 12px;
  border-radius: 4px;
}

.compare-bar .compare-btn {
  background: #fff;
  color: #d3542e;
  font-weight: 700;
}

.compare-clear {
  background: #333;
  color: #fff;
}

.info > .compare-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  background: transparent;
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

.compare-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #d3542e;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.info > .compare-btn.active {
  color: #2e7d32;
  font-weight: 600;
}

.info > .compare-btn.active .compare-icon {
  background: #2e7d32;
}

/* Fiyat ve SEO içerikleri: masaüstünde ikili */
.detail-commerce-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
  margin: 30px 0;
}

.detail-commerce-grid > .seo-content {
  min-width: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  box-sizing: border-box;
}

.detail-commerce-grid.no-offers {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seo-content {
  padding: 20px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
}

.seo-content h2,
.seo-content h3 {
  margin: 0 0 12px;
  color: #222;
}

.seo-content h2 {
  font-size: 18px;
}

.seo-content h3 {
  font-size: 16px;
}

.price-history-table {
  width: 100%;
  margin: 14px 0 0;
  border-collapse: collapse;
  font-size: 13px;
}

.price-history-table th,
.price-history-table td {
  padding: 8px 10px;
  border: 1px solid #eee;
}

.price-history-table th {
  background: #f7f7f7;
  text-align: left;
}

.price-history-desc {
  margin-bottom: 14px;
  color: #555;
  font-size: 14px;
}

/* Satıcı teklifleri */
.offer-section {
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
}

.offer-section h2 {
  margin: 0;
  padding: 14px 16px;
  background: var(--brand-weak);
}

.offer-list {
  display: flex;
  flex-direction: column;
}

.offer-card {
  display: none;
  grid-template-columns: 100px minmax(0, 1fr) 130px;
  grid-template-areas:
        "logo name price"
        "logo name action";
  column-gap: 14px;
  row-gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 14px 16px;
  border-top: 1px solid #eee;
  cursor: pointer;
}

.offer-card.is-visible {
  display: grid;
}

.offer-card:hover {
  background: #fafcff;
}

.offer-logo {
  grid-area: logo;
  min-width: 0;
}

.offer-logo img {
  display: block;
  max-width: 95px;
  max-height: 36px;
  object-fit: contain;
}

.offer-name {
  grid-area: name;
  min-width: 0;
}

.offer-name strong,
.offer-name span,
.offer-name em {
  display: block;
}

.offer-name strong {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.offer-name span {
  color: #666;
  font-size: 12px;
}

.offer-name em {
  margin-top: 5px;
  color: #2e7d32;
  font-size: 12px;
  font-style: normal;
}

.offer-price {
  grid-area: price;
  min-width: 0;
  text-align: right;
}

.offer-price strong {
  display: block;
  white-space: nowrap;
  color: var(--brand);
  font-size: 18px;
}

.offer-price span {
  display: block;
  margin-top: 4px;
  color: #666;
  font-size: 12px;
}

.offer-go {
  grid-area: action;
  text-align: right;
}

.offer-go a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
}

.offer-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid #eee;
  background: #fafafa;
}

.offer-pagination button {
  padding: 7px 12px;
  cursor: pointer;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
}

.offer-pagination button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.best-price-badge {
  display: inline-flex !important;
  width: max-content;
  margin: 6px 0 8px;
  padding: 4px 11px;
  border-radius: 999px;
  background: #2e7d32;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700;
}

/* Fiyat özeti */
.price-summary-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.price-summary-inline div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.price-summary-inline strong {
  display: block;
  margin-bottom: 5px;
  color: #666;
  font-size: 12px;
}

.price-summary-inline span {
  color: var(--brand);
  font-size: 15px;
  font-weight: 700;
}

.price-summary-inline .up {
  color: #c0392b;
}

.price-summary-inline .down {
  color: #2e7d32;
}

/* Teknik özellikler */
.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.specs section {
  min-width: 0;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.specs h2 {
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f1f1;
  font-size: 16px;
}

.specs table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.specs td {
  padding: 6px 8px;
  border-bottom: 1px solid #f7f7f7;
}

.specs td:first-child {
  width: 40%;
  color: #555;
}

.specs tr:nth-child(even) td {
  background: #fafafa;
}

@media (max-width: 900px) {
  .detail-commerce-grid,
  .detail-commerce-grid.no-offers,
  .specs {
    grid-template-columns: 1fr;
  }

  .offer-card {
    grid-template-columns: 90px minmax(0, 1fr) 125px;
  }
}

@media (max-width: 768px) {
  .top {
    grid-template-columns: 1fr;
  }

  .compare-bar {
    flex-wrap: wrap;
    gap: 6px;
  }

  .compare-items {
    order: 3;
    flex-basis: 100%;
  }
}

@media (max-width: 600px) {
  .page-phone-detail .wrap {
    padding: 12px;
  }

  .offer-card {
    grid-template-columns: 80px minmax(0, 1fr);
    grid-template-areas:
            "logo name"
            "price price"
            "action action";
  }

  .offer-price,
  .offer-go {
    text-align: left;
  }

  .price-summary-inline {
    grid-template-columns: 1fr;
  }
}
.detail-commerce-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px;
  margin: 30px 0;
  align-items: start;
}

.detail-commerce-grid > * {
  min-width: 0;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.price-analysis-card,
.price-summary-card {
  grid-column: 1;
}

.price-history,
.offer-section {
  grid-column: 2;
}

@media (max-width: 900px) {
  .detail-commerce-grid {
    grid-template-columns: 1fr;
  }

  .price-analysis-card,
  .price-summary-card,
  .price-history,
  .offer-section {
    grid-column: auto;
  }
}