/* ==== Импорты шрифтов ==== */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Open+Sans:wght@300;400;600&display=swap');

/* ==== Переменные ==== */
:root {
  --max: 1200px;
  --accent: #000;
  --muted: #666;
}

/* ==== Общие стили ==== */
* { box-sizing: border-box; margin-top: 2px;}
body {
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  margin: 0;
  color: var(--accent);
  background: #fdf5e6;
}
a { color: inherit; text-decoration: none; }

.logo a {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
}
nav {
  display: flex;
  gap: 14px;
  align-items: center;
}
nav a {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
}
#cart-widget { font-size: 16px;}
.checkout-container { display: flex; gap: 40px; flex-wrap: wrap; }
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 20px;
}

.h1 {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  margin: 0 0 20px;
}
.hero {
  position: relative;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}

.hero .cta {
  background: rgba(255,255,255,0.95);
  padding: 20px 40px;
  border-radius: 28px;
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  text-transform: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  opacity: 0;
  animation: fadeIn 1.5s ease forwards;
  animation-delay: 0.1s;
}

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

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: 32px;
}

.item {
  text-align: center;
}
.item img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #fafafa;
  background: #fff;
  transition: transform .25s ease;
  cursor: pointer;
}
.item img:hover { transform: scale(1.03); }
.item .title {
  display: block;
  margin-top: 14px;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
}
.item .price { margin-top: 8px; font-weight: 600; }

.product-page {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.product-page img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 18px auto;
}

button {
  background: #000;
  color: #fff;
  border: none;
  padding: 10px 16px;
  font-size: 17px;
  cursor: pointer;
  border-radius: 4px;
}

.cart-list {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 1.3rem;
}
.total { font-weight: 700; margin-top: 12px; text-align: right; }

.footer { padding: 40px 20px; text-align: center; color: var(--muted); }

.product-title {
  text-align: center;
  font-size: 2.5em;
  margin-top: 20px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
}

.product-title a {
  text-decoration: none;
  color: inherit;
}

.inspiration {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  font-family: 'Libre Baskerville', serif;
  font-size: 32px;
  color: #444;
  text-align: center;
}

.product-gallery { flex: 1; }
.main-image { width: 100%; border-radius: 8px; }
.thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.thumbnails img {
  width: 80px;
  height: auto;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid #ddd;
  transition: border-color 0.2s;
}
.thumbnails img:hover { border-color: #333; }

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.price { font-size: 1.1rem; font-weight: bold; }

/* ==== Catalog container ==== */
.catalog-container {
  display: flex;
  flex-direction: column; /* brand-info сверху */
  gap: 25px;
  align-items: stretch;
  width: 100%;
}

.brand-info {
  width: 100%;
  background-image: url('../img/brand-info-bg.jpeg');
  background-size: cover;
  background-position: center;
  color: #000;
  margin-bottom: 20px;
  padding: 20px;
  border-radius: 4px;
  font-family: 'Open Sans', sans-serif;
}

.brand-info h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  margin-bottom: 10px;
}

.brand-info p {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}


/* ==== Cart banner ==== */
.cart-banner {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: #333;
  color: #f7e6d3;
  padding: 16px 24px;
  border-radius: 12px;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 9999;
  text-align: center;
  max-width: 90%;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.cart-banner.show {
  opacity: 1;
  pointer-events: auto;
}
.cart-banner .banner-buttons { display: flex; gap: 15px; }
.cart-banner .checkout {
background: none;
  border: 1px solid #fff;
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}
.description {
    line-height: 1.6;
    font-size: 16px;
}

.description b {
    font-weight: bold;
}

/* ==== Медиазапросы ==== */
@media (max-width: 1024px) {
  body { font-size: 95%; }
  img { max-width: 100%; height: auto; }
  .catalog { grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 20px; }
}

@media (max-width: 767px) {
  body { font-size: 90%; }
  header, .container, footer { padding: 0px; }
  nav { gap: 10px; flex-wrap: wrap; justify-content: center; }
  .catalog { grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; width: 100%; }
  .product-page { flex-direction: column; gap: 20px; }
  .product-gallery, .product-info { width: 100%; }
  .thumbnails img { width: 60px; }
  .catalog-container { flex-direction: column; }
  .catalog-container .catalog, .catalog-container .brand-info { max-width: 100%; flex: 1 1 100%; }
  }

@media (max-width: 480px) {
  body { font-size: 85%;}
  body.cart-html .container { padding: 0px; }
  nav a { font-size: 14px; }
  .h1, .product-title { font-size: 2em; margin-left: 10px;}
  .container p { margin-left: 10px; margin-right: 5px; }
  .inspiration { font-size: 1.5em; }
  .catalog { grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 14px; }
  .item .title { font-size: 17px; }
  .thumbnails img { width: 50px; }
  .cart-item img { width: 70px; }
  .description { line-height: 1.6; padding: 0 10px; }
  .price {padding: 0px 10px; }
  #certificatePrice,
  label[for="certificatePrice"] {
    margin-left: 10px; }
  h2 {margin-left: 10px; }
.checkout-container {
        display: flex;
        gap: 20px;
        flex-wrap: wrap;
    }
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  flex-direction: column;
}

/* Логотип */
header .logo a {
  font-size: 40px;
  font-weight: bold;
  text-decoration: none;
  color: #000; /* логотип чёрный */
}

/* Контейнер для навигации + корзины */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Навигация */
header nav {
  display: flex;
  gap: 66px;
  flex-direction: row;
  flex-wrap: wrap;
  align-content: center;
  justify-content: space-around;
}

header nav a {
  text-decoration: none;
  color: #333;
  font-size: 18px;
}

/* Корзина */
#cart-widget a {
  text-decoration: none;
  color: #ef8787;
  font-size: 14px;
  
}

/* Мобильная версия */
@media (max-width: 767px) {
  header {  padding: 5px 10px;
    flex-wrap: nowrap;
  }

  .header-right {
    gap: 10px;
  }

  header nav {
    gap: 6px;
    flex-wrap: wrap;
	
  }