body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: #fff;
  font-family: "Montserrat", serif;
}
.footer-links a {
  color: inherit;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0;
  width: 100%;
}
.header_content {
  display: flex;
  align-items: center;
  background-color: white;
  justify-content: space-between;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 15px;
  padding-top: 10px;
  padding-bottom: 10px;
  box-sizing: border-box;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.brand_name {
  font-family: "Bodoni Moda", serif;
  font-size: 22px;
}
.menu {
  width: 25px;
  height: 10%;
  object-fit: cover;
  display: block;
}
.menu_font {
  font-family: "Montserrat", serif;
}
.body {
  max-width: 480px;
  margin: 0 auto 0;
  text-align: center;
}
.pic_widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  gap: 15px;
}
.picture {
  width: 100%;
  max-width: 480px;
  margin: 0;
  margin-bottom: 30px;
  padding: 0;
  height: auto;
  display: block;
  object-fit: cover;
}
.about_us {
  display: flex;
  flex-direction: column;
  margin-top: 150px;
  padding: 25px;
  font-size: 15px;
}
.aboutus_widget {
  display: flex;
  flex-direction: column;
  margin-top: 150px;
  padding: 25px;
  font-size: 15px;
}
.headlines {
  font-size: 20px;
  font-weight: bold;
}

.filter_wrapper {
  margin-top: 30px;
  margin: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  text-align: left;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
}

#categoryFilter {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 6px 12px;
  border: 1px solid #000;
  border-radius: 6px;
  width: calc(100px + 5px);
  background-color: #fff;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg width='20' height='5' viewBox='0 0 15 5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M0 0l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px 5px;
  cursor: pointer;
  transition: 0.2s;
}
#categoryFilter:hover { border-color: #444; }
#categoryFilter:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

.footer {
  background: black;
  color: white;
  font-family: 'Montserrat', sans-serif;
  margin: auto;
  max-width: 480px;
  box-sizing: border-box;
  padding: 30px 20px;
}
.footer h2 { font-weight: 500; margin-bottom: 25px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 60px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 12px; cursor: pointer; }

/* ── Product grid ── */
#productContainer {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 14px;
}

.product-card {
  background: #fff;
  cursor: pointer;
  transition: transform 0.2s;
}
.product-card:hover { transform: translateY(-4px); }

.product-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #f5f5f5;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-info {
  padding: 8px 4px 10px;
}
.product-info h3 {
  font-size: 11px;
  margin: 0 0 3px;
  font-weight: 400;
}
.price {
  font-size: 10px;
  font-weight: 400;
  margin: 0 0 3px;
  color: #111;
}
.size {
  font-size: 11px;
  margin: 0 0 2px;
  color: #222;
}
.model {
  font-size: 10px;
  color: #666;
  margin: 0 0 6px;
}

/* color dots — card */
.card-colors {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.color-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.15);
  display: inline-block;
  flex-shrink: 0;
}

/* ── Side menu / overlay ── */
.overlay {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 100vh;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
  z-index: 998;
}
.side_menu {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}
.menu_panel {
  position: absolute;
  top: 0;
  left: -260px;
  width: 190px;
  height: 100%;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 80px 20px;
  box-sizing: border-box;
  transition: 0.3s ease;
  pointer-events: auto;
}
.menu_panel a { text-decoration: none; color: inherit; }
.side_menu.active .menu_panel { left: 0; }
.overlay.active { opacity: 1; visibility: visible; }
.menu_panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Product modal ── */
#productModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  align-items: flex-end;
  justify-content: center;
}
#productModal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

/* Шторка снизу — занимает весь экран на мобильных */
.modal-sheet {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 480px;
  /* на маленьких экранах занимает почти весь экран */
  height: 93dvh;
  height: 93vh; /* fallback */
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
}

/* Drag-handle */
.modal-handle {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
}
.modal-handle::before {
  content: '';
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #ddd;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: rgba(0,0,0,0.06);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  color: #444;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

/* Прокручиваемая область внутри шторки */
.modal-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* ── Slider ── */
.modal-slider {
  position: relative;
  width: 100%;
  background: #f0f0f0;
  flex-shrink: 0;
}

.slider-track-wrap {
  overflow: hidden;
  width: 100%;
  height: clamp(260px, 72vw, 400px);
  background: #fff;
}

.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.32s ease;
  will-change: transform;
}

.slider-track img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-drag: none;
}

.slider-prev,
.slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: none;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: #222;
  -webkit-tap-highlight-color: transparent;
}
.slider-prev { left: 10px; }
.slider-next { right: 10px; }

.slider-dots {
  position: absolute;
  bottom: 8px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.slider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  pointer-events: auto;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.slider-dot.active {
  background: #fff;
  transform: scale(1.25);
}

/* ── Modal info block — адаптивный ── */
.modal-body {
  padding: 16px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* На узком экране — всё в столбик */
.modal-info-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.modal-name {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(17px, 5vw, 22px);
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.2;
}
.modal-price {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(12px, 4vw, 15px);
  font-weight: 400;
  color: #111;
  margin: 0 0 8px;
}

.modal-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 10px;
}

.modal-body .size {
  font-size: clamp(11px, 3.2vw, 13px);
  margin: 0;
  color: #222;
}
.modal-body .model {
  font-size: clamp(10px, 3vw, 12px);
  color: #666;
  margin: 0;
}

/* Разделитель */
.modal-divider {
  height: 1px;
  background: #eee;
  margin: 10px 0;
}

.modal-colors {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.modal-colors .color-dot {
  width: 18px;
  height: 18px;
}

.modal-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
  margin: 0 0 5px;
}


/* ── Loading Screen ── */
#loadingScreen {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loadingScreen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-brand {
  font-family: "Bodoni Moda", serif;
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: #111;
  animation: pulse-brand 2s ease-in-out infinite;
}

@keyframes pulse-brand {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.loading-bar-wrap {
  width: 100px;
  height: 1px;
  background: #e0e0e0;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  background: #111;
  animation: loading-sweep 1.4s ease-in-out infinite;
  transform-origin: left;
}

@keyframes loading-sweep {
  0%   { transform: scaleX(0) translateX(0%); }
  50%  { transform: scaleX(1) translateX(0%); }
  100% { transform: scaleX(0) translateX(200%); }
}