/* Reset previous styles and enforce mobile-only layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  overflow-y: auto;
}
 

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fff;
  color: #000;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  font-size: calc(12px + 0.4vw); /* Responsive base font size */
  overscroll-behavior: none; /* Prevent bounce/rubber-band effect */
}

header {
  padding: 0.4rem 0;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  /* position: fixed; */
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
}

header.hidden {
  display: none;
}

h1 {
  text-align: left;
  /* margin-bottom: 0.5rem; */
  font-size: 1.5rem;
  font-weight: 600;
  padding: 0 0.4rem;
}

/* Make logo responsive */
.logo-image {
  height: min(50px, 15vw);
  width: auto;
  vertical-align: middle;
}

/* Make filters scroll smoothly on mobile */
.filters, .color-filters, .quality-filters{
  display: flex;
  gap: 0.3rem;
  overflow-x: auto;
  padding: 0.3rem max(0.4rem, 2vw);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
  max-width: 100%;
}

.filters::-webkit-scrollbar,
.color-filters::-webkit-scrollbar,
.quality-filters::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  padding: 0.2rem 0.4rem;
  border: 1px solid #000;
  background: #fff;
  border-radius: 16px;
  white-space: nowrap;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  color: #000;
  min-height: 28px;
}

.filter-btn.active {
  background: rgb(171, 244, 34);
  color: #000;
  border-color: rgb(171, 244, 34);
  box-shadow: 0 0 10px rgba(171, 244, 34, 0.5);
}

.color-filters .filter-btn {
  padding: 0.15rem 0.35rem;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 12px;
  font-size: 0.65rem;
  color: #888;
  min-height: 20px;
}

.quality-filters .filter-btn {
  padding: 0.15rem 0.35rem;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 12px;
  font-size: 0.65rem;
  color: #888;
  min-height: 20px;
}


/* Responsive product grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: min(0.25rem, 1vw);
  padding: min(0.25rem, 1vw);
  width: 100%;
  max-width: 100%;
}

.product-card {
  border: 1px solid #eee;
  padding: min(0.2rem, 1vw);
  border-radius: min(6px, 1.5vw);
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: relative;
  margin-bottom: min(0.25rem, 1vw);
}

.product-image {
  width: 100%;
  aspect-ratio: 1/1;
  background: #f5f5f5;
  margin-bottom: min(0.2rem, 1vw);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: min(1.5rem, 5vw);
  flex-shrink: 0;
  overflow: hidden;
  border-radius: min(4px, 1vw);
  position: relative;
}

.image-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  pointer-events: none;
}

.nav-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  transform: scale(1.1);
  background: none;
}

.nav-btn svg {
  width: 20px;
  height: 20px;
  fill: rgba(255, 255, 255, 0.8);
}

.image-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  pointer-events: auto;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dot.active {
  background: #fff;
  transform: scale(1.2);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.add-to-cart {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(128, 128, 128, 0.8);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transform-origin: center;
}

.add-to-cart svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.add-to-cart:hover,
.add-to-cart:active {
  background: rgb(171, 244, 34);
  color: #000;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(171, 244, 34, 0.3);
}

.add-to-cart.animate {
  animation: flyToCart 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
  pointer-events: none;
}

@keyframes flyToCart {
  0% {
    transform: scale(1) translate(0, 0);
    opacity: 1;
  }
  20% {
    transform: scale(1.2) translate(0, 0);
  }
  100% {
    transform: scale(0) translate(var(--moveX), var(--moveY));
    opacity: 0;
  }
}

.product-details {
  padding: min(0.2rem, 1vw);
  padding-top: min(0.75rem, 2vw);
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}


.product-title {
  font-size: min(0.75rem, 3vw);
  margin-bottom: min(0.15rem, 0.5vw);
  font-weight: 500;
  line-height: 1.2;
  height: 2.4em; /* Ровно 2 строки */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.price-quantity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: min(0.2rem, 1vw);
  margin-top: auto;
}

.product-price {
  font-size: min(0.9rem, 3.5vw);
  color: #666;
  flex-shrink: 0;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

.quantity-btn {
  width: min(20px, 5vw);
  height: min(20px, 5vw);
  border: none;
  background: none;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: min(0.9rem, 3.5vw);
  padding: 0;
  min-height: min(20px, 5vw);
}

.quantity-btn:disabled {
  color: #ccc;
  cursor: not-allowed;
}

.quantity-display {
  font-size: min(0.9rem, 3.5vw);
  min-width: 24px;
  text-align: center;
  color: #666;
}

.tab-content {
  display: none;
  width: 100%;
  padding: 0;
}

.tab-content.active {
  display: block;
}

/* Responsive tab bar */
.tab-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid #eee;
  width: 100%;
  padding-bottom: env(safe-area-inset-bottom);
  height: 68px; 
  z-index: 1000;
  backdrop-filter: blur(10px);
  box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1);
}

.tab-btn {
  flex: 1;
  padding: 0.4rem; 
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem; 
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  font-size: 0.7rem; 
  min-height: unset; 
}

.tab-btn.active {
  color: #000;
}

.tab-btn[data-tab="cart-tab"] {
  transition: color 0.3s ease, fill 0.3s ease;
}

.tab-btn[data-tab="cart-tab"] svg {
  transition: fill 0.3s ease;
}

.tab-btn[data-tab="cart-tab"].highlight {
  animation: popEffect 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popEffect {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.tab-btn svg {
  width: 20px; 
  height: 20px;
  fill: currentColor;
}

/* Responsive cart and checkout */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: min(0.75rem, 2vw);
  padding-bottom: 0;
  padding-top: min(0.75rem, 2vw);
  width: 100%;
  max-width: 100%;
  border-bottom: none;
}

.cart-item {
  display: flex;
  gap: min(0.75rem, 2vw);
  padding: min(0.3rem, 1vw);
  border: 1px solid #eee;
  border-radius: min(8px, 2vw);
  position: relative;
  touch-action: pan-y pinch-zoom;
  transform: translateX(0);
  transition: transform 0.3s ease;
  background: #fff;
}

.cart-item.service-fee,
.cart-item.delivery-fee {
  background: #f5f5f5;
  border: none;
  padding: 0.75rem;
}

.cart-item.service-fee .cart-item-image,
.cart-item.delivery-fee .cart-item-image {
  display: none;
}

.cart-items-divider {
  display: none;
}

.cart-item.swiping {
  transition: none;
}

.cart-item.delete-threshold {
  background: #ffebee;
}

.delete-indicator {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: #ff4444;
  border-radius: 0 8px 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
  transform: translateX(100%);
}

.cart-item-image {
  width: min(50px, 15vw);
  height: min(50px, 15vw);
  background: #f5f5f5;
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cart-item-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.2rem;
}

.cart-item .quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.cart-item .quantity-btn {
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  color: #666;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item .quantity-display {
  min-width: 24px;
  text-align: center;
  color: #666;
}

.cart-total {
  margin: 0;
  padding: 0.75rem;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  font-weight: 500;
  margin-top: 1rem;
}

.checkout-btn {
  width: calc(100% - 1.5rem); 
  padding: min(1rem, 3vw);
  background: #666; 
  color: #fff;
  border: none;
  border-radius: min(4px, 1vw);
  cursor: pointer;
  margin: 0.75rem 0.75rem 0;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.popup {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  width: min(90%, 400px);
  margin: min(2vh, 20px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  max-height: 90vh;
  overflow-y: auto;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.popup-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: #000;
}

.close-popup {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: #666;
  transition: color 0.2s ease;
}

.close-popup:hover {
  color: #000;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgb(171, 244, 34);
}

.form-group select {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
}

.pay-btn {
  width: calc(100% - 3rem);
  padding: min(1rem, 3vw);
  background: #666;
  color: #fff;
  border: none;
  border-radius: min(4px, 1vw);
  cursor: pointer;
  margin: 0.5rem 1.5rem 0.75rem;
  transition: all 0.2s ease;
}

.pay-btn:hover {
  background: rgb(171, 244, 34);
  color: #000;
}

.form-group input[type="date"],
.form-group input[type="time"],
.form-group select {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  background: white;
  color: #000;
  -webkit-text-fill-color: #000;
  opacity: 1;
  cursor: pointer;
}

.form-group input[type="date"]::-webkit-datetime-edit,
.form-group input[type="time"]::-webkit-datetime-edit,
.form-group select option {
  color: #000;
}

.form-group input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.form-group input[type="time"]::-webkit-datetime-edit-fields-wrapper {
  color: #000;
}

.form-group input[type="checkbox"] {
  width: auto;
  accent-color: rgb(171, 244, 34);
}


.running-text {
  width: 100%;
  margin: 0 auto;
  padding: 0 0.4rem;
  color: rgb(171, 244, 34);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  margin-bottom: 0.5rem;
  position: relative;
  text-transform: uppercase;
}

.running-text-content {
  display: inline-block;
  animation: marquee 20s linear infinite;
  padding-left: 100%;
  will-change: transform;
}

.running-text-content::after {
  content: "ЦВЕТЫ ПО СЕБЕСТОИМОСТИ ЦВЕТЫ ПО СЕБЕСТОИМОСТИ ЦВЕТЫ ПО СЕБЕСТОИМОСТИ ЦВЕТЫ ПО СЕБЕСТОИМОСТИ    ";
  white-space: nowrap;
  position: absolute;
  left: 100%;
  top: 0;
}

@keyframes marquee {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-200%, 0);
  }
}

.account-container {
  padding: 0.75rem;
  margin: 0 auto;
  max-width: 100%;
}

.account-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.account-avatar svg {
  fill: #666;
} 

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.account-name {
  font-size: 1.25rem;
  font-weight: 500;
}

.account-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #000;
  transition: background-color 0.2s ease;
}

.account-menu-item:hover {
  background: #f5f5f5;
}

.account-menu-item svg {
  fill: #666;
}

.profile-info {
  display: none;
}

.saved-address {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #f5f5f5;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.remove-address {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #666;
}

.remove-address:hover {
  color: #ff4444;
}

.address-manager {
  padding: 1rem 0;
}

.address-manager h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 500;
}

.order-total {
  padding: 1rem 0;
  margin-top: 1rem;
  border-top: 1px solid #eee;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#saved-address {
  margin-bottom: 0.5rem;
}

.active-order {
  margin-top: 1rem;
  padding: 1rem;
  background: #f5f5f5;
  border-radius: 8px;
}

.active-order .error-message {
  color: #f44336;
  text-align: center;
  padding: 1rem;
}

.active-order .no-orders {
  color: #666;
  text-align: center;
  padding: 1rem;
}

.active-order .order-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.active-order .order-info-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #666;
}

.active-order .order-info-item strong {
  color: #000;
}

.active-order .order-status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: rgb(171, 244, 34);
  color: #000;
  border-radius: 12px;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

.active-order .order-status.processing {
  background: #ffd54f;
}

.active-order .order-status.delivering {
  background: #4fc3f7;
}

.active-order .order-status.completed {
  background: rgb(171, 244, 34);
}

.active-order .order-status.cancelled {
  background: #ef5350;
  color: white;
}

.history-order {
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.order-header {
  padding: 1rem;
  background: #fff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* .order-summary {
  display: grid;
  grid-template-columns: auto auto auto;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  align-items: center;
  font-size: 0.9rem;
} */

.order-summary {
  display: grid;
  grid-template-columns: 80px 80px 1fr; /* Пример: номер 110px, сумма 80px, статус — остальное */
  gap: 1rem;
  align-items: center;
  font-size: 0.9rem;
}


.order-summary > div:nth-child(1) {
  text-align: left;
  /* font-family: monospace; */
  /* letter-spacing: 1px; */
}

.order-summary > div:nth-child(2),
.order-summary > div:nth-child(3) {
  text-align: right;
}

.order-status {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  text-align: center;
  background: #e8f5e9;
  color: #2e7d32;
}

/* .order-status.доставлен {
  background: #e8f5e9;
  color: #2e7d32;
} */



.order-details {
  display: none;
  padding: 1rem;
  background: #f9f9f9;
  border-top: 1px solid #eee;
}

.order-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: #666;
}

.points-section {
  text-align: center;
  padding: 2rem 1rem;
}

.points-balance {
  margin: 2rem 0;
}

.points-amount {
  font-size: 3rem;
  font-weight: 500;
  color: rgb(171, 244, 34);
}

.points-label {
  font-size: 1rem;
  color: #666;
  margin-top: 0.5rem;
}

.points-info {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

.points-info p {
  margin: 0.5rem 0;
}

.add-address-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.add-address-form input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
}

.add-address-form button {
  padding: 0.75rem 1rem;
  background: rgb(171, 244, 34);
  border: none;
  border-radius: 8px;
  color: #000;
  cursor: pointer;
}

.section-content {
  padding: 1rem;
}

.section-content h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 500;
}

.bonus-points-summary {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.current-points,
.pending-points {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.current-points strong,
.pending-points strong {
  font-size: 1.2rem;
  color: #000;
}

.points-info {
  font-size: 0.8rem;
  color: #666;
  text-align: center;
  margin-top: 0.5rem;
}

.about-container {
  padding: 1rem;
  max-width: 100%;
  margin: 0 auto;
}

.about-content {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #333;
  padding: 2rem;
  background: #f9f9f9; 
  border-radius: 12px; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
}

.advantages-section {
  margin: 2rem 0;
  padding: 1rem 0;
}

.advantages-grid {
  display: grid;
  /* grid-template-columns: repeat(2, 1fr);*/
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}


.advantage-item {
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: transform 0.2s ease;
}

.advantage-item:hover {
  transform: translateY(-2px);
}

.advantage-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  background: rgb(171, 244, 34);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.advantage-item span {
  font-size: 0.85rem;
  color: #333;
  line-height: 1.2;
}

.contact-info {
  background: #f9f9f9;
  /* padding: 1.5rem; */
  border-radius: 12px;
  margin-top: 1rem;
}

.contact-info p {
  margin: 0.5rem 0;
  color: #666;
}

.service-fee-info {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.service-fee-info h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  color: #000;
  text-align: center;
}

.fee-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fee-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: white;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.fee-item:hover {
  transform: translateX(4px);
}

.fee-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(171, 244, 34);
  border-radius: 8px;
  flex-shrink: 0;
}

.fee-icon svg {
  width: 20px;
  height: 20px;
  fill: #000;
}

.fee-item span {
  font-size: 0.9rem;
  color: #333;
}

.address-selector {
  margin-bottom: 1rem;
}

.address-selector-toggle {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.address-selector-toggle button {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #666;
}

.address-selector-toggle button.active {
  background: rgb(171, 244, 34);
  color: #000;
  border-color: rgb(171, 244, 34);
}

.saved-addresses-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
}

.saved-addresses-select option {
  padding: 0.5rem;
}

#menu-tab {
  padding-bottom: calc(60px + env(safe-area-inset-bottom));
}

.go-to-cart-btn {
  position: fixed;
  bottom: calc(73px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: rgb(171, 244, 34);
  color: #000;
  border: none;
  border-radius: 24px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 999;
  cursor: pointer;
  transition: all 0.2s ease;
  width: calc(100% - 32px);
  justify-content: center;
  max-width: 400px;
}

.go-to-cart-btn:hover {
  transform: translateX(-50%) scale(1.02);
  box-shadow: 0 4px 12px rgba(171, 244, 34, 0.2);
}

.go-to-cart-btn .cart-count {
  background: rgba(0, 0, 0, 0.1);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.go-to-catalog-btn {
  margin-top: 24px; /* отступ от текста */
  background: rgb(171, 244, 34);
  color: #000;
  border: none;
  border-radius: 24px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  justify-content: center;
}

.go-to-catalog-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(171, 244, 34, 0.2);
}

main {
  width: 100%;
  margin: 0 auto;
  padding-bottom: calc(48px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}


/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
  body {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
    padding-bottom: max(env(safe-area-inset-bottom), 48px);
  }

  .tab-bar {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Remove fixed max-width constraints */
.filters,
.color-filters,
.quality-filters,
.products-grid,
.cart-items,
.account-container,
.tab-bar,
header,
main {
  max-width: 100%;
}

/* Update styles for delivery zones */
.delivery-zones {
  padding: 0.75rem;
  margin: 0;
  border-top: 1px solid #eee;
  background: #f5f5f5;
}

.zone-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  padding: 0.3rem;
}

.zone-btn {
  padding: 0.5rem;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  color: #000;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  min-height: unset;
  width: 100%;
}

.zone-btn span {
  padding: 0 0.3rem;
}

.zone-btn .delivery-price {
  color: #666;
  font-size: 0.75rem;
}

.zone-btn.active {
  background: rgb(171, 244, 34);
  color: #000;
  border-color: rgb(171, 244, 34);
  box-shadow: 0 0 10px rgba(171, 244, 34, 0.5);
}

.zone-btn.active .delivery-price {
  color: #000;
}

.cart-logo {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid #eee;
}

.cart-logo img {
  height: min(64px, 15vw);
  width: auto;
}

/* Additional padding for cart items to account for new header */
#cart-tab .cart-items {
  padding-top: 0;
}

/* .fee-items,
.advantages-grid {
  display: flex;
  flex-wrap: wrap; 
} */


/*/////////////////////////////////////////////////////////////////////////////////////////////////////////////*/

/* @media screen and (min-width: 768px) {
  body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
  }

  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .tab-bar {
    position: static;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border-top: none;
    border-bottom: 1px solid #eee;
    height: 64px;
    padding: 0;
    box-shadow: none;
  }

  .tab-btn {
    flex-direction: row;
    gap: 0.5rem;
    font-size: 0.9rem;
    justify-content: center;
  }

  main {
    padding-bottom: 2rem;
  }

  .cart-items {
    max-width: 800px;
    margin: 0 auto;
  }

  .cart-item {
    padding: 1rem;
  }

  .cart-item-image {
    width: 80px;
    height: 80px;
  }

  .popup {
    width: 500px;
  }

  .filters,
  .color-filters,
  .quality-filters {
    justify-content: center;
    padding: 1rem;
    gap: 0.75rem;
  }

  .filter-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }

  .about-container {
    max-width: 800px;
    margin: 0 auto;
  }

  .account-container {
    max-width: 800px;
    margin: 0 auto;
  }

  .running-text {
    font-size: 1rem;
  }
}

@media (hover: hover) {
  .filter-btn:hover {
    background: rgba(171, 244, 34, 0.1);
  }

  .product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .tab-btn:hover {
    color: rgb(171, 244, 34);
  }

  .zone-btn:hover {
    background: rgba(171, 244, 34, 0.1);
  }
} */


/*/////////////////////////////////////////////////////////////////////////////////////////////////////////////*/


.error-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 2rem;
}

.error-content {
  text-align: center;
  background: #f9f9f9;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  max-width: 400px;
  width: 100%;
}

.error-icon {
  fill: rgb(171, 244, 34);
  margin-bottom: 1.5rem;
}

.error-content h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: #000;
}

.error-content p {
  color: #666;
  margin-bottom: 2rem;
}

.telegram-redirect-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgb(171, 244, 34);
  color: #000;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 24px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.telegram-redirect-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(171, 244, 34, 0.2);
}

.telegram-redirect-btn svg {
  fill: currentColor;
}



/* Add new styles for info sections */
.info-sections {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-section {
  background: white;
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 1rem;
}

.info-section summary {
  font-size: 1.1rem;
  font-weight: 500;
}

.info-content {
  border-top: 2px solid rgb(171, 244, 34);
  padding-top: 0.5rem;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.6;
}

.info-content ul,
.info-content ol {
  margin: 1rem 0;
  padding-left: 1.2rem;
}

.info-content li {
  margin-bottom: 0.5rem;
}

.read-more-btn {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: rgb(171, 244, 34);
  border: none;
  border-radius: 24px;
  color: #000;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.read-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(171, 244, 34, 0.2);
}

.contact-info .payment-logo {
  width: 100%;        /* или 100vw, если нужно игнорировать внутренние отступы родителя */
  height: auto;       /* сохраняет исходное соотношение сторон */
  display: block;     /* убирает возможный нижний «зазор» у inline‑картинок */
}

.form-group-checkbox {
  /* display: flex; */
  flex-direction: row;
  align-items: center;
  /* gap: 1px; */
}

#custom-loader {
  position: fixed;
  z-index: 99999;
  background: #fff; /* или #181818 если у тебя тёмная тема */
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  opacity: 1;
  pointer-events: all;
}
#custom-loader .loader-spinner {
  border: 5px solid #eee;
  border-top: 5px solid #abf422;
  border-radius: 50%;
  width: 48px; height: 48px;
  animation: spin 1s linear infinite;
  margin-bottom: 14px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
#custom-loader .loader-text {
  font-size: 19px;
  color: #333;
}


/* Points redemption styles */
.points-redemption {
  padding: 0.75rem;
  background: #f5f5f5;
  margin-top: 1px;
}

.points-switch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: rgb(171, 244, 34);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.points-label {
  font-size: 0.9rem;
  color: #000;
}

.available-points {
  font-size: 0.85rem;
  color: #666;
}

.points-applied {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #666;
}

.points-used {
  font-weight: 500;
  color: #000;
}

.points-applied.hidden {
  display: none;
}

.badge-wrap{ position:absolute; top:8px; right:8px; z-index:5; }
.badge-today{
    display:inline-block; padding:4px 8px; border-radius:999px;
    font-size:12px; font-weight:600; line-height:1;
    background:rgb(171, 244, 34); color:#fff;
  }

  /* .badge-wrap{ position:absolute; top:8px; right:8px; z-index:5; }
  .badge-today{
    display:inline-block; padding:4px 8px; border-radius:999px;
    font-size:12px; font-weight:600; line-height:1;
    background:#10b981; color:#fff;          
  } */
.badge-tomorrow{
  display:inline-block; padding:4px 8px; border-radius:999px;
  font-size:12px; font-weight:600; line-height:1;
  background:#e0f2fe; color:#0369a1;       /* синий — «Доставим завтра» */
  border:1px solid #bae6fd;
}
.nearest-slot{
  margin:8px 0 0; font-size:13px; color:#0f172a;
  background:#f1f5f9; border:1px dashed #cbd5e1; padding:8px 10px; border-radius:8px;
}

/* .empty-cart-box{ text-align:center; padding:24px 12px; color:#0f172a;}
 */
.empty-cart-box {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  flex-direction: column;
  text-align: center;
  padding: 24px 12px;
  color: #0f172a;
}
.empty-cart-illustration{ width:140px; height:auto; opacity:.9; margin:0 auto 12px; display:block;}
.points-box{ display:inline-block; margin-top:12px; padding:10px 14px; border-radius:12px; background:#f1f5f9; border:1px dashed #cbd5e1;}
.points-title{ font-size:12px; color:#475569;}
.points-amount{ font-size:18px; font-weight:700; color:#0f172a;}

/* Базовые переменные под Telegram тему */
:root {
  --tg-bg: var(--tg-theme-secondary-bg-color, #ffffff);
  --tg-bg-main: var(--tg-theme-bg-color, #f5f5f5);
  --tg-text: var(--tg-theme-text-color, #222222);
  --tg-hint: var(--tg-theme-hint-color, #999999);
  --tg-link: var(--tg-theme-link-color, #2a9df4);
  --tg-accent: var(--tg-theme-button-color, #2a9df4);
  --tg-accent-text: var(--tg-theme-button-text-color, #ffffff);
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ---------- ХЭДЕР И КНОПКА ГОРОДА ---------- */

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px 0;
}

.logo-image {
  height: 32px;
  border-radius: 8px;
}

/* “таблетка” выбора города */
.city-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: none;
  background: rgba(0, 0, 0, 0.04);
  color: var(--tg-text);
  font-size: 13px;
  cursor: pointer;
  line-height: 1.2;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.04);
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.06s ease;
}

.city-pill:hover {
  background: rgba(0,0,0,0.06);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.city-pill:active {
  transform: translateY(0);
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.city-pill-icon {
  font-size: 15px;
}

.city-pill-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.city-pill-caption {
  font-size: 11px;
  color: var(--tg-hint);
}

.city-pill-value {
  font-size: 13px;
  font-weight: 500;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #000000;
}

.city-pill-arrow {
  font-size: 11px;
  opacity: 0.7;
}

/* ---------- МОДАЛКА ГОРОДА ---------- */

.city-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
}

.city-modal.hidden {
  display: none;
}

.city-modal:not(.hidden) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.city-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.city-modal-card {
  position: relative;
  z-index: 1;
  width: 92%;
  max-width: 360px;
  background: var(--tg-bg);
  border-radius: 20px;
  padding: 16px 14px 12px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.city-modal-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.city-modal-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--tg-text);
}

.city-modal-subtitle {
  font-size: 12px;
  color: var(--tg-hint);
}

/* Список городов */


.city-option-name {
  font-size: 14px;
  font-weight: 500;
}

.city-option-tag {
  font-size: 11px;
  opacity: 0.8;
}

/* маленький “чип” справа, можно использовать, если захочешь показывать timezone/“скоро” */
.city-option-chip {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(255,255,255,0.3);
  opacity: 0.9;
}

/* --- Выбор города --- */

.hidden {
  display: none !important;
}

.city-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;              /* по умолчанию скрыта, покажем из JS */
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.city-overlay.visible {
  display: flex;
}

.city-overlay-inner {
  width: 80%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  text-align: center;
}

.city-overlay-title {
  font-size: 16px;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: #ffffff;
}

/* кнопки-горошины */

.city-choice-btn {
  position: relative;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  background: #ffffff;
  color: #111111;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.08s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.city-choice-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.city-choice-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

/* залоченный город */

.city-choice-btn--locked {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}

.city-choice-btn--locked:hover,
.city-choice-btn--locked:active {
  transform: none;
  box-shadow: none;
}

.city-choice-label {
  display: inline-block;
  margin-right: 10px;
}

.city-choice-lock {
  font-size: 14px;
  vertical-align: middle;
}

.city-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(8px);
}

.city-modal.visible {
  display: flex;
}

.city-modal-content {
  width: 80%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  text-align: center;
}

.city-modal-title {
  font-size: 16px;
  font-weight: 600;
  text-transform: lowercase;
  color: #fff;
  letter-spacing: .04em;
}

.city-modal-hint {
  font-size: 11px;
  color: rgba(255,255,255,.8);
  margin-bottom: 6px;
}

.city-option-btn {
  position: relative;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  background: #fff;
  color: #111;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
  transition: transform .08s ease, box-shadow .12s ease, opacity .12s ease;
}

.city-option-btn:hover {
  background: rgb(171, 244, 34);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.22);
}

.city-option-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
}

.city-option-btn.locked {
  opacity: .55;
  cursor: default;
  box-shadow: none;
}

.city-option-btn.locked:hover,
.city-option-btn.locked:active {
  transform: none;
  box-shadow: none;
}

.city-option-label {
  margin-right: 10px;
}

.city-option-lock {
  font-size: 14px;
  vertical-align: middle;
}
