/* ================= GLOBAL BASE STYLES ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)),
              url('images/soft-white-fabric-texture-with-gentle-folds-ideal-for-backgrounds-and-textile-designs-photo.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #e8d9c0;
  overflow-x: hidden;
  padding: 40px;
  position: relative;
  min-height: 100vh;
}

/* Background Grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
              linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
}

/* Glows Behind Website */
.bg-blur {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  z-index: -2;
}

.blur1 {
  width: 450px;
  height: 450px;
  background: #c6a56a;
  top: -120px;
  left: -120px;
  opacity: 0.25;
}

.blur2 {
  width: 550px;
  height: 550px;
  background: #f5e8c7;
  bottom: -180px;
  right: -80px;
  opacity: 0.18;
}

/* ================= AMINATIONS (SCROLL SHOW/HIDDEN) ================= */
.card.hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), 
              transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card.show {
  opacity: 1;
  transform: translateY(0);
}

/* ================= BASE CARD (GLASSMORPHISM) ================= */
.card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  padding: 40px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, box-shadow 0.4s, transform 0.4s;
}

/* Dynamic Mouse Glow */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                              rgba(245, 232, 180, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.card:hover::before {
  opacity: 1;
}

/* ================= HEADER ================= */
.header {
  position: sticky;
  top: 20px;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(245, 238, 225, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  margin-bottom: 40px;
}

.logo img {
  width: 55px;
  height: 55px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: block;
  
  /* Плавность: анимируем трансформацию (scale) за 0.4 секунды сглаженно */
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  
  cursor: pointer;
}

/* Enlarged state applied via JS after a 2s hold */
.logo img.enlarged {
  transform: scale(3);
}

/* === 2. ЭФФЕКТ ПРИ НАЖАТИИ (КЛИКЕ) МЫШКИ === */
/* Псевдокласс :active срабатывает в момент зажатия кнопки мыши */
.logo img:active {
  transform: scale(1.1); /* При клике чуть уменьшаем обратно, создавая эффект "нажатия кнопки" */
  transition-delay: 0s;  /* При клике задержка сбрасывается, чтобы реакция была мгновенной */
  transition: transform 0.1s ease; /* Делаем клик очень резким и отзывчивым */
}

.nav {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.6);
  padding: 6px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.nav a {
  color: #1a1a1a;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 20px;
  border-radius: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav a:hover {
  color: #b8862b;
  background: rgba(232, 196, 90, 0.2);
}

/* Make navbar sleeker to match premium design */
.nav {
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(245,238,225,0.6));
  padding: 8px 12px;
  gap: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

.nav a {
  padding: 10px 18px;
  border-radius: 12px;
  color: #1a1a1a;
  font-weight: 700;
  transition: all 0.28s ease;
}

.nav a:hover {
  color: #fff9e6;
  background: linear-gradient(90deg, rgba(212,169,61,0.95), rgba(180,120,30,0.95));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(184,134,43,0.24);
}

/* Burger button (mobile only) */
.burger {
  display: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px;
  border-radius: 10px;
  gap: 6px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.burger-bar {
  display: block;
  width: 22px;
  height: 2.5px;
  background: #1a1a1a;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.burger.open .burger-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.burger.open .burger-bar:nth-child(2) {
  opacity: 0;
}
.burger.open .burger-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Global overlay for large previews */
.global-overlay {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  padding: 24px;
}

.global-overlay.visible {
  display: flex;
}

.global-overlay img {
  width: min(86vw, 620px);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 36px 120px rgba(0,0,0,0.6);
}

/* ================= HERO SECTION ================= */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.mini-title {
  display: block;
  color: #d4b37c;
  font-size: 13px;
  letter-spacing: 3px;
  font-weight: 700;
  margin-bottom: 15px;
}

.hero-left h1 {
  font-size: 64px;
  line-height: 1.1;
  margin-bottom: 25px;
  font-weight: 800;
  background: linear-gradient(180deg, #ffffff 0%, #f5e0a0 50%, #d4a93d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-left p {
  color: #c7baa0;
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 35px;
  max-width: 90%;
}

/* Hero Right Visual Bag Preview */
.hero-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  gap: 24px;
  min-height: 640px;
}

.preview-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(212, 169, 61, 0.24);
  border: 1px solid rgba(255, 214, 111, 0.45);
  color: #fff9e6;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.globe-shell {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  perspective: 1200px;
}

.globe {
  position: relative;
  width: min(100%, 420px);
  height: min(100%, 420px);
  transform-style: preserve-3d;
  transform: scale(1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: grab;
}

.globe.dragging {
  cursor: grabbing;
}

.globe-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
  transition: box-shadow 0.25s ease;
}

.globe-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(80vw, 520px);
  max-height: min(80vh, 720px);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  z-index: 9999;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

.globe-overlay.visible {
  display: flex;
}

.globe-overlay img {
  width: 100%;
  height: auto;
  max-height: 72vh;
  border-radius: 24px;
  object-fit: contain;
}

.globe-rotator {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.15s ease;
}

.globe-spinning {
  animation: globe-spin 18s linear infinite;
}

.globe-face {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  transform-style: preserve-3d;
  transform-origin: center center;
  backface-visibility: hidden;
}

.globe-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
}

.globe-ring {
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(212, 169, 61, 0.18);
  border-radius: 50%;
  transform: rotateX(70deg);
  pointer-events: none;
}

.globe-meta {
  text-align: center;
}

.globe-meta h3 {
  color: #f5e8c7;
  font-size: 26px;
  margin-top: 8px;
}

.globe-meta p {
  color: #d4c69c;
  max-width: 92%;
  margin: 0 auto;
  line-height: 1.75;
}

.globe-meta a {
  color: #d4b37c;
  text-decoration: underline;
}

@keyframes globe-spin {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

.globe-instructions {
  margin: 40px 0 20px;
}

.globe-instructions-card {
  padding: 30px;
}

.globe-instructions-card h2 {
  color: #f5e8c7;
  margin-bottom: 14px;
}

.globe-instructions-card p {
  color: #c7baa0;
  line-height: 1.8;
  margin-bottom: 12px;
}

.globe-instructions-card code {
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 8px;
  border-radius: 8px;
}

/* ================= COMPONENTS: BUTTON ================= */
button {
  background: linear-gradient(145deg, #e8c45a, #b8862b);
  color: #1f1815;
  padding: 16px 36px;
  border: none;
  border-radius: 16px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 15px rgba(184, 134, 43, 0.3);
}

button:hover {
  transform: translateY(-4px);
  background: linear-gradient(145deg, #f5d96f, #c99a3d);
  box-shadow: 0 8px 25px rgba(184, 134, 43, 0.45);
}

/* ================= INFO GRID SECTION ================= */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.info-card .top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.info-card h2, .eco-card h2, .contact-card h2 {
  font-size: 24px;
  color: #f5e8c7;
  letter-spacing: 1px;
}

.info-card p, .eco-card p, .contact-card p {
  color: #c7baa0;
  line-height: 1.6;
  margin-bottom: 20px;
}

.info-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.info-card .tags span {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 12px;
  color: #d4b37c;
}

.contact-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.contact-top .status {
  font-size: 11px;
  background: #2e7d32;
  color: #e8f5e9;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 700;
}

.contact-list p {
  margin-bottom: 12px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ================= ABOUT FACTORY SECTION ================= */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 50px;
}

.about-left h2 {
  font-size: 42px;
  color: #f5e8c7;
  line-height: 1.2;
  margin-bottom: 20px;
}

.about-left p {
  color: #c7baa0;
  font-size: 16.5px;
  line-height: 1.7;
}

.about-gallery {
  display: flex;
  gap: 15px;
  height: 260px;
}

.gallery-img {
  flex: 1;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.5s ease;
}

.gallery-img:hover {
  flex: 1.8;
  filter: brightness(1.1);
}

/* ================= CATALOG SECTION ================= */
.catalog-section {
  margin-top: 60px;
  margin-bottom: 60px;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 44px;
  color: #f5e8c7;
  background: linear-gradient(180deg, #ffffff, #c7baa0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

/* SABER catalog header: span full width above SABER cards and center text */
.catalog-saber-title {
  grid-column: 1 / -1;
  text-align: center;
  margin: 20px 0 8px;
}
.catalog-saber-title .mini-title {
  display: block;
  color: #d4b37c;
  font-size: 13px;
  letter-spacing: 3px;
  font-weight: 700;
  margin-bottom: 6px;
}
.catalog-saber-title h2 {
  font-size: 32px;
  color: #f5e8c7;
  margin: 0;
}

/* Специфичный пересброс паддингов .card для карточек каталога */
.catalog-card.card {
  padding: 0px; 
  border-radius: 26px;
}

.catalog-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.catalog-card:hover img {
  transform: scale(1.06);
}

.catalog-info {
  padding: 24px;
  text-align: center;
  position: relative;
  z-index: 2;
  background: rgba(15, 15, 15, 0.5);
  backdrop-filter: blur(10px);
}

.catalog-info h3 {
  color: #f5e8c7;
  font-size: 19px;
  margin-bottom: 8px;
}

.catalog-info .price {
  font-size: 24px;
  font-weight: 700;
  color: #d4a93d;
}

/* ================= FOOTER ================= */
footer {
  text-align: center;
  padding: 60px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 80px;
}

footer h2 {
  font-size: 22px;
  letter-spacing: 2px;
  color: #f5e8c7;
  margin-bottom: 10px;
}

footer p {
  color: #7a705a;
  font-size: 14px;
}

/* ================= RESPONSIVE DESIGN (MEDIA QUERIES) ================= */
@media (max-width: 1200px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body { 
    padding: 16px; 
  }
  .header { 
    flex-direction: column; 
    gap: 16px; 
    padding: 16px;
  }
  /* Show burger and hide desktop nav by default on mobile */
  .burger { display: flex; }
  .nav { display: none; position: fixed; top: 84px; right: 16px; background: rgba(245,238,225,0.95); flex-direction: column; padding: 12px; gap: 8px; border-radius: 12px; box-shadow: 0 18px 60px rgba(0,0,0,0.25); z-index: 1001; }
  .nav.open { display: flex; }
  .nav a { color: #1a1a1a; padding: 10px 14px; border-radius: 8px; }
  /* Ensure map link in contact looks tappable */
  .map-link { color: #d4b37c; font-weight:700; text-decoration:underline; }
  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  .nav a {
    padding: 8px 16px;
    font-size: 14px;
  }
  .hero-left h1 {
    font-size: 42px;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
  .about-gallery {
    height: 180px;
  }
}
/* Mobile tweaks for globe to improve spacing and performance */
@media (max-width: 768px) {
  .globe {
    width: min(86vw, 320px);
    height: min(86vw, 320px);
  }
  .globe-face {
    width: 72px;
    height: 72px;
  }
  .logo img.enlarged {
    transform: scale(2.2);
  }
}
/* ================= SWITCH PHOTO EFFECT FOR CATALOG ================= */

/* Контейнер для картинок */
.catalog-img-container {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.2);
}

/* Общие стили для обеих картинок товара */
.catalog-card .catalog-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Класс активной картинки (которая видна в данный момент) */
.catalog-card .catalog-img.active {
  opacity: 1;
  visibility: visible;
}

/* Легкий зум картинки при наведении на карточку */
.catalog-card:hover .catalog-img.active {
  transform: scale(1.05);
}

/* Визуальные подсказки снизу картинки (тонкие полосочки, как в Instagram-story) */
.hover-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  display: flex;
  gap: 6px;
  z-index: 5;
  pointer-events: none; /* Чтобы полоски не мешали курсору */
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Показываем полосочки только при наведении на карточку */
.catalog-card:hover .hover-indicators {
  opacity: 0.6;
}

.hover-indicators span {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  transition: background 0.3s ease;
}

/* Подсветка левой или правой полоски в зависимости от того, какое фото активно */
.catalog-card:has(.img-primary.active) .hover-indicators span:nth-child(1) {
  background: #d4a93d;
}
.catalog-card:has(.img-secondary.active) .hover-indicators span:nth-child(2) {
  background: #d4a93d;
}
/* Специальный класс для карточки с 3D, чтобы не задеть остальные */
.hero-3d-card {
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), 
              box-shadow 0.6s ease, 
              border-color 0.6s ease;
  will-change: transform;
}

/* Эффект мощного увеличения при наведении (Увеличитель) */
.hero-3d-card:hover {
  transform: scale(1.06) translateY(-5px) !important; /* Увеличиваем всю карточку на 6% */
  border-color: rgba(212, 169, 61, 0.3); /* Подсвечиваем границы золотом */
  box-shadow: 0 20px 50px rgba(212, 169, 61, 0.15); /* Делаем глубокую золотистую тень */
  z-index: 10;
}

/* Плавное увеличение самой 3D модели внутри карточки */
.hero-3d-card model-viewer {
  width: 100%;
  height: 350px;
  outline: none;
  --poster-color: transparent;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Когда мышка над карточкой, модель дополнительно увеличивается внутри своего контейнера */
.hero-3d-card:hover model-viewer {
  transform: scale(1.12); /* Модель станет еще на 12% ближе */
}
.gold-line{
  width:120px;
  height:3px;
  margin:18px 0 24px;
  border-radius:10px;
  background:linear-gradient(90deg,#d4af37,#f7d77a);
  box-shadow:0 0 25px rgba(212,175,55,.6);
}

.hero h1{
  color:#f7f0dc;
  line-height:1;
}

.hero h1 br{
  display:block;
}

.hero h1{
  text-shadow:
  0 0 10px rgba(212,175,55,.3),
  0 0 20px rgba(212,175,55,.15);
}

.hero-features{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
  margin:25px 0;
}

.feature-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  border-radius:14px;
  backdrop-filter:blur(10px);
}

.feature-item span{
  font-size:20px;
}

.feature-item p{
  margin:0;
  font-size:14px;
  font-weight:600;
}

.hero-stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
  margin-bottom:25px;
}

.stat-box{
  padding:16px;
  border-radius:16px;
  text-align:center;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  backdrop-filter:blur(10px);
}

.stat-box h3{
  margin:0;
  font-size:24px;
  color:#d4af37;
}

.stat-box span{
  font-size:13px;
  opacity:.8;
}
