/* Felicity - energy equipment store. Base styles, mobile-first. */

:root {
  --color-bg: #f7f9fc;
  --color-bg-alt: #eef2f7;
  --color-surface: #ffffff;
  --color-surface-2: #f4f6fa;
  --color-border: #dfe4ec;
  --color-text: #16202e;
  --color-text-muted: #5b6b84;
  --color-white: #ffffff;
  --color-accent: #ed6f20;
  --color-accent-dark: #c85a16;
  --color-accent-2: #ff8a3d;
  --color-danger: #e2453c;
  --radius: 0;
  --radius-lg: 0;
  --shadow: 0 4px 16px rgba(16, 24, 40, 0.08);
  --container: 1200px;
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-accent); }

ul { list-style: none; margin: 0; padding: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 12px; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 12px; color: var(--color-text-muted); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--color-accent);
  color: #08251a; padding: 10px 16px; z-index: 200; border-radius: 0;
}
.skip-link:focus { left: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 0; border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--color-accent); color: #06210f; }
.btn-primary:hover { background: var(--color-accent-dark); color: #06210f; }
.btn-outline { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: saturate(150%) blur(6px);
}
.header-top {
  display: flex; align-items: center; gap: 16px; padding: 14px 0;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.4rem; color: var(--color-text); flex-shrink: 0; }
.logo-img { height: 48px; width: auto; }
.logo-tag { color: var(--color-accent); }

.header-search { flex: 1; position: relative; max-width: 520px; display: none; }
.header-search input[type="search"] {
  width: 100%; padding: 10px 42px 10px 14px; border-radius: 0;
  border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); font-size: 0.95rem;
}
.header-search input::placeholder { color: var(--color-text-muted); }
.header-search button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: var(--color-accent); border: none; width: 34px; height: 34px; border-radius: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.search-suggestions {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--color-surface-2);
  border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; z-index: 50; display: none;
}
.search-suggestions.open { display: block; }
.search-suggestions a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; font-size: 0.9rem; border-bottom: 1px solid var(--color-border); }
.search-suggestions a:last-child { border-bottom: none; }
.search-suggestions a:hover { background: var(--color-surface); }
.search-suggestions .sugg-price { color: var(--color-accent); white-space: nowrap; }

.header-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.header-partner {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 9px 18px; border-radius: 0;
  background: var(--color-accent); color: #06210f;
  font-weight: 800; font-size: 0.9rem; letter-spacing: .02em; text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 0 0 0 rgba(237, 111, 32, 0.55);
  animation: partner-pulse 2.4s ease-out infinite;
}
.header-partner:hover { background: var(--color-accent-dark); color: #06210f; animation: none; }
@keyframes partner-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(237, 111, 32, 0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(237, 111, 32, 0); }
  100% { box-shadow: 0 0 0 0 rgba(237, 111, 32, 0); }
}
@media (prefers-reduced-motion: reduce) { .header-partner { animation: none; } }
@media (max-width: 859px) { .header-partner { padding: 8px 12px; font-size: 0.78rem; } }
.header-phone { display: none; flex-direction: column; font-size: 0.85rem; color: var(--color-text-muted); white-space: nowrap; }
.header-phone strong { color: var(--color-text); font-size: 1rem; }
.cart-link { position: relative; display: flex; align-items: center; gap: 6px; }
.cart-count {
  position: absolute; top: -8px; right: -10px; background: var(--color-accent-2); color: #2a1200;
  font-size: 0.7rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 0;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

.burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px; background: none; border: none; cursor: pointer; }
.burger span { display: block; width: 100%; height: 2px; background: var(--color-text); border-radius: 0; }

.main-nav { display: none; border-top: 1px solid var(--color-border); background: var(--color-bg-alt); }
.main-nav.open { display: block; }
.main-nav ul { display: flex; flex-direction: column; flex-wrap: wrap; gap: 4px; padding: 8px 0; }
.main-nav a { display: block; padding: 8px 12px; border-radius: var(--radius); font-size: 0.92rem; color: var(--color-text-muted); }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--color-accent); background: var(--color-surface); }

.mobile-search { padding: 10px 0; border-bottom: 1px solid var(--color-border); margin-bottom: 8px; }
.mobile-search input[type="search"] {
  width: 100%; padding: 10px 14px; border-radius: 0; border: 1px solid var(--color-border);
  background: var(--color-surface); color: var(--color-text); font-size: 0.95rem;
}

@media (min-width: 860px) {
  .header-search { display: block; }
  .header-phone { display: flex; }
  .burger { display: none; }
  .main-nav { display: block; }
  .main-nav ul { flex-direction: row; }
  .mobile-search { display: none; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  padding: 48px 0;
  min-height: 420px;
  display: flex;
  align-items: center;
}
.hero-banner-imgs { position: absolute; inset: 0; }
.hero-banner-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center right;
  opacity: 0; transition: opacity 1.2s ease;
}
.hero-banner-img.active { opacity: 1; }
.hero-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.94) 0%, rgba(255,255,255,0.88) 35%, rgba(255,255,255,0.55) 65%, rgba(255,255,255,0.25) 100%);
}
.hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.hero-eyebrow { color: var(--color-accent); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 0.8rem; }
.hero h1 { margin: 0; max-width: 640px; }
.hero p { max-width: 560px; font-size: 1.05rem; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== Sections ===== */
.section { padding: 40px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head .see-all { color: var(--color-accent); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }

/* ===== Product grid & cards ===== */
.product-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: 14px; display: flex; flex-direction: column; position: relative; transition: border-color .15s, transform .1s;
}
.product-card:hover { border-color: var(--color-accent); transform: translateY(-2px); }
.product-media { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--color-bg-alt); margin-bottom: 12px; }
.product-media img { width: 100%; height: 100%; object-fit: contain; }
.badge { position: absolute; top: 8px; left: 8px; font-size: 0.72rem; font-weight: 700; padding: 4px 8px; border-radius: 0; z-index: 2; }
.badge-sale { background: var(--color-accent-2); color: #2a1200; }
.badge-out { background: var(--color-border); color: var(--color-text-muted); }

.product-cat { font-size: 0.75rem; color: var(--color-text-muted); margin-bottom: 4px; }
.product-cat a { color: var(--color-text-muted); }
.product-cat a:hover { color: var(--color-accent); }
.product-title { font-size: 0.95rem; font-weight: 600; margin: 0 0 8px; }
.product-title a { color: var(--color-text); }
.product-title a:hover { color: var(--color-accent); }
.product-price { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-current { font-size: 1.15rem; font-weight: 800; color: var(--color-accent); }
.price-old { font-size: 0.9rem; color: var(--color-text-muted); text-decoration: line-through; }
.product-card .btn { margin-top: 10px; }

/* ===== About / info blocks ===== */
.about-block { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 28px; }
.stat-row { display: grid; grid-template-columns: repeat(1, 1fr); gap: 16px; margin-top: 20px; }
@media (min-width: 500px) { .stat-row { grid-template-columns: repeat(3, 1fr); } }
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.6rem; color: var(--color-accent); }
.stat span { font-size: 0.82rem; color: var(--color-text-muted); }

/* ===== Breadcrumbs ===== */
.breadcrumbs { padding: 14px 0 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.85rem; color: var(--color-text-muted); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--color-border); }
.breadcrumbs a:hover { color: var(--color-accent); }

/* ===== Filters / catalog ===== */
.catalog-layout { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 860px) { .catalog-layout { flex-direction: row; align-items: flex-start; } }
.filters {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: 18px; width: 100%;
}
@media (min-width: 860px) { .filters { width: 240px; flex-shrink: 0; position: sticky; top: 90px; } }
.filters h2 { font-size: 1rem; }
.filter-group { margin-bottom: 18px; }
.filter-group label { display: block; font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 6px; }
.price-range { display: flex; gap: 8px; align-items: center; }
.price-range input { width: 100%; padding: 8px; border-radius: 0; border: 1px solid var(--color-border); background: var(--color-bg-alt); color: var(--color-text); }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--color-text); }
.catalog-main { flex: 1; min-width: 0; }
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.catalog-toolbar select {
  padding: 8px 10px; border-radius: 0; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text);
}
.result-count { font-size: 0.88rem; color: var(--color-text-muted); }
.empty-state { padding: 40px 0; text-align: center; color: var(--color-text-muted); }

/* ===== Product page ===== */
.product-page { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 860px) { .product-page { grid-template-columns: 1fr 1fr; } }
.gallery-col { display: flex; flex-direction: column; gap: 12px; }
.gallery-main { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--color-surface); border: 1px solid var(--color-border); aspect-ratio: 1/1; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.85); border: 1px solid var(--color-border); cursor: pointer;
  font-size: 1.2rem; color: var(--color-text); line-height: 1;
}
.gallery-nav:hover { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.gallery-nav-prev { left: 10px; }
.gallery-nav-next { right: 10px; }
.gallery-counter {
  position: absolute; bottom: 10px; right: 10px; padding: 3px 9px; font-size: 0.78rem;
  background: rgba(0,0,0,0.55); color: #fff;
}
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.gallery-thumb { display: block; aspect-ratio: 1/1; border-radius: 0; overflow: hidden; background: var(--color-surface); border: 1px solid var(--color-border); cursor: pointer; padding: 0; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumb:hover { border-color: var(--color-accent); }
.gallery-thumb.active { border-color: var(--color-accent); border-width: 2px; }
.product-info h1 { margin-bottom: 6px; }
.product-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.stock-badge { font-size: 0.82rem; font-weight: 600; padding: 4px 10px; border-radius: 0; }
.stock-in { background: rgba(237,111,32,0.15); color: var(--color-accent); }
.stock-out { background: rgba(255,92,92,0.15); color: var(--color-danger); }
.product-sku { font-size: 0.82rem; color: var(--color-text-muted, #6b7280); }
.price-block { display: flex; align-items: baseline; gap: 12px; margin: 16px 0; }
.price-block .price-current { font-size: 2rem; }
.qty-row { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.qty-input { display: flex; align-items: center; border: 1px solid var(--color-border); border-radius: 0; overflow: hidden; }
.qty-input button { background: var(--color-surface); border: none; color: var(--color-text); width: 36px; height: 40px; cursor: pointer; font-size: 1.1rem; }
.qty-input input { width: 46px; text-align: center; border: none; background: var(--color-bg-alt); color: var(--color-text); height: 40px; }

.specs-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.specs-table tr { border-bottom: 1px solid var(--color-border); }
.specs-table th, .specs-table td { text-align: left; padding: 10px 4px; font-size: 0.92rem; }
.specs-table th { color: var(--color-text-muted); font-weight: 500; width: 50%; }
.specs-table td { color: var(--color-text); font-weight: 600; }

/* ===== Cart ===== */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.cart-table th { text-align: left; font-size: 0.82rem; color: var(--color-text-muted); padding: 10px 8px; border-bottom: 1px solid var(--color-border); }
.cart-table td { padding: 12px 8px; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.cart-product { display: flex; align-items: center; gap: 12px; }
.cart-product img { width: 56px; height: 56px; object-fit: contain; background: var(--color-surface); border-radius: 0; }
.cart-remove { background: none; border: none; color: var(--color-text-muted); cursor: pointer; font-size: 1.1rem; }
.cart-remove:hover { color: var(--color-danger); }
.cart-summary { max-width: 360px; margin-left: auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 20px; }
.cart-summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.95rem; }
.cart-summary-row.total { font-weight: 800; font-size: 1.2rem; color: var(--color-accent); border-top: 1px solid var(--color-border); padding-top: 10px; }

/* ===== Forms ===== */
.form-grid { display: grid; gap: 14px; max-width: 520px; }
.form-field label { display: block; font-size: 0.85rem; margin-bottom: 6px; color: var(--color-text-muted); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 11px 12px; border-radius: var(--radius); border: 1px solid var(--color-border);
  background: var(--color-surface); color: var(--color-text); font-family: inherit; font-size: 0.95rem;
}
.form-field textarea { resize: vertical; min-height: 100px; }
.form-note { font-size: 0.85rem; color: var(--color-text-muted); }

/* ===== Static content pages ===== */
.content-page { max-width: 780px; }
.content-page h2 { margin-top: 28px; }
.content-page ul { list-style: disc; padding-left: 20px; margin-bottom: 14px; }
.content-page li { margin-bottom: 6px; color: var(--color-text-muted); }
.info-cards { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 20px 0; }
@media (min-width: 700px) { .info-cards { grid-template-columns: repeat(3, 1fr); } }
.info-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 18px; }

/* ===== Footer ===== */
.site-footer { background: var(--color-bg-alt); border-top: 1px solid var(--color-border); padding: 40px 0 20px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-col h3 { font-size: 0.95rem; color: var(--color-text); margin-bottom: 12px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--color-accent); }
.footer-phone { font-size: 1.1rem; font-weight: 700; color: var(--color-text); margin-bottom: 6px; display: block; }
.payment-icons { display: flex; gap: 10px; margin-top: 12px; }
.payment-icons span {
  border: 1px solid var(--color-border); border-radius: 0; padding: 4px 10px; font-size: 0.75rem; color: var(--color-text-muted); font-weight: 700;
}
.footer-bottom { border-top: 1px solid var(--color-border); margin-top: 28px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.82rem; color: var(--color-text-muted); }

@media (min-width: 860px) {
  .hero-inner { max-width: 640px; }
}
