/* Ürün sayfası düzeni, paylaş/karşılaştır, değerlendirmeler (views/product.php, configurator.php, _product.php) */
:root { --pd-line: #e3e6ed; --pd-muted: #6b7280; --pd-soft: #f5f7fa; --pd-ok: #1f9d55; --pd-star: #f5a623; }

/* ---------- Bilgi kolonu ---------- */
.pd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--pd-muted); margin: 4px 0 12px; }
.pd-meta a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pd-meta b { color: #333; font-weight: 600; }
.pd-cond { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--pd-soft); color: #333; }
.pd-cond.refurb { background: #eaf1ff; color: var(--bs-primary); }
.pd-warranty { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; background: #e8f6ee; color: #146c43; }
.pd-rating { display: inline-flex; align-items: center; gap: 6px; color: #333 !important; text-decoration: none !important; }
.pd-rating small { color: var(--pd-muted); }
.pd-short { color: #4b5563; font-size: 15px; line-height: 1.55; margin: 0 0 14px; max-width: 640px; }
.product-detail .price-info .prices .salePrice .pd-tax { font-size: 14px; line-height: 1; font-weight: 600; color: var(--pd-muted); margin-left: 6px; white-space: nowrap; }
.pd-price-note { font-size: 13px; color: var(--pd-muted); margin: -4px 0 12px; }
.pd-price-note b { color: #333; }
.pd-price-note a { font-weight: 600; }
.pd-specs { list-style: none; margin: 0 0 16px; padding: 12px 0; border-top: 1px solid var(--pd-line); border-bottom: 1px solid var(--pd-line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px; max-width: 560px; }
.pd-specs li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 2px 0; }
.pd-specs li span { color: var(--pd-muted); }
.pd-specs li b { font-weight: 600; text-align: right; }
.pd-specs-more { font-size: 13px; grid-column: 1 / -1; }
.pd-stockline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 14px; margin: 14px 0 0; }
.pd-stockline .in { color: var(--pd-ok); font-weight: 600; }
.pd-stockline .out { color: var(--bs-danger); font-weight: 600; }

/* ---------- Favori / Karşılaştır / Paylaş ---------- */
.pd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; }
.pd-action { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--pd-line); border-radius: 8px; background: #fff; color: #333; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s, background-color .15s; }
.pd-action:hover { border-color: #b8c2d6; }
.pd-action svg { width: 18px; height: 18px; }
.pd-action.is-on { border-color: var(--bs-primary); color: var(--bs-primary); background: #f2f6ff; }
.pd-share { position: relative; }
.pd-share-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 200px; background: #fff; border: 1px solid var(--pd-line); border-radius: 8px; box-shadow: 0 10px 30px rgba(16, 24, 40, .12); padding: 6px; }
.pd-share-menu a, .pd-share-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 6px; font-size: 14px; color: #333; text-decoration: none; }
.pd-share-menu a:hover, .pd-share-menu button:hover, .pd-share-menu a:focus, .pd-share-menu button:focus { background: var(--pd-soft); outline: none; }
.pd-share-menu[hidden] { display: none; }

/* Ürün kartı: karşılaştır düğmesi */
.product { position: relative; }
.p-compare { position: absolute; z-index: 3; top: 8px; right: 8px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--pd-line); border-radius: 50%; background: rgba(255, 255, 255, .92); color: #555; cursor: pointer; opacity: .85; transition: opacity .15s, color .15s, border-color .15s; }
.p-compare svg { width: 16px; height: 16px; }
.p-compare:hover, .p-compare.is-on { opacity: 1; color: var(--bs-primary); border-color: var(--bs-primary); }

/* Alt karşılaştırma çubuğu */
.cmp-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: #fff; border-top: 1px solid var(--pd-line); box-shadow: 0 -6px 20px rgba(16, 24, 40, .1); padding: 10px 0; }
.cmp-bar[hidden] { display: none; }
.cmp-bar .container { display: flex; align-items: center; gap: 16px; }
.cmp-bar ul { flex: 1 1 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; }
.cmp-bar li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 6px; border: 1px solid var(--pd-line); border-radius: 8px; font-size: 12px; }
.cmp-bar li img { flex: 0 0 40px; width: 40px; height: 40px; object-fit: contain; }
.cmp-bar li span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-bar li button { flex: 0 0 auto; border: 0; background: none; font-size: 18px; line-height: 1; color: #888; }
.cmp-bar li.empty { border-style: dashed; color: #aaa; justify-content: center; min-height: 50px; }
.cmp-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.cmp-hint { font-size: 12px; color: var(--pd-muted); }

/* Sepete ekle / WhatsApp / stok alarmı: miktar seçiciyle aynı köşe */
.product-detail .action-info .cart-box .btn, .product-detail .button-info .btn { border-radius: 8px; }
.product-detail .button-info .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.product-detail .button-info .btn svg { margin-right: 0; flex: 0 0 auto; }

/* ---------- Miktar seçici (− 1 +) : ürün sayfası ve sepet ---------- */
.qty-stepper { display: flex; align-items: stretch; width: 100%; height: 44px; border: 1px solid #dfe3ea; border-radius: 8px; background: #fff; overflow: hidden; }
.qty-stepper button { flex: 0 0 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; font-size: 22px; font-weight: 300; line-height: 1; color: #333; cursor: pointer; transition: background-color .15s, color .15s; }
.qty-stepper button:first-child { border-right: 1px solid #dfe3ea; }
.qty-stepper button:last-child { border-left: 1px solid #dfe3ea; }
.qty-stepper button:hover:not(:disabled) { background: var(--pd-soft); }
.qty-stepper button:disabled { color: #c3c8d1; cursor: default; }
.qty-stepper input { flex: 1 1 auto; width: 100%; min-width: 0; min-height: 0; height: auto; padding: 0; border: 0; border-radius: 0; text-align: center; font-size: 16px; font-weight: 600; color: #222; background: transparent; -moz-appearance: textfield; appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper input:focus { outline: none; }
.qty-stepper:focus-within { border-color: var(--bs-primary); }
.qty-stepper-sm { height: 36px; }
.qty-stepper-sm button { flex-basis: 34px; font-size: 19px; }
.qty-stepper-sm input { font-size: 14px; }

/* ---------- Sabit WhatsApp butonu (canlı sohbet yerine) ---------- */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 1040; width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #25d366; box-shadow: 0 6px 18px rgba(0, 0, 0, .22); transition: transform .15s, bottom .2s; }
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; }
body.has-cmp-bar .wa-float { bottom: 96px; }
@media (max-width: 575px) { .wa-float { right: 14px; bottom: 14px; width: 52px; height: 52px; } body.has-cmp-bar .wa-float { bottom: 150px; } }

/* ---------- Sekmeler ---------- */
.pd-spec-table { width: 100%; max-width: 820px; border-collapse: collapse; font-size: 14px; }
.pd-spec-table th, .pd-spec-table td { padding: 10px 12px; border-bottom: 1px solid #eef0f3; text-align: left; vertical-align: top; }
.pd-spec-table th { width: 40%; color: var(--pd-muted); font-weight: 500; }
.pd-spec-table tr:nth-child(odd) td, .pd-spec-table tr:nth-child(odd) th { background: #fafbfc; }
.pd-policies section + section { margin-top: 22px; }
.pd-inst-lead { font-size: 14px; color: #4b5563; margin: 0 0 16px; }
.pd-inst-lead b { color: #222; }
.pd-inst-lead a { font-weight: 600; white-space: nowrap; }
.pd-inst { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pd-inst-card { border: 1px solid var(--pd-line); border-radius: 10px; background: #fff; overflow: hidden; }
.pd-inst-head { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 64px; padding: 10px 12px; border-bottom: 1px solid var(--pd-line); background: var(--pd-soft); }
.pd-inst-head img { height: 22px; width: auto; max-width: 120px; object-fit: contain; object-position: left center; }
.pd-inst-head small { font-size: 11px; line-height: 1.3; color: var(--pd-muted); }
.pd-inst-card table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pd-inst-card th, .pd-inst-card td { padding: 7px 10px; border-bottom: 1px solid #eef0f3; text-align: right; white-space: nowrap; }
.pd-inst-card th:first-child, .pd-inst-card td:first-child { text-align: left; }
.pd-inst-card th { font-size: 12px; font-weight: 600; color: var(--pd-muted); }
.pd-inst-card tr:last-child td { border-bottom: 0; }

/* ---------- Değerlendirmeler ---------- */
.rv-stars { display: inline-flex; gap: 1px; vertical-align: -2px; }
.rv-stars i { position: relative; display: inline-block; width: 14px; height: 14px; background: #d7dbe2; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3 6.9 7.5.7-5.7 5 1.7 7.4L12 18.3 5.5 22l1.7-7.4-5.7-5 7.5-.7z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3 6.9 7.5.7-5.7 5 1.7 7.4L12 18.3 5.5 22l1.7-7.4-5.7-5 7.5-.7z'/%3E%3C/svg%3E") center/contain no-repeat; }
.rv-stars i::before { content: ""; position: absolute; inset: 0; width: var(--fill, 0%); background: var(--pd-star); }
.rv-stars-lg i { width: 20px; height: 20px; }
.rv-summary { display: grid; grid-template-columns: 180px minmax(0, 1fr) 260px; gap: 24px; align-items: center; padding: 18px; border: 1px solid var(--pd-line); border-radius: 10px; background: #fff; margin-bottom: 18px; }
.rv-score { text-align: center; }
.rv-score b { font-size: 40px; line-height: 1; }
.rv-score small { font-size: 16px; color: var(--pd-muted); margin-left: 2px; }
.rv-score span { display: block; font-size: 13px; color: var(--pd-muted); margin-top: 6px; }
.rv-dist-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 28px; gap: 8px; align-items: center; font-size: 13px; padding: 2px 0; }
.rv-bar { height: 8px; border-radius: 4px; background: #eef0f3; overflow: hidden; }
.rv-bar i { display: block; height: 100%; background: var(--pd-star); }
.rv-cta small { display: block; font-size: 12px; color: var(--pd-muted); margin-top: 8px; line-height: 1.4; }
.rv-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid #eef0f3; }
.rv-avatar { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: var(--pd-soft); color: #555; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.rv-body { flex: 1 1 auto; min-width: 0; }
.rv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; color: var(--pd-muted); }
.rv-meta b { color: #333; }
.rv-verified { color: var(--pd-ok); font-weight: 600; }
.rv-body p { margin: 6px 0 0 !important; color: #333; }
.rv-images { display: flex; gap: 8px; margin-top: 8px; }
.rv-images img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--pd-line); }
.rv-reply { margin-top: 10px; padding: 10px 12px; background: var(--pd-soft); border-radius: 8px; font-size: 14px; }
.rv-empty { padding: 18px; text-align: center; color: var(--pd-muted); border: 1px dashed #c9ced8; border-radius: 10px; }

@media (max-width: 1199px) {
    .pd-inst { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .rv-summary { grid-template-columns: 140px minmax(0, 1fr); }
    .rv-cta { grid-column: 1 / -1; }
    .cmp-bar ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cmp-bar li.empty { display: none; }
}
@media (max-width: 575px) {
    .pd-inst { grid-template-columns: minmax(0, 1fr); }
    .pd-specs { grid-template-columns: minmax(0, 1fr); }
    .rv-summary { grid-template-columns: minmax(0, 1fr); text-align: center; }
    .cmp-bar .container { flex-direction: column; align-items: stretch; gap: 8px; }
    .cmp-actions { justify-content: space-between; }
}
