/* ========== RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
  border: none;
  text-transform: capitalize;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

:root {
  --bg-color--: #ab2e26;
  --color--: #b8b8b8;
  --text--: #202020;
}

/* ========== HEADER ========== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background-color: var(--bg-color--);
  color: #fff;
  height: 70px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  padding: 0 5%;
}

.unik {
  color: #000;
  font-weight: 700;
  font-size: 1.5rem;
}

/* Search */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

#searchInput {
  width: 0;
  opacity: 0;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 20px;
  outline: none;
  transition: 0.4s ease;
  margin-left: 10px;
  font-size: 1rem;
}

/* When active */
.search-active #searchInput {
  width: 200px;
  opacity: 1;
}

/* Navigation */
header nav ul {
  display: flex;
  list-style-type: none;
  align-items: center;
  gap: 10px;
}

header nav ul a {
  text-decoration: none;
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  padding: 10px;
  border-radius: 6px;
  transition: 0.3s;
}

header nav ul a:hover {
  color: #000;
  background-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

/* Hamburger Icon */
#menu {
  display: none;
  font-size: 26px;
  cursor: pointer;
  color: #fff;
}

/* Cart Icon Container */
.cart-icon-container {
  transition: 0.3s ease;
  padding: 8px 12px;
  border-radius: 6px;
}

.cart-icon-container:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.cart-icon-container:hover #cartLabel {
  display: inline-block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff0000;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  border: 2px solid #b30000;
}

/* Hidden nav (default mobile) */
nav {
  position: absolute;
  top: 70px;
  left: 0;
  width: 100%;
  background-color: var(--bg-color--);
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  transform: translateY(-200%);
  opacity: 0;
  visibility: hidden;
}

nav.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* ========== HERO SECTION ========== */
.hero {
  width: 100%;
  height: 80vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 12px;
  margin-top: 70px; /* Prevent overlap with fixed header */
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(85%);
}

.hero-text {
  position: absolute;
  text-align: left;
  color: #fff;
  max-width: 600px;
  padding: 0 5%;
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  color: black;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-text p {
  font-size: 1.2rem;
  margin-top: 10px;
  color: #fff;
  line-height: 1.5;
}

.hero-text .btn {
  margin-top: 20px;
  display: inline-block;
  background-color: #ff0000;
  color: #fff;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s;
}

.hero-text .btn:hover {
  background-color: #cc0000;
  transform: translateY(-3px);
}

/* ========== PRODUCTS SECTION ========== */
.products-section {
  padding: 50px 5%;
  background-color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.product-card {
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  background: #fafafa;
  text-align: center;
  transition: 0.3s;
}

.product-card:hover {
  transform: scale(1.03);
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.product-card h3 {
  margin: 10px 0;
  font-size: 1.1rem;
}

.product-card p {
  color: #555;
}

.product-card button {
  background: var(--bg-color--);
  color: #fff;
  border: none;
  padding: 10px 15px;
  margin-bottom: 15px;
  border-radius: 5px;
  cursor: pointer;
}

.product-card button:hover {
  background-color: #922520;
}

/* ========== FOOTER ========== */
.footer {
  background-color: #b30000;
  color: #fff;
  padding: 50px 5% 20px;
  font-family: "Poppins", sans-serif;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.footer h4 {
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.footer p {
  line-height: 1.6;
  color: #f1f1f1;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin: 8px 0;
}

.footer-links a {
  color: #f1f1f1;
  text-decoration: none;
  transition: 0.3s;
}

.footer-links a:hover {
  color: #ffd6d6;
}

.footer-social .social-icons {
  display: flex;
  gap: 15px;
}

.footer-social a {
  color: #fff;
  background: #ff3333;
  padding: 10px;
  border-radius: 5px;
  transition: 0.3s;
  text-decoration: none;
}

.footer-social a:hover {
  background: #fff;
  color: #b30000;
}

.footer-bottom {
  border-top: 1px solid #ff6666;
  text-align: center;
  padding-top: 15px;
  font-size: 0.9rem;
  color: #fff;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
  #menu {
    display: block;
  }

  header nav ul {
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 20px;
  }

  header nav ul li {
    width: 100%;
    text-align: center;
    padding: 10px 0px;
  }

  header nav ul a {
    font-size: 18px;
  }

  .hero {
    height: 60vh;
  }

  .hero-text {
    text-align: center;
    max-width: 90%;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 1rem;
  }

  .products-section {
    padding: 30px 5%;
  }

  .product-card img {
    height: 180px;
  }
}

@media (max-width: 440px) {
  .hero-text h1 {
    font-size: 1.6rem;
  }

  .hero-text p {
    font-size: 0.9rem;
  }

  .hero-text .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

/* ========== DESKTOP NAV FIX ========== */
@media (min-width: 769px) {
  nav {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: flex;
    background: transparent;
  }
}
