/* ========== FLEX LAYOUT STYLES ========== */

/* Body base */
.custom-body {
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ========== HEADER ========== */
.custom-header {
  background-color: blue;
  color: white;
  padding: 1rem;
  position: relative;
  width: 100%;
}

.header-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* Optional: prevents logo from blocking clicks */
}

.header-center a {
  pointer-events: auto; /* Restores clickability on the logo */
}

.header-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* Hamburger on the left */
.menu {
  display: flex;
  align-items: center;
  z-index: 10;
}

.menu-button {
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
}

.menu-button:hover {
  transform: scale(1.1);
}

/* Centered Logo using absolute + translate */
.header-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.logo {
  height: 80px;
  width: 120px;
  object-fit: contain;
}

/* Right side (search + basket) */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  z-index: 10;
}

/* === Search Bar Wrapper === */
.search-bar-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

/* === Search Toggle Button (Search Icon) === */
.search-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* === Search Bar (Initially Hidden) === */
.search-bar {
  display: flex;
  align-items: center;
  background-color: #2b2b2b;
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  position: absolute;
  right: 0;
  top: 110%;
  z-index: 10;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
  min-width: 220px;
}

.search-bar.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.search-input {
  border: none;
  background: transparent;
  color: white;
  padding: 0.5rem;
  outline: none;
  width: 100%;
  max-width: 200px;
}

.search-button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.search-button:hover {
  color: red;
}

/* === Basket Icon === */
.basket-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  position: relative;
}

.basket-count {
  background-color: red;
  border-radius: 50%;
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  position: absolute;
  top: -8px;
  right: -10px;
}

.basket-count.hidden {
  display: none;
}

/* === MENU LIST === */
.menu-list {
  background-color: #2b2b2b;
  padding: 1rem;
  list-style: none;
  position: absolute;
  top: 60px;
  left: 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  min-width: 250px;
  z-index: 9999;
  max-height: 80vh;
  overflow-y: auto;
  transition: all 0.3s ease;
}

.menu-list.hidden {
  display: none;
}

.menu-list li {
  margin: 0.5rem 0;
}

.menu-list li a {
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  display: block;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease;
}

.menu-list li a:hover {
  background-color: red;
  color: white;
}

/* ========== RESPONSIVENESS ========== */
@media (max-width: 768px) {
  .header-container {
    padding: 0 1rem;
  }

  .search-bar {
    min-width: 180px;
  }

  .search-input {
    max-width: 150px;
  }
}

@media (max-width: 640px) {
  .header-container {
    flex-wrap: nowrap;
    padding: 0;
  }

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

  .search-bar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .header-right {
    gap: 8px;
  }
}

/* ========== MAIN CONTENT ========== */
.main-content {
  flex: 1;
  padding: 2rem;
}

.page-title {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  font-weight: bold;
}

.featured-products {
  padding: 4rem 1rem;
  background-color: #f9fafb;
  text-align: center;
}

.featured-products h2 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 2rem;
}

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

.product-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  text-align: left;
  transition: transform 0.2s ease;
}

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

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

.product-card .p-4 {
  padding: 1rem;
}

.product-card h3 {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.product-card p {
  font-size: 0.95rem;
  color: #6b7280;
}

.product-card button {
  margin-top: 1rem;
  background-color: #10b981;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
}

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

/* ========== BASKET MODAL ========== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
}

.modal-title {
  margin-top: 0;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.modal.show {
  display: flex;
}

.footer {
  background-color: #1a1a1a;
  color: white;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  text-align: center;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-links h3,
.footer-payments h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

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

.footer-links ul li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: white;
  text-decoration: none;
  font-size: 1.05rem;
}

/* Payment section */
.footer-payments {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.footer-payments h3 {
  margin-bottom: 0.5rem;
}

.payment-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Social icons */
.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  font-size: 1.6rem;
}

.footer-social a {
  color: white;
  transition: color 0.3s;
}

.footer-social a:hover {
  color: #ff4d4d;
}

.footer-copyright {
  font-size: 0.95rem;
  color: #ccc;
  text-align: center;
}

/* Responsive for desktop */
@media (min-width: 768px) {
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .footer-links {
    flex: 1;
    text-align: left;
  }

  .footer-payments {
    align-items: flex-end;
    text-align: right;
  }

  .payment-icons {
    justify-content: flex-end;
  }
}


