/* ============================================================
   Public shop pages — extracted from product_detail.html and
   service_order.html (previously inline <style> blocks).
   Loaded by templates/cms/layout.html on all public pages.
   ============================================================ */

/* ── product_detail.html — Layout ─────────────────────────── */
.pd-wrap { max-width: 1140px; margin: 0 auto; padding: 0 1rem; }
.pd-wrap.pd-wrap--page { padding-top: 1.5rem; padding-bottom: 4rem; }
.pd-grid {
  display: grid; grid-template-columns: 1fr 400px;
  gap: 3rem; align-items: start;
}
@media (max-width: 1023px) {
  .pd-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── product_detail.html — Gallery ────────────────────────── */
.pd-gallery { position: sticky; top: 1.5rem; }
.pd-gallery-main {
  border-radius: 1.25rem; overflow: hidden;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  height: 420px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.10), inset 0 0 0 1px rgba(148,163,184,0.12);
  margin-bottom: 0.75rem;
}
.pd-gallery-main img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  padding: 0.5rem; transition: opacity 0.2s ease;
}
.pd-gallery-empty-img {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #94a3b8; gap: 0.75rem;
}
.pd-gallery-thumbs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.5rem;
}
.pd-thumb {
  aspect-ratio: 1 / 1; border-radius: 0.75rem; overflow: hidden;
  border: 2.5px solid transparent; cursor: pointer; background: #f1f5f9;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.pd-thumb:hover { transform: translateY(-2px); border-color: rgba(59, 130, 246, 0.35); }
.pd-thumb.is-active {
  border-color: hsl(217, 91%, 50%);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── product_detail.html — Purchase panel ─────────────────── */
.pd-panel {
  background: #fff; border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1.5rem; padding: 2rem 1.75rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.07);
}
.pd-breadcrumb {
  font-size: 0.78rem; color: #64748b; margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.pd-breadcrumb a { color: hsl(217, 91%, 50%); }
.pd-breadcrumb a:hover { text-decoration: underline; }
.pd-title {
  font-size: 1.65rem; font-weight: 800; color: #0f172a;
  line-height: 1.2; margin-bottom: 0.5rem;
}
.pd-subtitle { font-size: 1rem; color: #475569; margin-bottom: 1.25rem; }
.pd-avail-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.5rem; }
.pd-avail-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pd-avail-dot.is-green { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }
.pd-avail-dot.is-yellow { background: #eab308; box-shadow: 0 0 0 3px rgba(234,179,8,0.2); }
.pd-avail-dot.is-grey { background: #94a3b8; }
.pd-avail-label { font-size: 0.85rem; color: #475569; }
.pd-divider { border: none; border-top: 1px solid rgba(148,163,184,0.18); margin: 1.25rem 0; }
.pd-price-row { display: flex; align-items: flex-end; gap: 0.35rem; margin-bottom: 0.2rem; line-height: 1; }
.pd-currency { font-size: 1rem; font-weight: 600; color: #64748b; padding-bottom: 0.35rem; }
.pd-amount { font-size: 2.6rem; font-weight: 900; color: #0f172a; line-height: 1; letter-spacing: -0.02em; }
.pd-price-vat-badge {
  font-size: 0.72rem; font-weight: 700; color: #15803d;
  background: #dcfce7; border: 1px solid #bbf7d0;
  border-radius: 999px; padding: 0.2rem 0.6rem;
  align-self: center; margin-left: 0.15rem;
}
.pd-price-tax-line { font-size: 0.78rem; color: #64748b; margin-bottom: 0.25rem; }
.pd-price-tax-line a { color: hsl(217,91%,50%); text-decoration: none; }
.pd-price-tax-line a:hover { text-decoration: underline; }
.pd-price-note { font-size: 0.8rem; color: #94a3b8; margin-bottom: 1rem; }
.pd-meta-row {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: #64748b;
  padding: 0.5rem 0; border-bottom: 1px solid rgba(148,163,184,0.12);
}
.pd-meta-row:last-of-type { border-bottom: none; }
.pd-meta-row .icon { color: #94a3b8; flex-shrink: 0; }
.pd-meta-rows-wrap { margin: 0.75rem 0 1.25rem; }

.pd-checkout-form .field { margin-bottom: 0.85rem; }
.pd-checkout-form .label { font-size: 0.82rem; font-weight: 600; color: #374151; margin-bottom: 0.25rem; }
.pd-checkout-form .input { border-radius: 0.75rem; }
.pd-checkout-btn {
  width: 100%; height: 3.2rem; border-radius: 0.85rem;
  font-size: 1.05rem; font-weight: 700; letter-spacing: 0.02em;
  background: #1e3a8a; color: #fff;
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 0.55rem;
}
.pd-checkout-btn:hover {
  background: #1e40af; transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.3);
}
.pd-checkout-btn:active { transform: translateY(0); }
.pd-checkout-btn.is-stripe { background: #635bff; }
.pd-checkout-btn.is-stripe:hover { background: #4f46e5; box-shadow: 0 8px 20px rgba(99,91,255,0.35); }
.pd-checkout-btn.is-redsys { background: #c0392b; }
.pd-checkout-btn.is-redsys:hover { background: #a93226; box-shadow: 0 8px 20px rgba(192,57,43,0.3); }
.pd-provider-badge {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em;
  opacity: 0.8; text-transform: uppercase;
}
.pd-trust-row {
  display: flex; gap: 1rem; justify-content: center;
  margin-top: 1rem; flex-wrap: wrap;
}
.pd-trust-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: #64748b; }
.pd-trust-item .icon { color: #22c55e; }
.pd-not-ready { text-align: center; padding: 1rem; color: #64748b; }

.pd-shipping-box {
  background: #f8fafc; border: 1px solid rgba(148,163,184,0.18);
  border-radius: 1rem; padding: 1rem; margin-bottom: 1rem;
}

/* ── product_detail.html — Content sections below ─────────── */
.pd-section-grid {
  display: grid; grid-template-columns: 1fr 340px;
  gap: 2rem; align-items: start; margin-top: 3rem;
}
@media (max-width: 1023px) { .pd-section-grid { grid-template-columns: 1fr; } }
.pd-content-card {
  background: #fff; border: 1px solid rgba(148,163,184,0.18);
  border-radius: 1.25rem; padding: 2rem; margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(15,23,42,0.04);
}
.pd-section-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: #94a3b8; margin-bottom: 0.75rem;
}
.pd-steps { display: grid; gap: 1.25rem; }
.pd-step { display: flex; gap: 1rem; align-items: flex-start; }
.pd-step-num {
  width: 2rem; height: 2rem; border-radius: 50%;
  background: hsl(217, 91%, 50%); color: #fff;
  font-size: 0.82rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pd-facts {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.75rem; margin-bottom: 1.25rem;
}
@media (max-width: 600px) { .pd-facts { grid-template-columns: 1fr; } }
.pd-fact {
  background: #f8fafc; border: 1px solid rgba(148,163,184,0.16);
  border-radius: 0.85rem; padding: 0.85rem 1rem;
}
.pd-fact-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #94a3b8; margin-bottom: 0.25rem; }
.pd-fact-value { font-size: 0.95rem; font-weight: 700; color: #0f172a; }
.pd-side-card {
  background: #fff; border: 1px solid rgba(148,163,184,0.18);
  border-radius: 1.25rem; padding: 1.5rem; margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(15,23,42,0.04);
}
.pd-who-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.pd-who-list li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.9rem; color: #374151; }
.pd-who-list li::before { content: "\2713"; color: #22c55e; font-weight: 800; flex-shrink: 0; margin-top: 0.05rem; }
.pd-faq { display: grid; gap: 0; }
.pd-faq-item { border-top: 1px solid rgba(148,163,184,0.15); padding: 0.85rem 0; }
.pd-faq-item:first-child { border-top: none; padding-top: 0; }
.pd-faq-q { font-size: 0.88rem; font-weight: 700; color: #0f172a; margin-bottom: 0.3rem; }
.pd-faq-a { font-size: 0.82rem; color: #64748b; }

/* ── product_detail.html — Related products ───────────────── */
.pd-related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; margin-top: 2.5rem;
}
@media (max-width: 900px) { .pd-related-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .pd-related-grid { grid-template-columns: 1fr; } }
.pd-related-card {
  background: #fff; border: 1px solid rgba(148,163,184,0.18);
  border-radius: 1.1rem; overflow: hidden;
  box-shadow: 0 4px 14px rgba(15,23,42,0.05);
  display: flex; flex-direction: column;
  transition: box-shadow 0.18s, transform 0.18s;
}
.pd-related-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(15,23,42,0.1); }
.pd-related-media {
  aspect-ratio: 16 / 10; overflow: hidden;
  background: linear-gradient(135deg, #eef2ff, #f0f9ff);
}
.pd-related-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-related-body { padding: 1rem 1rem 1.1rem; flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.pd-related-title { font-size: 0.95rem; font-weight: 700; color: #0f172a; }
.pd-related-title a { color: inherit; }
.pd-related-title a:hover { color: hsl(217,91%,50%); }
.pd-related-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.pd-related-price { font-weight: 700; font-size: 0.9rem; color: #0f172a; }
.pd-view-btn {
  font-size: 0.78rem; font-weight: 600;
  color: hsl(217,91%,50%); background: rgba(59,130,246,0.08);
  border: none; border-radius: 999px;
  padding: 0.3rem 0.85rem; cursor: pointer; text-decoration: none;
  transition: background 0.15s;
}
.pd-view-btn:hover { background: rgba(59,130,246,0.15); }

/* ── service_order.html ───────────────────────────────────── */
@media print {
  .no-print { display: none !important; }
  .order-card { box-shadow: none !important; border: 1px solid #ddd !important; }
  body { background: #fff !important; }
}
.order-wrap { max-width: 900px; margin: 1.5rem auto; }
.order-card { border-radius: 12px; overflow: hidden; }
.order-header {
  border-bottom: 3px solid var(--order-accent, #00d1b2);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}
.order-header .title { margin-bottom: 0.35rem !important; line-height: 1.12; }
.order-header .title + .subtitle { margin-top: 0 !important; }
.order-header .subtitle { margin-bottom: 0 !important; line-height: 1.25; }
.order-top {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 1rem;
}
.order-logo { max-height: 56px; max-width: 190px; object-fit: contain; }
.order-info-row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.5rem 0; border-bottom: 1px solid #f0f0f0;
}
.order-info-label { font-weight: 600; color: #4a4a4a; }
.order-total {
  background: #f7f7f7; border-radius: 8px;
  padding: 0.9rem 1rem; margin-top: 1rem;
}
.order-days { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.order-footer {
  border-top: 2px solid #eee; padding-top: 1rem;
  margin-top: 1.5rem; text-align: center;
}
.order-policy {
  margin-top: 1rem;
  border-left: 4px solid #f59e0b;
  background: #fff8e6; color: #664d03;
  border-radius: 8px;
  padding: 0.8rem 0.95rem; font-size: 0.92rem;
}
