/* Global styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Chathura', sans-serif;
}

body {
  background-color: #000;
  color: #fff;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Base responsive setup */
html {
  font-size: 100%;
}

/* Fix the header to the top */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: #000;
  /* match body bg or set your desired color */
}

/* Navigation bar styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
}

.SearchIconNavBar {
  width: 25px;
}

.nav-links,
.nav-actions {
  display: flex;
  gap: 20px;
  width: 220px;
}

hr {
  height: 40px;
  line-height: 20px;
  border: 1px solid white;
  transform: translate(0%, +35%);
}

.nav-link {
  color: #fff;
  text-decoration: none;
  font-size: 40px;
  letter-spacing: 1px;
  transition: opacity 0.3s;
  white-space: nowrap;
  display: inline-block;
}

@media (hover: hover) {


  .nav-link:hover {
    opacity: 0.7;
  }


}

.logo {
  font-size: 70px;
  font-weight: 500;
  line-height: 70px;
  letter-spacing: 1px;
  pointer-events: none;
}

.logo-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

body::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none;
}

.CardGrid,
body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Product page styles */
.product-container {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  padding: 20px 100px;
  gap: 40px;
  margin-top: 140px;
}

.main-product-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 1;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  border-radius: 8px;
  cursor: pointer;
}

.main-product-image.fade-out {
  opacity: 0;
  transform: scale(0.98);
}

.product-details {
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 80px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 0.8;
  padding-bottom: 20px;
  width: fit-content;
}

.product-vendor {
  font-size: 40px;
  font-weight: 500;
  padding-bottom: 20px;
  border-bottom: 1px solid #fff;
  width: fit-content;
  display: block;
  /* Ensure this is displayed */
  margin-bottom: 20px;
}

.vendor-link {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.3s;
  font-weight: 700;
}

@media (hover: hover) {


  .vendor-link:hover {
    opacity: 0.7;
    text-decoration: underline;
  }


}

.product-price {
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
}

.price-container {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 15px;
  flex-wrap: wrap;
}

.current-price {
  font-size: 64px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.compare-price {
  font-size: 45px;
  font-weight: 500;
  color: #888;
  opacity: 0.8;
  display: inline-block;
  line-height: 1;
  vertical-align: middle;
  position: relative;
}

.compare-price::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background-color: #888888aa;
  transform: translateY(-50%);
}

.discount-badge {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: #fff;
  font-size: 35px;
  font-weight: 900;
  padding: 5px 20px;
  border-radius: 8px;
  letter-spacing: 2px;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
  animation: pulse 2s ease-in-out infinite;
  width: fit-content;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
  }

  50% {
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.7);
  }
}

.product-size {
  width: 100%;
  max-width: 700px;
  font-weight: 500;
  font-size: 35px;
  line-height: 0.8;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.product-Condition {
  width: 100%;
  max-width: 700px;
  font-weight: 500;
  font-size: 35px;
  line-height: 0.8;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.product-description {
  width: 100%;
  max-width: 700px;
  font-weight: 500;
  font-size: 35px;
  line-height: 0.8;
  letter-spacing: 0.5px;
}

.product-actions {
  display: flex;
  gap: 20px;
  margin-top: 40px;
}

.add-to-cart-btn {
  /* .buy-now-btn */
  padding: 10px 50px;
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 1px;
  cursor: pointer;
  background-color: white;
  color: black;
  transition: all 0.3s ease;
  border: none;
  text-align: center;
  width: 100%;
  max-width: 500px;
}

@media (hover: hover) {


  .add-to-cart-btn:hover {
    /* .buy-now-btn:hover */
    opacity: 0.7;
  }


}

.add-to-cart-btn:disabled {
  opacity: 1 !important;
  cursor: not-allowed !important;
}

@media (hover: hover) {


  .add-to-cart-btn:disabled:hover {
    opacity: 1 !important;
  }


}

.go-to-cart-btn {
  padding: 10px 50px;
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  background-color: #28a745;
  color: white;
  transition: all 0.3s ease;
  border: none;
  text-align: center;
  width: 100%;
  max-width: 500px;
}

@media (hover: hover) {


  .go-to-cart-btn:hover {
    opacity: 0.7;
  }


}

.sold-status-btn {
  padding: 0px 50px;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 1px;
  background-color: #ff0000;
  color: white;
  border: none;
  text-align: center;
  width: 100%;
  max-width: 400px;
  cursor: not-allowed;
}

.disclaimer {
  width: fit-content;
  font-size: 35px;
  letter-spacing: 3px;
  opacity: 0.7;
  margin-top: 40px;
  padding: 5px 30px;
  background-color: #313131;
  line-height: 0.8;
}

/* Product images section styles */
.product-images-section {
  display: flex;
  gap: 20px;
  padding: 0 5px;
  width: 100%;
}

.thumbnail-container {
  flex: 0.3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  overflow-y: auto;
  padding: 10px;
  max-height: 380px;
  /* Show approximately 4 thumbnails */
  scrollbar-width: none;
  /* Hide scrollbar for Firefox */
  -ms-overflow-style: none;
  /* Hide scrollbar for IE and Edge */
}

.thumbnail-container::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar for Chrome, Safari and Opera */
}

.thumbnail-img {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

@media (hover: hover) {


  .thumbnail-img:hover {
    transform: scale(1.1);
  }


}

.thumbnail-img.selected {
  border-color: #fff;
  transform: scale(1.2);
}

.main-image-container {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: start;
}

/* Sold badge on main image */
.sold-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: transparent;
  border: 5px solid #ff0000;
  color: #ff0000;
  padding: 5px 20px;
  font-size: 20px;
  letter-spacing: 1px;
  font-family: Dela Gothic One, sans-serif;
  z-index: 5;
}

/* Apply brightness filter to sold product image */
.main-product-image.sold {
  filter: brightness(0.5);
}

/* Loading animation styles */
.loading-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loading-container.active {
  display: flex;
}

.loading-text {
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  letter-spacing: 2px;
  line-height: 1;
  text-align: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid #333;
  border-top: 3px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Hide product container while loading */
.product-container.loading {
  visibility: hidden;
}

/* Extended Footer Styles */
.extended-footer {
  width: 100vw;
  background: #000;
  color: #fff;
  padding: 50px 0 0 0;
  margin: 0;
}

/* Hide footer when loading is active */
.loading-container.active~.extended-footer,
body:has(.loading-container.active) .extended-footer {
  display: none !important;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 90vw;
  margin: 0 auto;
  padding-bottom: 40px;
}

.footer-left {
  flex: 1;
  min-width: 300px;
}

.footer-logo {
  font-size: 70px;
  font-weight: bold;
  line-height: 0.8;
  margin-bottom: 30px;
  letter-spacing: 2px;
}

.footer-links {
  list-style: none;
  margin-bottom: 30px;
}

.footer-links li {
  font-size: 40px;
  font-weight: bold;
  line-height: 0.8;
  margin-bottom: 10px;
  padding-left: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

@media (hover: hover) {


  .footer-links li:hover {
    opacity: 0.7;
  }


}

.footer-copyright {
  font-size: 25px;
  margin-top: 10px;
  padding-left: 10px;
  line-height: 0.8;
  font-weight: bold;
  opacity: 0.7;
}

.footer-right {
  flex: 2;
  min-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.footer-join-title {
  font-size: 40px;
  line-height: 0.8;
  padding-bottom: 20px;
  margin-top: 30px;
}

.footer-join-form {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-inputs {
  display: flex;
  flex-direction: row;
}

.footer-email {
  font-size: 40px;
  line-height: 0.8;
  font-weight: bold;
  padding: 0px 30px;
  border-radius: 50px;
  border: none;
  outline: none;
  margin-right: 30px;
  width: 350px;
  background: #fff;
  color: #000;
}

.footer-subscribe {
  font-size: 40px;
  line-height: 0.8;
  font-weight: bold;
  padding: 15px 30px;
  border-radius: 0;
  border: 1px solid #fff;
  background: #000;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
}

@media (hover: hover) {


  .footer-subscribe:hover {
    background: #fff;
    color: #000;
  }


}

.footer-icons {
  display: flex;
  gap: 60px;
  margin-top: 10px;
}

.footer-icon-circle {
  width: 60px;
  height: 60px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #000;
  transition: all 0.3s ease;
  cursor: pointer;
}

@media (hover: hover) {


  .footer-icon-circle:hover {
    scale: 1.2;
    color: white;
    background-color: #000;
    border: 1px solid #fff;
  }


}

.footer-divider {
  border: none;
  border-top: 2px solid #fff;
  margin: 0 4vw 0 4vw;
  opacity: 0.7;
}

.footer-icons {
  display: flex;
  flex-direction: row;
}

/* Mobile Menu Styles */
/* Mobile Menu Styles */
.mobile-menu-toggle {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 150;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: white;
  position: absolute;
  transition: all 0.3s ease;
}

.mobile-menu-toggle span:first-child {
  top: 0;
}

.mobile-menu-toggle span:nth-child(2) {
  top: 10px;
}

.mobile-menu-toggle span:last-child {
  bottom: 0;
}

.mobile-menu-toggle.active span:first-child {
  transform: rotate(45deg);
  top: 10px;
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:last-child {
  transform: rotate(-45deg);
  bottom: 12px;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 120;
  padding: 80px 30px 30px;
  transition: left 0.3s ease;
  overflow-y: auto;
}

.mobile-drawer.active {
  left: 0;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.mobile-nav-list {
  list-style: none;
  padding: 0;
}

.mobile-nav-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-link {
  color: white;
  font-size: 40px;
  font-weight: bold;
  line-height: 0.8;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 20px 0;
  transition: opacity 0.2s ease;
}

@media (hover: hover) {


  .mobile-nav-link:hover {
    opacity: 0.7;
  }


}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 110;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.rupee-sign {
  font-size: 40px;
  position: relative;
  margin-right: 2px;
}

/* ====== RESPONSIVE STYLES ====== */

/* Tablet Styles (768px - 1300px) */
@media screen and (max-width: 1300px) {

  .rupee-sign {
    font-size: 30px;
    position: relative;
    margin-right: 2px;
  }

  /* Navigation adjustments */
  .navbar {
    padding: 20px;
  }

  .nav-links,
  .nav-actions {
    gap: 10px;
    width: auto;
  }

  .nav-link {
    font-size: 30px;
  }

  hr {
    height: 30px;
  }

  /* Main content */
  .logo {
    font-size: 60px;
    line-height: 60px;
  }

  /* Product container */
  .product-container {
    padding: 20px 40px;
    gap: 20px;
    margin-top: 120px;
    grid-template-columns: 1fr 1fr;
  }

  .product-title {
    font-size: 70px;
  }

  .product-vendor {
    font-size: 35px;
  }

  .product-price {
    font-size: 55px;
    line-height: 1;
  }

  .current-price {
    font-size: 55px;
  }

  .compare-price {
    font-size: 38px;
  }

  .compare-price::after {
    height: 2px;
  }

  .discount-badge {
    font-size: 30px;
    padding: 4px 16px;
  }

  .thumbnail-container {
    padding: 10px 25px;
  }

  .thumbnail-img {
    width: 70px;
    height: 70px;
  }

  .product-size,
  .product-Condition,
  .product-description {
    font-size: 30px;
  }

  .add-to-cart-btn,
  .go-to-cart-btn,
  .buy-now-btn {
    padding: 10px 30px;
    font-size: 35px;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-right,
  .footer-left {
    width: 100%;
    min-width: unset;
    align-items: flex-start;
  }

  .footer-join-form {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-icons {
    margin-top: 30px;
  }

  .footer-email,
  .footer-subscribe {
    font-size: 30px;
    height: 50px;
    padding: 0px 20px;
  }
}

/* Mobile Styles (up to 767px) */
@media screen and (max-width: 767px) {

  /* Navigation adjustments */
  .navbar {
    padding: 30px 20px;
    justify-content: space-between;
  }

  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: flex;
  }

  /* Hide desktop navigation */
  .nav-links,
  .nav-actions {
    display: none;
  }

  .nav-link {
    font-size: 24px;
  }

  .logo {
    font-size: 60px;
    line-height: 50px;
  }

  /* Product container */
  .product-container {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 30px;
    margin-top: 100px;
  }

  .product-images-section {
    display: flex;
    flex-direction: column-reverse;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .thumbnail-container {
    flex: 1;
    flex-direction: row;
    max-height: unset;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 5px;
    justify-content: flex-start;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  }

  .thumbnail-container::-webkit-scrollbar {
    display: block;
    height: 4px;
  }

  .thumbnail-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
  }

  .thumbnail-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
  }

  @media (hover: hover) {


    .thumbnail-container::-webkit-scrollbar-thumb:hover {
      background: rgba(255, 255, 255, 0.5);
    }


  }

  .thumbnail-img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin: 0 3px;
    flex-shrink: 0;
  }

  .main-image-container {
    align-items: center;
    margin: 0 auto;
    width: 100%;
  }

  .main-product-image {
    margin: 0 auto;
  }

  .product-title {
    font-size: 60px;
    padding-bottom: 15px;
  }

  .product-vendor {
    font-size: 30px;
    padding-bottom: 15px;
  }

  .product-price {
    font-size: 50px;
    line-height: 1;
  }

  .current-price {
    font-size: 50px;
  }

  .compare-price {
    font-size: 35px;
  }

  .compare-price::after {
    height: 2px;
  }

  .discount-badge {
    font-size: 28px;
    padding: 4px 15px;
  }

  .product-size,
  .product-Condition,
  .product-description {
    font-size: 28px;
    line-height: 0.9;
  }

  .product-actions {
    flex-direction: column;
    gap: 15px;
  }

  .add-to-cart-btn,
  .go-to-cart-btn,
  .buy-now-btn {
    width: 100%;
    padding: 10px 20px;
    font-size: 35px;
    max-width: 1000px;
  }

  .footer-logo {
    font-size: 50px;
  }

  .footer-links li {
    font-size: 30px;
  }

  .footer-join-title {
    font-size: 30px;
  }

  .footer-email,
  .footer-subscribe {
    font-size: 30px;
  }

  .footer-email {
    width: 100%;
    margin-right: 0;
    margin-bottom: 20px;
    height: 50px;
    padding: 0px 20px;
  }

  .footer-inputs {
    flex-direction: column;
    width: 100%;
  }

  .footer-subscribe {
    width: 100%;
    height: 50px;
    padding: 0px 20px;
  }

  .footer-icons {
    justify-content: center;
    width: 100%;
  }
}

/* Small Mobile Styles (up to 479px) */
@media screen and (max-width: 479px) {

  /* Navigation adjustments */
  .logo {
    font-size: 50px;
    line-height: 40px;
  }

  .product-container {
    margin-top: 90px;
  }

  .product-title {
    font-size: 50px;
  }

  .product-vendor {
    font-size: 25px;
  }

  .product-price {
    font-size: 45px;
    line-height: 1;
  }

  .current-price {
    font-size: 45px;
  }

  .compare-price {
    font-size: 32px;
  }

  .compare-price::after {
    height: 2px;
  }

  .discount-badge {
    font-size: 25px;
    padding: 3px 12px;
  }

  .product-size,
  .product-Condition,
  .product-description {
    font-size: 25px;
    line-height: 1;
  }

  .add-to-cart-btn,
  .go-to-cart-btn,
  .buy-now-btn {
    font-size: 30px;
  }

  .disclaimer {
    font-size: 25px;
    letter-spacing: 2px;
  }

  .thumbnail-img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
  }

  .main-product-image {
    width: 100%;
  }

  .footer-logo {
    font-size: 40px;
  }

  .footer-links li {
    font-size: 24px;
  }

  .footer-join-title {
    font-size: 24px;
  }

  .rupee-sign {
    font-size: 25px;
    position: relative;
    margin-right: 2px;
  }

  .footer-email,
  .footer-subscribe {
    font-size: 25px;
    height: 40px;
    padding: 0px 20px;
  }

  .footer-icon-circle {
    width: 50px;
    height: 50px;
    font-size: 30px;
  }
}

/* Similar Products Section Styles */
.similar-products-section {
  width: 100%;
  background-color: #000;
  color: #fff;
  padding: 60px 0;
  margin-top: 40px;
}

.similar-products-container {
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
}

.similar-products-title {
  font-family: 'Dela Gothic One', Arial, sans-serif;
  font-size: 50px;
  line-height: 0.8;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: #fff;
  padding-left: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.similar-products-title::before,
.similar-products-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  margin: 0 20px;
}

.similar-products-wrapper {
  position: relative;
  width: 100%;
}

.scroll-btn {
  display: none;
  /* Hide scroll buttons */
}

.similar-products-grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1;
  padding: 10px 20px;
  /* Add horizontal padding */
  justify-content: flex-start;
  /* Start from left instead of center */
  /* Custom scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  padding-left: 20px;
}

.similar-products-grid::-webkit-scrollbar {
  height: 8px;
}

.similar-products-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.similar-products-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

@media (hover: hover) {


  .similar-products-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
  }


}

.similar-product-card {
  background: #111;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  min-width: 280px;
  width: 280px;
  height: 350px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (hover: hover) {


  .similar-product-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  }


}

.similar-product-image-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
}

.similar-discount-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 8px;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
  z-index: 10;
  animation: pulse 2s ease-in-out infinite;
  pointer-events: none;
}

.similar-product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity 0.5s ease;
  backface-visibility: hidden;
}

.similar-product-image.active {
  opacity: 1;
  z-index: 1;
}

.similar-product-image:first-child {
  position: relative;
}

.similar-product-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 40%, rgba(0, 0, 0, 0.3) 70%, rgba(0, 0, 0, 0) 100%);
  color: white;
  padding: 15px;
  z-index: 4;
}

.similar-product-details {
  flex: 1;
  overflow: hidden;
}

.similar-product-name-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.similar-product-name {
  font-size: 35px;
  font-weight: bold;
  line-height: 1.2;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  /* Allows text to shrink */
}

.similar-product-price-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0px;
  flex-shrink: 0;
}

.similar-product-compare-price {
  font-size: 30px;
  font-weight: normal;
  color: #fff;
  text-decoration: none;
  display: block;
  margin-bottom: -20px;
  transform: rotate(3deg);
  line-height: 1;
  position: relative;
  white-space: nowrap;
}

.similar-product-compare-price::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background-color: #ff0000aa;
  transform: translateY(-50%);
}

.similar-product-price {
  font-size: 30px;
  font-weight: bold;
  margin: 0;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
  /* Prevents price from shrinking */
}

.similar-product-price .rupee-sign {
  font-size: 20px;
  /* Even smaller than the price text */
  position: relative;
  margin-right: 2px;
  font-weight: 100;
}

.similar-add-to-cart-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

@media (hover: hover) {


  .similar-add-to-cart-btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
  }


}

.similar-add-to-cart-btn:hover img {
  filter: invert(1);
}

.similar-add-to-cart-btn.in-cart {
  background-color: rgba(76, 175, 80, 0.9);
  border-color: #4CAF50;
}

.similar-add-to-cart-btn.in-cart img {
  filter: brightness(0) invert(1);
}

/* Cart success indicator styling */
.cart-success-indicator {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #28a745;
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  z-index: 10;
  animation: successPop 0.3s ease-out;
  pointer-events: none;
  border: 2px solid white;
}

.cart-remove-indicator {
  background: #dc3545;
}

@keyframes successPop {
  0% {
    opacity: 0;
    transform: scale(0);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.similar-add-to-cart-btn .cart-icon {
  width: 20px;
  height: 20px;
}

.pagination-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.pagination-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

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

/* Loading styles for similar products */
.similar-products-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  font-size: 18px;
  color: #ccc;
}

.similar-products-error {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  font-size: 18px;
  color: #ff6b6b;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
  .similar-products-container {
    padding: 0 30px;
  }

  .similar-product-card {
    min-width: 250px;
    width: 250px;
    height: 320px;
  }

  .similar-products-title {
    font-size: 40px;
  }

  .similar-products-title::before,
  .similar-products-title::after {
    margin: 0 15px;
  }
}

@media screen and (max-width: 768px) {
  .similar-products-section {
    padding: 40px 0;
  }

  .similar-products-container {
    padding: 0 20px;
  }

  .similar-products-title {
    font-size: 30px;
    margin-bottom: 30px;
    padding-left: 0px;
  }

  .similar-products-title::before,
  .similar-products-title::after {
    margin: 0 10px;
  }

  .similar-products-grid {
    padding-left: 20px;
  }

  .scroll-btn {
    width: 45px;
    height: 45px;
  }

  .scroll-btn img {
    width: 18px;
    height: 18px;
  }

  .similar-product-card {
    min-width: 220px;
    width: 220px;
    height: 280px;
  }

  .similar-product-name {
    font-size: 28px;
  }

  .similar-product-compare-price {
    font-size: 24px;
    margin-bottom: -10px;
  }

  .similar-product-compare-price::after {
    height: 1.5px;
  }

  .similar-product-price {
    font-size: 24px;
  }

  .similar-product-price .rupee-sign {
    font-size: 16px;
  }

  .similar-add-to-cart-btn {
    width: 35px;
    height: 35px;
  }

  .similar-add-to-cart-btn .cart-icon {
    width: 18px;
    height: 18px;
  }

  .similar-discount-badge {
    font-size: 20px;
    padding: 3px 10px;
  }
}

@media screen and (max-width: 480px) {
  .similar-products-wrapper {
    gap: 10px;
  }

  .similar-products-title::before,
  .similar-products-title::after {
    margin: 0 8px;
  }

  .scroll-btn {
    width: 40px;
    height: 40px;
  }

  .scroll-btn img {
    width: 16px;
    height: 16px;
  }

  .similar-product-card {
    min-width: 180px;
    width: 180px;
    height: 240px;
  }

  .similar-product-name-price-row {
    gap: 5px;
  }

  .similar-product-compare-price {
    font-size: 24px;
    margin-bottom: -10px;
  }

  .similar-product-compare-price::after {
    height: 1.5px;
  }

  .similar-product-price .rupee-sign {
    font-size: 12px;
  }

  .similar-add-to-cart-btn {
    width: 30px;
    height: 30px;
    top: 10px;
    right: 10px;
  }

  .similar-add-to-cart-btn .cart-icon {
    width: 16px;
    height: 16px;
  }

  .similar-discount-badge {
    font-size: 16px;
    padding: 2px 8px;
    top: 10px;
    left: 10px;
  }
}

/* Image Popup Modal Styles */
.image-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.image-popup-overlay.active {
  display: flex;
  opacity: 1;
}

.image-popup-container {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-popup-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}

.popup-image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  cursor: grab;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.popup-image:active {
  cursor: grabbing;
}

.zoom-controls {
  position: fixed;
  bottom: 10vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  background: rgba(0, 0, 0, 0.8);
  padding: 10px 20px;
  border-radius: 25px;
  backdrop-filter: blur(10px);
  z-index: 1001;
}

.zoom-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 50px;
  font-weight: bold;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  font-family: 'Chathura', sans-serif;
}

@media (hover: hover) {


  .zoom-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
  }


}

.zoom-icon {
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
}

.zoom-reset {
  font-size: 30px !important;
  width: 80px !important;
  border-radius: 25px !important;
}

.image-popup-close {
  font-size: 50px !important;
}

.image-popup-close .zoom-icon {
  width: 24px !important;
  height: 24px !important;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

@media (hover: hover) {


  .nav-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
  }


}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.05) !important;
}

@media (hover: hover) {


  .nav-btn:disabled:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.05) !important;
  }


}

/* Responsive Design for Popup */
@media screen and (max-width: 768px) {
  .popup-image {
    max-width: 95vw;
    max-height: 80vh;
  }

  .zoom-controls {
    bottom: 8vh;
    padding: 8px 15px;
  }

  .zoom-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .zoom-icon {
    width: 20px;
    height: 20px;
  }

  .zoom-reset {
    font-size: 30px !important;
    width: 70px !important;
  }

  .image-popup-close {
    font-size: 24px !important;
  }

  .image-popup-close .zoom-icon {
    width: 20px !important;
    height: 20px !important;
  }
}

@media screen and (max-width: 480px) {
  .popup-image {
    max-width: 98vw;
    max-height: 75vh;
  }

  .zoom-controls {
    bottom: 6vh;
    padding: 6px 12px;
    gap: 8px;
  }

  .zoom-btn {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  .zoom-icon {
    width: 16px;
    height: 16px;
  }

  .zoom-reset {
    font-size: 30px !important;
    width: 60px !important;
  }

  .image-popup-close {
    font-size: 20px !important;
  }

  .image-popup-close .zoom-icon {
    width: 16px !important;
    height: 16px !important;
  }
}