/* style.css */
html, body { margin: 0; padding: 0; }

:root{
  --focus-ring: 0 0 0 3px rgba(118,97,98,0.25);
  --focus-border: rgba(118,97,98,0.85);
}

/* чтобы якоря не прятались под fixed nav */
section[id], div[id], footer[id]{
  scroll-margin-top: 95px;
}

body{
  display: grid;
  align-items: center;
  justify-items: center;
  background-color: #f9faee;
  color: rgb(19, 18, 18);
  font-size: 17px;
  font-family: "Cardo", serif;
}

/* ---------------- HEADER ---------------- */
.container{
  background-image: url("img/cover1.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
  width: 100%;
}
main{ overflow: hidden; width: 100%; }

.capture{
  padding: 100px;
  text-align: center;
}

h1{
  color: #fdfbfc;
  font-size: 30px;
  text-transform: uppercase;
  margin: 0;
}

.item_description{
  padding-top: 50px;
  color: #fdfbfc;
  font-size: 18px;
  font-weight: 525;
  max-width: 1100px;
  margin: 0 auto;
}

/* CTA buttons */
.hero-cta{
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-btn{
  display: inline-block;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.7);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-decoration: none;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

.hero-btn--primary{
  background-color: #d3cacd;
  color: #1e313e;
}

.hero-btn--secondary{
  background-color: rgba(255,255,255,0.18);
  color: #ffffff;
  border-color: rgba(255,255,255,0.7);
}

.hero-btn:hover{ cursor: pointer; opacity: 0.95; transform: translateY(-1px); }
.hero-btn:focus-visible{ outline: none; box-shadow: var(--focus-ring); }

/* ---------------- NAV ---------------- */
.main-tool-bar{
  position: fixed;
  width: 100%;
  left: 0;
  top: 0;
  z-index: 10;
  transition: ease 0.4s;
}

.nav{
  display: flex;
  justify-content: end;
  background-color: #8a7575bc;
  padding: 10px;
  flex-wrap: wrap;
}

.nav__link{
  color: #fdfbfc;
  font-size: 16px;
  padding: 20px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 12px;
}

.nav__link:hover{ opacity: 0.95; text-decoration: underline; }
.nav__link:focus-visible{
  outline: none;
  box-shadow: var(--focus-ring);
  background: rgba(255,255,255,0.10);
}

/* ---------------- COMMON ---------------- */
.header{ display: flex; justify-content: center; }

.header_h2{
  color: #766162;
  font-size: 18px;
  padding-top: 40px;
  text-transform: uppercase;
}

a{ text-decoration: none; color: #1e313e; }

a:focus-visible{
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 10px;
}

.section{
  width: 100%;
  padding: 10px 0 40px;
}

/* ---------------- COLLECTION ---------------- */
.wrapper{
  display: flex;
  justify-content: center;
  width: 98%;
}

.product{
  width: 450px;
  height: 550px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid black;
  border-radius: 20px;
  margin: 50px;
  background: rgba(255,255,255,0.35);
}

.product-img{
  border-radius: 20px;
  object-fit: cover;
}
.one{ height: 300px; }

/* ---------------- SHOP FILTERS ---------------- */
.shop-filters{
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px 0;
}

.filter-btn{
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.75);
  background: rgba(255,255,255,0.35);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.filter-btn--active{ background-color: #d3cacd; }

.filter-btn:hover{ transform: translateY(-1px); }
.filter-btn:focus-visible{ outline: none; box-shadow: var(--focus-ring); }

.is-hidden{ display: none !important; }

/* ---------------- SHOP GRID ---------------- */
.app{
  padding-bottom: 150px; /* ✅ чтобы hover-карта не залезала на Policies */
  display: flex;
  justify-content: center;
  width: 100%;
  background: #feffef;
  position: relative;
  z-index: 0;
}

/* ---------------- SHOP GRID FIXED ---------------- */

.gallery{
  display: grid;
  grid-template-columns: repeat(3, 1fr);   /* ✅ ровно 3 товара */
  gap: 30px;
  padding: 10px;
  width: min(1400px, 98%);
  align-items: stretch;   /* ✅ одинаковая высота */
}

/* CARD */
.gallery__item{
  display: flex;
  flex-direction: column;
  justify-content: space-between;  /* ✅ кнопки на одном уровне */
  align-items: center;

  border-radius: 20px;
  padding: 16px;
  background: rgba(255,255,255,0.35);

  transition: transform 180ms ease, box-shadow 180ms ease;
  height: 100%;      /* ✅ одинаковая высота */
}

.gallery__item:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

/* картинка */
.gallery__img{
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 20px;
}

/* текст центрируем */
.item_name{
  text-align: center;
  margin-top: 10px;
}

.card-meta{
  text-align: center;
}

.item_name{
  color: #766162;
  padding: 10px;
  text-transform: uppercase;
}

.item_name:hover{ color: #a28587; }

.item_text{ color: #766162; }

.card-meta{
  font-size: 14px;
  color: #1e313e;
  opacity: 0.85;
  margin-top: -2px;
  margin-bottom: 6px;
}

/* ---------------- POPUP ---------------- */
.detail{
  position: fixed;
  top: 10px;
  left: 50%;
  width: 90.1vmin;
  cursor: pointer;
  font-size: 0;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  max-height: 100%;
  overflow: auto;
  z-index: 100;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
}

.detail__top{
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: 44px 44px 44px;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(254,255,239,0.95);
  z-index: 2;
}

.detail__nav,
.detail__close{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.4);
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  line-height: 1;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.detail__nav{ font-size: 26px; }
.detail__close{ font-size: 20px; }

.detail__nav:hover,
.detail__close:hover{
  background: rgba(211,202,205,0.75);
  transform: translateY(-1px);
}

.detail__nav:focus-visible,
.detail__close:focus-visible{
  outline: none;
  box-shadow: var(--focus-ring);
}

.detail__main-img{
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 55vh;
  object-fit: cover;
}

.detail__thumbs{
  display: flex;
  gap: 10px;
  padding: 10px 12px 0;
  background: #feffef;
}

.detail__thumb{
  width: 72px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.9;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.detail__thumb:hover{ transform: translateY(-1px); opacity: 1; }
.detail__thumb:focus-visible{ outline: none; box-shadow: var(--focus-ring); }

.detail__thumb.is-active{
  border-color: rgba(118,97,98,0.9);
  opacity: 1;
}

.detail .content{
  background: #feffef;
  padding: 2rem 1.5rem;
  font-size: 1rem;
  box-sizing: border-box;
  flex-grow: 1;
}

.detail .title{ font-size: 2rem; text-transform: uppercase; }
.detail .secondary{ color: rgb(56, 47, 47); font-size: 20px; }
.detail .description{ line-height: 1.5; font-size: 17px; }

.detail__meta-line{
  font-size: 14px;
  color: #1e313e;
  opacity: 0.85;
  margin: 10px 0 12px;
}

.detail__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------------- BUTTONS ---------------- */
.btn{
  margin: 10px;
  padding: 14px;
  font-size: 17px;
  background-color: #d3cacd;
  border: 1px solid black;
  border-radius: 30px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn:hover{
  background-color: #bbaaae;
  cursor: pointer;
  font-weight: 600;
  transform: translateY(-1px);
}

.btn:focus-visible{
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn--ghost{
  background: rgba(255,255,255,0.35);
}

/* ---------------- HOW IT WORKS ---------------- */
.wrapper_2{ display: flex; padding: 10px; }

.why-block{
  display: flex;
  justify-content: space-around;
  padding: 30px;
  color: #766162;
}

span{
  color: #1e313e;
  background-color: #bbaaae;
  border-radius: 50px;
  font-size: 55px;
  padding: 20px;
  margin: 25px;
}

.video{ display: flex; justify-content: center; }

/* ---------------- REVIEWS ---------------- */
.reviews{
  width: min(1100px, 92%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 16px;
}

.review-card{
  border: 1px solid rgba(0,0,0,0.35);
  border-radius: 16px;
  padding: 16px 14px;
  background: rgba(255,255,255,0.55);
}

.review-card:focus-within{ box-shadow: var(--focus-ring); }

.review-stars{
  letter-spacing: 2px;
  font-size: 18px;
  color: #766162;
}

.review-text{
  margin: 12px 0;
  color: #1e313e;
  line-height: 1.45;
}

.review-author{
  color: #766162;
  font-weight: 700;
}

/* ---------------- FAQ ACCORDION ---------------- */
.faq{
  width: min(900px, 92%);
  margin: 0 auto;
  padding-top: 10px;
}

.faq__item{
  border: 1px solid rgba(0,0,0,0.35);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.55);
  margin: 12px 0;
}

.faq__question{
  width: 100%;
  text-align: left;
  padding: 14px 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: "Cardo", serif;
  text-transform: uppercase;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #1e313e;
}

.faq__question:focus-visible{
  outline: none;
  box-shadow: var(--focus-ring);
}

.faq__icon{
  font-size: 22px;
  color: #766162;
  line-height: 1;
  transition: transform 180ms ease;
}

.faq__answer{
  padding: 0 14px 14px;
  color: #1e313e;
  line-height: 1.5;
}

.faq__item.is-open .faq__icon{
  transform: rotate(45deg);
}

/* ---------------- POLICIES ---------------- */
.policies{
  width: min(1100px, 92%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding-top: 16px;
}

.policy-card{
  border: 1px solid rgba(0,0,0,0.35);
  border-radius: 16px;
  padding: 16px 14px;
  background: rgba(255,255,255,0.55);
}

.policy-link:focus-visible{
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 10px;
}

/* ---------------- FOOTER ---------------- */
footer{
  background-color: #eee9ed;
  font-size: 18px;
  padding-bottom: 30px;
}

.footer_sections{
  display: flex;
  justify-content: space-around;
  padding: 20px;
}

li{
  font-size: 18px;
  color: #766162;
  list-style: none;
  margin: 10px;
}

li:hover{ text-decoration: underline; font-weight: 550; }

.contact{ color: #000000; text-decoration: underline; }

/* ---------------- ORDER FORM ---------------- */
.order-form{
  width: min(900px, 92%);
  margin: 14px auto 0;
  padding: 18px 16px;
  border: 1px solid rgba(0,0,0,0.35);
  border-radius: 16px;
  background: rgba(255,255,255,0.55);
}

.order-form input,
.order-form select,
.order-form textarea{
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.35);
  background: rgba(255,255,255,0.7);
  font-family: "Cardo", serif;
  font-size: 16px;
  color: #1e313e;
  outline: none;
  box-sizing: border-box;
}

.order-form textarea{
  resize: vertical;
  min-height: 140px;
  line-height: 1.4;
}

.order-form input::placeholder,
.order-form textarea::placeholder{
  color: rgba(30,49,62,0.65);
}

.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus{
  border-color: var(--focus-border);
  box-shadow: var(--focus-ring);
}

.form-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.order-form select{ cursor: pointer; }

.order-form .form-btn{
  display: inline-block;
  margin: 12px 0 6px;
  width: 100%;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.form-note{
  margin: 6px 0 0;
  text-align: center;
  color: #766162;
  font-weight: 700;
}

/* ---------------- RESPONSIVE ---------------- */

@media all and (max-width:1550px){
  .wrapper{ flex-wrap: wrap; }
  .container{ background-image: url("img/coverNew1.jpg"); }
  .reviews{ grid-template-columns: 1fr; }
  .policies{ grid-template-columns: 1fr; }
}

/* ✅ на планшете: 2 колонки товаров */
@media all and (max-width:1000px){
  .gallery{
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media all and (max-width:820px){
  .wrapper_2{ flex-direction: column; }
  .main-tool-bar{ position: relative; }
  .nav{ flex-direction: column; align-items: center; }
  .item_description, h1{ padding: 15px; }
  .header_h2{ text-align: center; }
  .footer_sections{ flex-direction: column; }
  div.gmap_canvas, div.mapouter, iframe{ width: 100%; }
  .product{ width: 100%; height: 100%; }
  .product-img{ width: 95%; }
  .one{ height: 445px; }
  .detail__thumb{ width: 64px; height: 48px; }
  .form-row{ grid-template-columns: 1fr; }
}

@media all and (max-width:510px){
  .one{ height: 240px; }
  .gallery__img{ height: 260px; }
}
