@import url("https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap");

/*-----------------------------------*\
  #HERO
\*-----------------------------------*/

.hero {
  padding-block-start: calc(var(--section-padding) + 60px);
}

.hero-list {
  display: grid;
  gap: 15px;
}

.hero-card {
  position: relative;
}

.hero-card .img-cover {
  transition: var(--transition-2);
}

.hero-card:is(:hover, :focus) .img-cover {
  transform: scale(1.1);
}

.hero-card .card-content {
  position: absolute;
  top: 30px;
  left: 30px;
  right: 30px;
}

.hero-card :is(.card-title, .card-text) {
  font-weight: var(--fw-500);
}

.hero-card .card-title {
  font-size: var(--fs-3);
  transition: var(--transition-1);
}

.hero-card .card-title:is(:hover, :focus) {
  color: var(--tan-crayola);
}

/*-----------------------------------*\
    #ABOUT
\*-----------------------------------*/

.about {
  text-align: center;
}

.about .section-title {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-style: normal;
  font-size: 45px;
}

.about .section-text {
  margin-block: 12px 45px;
}

.about-card {
  position: relative;
}

.about-card .img-cover {
  transition: var(--transition-2);
}

.about-card:is(:hover, :focus) .img-cover {
  transform: scale(1.1);
}

/*-----------------------------------*\
    #PRODUCT
  \*-----------------------------------*/

.product .section-title {
  text-align: center;
}

.product .title-wrapper {
  margin-block-end: 30px;
}

#home-product-list {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  #home-product-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  #home-product-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.filter-btn-list {
  /* margin-top: 8px;
  margin-bottom: 10px; */
  margin-block: 20px 50px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn-item {
  position: relative;
  display: flex;
}

.filter-btn-item:not(:last-child)::after {
  content: "|";
  margin-inline: 15px;
}

.filter-btn {
  transition: var(--transition-1);
}

.filter-btn.active {
  color: var(--tan-crayola);
}

.product-card {
  position: relative;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid hsl(0 0% 92%);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition-2), transform var(--transition-2);
  overflow: hidden;
}

.product-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.product-card .product-media-wrapper {
  position: relative;
  background-color: var(--light-gray);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.product-card .product-media-wrapper img,
.product-card .product-media-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-2);
}

.product-card:hover .product-media-wrapper img {
  transform: scale(1.05);
}

.product-card .quick-preview-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background-color: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  color: var(--smokey-black);
  transition: var(--transition-1);
}

.product-card .quick-preview-btn:hover {
  background-color: var(--tan-crayola);
  color: var(--white);
  box-shadow: 0 14px 24px rgba(238, 91, 33, 0.3);
}

.product-card .card-info {
  padding: 1.4rem 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
}

.product-card .card-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--smokey-black);
  transition: var(--transition-1);
}

.product-card:hover .card-title {
  color: var(--tan-crayola);
}

.product-card .card-price {
  font-size: 1.4rem;
  color: var(--granite-gray);
}

.product-list > * {
  display: none;
}

.product-list[data-filter="all"] > *,
.product-list[data-filter="accessory"] > .accessory,
.product-list[data-filter="decoration"] > .decoration,
.product-list[data-filter="furniture"] > .furniture {
  display: block;
  animation: fadeUp 1s ease forwards;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.more-products-button {
  text-align: center;
  margin-top: 40px;
}

.more-products-button a {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--tan-crayola); /* ярко-оранжевый, как в теме */
  color: white;
  font-size: 16px;
  font-weight: 500;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

.more-products-button a:hover {
  background-color: hsl(17, 96%, 40%); /* немного темнее при наведении */
}

/* ====== МОДАЛКА ДЛЯ ГЛАВНОЙ СТРАНИЦЫ ====== */

.modal[aria-hidden="true"] {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.modal[aria-hidden="false"] {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 1;
  pointer-events: all;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 0;
  cursor: pointer;
}

.modal-dialog {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  width: min(900px, 90vw);
  max-width: min(900px, 90vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  line-height: 30px;
  font-size: 1.6rem;
  text-align: center;
  cursor: pointer;
  color: var(--smokey-black);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.modal-body {
  background: #fff;
  color: #000;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  min-height: 500px;
}

.gallery-viewport {
  position: relative;
  width: 500px;
  height: 500px;
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  overflow: hidden;
}

.gallery-counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 5;
  white-space: nowrap;
}

.gallery-counter:empty {
  display: none;
}

.gallery-viewport img,
.gallery-viewport video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: opacity 0.4s ease;
}

.gallery-viewport img.fade-out,
.gallery-viewport video.fade-out {
  opacity: 0;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

#home-modal-prev {
  left: 2rem;
}

#home-modal-next {
  right: 2rem;
}

@media (max-width: 768px) {
  .gallery-viewport {
    width: 400px;
    height: 400px;
  }

  .modal-body {
    padding: 2rem;
    min-height: 400px;
  }
}

@media (max-width: 500px) {
  .gallery-viewport {
    width: 300px;
    height: 300px;
  }

  .modal-body {
    padding: 1.5rem;
    min-height: 300px;
  }

  .nav-btn {
    width: 36px;
    height: 36px;
    font-size: 1.6rem;
  }

  #home-modal-prev {
    left: 1rem;
  }

  #home-modal-next {
    right: 1rem;
  }
}

.modal-description {
  font-size: 1.4rem;
  line-height: 1.7;
  color: #555;
}
.modal-description p { margin: 0.4em 0; }
.modal-description strong, .modal-description b { font-weight: 700; }
.modal-description em, .modal-description i { font-style: italic; }

.card-price-sold { color: #c0392b !important; font-weight: 700; }

.modal-info {
  background: #fff;
  border-top: 1px solid #eee;
  padding: 1.6rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: flex-start;
  column-gap: 2rem;
  row-gap: 1.6rem;
  overflow-y: auto;
  max-height: calc(90vh - 320px);
}

@media (max-width: 600px) {
  .modal-info {
    grid-template-columns: 1fr;
  }
}

.modal-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.modal-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-main .title {
  font-size: 2rem;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
}

.modal-main .material {
  font-size: 1.5rem;
  line-height: 1.4;
  color: #666;
  margin-top: 0.4rem;
}

.modal-main .category {
  display: inline-block;
  font-size: 1.3rem;
  line-height: 1.2;
  font-weight: 500;
  color: var(--white);
  background-color: var(--tan-crayola);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  box-shadow: 0 8px 16px rgba(238, 91, 33, 0.25);
  margin-top: 0.6rem;
  align-self: flex-start;
}

.modal-main .price {
  font-size: 1.6rem;
  font-weight: 600;
  color: #444;
  line-height: 1.4;
  margin-top: 0.5rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  font-size: 1.3rem;
  line-height: 1.4;
}

.faq-link {
  font-size: 1.3rem;
  line-height: 1.4;
  color: #e67e22;
  font-weight: 500;
  text-decoration: none;
}

.faq-link:hover {
  text-decoration: underline;
}

.modal-order-box {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
  font-size: 1.3rem;
  line-height: 1.4;
  color: #222;
  min-width: 240px;
  max-width: 260px;
}

@media (max-width: 600px) {
  .modal-order-box {
    max-width: 100%;
    min-width: 0;
  }
}

.order-text {
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: #222;
}

.order-contacts {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.order-contact-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.3rem;
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
  word-break: break-word;
}

.order-contact-link i {
  font-size: 1.4rem;
  color: #e67e22;
}

.order-contact-link:hover {
  color: #e67e22;
}

.payment-hint {
  font-size: 1.2rem;
  color: #777;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.03);
}
