/*
Theme Name: Bresta Group Theme v4 Patch (Bright Edition)
Theme URI: https://brestagroup.com.ua
Author: Олександра
Description: Професійна яскрава тема Bresta Group з ripple-ефектом, блиском цифр, картою, адаптивом і preloader'ом.
Version: 4.1.1
Text Domain: bresta-group
*/

:root {
  --brand1: #0ea5e9;
  --brand2: #2563eb;
  --brand3: #38bdf8;
  --bg: #ffffff;
  --bg-dark: #0b1220;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(2,6,23,.08);
  --radius: 16px;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--brand2); text-decoration: none; }
a:hover { text-decoration: underline; }
.br-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(16px, 2vw, 24px);
}

/* Preloader */
#br-preloader {
  position: fixed; inset: 0;
  background: #0b1220;
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity .4s ease;
}
#br-preloader .pulse {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  opacity: .85; animation: pulse 1.4s infinite ease-in-out;
}
@keyframes pulse {
  0% { transform: scale(.9); opacity: .6; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(.9); opacity: .6; }
}
html.br-loaded #br-preloader { opacity: 0; pointer-events: none; }


/* Buttons */
.br-btn {
  position: relative;
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  border: none;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.br-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(2,6,23,.15); }
.br-btn--ghost { background: transparent; color: var(--brand2); border: 2px solid var(--brand2); }

/* Ripple */
.br-btn::after {
  content: "";
  position: absolute;
  top: var(--ry, 50%);
  left: var(--rx, 50%);
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--brand3);
  opacity: 0;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity .6s, transform .6s;
}
.br-btn:active::after {
  opacity: .4;
  transform: translate(-50%, -50%) scale(20);
  transition: 0s;
}

/* Advantages */
.advantages {
  background: #f8fafc;
  padding: 60px 0;
}
.advantages h2 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--text);
}
.adv-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 20px;
}
@media(max-width:1024px){.adv-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.adv-grid{grid-template-columns:1fr}}
.adv-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.adv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(14,165,233,.2);
}
.adv-icon {
  font-size: 32px;
  color: var(--brand2);
  margin-bottom: 10px;
  text-shadow: 0 0 8px rgba(14,165,233,.5);
}

/* Stats */
.stats-section {
  background: linear-gradient(90deg,#0f172a,#1e3a8a 60%,#2563eb 100%);
  color: #fff;
  padding: 50px 0;
  text-align: center;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 40px;
}
@media(max-width:700px){.stats-row{grid-template-columns:1fr;gap:24px}}
.counter {
  font-size: clamp(36px,6vw,64px);
  font-weight: 900;
  background: linear-gradient(90deg,#38bdf8,#0ea5e9,#38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: shine 4s linear infinite;
}
/* === Footer links & paragraph styling (Bresta Group enhancement) === */
.footer-list a {
  color: #bae6fd;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s, text-shadow 0.3s;
}
.footer-list a:hover {
  color: #38bdf8;
  text-shadow: 0 0 8px rgba(56,189,248,0.6);
}
.footer-block p {
  color: #e2e8f0;
  line-height: 1.6;
}


@keyframes shine { to { background-position: 200% center; } }
.stat p { font-size: 18px; opacity: .9; margin: 10px 0 0; }

/* Map */
.map-section {
  background: #fff;
  padding: 50px 0;
}
.map-section h2 {
  text-align: center;
  color: var(--text);
  margin-bottom: 20px;
}
.map-section iframe {
  border: 2px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: #e2e8f0;
  padding: 30px 0;
  text-align: center;
}
.site-footer a { color: #60a5fa; }
.site-footer a:hover { color: #93c5fd; }
.footer-contacts {
  display: grid; gap: 6px; justify-items: center; margin-bottom: 10px;
}
.copy { font-size: 13px; color: #9aa7b5; margin-top: 12px; }
/* === Fixed Contact Bar === */
.contact-bar {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cb-item {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.cb-item:hover {
  transform: scale(1.15);
  box-shadow: 0 10px 20px rgba(14,165,233,0.3);
}

@media (max-width: 600px) {
  .cb-item {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
}
/* === Footer Styling (Bresta Group) === */
.site-footer {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  padding: 60px 0 30px;
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-title {
  font-size: 18px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-list li {
  margin: 6px 0;
}
.footer-list a {
  color: #93c5fd;
  text-decoration: none;
  transition: color 0.3s;
}
.footer-list a:hover {
  color: #38bdf8;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #38bdf8;
  color: #fff;
  font-size: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.footer-social a:hover {
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(56,189,248,0.6);
}

.footer-bottom {
  border-top: 1px solid rgba(148,163,184,0.2);
  text-align: center;
  padding-top: 20px;
  color: #9ca3af;
  font-size: 14px;
}

/* === TRUST STRIP === */
.trust-strip {
  background: linear-gradient(90deg, #0ea5e9 0%, #2563eb 100%);
  color: #fff;
  text-align: center;
  padding: 30px 0;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.trust-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 80px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 16px;
}

.trust-number {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.4);
  line-height: 1;
  transition: transform 0.3s ease;
}

.trust-item:hover .trust-number {
  transform: scale(1.1);
}

.trust-text {
  margin-top: 6px;
  font-size: 15px;
}

/* адаптив */
@media (max-width: 768px) {
  .trust-container {
    gap: 30px;
  }
  .trust-number {
    font-size: 26px;
  }
  .trust-text {
    font-size: 14px;
  }
}


/* адаптив */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}
@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-social {
    justify-content: center;
  }
}

/* === HEADER + LOGO === */
.site-header {
  background: #0f172a;
  color: #fff;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  text-align: center;
}
.header-container .logo img {
  width: 110px;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(56,189,248,0.5);
}
.header-text h2 {
  font-size: 26px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 4px;
}
.header-text p {
  font-size: 15px;
  color: #cbd5e1;
  margin: 0;
}
/* === HEADER + LOGO === */
.site-header {
  background: #0f172a;
  color: #fff;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  text-align: center;
}
.header-container .logo img {
  width: 110px;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(56,189,248,0.5);
}
.header-text h2 {
  font-size: 26px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 4px;
}
.header-text p {
  font-size: 15px;
  color: #cbd5e1;
  margin: 0;
}
/* === MAIN CONTACT BUTTON === */
.main-contact-btn {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(37,99,235,0.4);
  transition: all 0.3s ease;
}
.main-contact-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(14,165,233,0.5);
}

/* === MODAL WINDOW === */
.contact-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(15,23,42,0.75);
  backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #1e293b;
  color: #e2e8f0;
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  max-width: 340px;
  width: 90%;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  animation: fadeInUp 0.3s ease;
}

.modal-content h3 {
  color: #38bdf8;
  margin-bottom: 10px;
}

.modal-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.modal-link {
  display: block;
  padding: 12px 0;
  border-radius: 8px;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.modal-link:hover { transform: scale(1.05); }

.modal-link.phone { background: linear-gradient(135deg, #10b981, #059669); }
.modal-link.tg { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.modal-link.vb { background: linear-gradient(135deg, #a855f7, #7e22ce); }

.close-modal {
  position: absolute;
  top: 14px;
  right: 20px;
  font-size: 28px;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.3s;
}
.close-modal:hover { color: #38bdf8; }

/* анімація */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
/* === ЕФЕКТ ПУЛЬСУ ТА БЛИСКУ ДЛЯ КНОПКИ "ЗВ’ЯЗАТИСЯ" === */
.main-contact-btn {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(14,165,233,0.5);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Плавний збільшений ефект при наведенні */
.main-contact-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 25px rgba(56,189,248,0.8);
}

/* Пульсуюче світіння */
@keyframes pulse-glow {
  0% { box-shadow: 0 0 8px rgba(56,189,248,0.5); }
  50% { box-shadow: 0 0 22px rgba(56,189,248,0.9); }
  100% { box-shadow: 0 0 8px rgba(56,189,248,0.5); }
}
.main-contact-btn {
  animation: pulse-glow 2.8s infinite ease-in-out;
}

/* Блиск, що рухається по поверхні */
.main-contact-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 80%);
  transform: skewX(-25deg);
  transition: left 0.7s ease;
}
.main-contact-btn:hover::after {
  left: 125%;
}
/* === ЕФЕКТ ПУЛЬСУ І БЛИСКУ ДЛЯ HERO-КНОПОК === */
.hero-cta .br-btn {
  position: relative;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 0 12px rgba(56,189,248,0.4);
  transition: all 0.3s ease;
  overflow: hidden;
}

/* світлий контур при наведенні */
.hero-cta .br-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 24px rgba(56,189,248,0.8);
}

/* Пульсуюче світіння */
@keyframes heroPulse {
  0% { box-shadow: 0 0 8px rgba(56,189,248,0.4); }
  50% { box-shadow: 0 0 18px rgba(56,189,248,0.9); }
  100% { box-shadow: 0 0 8px rgba(56,189,248,0.4); }
}
.hero-cta .br-btn {
  animation: heroPulse 3s infinite ease-in-out;
}

/* Блиск, що проходить по кнопці */
.hero-cta .br-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 80%);
  transform: skewX(-25deg);
  transition: left 0.7s ease;
}
.hero-cta .br-btn:hover::after {
  left: 130%;
}

/* Для кнопок з класом "br-btn--ghost" — легше світіння */
.hero-cta .br-btn--ghost {
  background: transparent;
  border: 2px solid #38bdf8;
  color: #e0f2fe;
  animation: heroPulse 4s infinite ease-in-out;
}
.hero-cta .br-btn--ghost:hover {
  background: rgba(56,189,248,0.1);
  box-shadow: 0 0 16px rgba(56,189,248,0.5);
}
/* === Popup (VentCalc Modal) === */
.vent-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
}

.vent-modal-content {
  background: #fff;
  padding: 30px 40px;
  border-radius: 10px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  position: relative;
  animation: fadeIn 0.3s ease;
}

.vent-modal-content h2 {
  margin-top: 0;
  color: #007bff;
  text-align: center;
}

.vent-modal-content p {
  text-align: center;
  font-size: 15px;
  color: #444;
}

.vent-field {
  margin-bottom: 15px;
}
.vent-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
}
.vent-field input,
.vent-field textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
}
.vent-submit {
  display: block;
  width: 100%;
  background: #007bff;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}
.vent-submit:hover {
  background: #0056b3;
}

.vent-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: #999;
  transition: color 0.2s;
}
.vent-close:hover {
  color: #333;
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-10px);}
  to {opacity: 1; transform: translateY(0);}
}

/* === Hero секція (адаптив) === */
.bresta-hero {
  position: relative;
  background-image: url('../assets/ventilation-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  padding: 160px 0 120px;
  text-align: center;
  overflow: hidden;
}

.bresta-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.bresta-hero .br-container {
  position: relative;
  z-index: 2;
}

.bresta-hero h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
}

.bresta-hero p {
  font-size: 18px;
  line-height: 1.5;
  max-width: 700px;
  margin: 0 auto 25px;
}

/* === Адаптив під телефон === */
@media (max-width: 992px) {
  .bresta-hero {
    padding: 120px 0 100px;
    background-position: center top;
  }
  .bresta-hero h1 {
    font-size: 32px;
  }
  .bresta-hero p {
    font-size: 16px;
    padding: 0 15px;
  }
}

@media (max-width: 600px) {
  .bresta-hero {
    padding: 100px 0 80px;
    background-size: cover;
    background-position: center top;
  }
  .bresta-hero h1 {
    font-size: 26px;
  }
  .bresta-hero p {
    font-size: 15px;
  }
}
/* === WooCommerce Shop Page — Bresta Group === */
.shop-hero {
  background: linear-gradient(rgba(15,23,42,0.65), rgba(15,23,42,0.65)),
              url('<?php echo get_stylesheet_directory_uri(); ?>/assets/ventilation-bg.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  padding: 120px 20px 80px;
}

.shop-hero h1 {
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 700;
  margin-bottom: 10px;
}

.shop-hero p {
  font-size: 18px;
  max-width: 720px;
  margin: 0 auto;
  opacity: 0.9;
}

/* Контейнер і товари */
.shop-container {
  padding: 40px 0;
}

.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.woocommerce ul.products li.product {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(14,165,233,0.2);
}

.woocommerce ul.products li.product img {
  border-radius: 10px;
  object-fit: cover;
  max-height: 220px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
}

.woocommerce ul.products li.product .price {
  color: #2563eb;
  font-weight: 700;
  font-size: 16px;
}

.woocommerce ul.products li.product .button {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}
.woocommerce ul.products li.product .button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(14,165,233,0.4);
}

/* === SINGLE PRODUCT PAGE — Bresta Group === */
.product-hero {
  background: linear-gradient(rgba(15,23,42,0.65), rgba(15,23,42,0.65)),
              url('<?php echo get_stylesheet_directory_uri(); ?>/assets/ventilation-bg.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  padding: 100px 20px 70px;
}

.product-hero h1 {
  font-size: clamp(28px, 4.5vw, 46px);
  font-weight: 700;
  margin-bottom: 10px;
}

.product-hero p {
  font-size: 17px;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

.product-container {
  background: #fff;
  border-radius: 14px;
  padding: 40px 20px;
  margin-top: -40px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.woocommerce div.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 800px) {
  .woocommerce div.product {
    grid-template-columns: 1fr;
  }
}

.woocommerce div.product div.images img {
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.woocommerce div.product .summary {
  padding-top: 10px;
}

.woocommerce div.product .product_title {
  font-size: 26px;
  color: #0f172a;
  font-weight: 700;
  margin-bottom: 10px;
}

.woocommerce div.product .price {
  color: #2563eb;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
}

.woocommerce div.product form.cart .button {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  border: none;
  padding: 12px 26px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.woocommerce div.product form.cart .button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(14,165,233,0.4);
}

.woocommerce div.product .woocommerce-tabs {
  margin-top: 40px;
  border-top: 1px solid #e2e8f0;
  padding-top: 30px;
}
.woocommerce div.product .woocommerce-tabs h2 {
  color: #0f172a;
  font-size: 22px;
  font-weight: 700;
}

/* === RESPONSIVE ADAPTATION === */

/* 📱 Mobile (до 768px) — оновлений адаптив */
@media (max-width: 768px) {
  .shop-hero { 
    padding: 90px 15px 60px; 
    background-attachment: scroll; 
  }
  .shop-hero h1 { font-size: 28px; }
  .shop-hero p { font-size: 15px; }

  .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding: 10px 14px;
  }

  .woocommerce ul.products li.product {
    padding: 14px;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  }

  .woocommerce ul.products li.product img {
    aspect-ratio: 1/1;
    width: 100%;
    max-height: 210px;
    border-radius: 12px;
  }

  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 15.5px;
    line-height: 1.3;
    margin-top: 10px;
  }

  .woocommerce ul.products li.product .price {
    font-size: 15px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 10px;
  }

  .woocommerce ul.products li.product .button {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 0;
    transition: all 0.3s ease;
  }
  .woocommerce ul.products li.product .button:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 10px rgba(14,165,233,0.4);
  }
}

/* 📱 Дуже малі екрани (до 480px) — 1 товар у ряд */
@media (max-width: 480px) {
  .woocommerce ul.products {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 10px 20px;
  }
  .woocommerce ul.products li.product img {
    max-height: 240px;
  }
}


/* === HEADER CART UNDER BUTTON === */
.header-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.header-cart {
  position: relative;
}

.header-cart .cart-link {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  font-size: 22px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(14,165,233,0.4);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.header-cart .cart-link:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(14,165,233,0.5);
}

.header-cart .cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

/* Mini cart popup */
.mini-cart-popup {
  display: none;
  position: absolute;
  right: 0;
  top: 58px;
  background: #fff;
  color: #000;
  padding: 15px;
  width: 280px;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
  z-index: 9999;
}

.mini-cart-popup.open {
  display: block;
  animation: fadeIn 0.3s ease;
}

.mini-cart-popup h4 {
  margin-top: 0;
  font-size: 16px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-10px);}
  to {opacity: 1; transform: translateY(0);}
}

/* Адаптив */
@media (max-width: 640px) {
  .header-actions {
    gap: 8px;
  }
  .header-cart .cart-link {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
}

/* === Bresta Group — збільшені товарні картки === */
@media (min-width: 1200px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)) !important;
    gap: 40px !important;
    padding: 40px 0 !important;
    max-width: 1400px;
    margin: 0 auto;
  }

  .woocommerce ul.products li.product {
    padding: 28px !important;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
  }

  .woocommerce ul.products li.product:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(14,165,233,0.25);
  }

  .woocommerce ul.products li.product img {
    height: 300px !important;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 16px;
  }

  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 20px !important;
    font-weight: 700;
    color: #0f172a;
  }

  .woocommerce ul.products li.product .price {
    font-size: 18px !important;
    color: #2563eb;
  }

  .woocommerce ul.products li.product .button {
    margin-top: 12px;
    padding: 12px 26px;
    border-radius: 10px;
    font-size: 15px;
  }
}

/* 📱 На мобільному — залишаємо 2 товари в ряд, але трохи ширші */
@media (max-width: 768px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px;
    padding: 12px;
  }
  .woocommerce ul.products li.product img {
    height: 180px;
  }
}

/* === WooCommerce — великі екрани (Full HD, 2K) === */
@media (min-width: 1400px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(4, minmax(260px, 1fr)) !important;
    gap: 26px !important;
    justify-content: center;
    padding: 0 40px;
  }

  .woocommerce ul.products li.product {
    max-width: 320px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }

  .woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  }

  .woocommerce ul.products li.product img {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 10px;
  }

  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 15px;
    line-height: 1.4;
    color: #1e293b;
  }

  .woocommerce ul.products li.product .price {
    color: #2563eb;
    font-size: 15px;
    font-weight: 700;
  }

  .woocommerce ul.products li.product .button {
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 6px;
    transition: background 0.3s ease;
  }
  .woocommerce ul.products li.product .button:hover {
    background: #3b82f6;
  }
}

/* === MOBILE FIX: компактна картка товару Bresta Group === */
@media (max-width: 767px) {
  /* Загальний блок */
  .single-product div.product {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 12px;
    margin: 20px auto;
    max-width: 100%;
  }

  /* Фото товару */
  .single-product div.product .woocommerce-product-gallery {
    width: 100%;
    max-width: 260px;
    margin: 0 auto 12px;
  }

  .single-product div.product .woocommerce-product-gallery img {
    max-height: 180px;
    width: auto;
    object-fit: contain;
    border-radius: 10px;
  }

  /* Назва і ціна */
  .single-product div.product .summary {
    padding: 0;
  }

  .single-product div.product .summary h1.product_title {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 4px;
  }

  .single-product div.product .summary .price {
    font-size: 16px;
    color: #2563eb;
    font-weight: 700;
    margin-bottom: 8px;
  }

  /* Кнопка */
  .single-product div.product .summary .cart {
    margin-top: 8px;
  }

  .single-product div.product .summary .cart button.single_add_to_cart_button {
    width: 100%;
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 10px 0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.3s ease;
  }

  .single-product div.product .summary .cart button.single_add_to_cart_button:hover {
    background: #3b82f6;
  }

  /* Опис товару */
  .single-product div.product .summary .woocommerce-product-details__short-description {
    font-size: 14px;
    color: #475569;
    margin-top: 12px;
    line-height: 1.5;
  }
}

/* === DESKTOP FIX: компактна картка товару Bresta Group === */
@media (min-width: 1024px) {
  .single-product div.product {
    display: grid;
    grid-template-columns: 420px 1fr;
    align-items: flex-start;
    gap: 40px;
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
  }

  /* Фото товару */
  .single-product div.product .woocommerce-product-gallery {
    max-width: 420px;
  }

  .single-product div.product .woocommerce-product-gallery img {
    max-height: 300px;
    width: auto;
    object-fit: contain;
    border-radius: 10px;
  }

  /* Опис */
  .single-product div.product .summary {
    padding-top: 10px;
    max-width: 480px;
  }

  .single-product div.product .summary h1.product_title {
    font-size: 26px;
    line-height: 1.3;
    margin-bottom: 8px;
    color: #1e293b;
  }

  .single-product div.product .summary .price {
    font-size: 20px;
    color: #2563eb;
    font-weight: 700;
    margin-bottom: 12px;
  }

  .single-product div.product .summary .woocommerce-product-details__short-description {
    font-size: 15px;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 16px;
  }

  /* Кнопка */
  .single-product div.product .summary .cart {
    margin-top: 8px;
  }

  .single-product div.product .summary .cart button.single_add_to_cart_button {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
  }

  .single-product div.product .summary .cart button.single_add_to_cart_button:hover {
    background: #3b82f6;
    transform: translateY(-2px);
  }
}

/* ======================================================
   FIX: Компактна сторінка товару (Single Product)
   Bresta Group — 2025
   ====================================================== */

/* === ПК та ноутбуки === */
@media (min-width: 1024px) {
  .single-product div.product {
    display: grid;
    grid-template-columns: 380px 1fr;
    align-items: start;
    gap: 40px;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
  }

  /* Фото */
  .single-product div.product .woocommerce-product-gallery {
    max-width: 380px;
  }

  .single-product div.product .woocommerce-product-gallery img {
    max-height: 320px;
    width: 100%;
    object-fit: contain;
    border-radius: 10px;
  }

  /* Текст і кнопки */
  .single-product div.product .summary {
    max-width: 460px;
    padding-top: 10px;
  }

  .single-product div.product .summary h1.product_title {
    font-size: 26px;
    line-height: 1.3;
    margin-bottom: 8px;
    color: #1e293b;
  }

  .single-product div.product .summary .price {
    font-size: 20px;
    color: #2563eb;
    font-weight: 700;
    margin-bottom: 10px;
  }

  .single-product div.product .summary .woocommerce-product-details__short-description {
    font-size: 15px;
    line-height: 1.5;
    color: #475569;
    margin-bottom: 12px;
  }

  /* Кнопка */
  .single-product div.product .summary .cart {
    margin-top: 6px;
  }

  .single-product div.product .summary .cart button.single_add_to_cart_button {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
  }

  .single-product div.product .summary .cart button.single_add_to_cart_button:hover {
    background: #3b82f6;
    transform: translateY(-2px);
  }
}

/* === Телефони (до 767px) === */
@media (max-width: 767px) {
  .single-product div.product {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 12px;
    margin: 20px auto;
    max-width: 100%;
    text-align: center;
  }

  /* Фото */
  .single-product div.product .woocommerce-product-gallery {
    width: 100%;
    max-width: 260px;
    margin-bottom: 10px;
  }

  .single-product div.product .woocommerce-product-gallery img {
    max-height: 180px;
    object-fit: contain;
    border-radius: 10px;
  }

  /* Текст */
  .single-product div.product .summary h1.product_title {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 6px;
  }

  .single-product div.product .summary .price {
    font-size: 16px;
    color: #2563eb;
    font-weight: 700;
    margin-bottom: 10px;
  }

  .single-product div.product .summary .woocommerce-product-details__short-description {
    font-size: 14px;
    color: #475569;
    line-height: 1.4;
  }

  /* Кнопка */
  .single-product div.product .summary .cart {
    margin-top: 10px;
    width: 100%;
  }

  .single-product div.product .summary .cart button.single_add_to_cart_button {
    width: 100%;
    background: #2563eb;
    color: #fff;
    padding: 10px 0;
    font-size: 15px;
    border: none;
    border-radius: 8px;
  }

  .single-product div.product .summary .cart button.single_add_to_cart_button:hover {
    background: #3b82f6;
  }
}

/* ======================================================
   FIX: Вирівнювання карточок товарів у магазині
   Bresta Group — 2025
   ====================================================== */

.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
  gap: 24px !important;
  justify-content: center;
  padding: 0 20px;
}

/* Кожна карточка товару */
.woocommerce ul.products li.product {
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
  min-height: 340px;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.05);
}

/* Фото */
.woocommerce ul.products li.product img {
  max-height: 150px;
  width: auto;
  object-fit: contain;
  margin-bottom: 12px;
}

/* Назва */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
  min-height: 40px; /* вирівнює назви */
}

/* Ціна */
.woocommerce ul.products li.product .price {
  color: #2563eb;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 8px;
}

/* Кнопка */
.woocommerce ul.products li.product .button {
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 500;
  transition: background 0.3s ease;
  margin-top: auto; /* щоб завжди внизу */
}

.woocommerce ul.products li.product .button:hover {
  background: #3b82f6;
}

/* --- Адаптація для мобільних --- */
@media (max-width: 767px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 10px;
  }

  .woocommerce ul.products li.product {
    min-height: 300px;
    padding: 10px;
  }

  .woocommerce ul.products li.product img {
    max-height: 120px;
  }

  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px;
  }

  .woocommerce ul.products li.product .price {
    font-size: 13px;
  }

  .woocommerce ul.products li.product .button {
    font-size: 12px;
    padding: 6px 10px;
  }
}

