/* Global Styles */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: #f8f8f8;
  color: #333333;
  overflow-x: hidden;
  width: 100%;
  margin: 0;
}

/* Custom Classes for Tailwind */
.text-accent-yellow {
  color: #ffaa00;
}

.bg-black {
  background-color: #000000;
}

.hover\:bg-gray-800:hover {
  background-color: #1f1f1f;
}

.border-black {
  border-color: #000000;
}

.focus\:border-black:focus {
  border-color: #000000;
}

.shadow-black-focus:focus {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.4);
}

.text-heading {
  color: #1a1a1a;
}

.text-body-dark {
  color: #333333;
}

.font-cinzel {
  font-family: "Cinzel", serif;
}

/* Offer Bar and Marquee Styles */
.offer-bar {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  width: 100%;
  height: 3rem;
  background-color: #000000;
  color: #ffffff;
  z-index: 9999;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  box-sizing: border-box;
  overflow: hidden;
}

.marquee {
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  height: 100%;
  flex: 1;
}

.marquee-text {
  display: inline-block;
  padding-left: 100%;
  animation: marquee-left 12s linear infinite;
  font-size: 1.25rem;
  line-height: 3rem;
  font-family: "Cinzel", serif;
  font-weight: 700;
  user-select: none;
  will-change: transform;
}

@keyframes marquee-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

header {
  position: sticky;
  top: 3rem;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #ededed;
  backdrop-filter: blur(8px);
  width: 100%;
  transition: top 0.4s ease;
}

.nav-link {
  position: relative;
  color: #333333;
  transition: color 0.3s ease;
  font-weight: 500;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000000;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: #000000;
}

/* Mobile Menu Styles */
#mobile-menu {
  display: none;
}

#mobile-menu.active {
  display: flex;
}

.nav-link-mobile {
  font-family: "Montserrat", sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: #333333;
  width: 100%;
}

.nav-link-mobile:hover {
  background-color: #f0f0f0;
}

@media (min-width: 768px) {
  .mobile-menu-toggle {
    display: none;
  }

  #nav-list {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  #mobile-menu {
    display: none !important;
  }
}

/* Swiper Slider */
.swiper-container {
  height: 80vh;
  max-height: 700px;
  width: 100%;
  overflow: hidden;
}

.swiper-slide {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.85);
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.4)
  );
  z-index: 5;
}

.banner-text {
  position: absolute;
  z-index: 10;
  color: #222222;
  text-align: left;
  padding: 2rem 3rem;
  max-width: 600px;
  left: 8%;
}

.banner-text h2 {
  font-family: "Cinzel", serif;
  color: #1a1a1a;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.2);
  line-height: 1.1;
  font-weight: 800;
}

.banner-text p {
  color: #333333;
  font-weight: 400;
}

/* Category Cards */
.category-card {
  background-color: #ffffff;
  border: 1px solid #f0f0f0;
  overflow: hidden;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
}

.category-card:hover {
  background-color: #f8f8f8;
}

.category-card img {
  width: 100%;
  height: 384px; /* Adjusted for consistency */
  object-fit: cover;
  object-position: center;
}

.category-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
  padding: 2rem;
  color: #ffffff;
  text-align: center;
}

.category-content h4 {
  font-family: "Cinzel", serif;
  font-size: 2rem;
  margin-bottom: 0.7rem;
  color: #ffffff;
  font-weight: 700;
}

.category-content p {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: #f0f0f0;
}

.category-content .material-icons {
  font-size: 3.5rem;
  color: #ffffff;
  transition: color 0.3s ease;
}

.category-card:hover .material-icons {
  color: #cccccc;
}

/* Product Cards */
.product-card {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.product-card img {
  width: 100%;
  height: 192px;
  object-fit: cover;
  object-position: center;
}

.product-card .text-xs {
  font-size: 0.75rem;
}

/* New Arrivals Section (BESTSELLERS) */
.new-arrivals-section {
  background: linear-gradient(to right, #f5f5f5, #f0f0f0);
}

.new-arrivals-section h3 {
  font-family: "Cinzel", serif;
  color: #1a1a1a;
}

/* Why Choose T-Mafia Section */
.why-tmafia-section {
  background: linear-gradient(to right, #f5f5f5, #f0f0f0);
}

.why-tmafia-section h3 {
  font-family: "Cinzel", serif;
  color: #1a1a1a;
}

.why-tmafia-section p {
  color: #444444;
}

.why-tmafia-section img {
  width: 100%;
  height: 384px;
  object-fit: cover;
  object-position: center;
}

/* View More Button */
#view-more-btn {
  background-color: #000000;
  color: #ffffff;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#view-more-btn:hover {
  background-color: #1f1f1f;
  transform: translateY(-2px);
}

#view-more-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, #ffffff, #f5f5f5);
  border-radius: 15px;
  padding: 4rem 2rem;
}

.newsletter h3 {
  font-family: "Cinzel", serif;
  color: #1a1a1a;
}

.newsletter p {
  color: #444444;
}

.newsletter input {
  background-color: #ffffff;
  color: #333333;
  border: 1px solid #cccccc;
  transition: border-color 0.3s ease;
  padding: 0.85rem 1.5rem;
  border-radius: 9999px;
}

.newsletter input:focus {
  border-color: #000000;
  outline: none;
}

.newsletter button {
  background-color: #000000;
  color: #ffffff;
  transition: background-color 0.3s ease;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
}

.newsletter button:hover {
  background-color: #1f1f1f;
}

/* Back to Top */
#back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #000000;
  color: #ffffff;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, background-color 0.3s ease;
  z-index: 100;
  cursor: pointer;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  background-color: #1f1f1f;
}

/* Footer */
footer {
  background-color: #000000;
  color: #ffffff;
  border-top: 1px solid #333333;
}

.footer-link {
  color: #ffffff;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #cccccc;
}

.footer-social-icon {
  color: #ffffff;
  transition: color 0.3s ease;
}

.footer-social-icon:hover {
  color: #cccccc;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .swiper-container {
    height: 60vh;
  }

  .banner-text {
    left: 5%;
    padding: 1.5rem 2rem;
    max-width: 90%;
  }

  .banner-text h2 {
    font-size: 2.2rem;
  }

  .banner-text p {
    font-size: 1rem;
  }

  .banner-text a {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  .category-card img {
    height: 320px;
  }

  .category-content h4 {
    font-size: 1.8rem;
  }

  .category-content p {
    font-size: 1.1rem;
  }

  .product-card img {
    height: 224px;
  }

  .why-tmafia-section img {
    height: 320px;
  }
}

@media (max-width: 640px) {
  .swiper-container {
    height: 50vh;
  }

  .banner-text {
    text-align: center;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem;
    max-width: 95%;
  }

  .banner-text h2 {
    font-size: 1.9rem;
  }

  .banner-text p {
    font-size: 0.9rem;
  }

  .banner-text a {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .category-card img {
    height: 280px;
  }

  .category-content h4 {
    font-size: 1.5rem;
  }

  .category-content p {
    font-size: 1rem;
  }

  .why-tmafia-section img {
    height: 280px;
  }

  .newsletter form {
    flex-direction: column;
    gap: 1rem;
  }

  .newsletter input {
    width: 100%;
  }

  .newsletter button {
    width: 100%;
  }

  .product-card img {
    height: 192px;
  }
}

/* Ensure container doesn't cause overflow */
.container {
  max-width: 100%;
  overflow-x: hidden;
}

/* Hide Swiper controls */
.swiper-button-prev,
.swiper-button-next,
.swiper-pagination {
  display: none !important;
}