:root {
  --max-width: 1440px;
  --side-padding: 18px;
}

body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background: #1c1c1c;
  scroll-behavior: smooth;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.layout-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--side-padding);
  box-sizing: border-box;
}

.wrapper.grid-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--side-padding);
}

/* Header */
.top-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  background-color: #333;
  color: #fff;
  padding: 12px var(--side-padding);
  position: relative;
}

.logo {
  width: 70px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: center;
  flex: 1;
}

.tagline {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  margin-bottom: 4px;
}

/* Desktop override */
@media (min-width: 769px) {
  .tagline {
    white-space: normal;
    max-width: 320px;
    line-height: 1.4;
  }
}

.telegram-link {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #febd59;
  text-decoration: none;
  font-weight: 500;
}

.telegram-link:hover,
.telegram-link:focus {
  transition: background-color 0.3s ease;
  color: inherit;
}

/* Search Bar */
.search-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
  width: 100%;
  box-sizing: border-box;
}

#searchInput {
  width: 100%;
  max-width: 100%;
  padding: 10px 14px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: #000;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 8px 0;
  width: 100%;
  background-color: #1c1c1c;
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .top-banner {
    padding: 12px 16px;
  }

  .header-right {
    align-items: flex-start;
    text-align: right;
    width: 100%;
  }

  .telegram-link {
    display: block;
    margin-left: auto;
    margin-right: 0;
    text-align: right;
  }

  .telegram-link:hover,
  .telegram-link:focus {
    transition: background-color 0.3s ease;
    color: inherit;
  }

  .tagline {
    display: block;
    margin-left: auto;
    margin-right: 0;
    text-align: right;
  }

  .logo {
    height: 100px;
    margin-bottom: 8px;
  }

  .layout-container {
    padding: 0 10px;
  }
}

/* Card */
.card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 6px;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
  aspect-ratio: 3 / 5;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
}

.card-content-container {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

/* Carousel inside Card */
.card .carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 5;
  overflow: hidden;
  border-radius: 8px;
}

.card .carousel img.active:hover {
  filter: brightness(1.08);
  transition: filter 0.3s ease;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.card.visible {
  animation: fadeInUp 0.6s ease forwards;
}

.title-text {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.95em;
  color: #BABABA;
  margin-top: 15px;
  line-height: 1.1;
  text-align: center;
  max-width: 90%;
  margin: 0 auto;
}

.card:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1px;
  display: block;
}

.action-button-text {
  font-family: 'Barlow', sans-serif;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Carousel */
.carousel {
  position: relative;
  overflow: hidden;
}

.carousel img {
  position: absolute;
  top: 0;
  left: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.6s ease;
  transform: translateX(100%);
  opacity: 0;
  z-index: 0;
}

.carousel img.active {
  transform: translateX(0%);
  left: 0;
  opacity: 1;
  z-index: 1;
}

.carousel img.active:hover {
  transform: scale(1.03);
  transition: transform 0.3s ease;
}

/* Navigation Bar */
.nav-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  background-color: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  border-top: 1px solid #444;
  border-bottom: 1px solid #444;
  width: 100%; /* Ensures full width on desktop */
}

/* Nav List */
.nav-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px; /* Increased gap for better spacing */
  list-style: none;
  margin: 0 auto; /* Centers the list within the nav-bar */
  padding: 0;
  max-width: var(--max-width); /* Matches layout-container max-width */
}

/* Nav Item */
.nav-list li {
  display: flex;
  align-items: center;
}

/* Nav Button with Image + Text */
.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 50px; /* Increased width to accommodate text */
  height: 50px; /* Increased height for better layout */
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #BABABA;
  text-transform: uppercase;
  position: relative;
  overflow: hidden; /* Prevents text overflow */
}

/* PNG Icon */
.nav-btn img {
  width: 40px;
  height: 40px;
  transform: scale(0.7); /* Fixed scale as per your update */
  transform-origin: top center;
}

/* Text Label (always visible) */
.nav-text {
  position: absolute;
  bottom: 2px; /* Adjusted to prevent overlap with image */
  opacity: 1;
  pointer-events: none;
  font-size: 9px; /* Reduced font size to fit single line */
  color: #BABABA;
  text-align: center;
  width: 100%;
  white-space: nowrap; /* Prevents text from wrapping */
  text-overflow: ellipsis; /* Adds ellipsis if text is too long */
}

/* Optional Separator */
.nav-separator {
  color: #555;
  font-size: 14px;
  user-select: none;
  margin: 0 8px; /* Adds spacing around separator */
}

/* Active State: Highlight current page */
.nav-btn.active .nav-text {
  color: #febd59; /* Corrected to #febd59 for active state */
}

.nav-btn.active img {
  width: 42px; /* Slightly larger icon for focused look */
  height: 42px;
  transform: scale(0.75); /* Adjusted scale to match new size */
  transform-origin: top center;
}

/* Hover Behavior */
.nav-btn:hover .nav-text {
  color: #febd59; /* New hover color */
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .nav-bar {
    padding: 6px 10px; /* Adjust padding for mobile */
  }
  .nav-list {
    gap: 12px; /* Slightly reduced gap for mobile */
    width: 100%; /* Ensures full width on mobile */
  }
  .nav-btn {
    width: 45px; /* Slightly reduced width for mobile */
    height: 45px;
  }
  .nav-text {
    font-size: 8px; /* Further reduced font size for mobile */
  }
}
/* Back to Top */
#backToTop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background-color: #ffcc00;
  color: #000;
  border: none;
  border-radius: 20px;
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  display: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

#backToTop:hover {
  background-color: #ffd633;
  transform: scale(1.05);
}

/* Footer */
.footer-banner {
  width: 100%;
  background-color: #333;
  color: #BDB9B9;
  padding: 4px 0;
  border-top: 1px solid #3A3A3A;
  opacity: 0.85;
}

.footer-content {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 11px;
  line-height: 1.2;
}
.footer-tagline {
  font-weight: 500;
  margin-bottom: 4px;
}

.footer-branding {
  font-size: 12px;
  margin-bottom: 4px;
}

.footer-disclaimer {
  font-size: 12px;
  opacity: 0.85;
}
.buy-divider {
  width: 90%;
  height: 1px;
  background-color: #BDB9B9;
  margin: 20px 0;
  border: none;
  opacity: 0.5;
}
.spacer {
  height: 20px;
}

.buy-button-wrapper {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-left: -6px;
  box-sizing: border-box;
}

.buy-button,
.share-button {
  margin-top: 5px;
  padding: 8px 18px 8px 0;
  background-color: rgba(30, 30, 30, 0.85);
  color: #BABABA;
  text-decoration: none;
  border-radius: 2px;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  align-self: flex-start;
  border: none;
  cursor: pointer;
  font-family: 'Barlow', sans-serif;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.buy-button:hover,
.share-button:hover {
  color: #005fa3;
  background-color: #3B3B3B;
  opacity: 0.85;
}

/* Error message */
.error-message {
  color: #ff6b6b;
  text-align: center;
  padding: 20px;
  font-family: 'Inter', sans-serif;
}

/* Loading animation */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
  }
  

}
/* Product Page Specific Styles */
.product-container {
  max-width: var(--max-width);
  margin: 30px auto;
  padding: 0 var(--side-padding);
  background: transparent;
}

.back-button {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px 8px 0;
  background-color: rgba(30, 30, 30, 0.85);
  color: #BABABA;
  text-decoration: none;
  border-radius: 2px;
  font-family: 'Barlow', sans-serif;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 20px;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

.back-button:hover {
  color: #005fa3;
  background-color: #3B3B3B;
  opacity: 0.85;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .product-detail {
    grid-template-columns: minmax(0, 420px) 1fr;
  }
}

.product-image-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  background: #333;
  aspect-ratio: 3 / 5;
  width: 100%;
  max-width: 420px;
  opacity: 0;
  transform: translateY(20px);
  margin: 0 auto;
}

.product-image-container.visible {
  animation: fadeInUp 0.6s ease forwards;
}

.product-image-container .carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #333;
}

.product-image-container .carousel img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.product-image-container .carousel img.active {
  opacity: 1;
  z-index: 1;
}

.product-image-container .carousel img.active:hover {
  filter: brightness(1.08);
  transition: filter 0.3s ease;
}

.product-info {
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-title {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.95em;
  color: #BABABA;
  margin: 15px 0;
  line-height: 1.1;
  text-align: left;
}

.product-description {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.95em;
  color: #BABABA;
  line-height: 1.4;
  text-align: left;
  margin-bottom: 15px;
}

.product-price {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.95em;
  color: #ffcc00;
  text-align: left;
  margin-bottom: 20px;
}

.product-features {
  margin: 15px 0;
  padding: 0;
  list-style: none;
}

.product-features li {
  padding: 5px 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.95em;
  color: #BABABA;
  position: relative;
  padding-left: 20px;
  text-align: left;
  line-height: 1.4;
}

.product-features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #ffcc00;
}

.product-meta {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #3A3A3A;
  font-family: 'Inter', sans-serif;
  font-size: 0.95em;
  color: #BABABA;
  text-align: left;
}

.similar-products {
  margin-top: 40px;
}

.section-title {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.95em;
  color: #BABABA;
  margin-bottom: 20px;
  text-align: left;
  position: relative;
  padding-bottom: 10px;
}

.section-title:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 1px;
  background-color: #3A3A3A;
  opacity: 0.5;
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 8px 0;
  width: 100%;
  background-color: #1c1c1c;
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 6px;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
  aspect-ratio: 3 / 5;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
}

.product-card.visible {
  animation: fadeInUp 0.6s ease forwards;
}

.product-card:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.product-card .carousel {
  position: relative;
  width: 100%;
  height: 60%;
  overflow: hidden;
  border-radius: 8px;
  background: #333;
}

.product-card .carousel img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.product-card .carousel img.active {
  opacity: 1;
  z-index: 1;
}

.product-card .carousel img.active:hover {
  filter: brightness(1.08);
  transition: filter 0.3s ease;
}

.product-card-title {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.95em;
  color: #BABABA;
  margin-top: 15px;
  line-height: 1.1;
  text-align: center;
  max-width: 90%;
  margin: 0 auto;
}

.product-card-price {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.95em;
  color: #ffcc00;
  text-align: center;
  margin: 8px 0;
}

.product-card-actions {
  padding: 0;
  width: 100%;
  margin-top: 10px;
}

.product-card-link {
  display: block;
  padding: 8px 18px 8px 0;
  background-color: rgba(30, 30, 30, 0.85);
  color: #BABABA;
  text-decoration: none;
  border-radius: 2px;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  text-align: center;
  font-family: 'Barlow', sans-serif;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.product-card-link:hover {
  color: #005fa3;
  background-color: #3B3B3B;
  opacity: 0.85;
}

@media (max-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .product-image-container {
    aspect-ratio: 3 / 5;
    max-width: 420px;
    margin: 0 auto;
  }
  
  .product-actions {
    flex-direction: row;
    margin-left: -6px;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .product-card {
    aspect-ratio: 3 / 5;
    padding: 6px;
  }
  
  .top-banner {
    padding: 12px 16px;
  }
  
  .header-right {
    align-items: flex-start;
    text-align: right;
    width: 100%;
  }
  
  .telegram-link {
    display: block;
    margin-left: auto;
    margin-right: 0;
    text-align: right;
  }
  
  .telegram-link:hover,
  .telegram-link:focus {
    transition: background-color 0.3s ease;
    color: inherit;
  }
  
  .tagline {
    display: block;
    margin-left: auto;
    margin-right: 0;
    text-align: right;
  }
  
  .logo {
    height: 100px;
    margin-bottom: 8px;
  }
}
