/* Стили для прайс-листа с префиксом price- (Apple 2025) */

:root {
  --price-bg: #f5f7fa;
  --price-surface: #ffffff;
  --price-elev-1: #ffffff;
  --price-elev-2: #ffffff;
  --price-text: #0b0b0c;
  --price-muted: #5b6470;
  --price-divider: rgba(0,0,0,.08);
  --price-accent: #0a84ff;
  --price-success: #30d158;
  --price-warning: #ffd60a;
  --price-radius: 12px;
  --price-shadow: 0 1px 0 rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.08);
  --price-shadow-hover: 0 1px 0 rgba(0,0,0,.08), 0 14px 40px rgba(0,0,0,.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --price-bg: #0b0b0c;
    --price-surface: #0f1113;
    --price-elev-1: #121418;
    --price-elev-2: #151920;
    --price-text: #f5f7fa;
    --price-muted: #97a0ab;
    --price-divider: rgba(255,255,255,.08);
    --price-shadow: 0 1px 1px rgba(0,0,0,.6), 0 8px 24px rgba(0,0,0,.35);
    --price-shadow-hover: 0 1px 1px rgba(0,0,0,.7), 0 14px 40px rgba(0,0,0,.45);
  }
}

.price-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: var(--price-bg);
  min-height: 100vh;
}

/* Toolbar */
.price-toolbar {
  display: grid;
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px;
  background: var(--price-surface);
  border-radius: var(--price-radius);
  box-shadow: var(--price-shadow);
}

.price-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 2px;
  background: rgba(0,0,0,.04);
  border: 1px solid var(--price-divider);
  border-radius: 6px;
  max-width: 100%;
  line-height: 1;
}

.price-segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.price-segmented label {
  height: 24px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
  color: var(--price-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  line-height: 1;
  margin: 0;
}

.price-segmented label .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  line-height: 1;
}

.price-segmented input:checked + label {
  background: color-mix(in oklab, var(--price-accent) 16%, transparent);
  color: var(--price-text);
  transform: translateY(-1px);
}

.price-filter-type {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.price-chip {
  position: relative;
}

.price-chip-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.price-chip-label {
  padding: 8px 16px;
  border: 1px solid var(--price-divider);
  border-radius: 20px;
  background: var(--price-surface);
  color: var(--price-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.price-chip-input:checked + .price-chip-label {
  background: color-mix(in oklab, var(--price-accent) 18%, transparent);
  border-color: color-mix(in oklab, var(--price-accent) 40%, var(--price-divider));
  color: var(--price-text);
}

.price-controls {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
}

.price-input {
  height: 44px;
  border-radius: var(--price-radius);
  border: 1px solid var(--price-divider);
  background: var(--price-surface);
  color: var(--price-text);
  padding: 0 14px;
  font: 500 14px/1 -apple-system, system-ui, sans-serif;
  transition: border-color 0.2s;
}

.price-input::placeholder {
  color: var(--price-muted);
}

.price-input:focus {
  border-color: color-mix(in oklab, var(--price-accent) 40%, var(--price-divider));
  outline: none;
}

.price-dense-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--price-muted);
  font-weight: 500;
}

/* Grid - компактный режим по умолчанию */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

/* Cards - простой дизайн как было, компактный по умолчанию */
.price-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.price-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.price-card-header {
  margin-bottom: 12px;
}

.price-card-category {
  display: inline-block;
  background: #f0f0f0;
  color: #666;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 10px;
}

.price-card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: #333;
}

.price-card-description {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.price-card-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 12px 0;
}

.price-amount {
  font-size: 20px;
  font-weight: 700;
  color: #0a84ff;
}

.price-currency {
  font-size: 16px;
  color: #666;
}

.price-unit {
  font-size: 14px;
  color: #999;
}

.price-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.price-check-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.price-check-label {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #f8f9fa;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.price-check-input:checked + .price-check-label {
  background: #e8f5e8;
  border-color: #4caf50;
  color: #2e7d32;
}

.price-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
}

.price-btn-primary {
  background: #0a84ff;
  color: white;
}

.price-btn-primary:hover {
  background: #0066cc;
}

.price-btn-secondary {
  background: #f0f0f0;
  color: #666;
}

.price-btn-secondary:hover {
  background: #e0e0e0;
}

/* Summary Bar */
.price-summary-bar {
  position: fixed;
  left: 50%;
  transform: translate(-50%, calc(100% + 16px));
  bottom: 20px;
  width: min(960px, 92vw);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 16px 20px;
  background: var(--price-elev-2);
  border: 1px solid var(--price-divider);
  border-radius: 16px;
  box-shadow: var(--price-shadow-hover);
  backdrop-filter: blur(10px) saturate(140%);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1);
  z-index: 1000;
}

.price-list:has(.price-check-input:checked) .price-summary-bar {
  transform: translate(-50%, 0);
}

.price-summary-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--price-text);
}

.price-summary-total-amount {
  font-size: 20px;
  font-weight: 700;
  color: var(--price-accent);
}

.price-summary-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.price-summary-clear {
  padding: 8px 12px;
  border: 1px solid var(--price-divider);
  border-radius: 8px;
  background: transparent;
  color: var(--price-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.price-summary-clear:hover {
  background: rgba(0,0,0,.04);
}

/* Section */
.price-section {
  margin: 0 0 30px 0;
}

.price-section-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 24px 0;
  color: var(--price-text);
  border-bottom: 2px solid var(--price-accent);
  padding-bottom: 12px;
}

/* Disclaimer */
.price-disclaimer {
  background: rgba(0,0,0,.02);
  border: 1px solid var(--price-divider);
  border-radius: var(--price-radius);
  padding: 20px;
  margin-top: 40px;
  font-size: 14px;
  color: var(--price-muted);
  line-height: 1.5;
}

.price-disclaimer p {
  margin: 0;
}

/* Dense mode */
.price-list[data-dense="true"] .price-card {
  padding: 16px;
}

.price-list[data-dense="true"] .price-card-title {
  font-size: 16px;
}

.price-list[data-dense="true"] .price-amount {
  font-size: 24px;
}

/* Адаптивность */
@media (max-width: 768px) {
  .price-list {
    padding: 16px;
  }
  
  .price-toolbar {
    padding: 12px;
    gap: 12px;
  }
  
  .price-controls {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .price-input {
    height: 36px;
    font-size: 13px;
    padding: 0 10px;
  }
  
  .price-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .price-card {
    padding: 16px;
  }
  
  .price-card-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .price-btn {
    width: 100%;
    justify-content: center;
  }
  
  .price-summary-bar {
    width: calc(100vw - 32px);
    left: 16px;
    transform: translate(0, calc(100% + 16px));
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .price-list:has(.price-check-input:checked) .price-summary-bar {
    transform: translate(0, 0);
  }
}

@media (max-width: 480px) {
  .price-segmented {
    grid-auto-flow: row;
    gap: 4px;
  }
  
  .price-segmented label {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }
  
  .price-filter-type {
    flex-direction: column;
    gap: 8px;
  }
  
  .price-chip-label {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* Order Modal — Apple-like 2025 */
.order-modal { position: fixed; inset: 0; z-index: 9999; display: none; }
.order-modal[aria-hidden="false"] { display: block; }
.order-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.28); backdrop-filter: blur(6px); }
.order-modal__panel {
  position: absolute; inset: 0; margin: auto; width: min(720px, 92vw); max-height: 88vh;
  border-radius: 22px; background: rgba(255,255,255,.65); backdrop-filter: blur(18px);
  border: 1px solid rgba(60,60,67,.18); box-shadow: 0 30px 80px rgba(0,0,0,.20);
  display: grid; grid-template-rows: auto 1fr; overflow: hidden;
  animation: om-pop .18s ease-out;
}
@keyframes om-pop { from { transform: scale(.98); opacity: .6; } to { transform: scale(1); opacity: 1; } }

.order-modal__close {
  position: absolute; top: 10px; right: 10px; border: 1px solid rgba(60,60,67,.18);
  background: rgba(255,255,255,.75); backdrop-filter: blur(10px);
  border-radius: 12px; padding: 6px 10px; cursor: pointer;
}

.order-modal__header { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 18px 18px 0 18px; }
.order-modal__icon { font-size: 28px; }
.order-modal__title { margin: 0; font-size: 18px; font-weight: 800; }
.order-modal__brand { color: #6e6e73; font-size: 13px; }

.order-modal__body { padding: 12px 18px 18px 18px; display: grid; gap: 14px; }
.order-modal__desc { margin: 0; color: #333; line-height: 1.5; }
.order-modal__spec { border: 1px solid rgba(60,60,67,.18); border-radius: 16px; background: rgba(255,255,255,.5); padding: 10px 12px; display: grid; gap: 8px; }
.om-row { display: grid; grid-template-columns: 140px 1fr; gap: 10px; align-items: baseline; font-size: 14px; }
.om-label { color: #6e6e73; }
.om-val { font-weight: 600; }

.order-modal__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .order-modal__actions { grid-template-columns: 1fr; } }
.om-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 12px; border: 1px solid rgba(60,60,67,.18); cursor: pointer; background: rgba(255,255,255,.7); backdrop-filter: blur(10px); text-decoration: none; }
.om-btn:link, .om-btn:visited { text-decoration: none; }
.om-btn:hover { filter: brightness(1.03); text-decoration: none; }
.om-btn-primary { background: #0071e3; color: #fff; border-color: #0071e3; }
.om-btn-secondary { background: #34c759; color: #fff; border-color: #34c759; }
.om-btn-ghost { background: transparent; }
.om-ico { font-size: 16px; }

.order-modal__hint { color: #6e6e73; font-size: 12px; }
