/* ------------------------------
   GLOBAL STYLES
------------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #f9f7f4;
  color: #333;
  line-height: 1.6;
}

/* ------------------------------
   TOP BAR
------------------------------ */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #d2b48c; /* carton brown tone */
  padding: 10px 20px;
  color: #fff;
}

.left-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
}

.search-box input {
  padding: 8px 12px;
  border-radius: 5px;
  border: none;
  outline: none;
  width: 200px;
}

.search-box button {
  background: #fff;
  color: #d2b48c;
  border: none;
  border-radius: 5px;
  padding: 8px 10px;
  cursor: pointer;
  transition: 0.3s;
}

.search-box button:hover {
  background: #f1f1f1;
}

/* ------------------------------
   CART ICON
------------------------------ */
.cart-icon {
  cursor: pointer;
  font-size: 1.5rem;
  position: relative;
}

#cart-count {
  position: absolute;
  top: -5px;
  right: -10px;
  background-color: #fff;
  color: #d2b48c;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.8rem;
  font-weight: bold;
}

/* ------------------------------
   HEADER
------------------------------ */
header {
  text-align: center;
  padding: 30px 10px;
  background-color: #fffaf0;
  border-bottom: 3px solid #d2b48c;
}

header h1 {
  color: #a47148;
  font-size: 2rem;
  margin-bottom: 10px;
  animation: slideIn 0.7s ease-out;
}

header p {
  color: #555;
}

/* ------------------------------
   PRODUCT GRID
------------------------------ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  padding: 20px;
  animation: gentleFade 0.8s ease-in;
}

.product {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  padding: 15px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

.product:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.price {
  font-weight: bold;
  color: #a47148;
  margin: 5px 0;
}

.product button {
  background-color: #a47148;
  color: #fff;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

.product button:hover {
  background-color: #8b5a2b;
}

/* ------------------------------
   PAGINATION
------------------------------ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 20px;
}

.pagination a {
  text-decoration: none;
  color: #a47148;
  font-weight: 600;
  padding: 6px 12px;
  border: 1px solid #a47148;
  border-radius: 5px;
  transition: 0.3s;
}

.pagination a.disabled {
  pointer-events: none;
  opacity: 0.5;
  border-color: #ccc;
  color: #ccc;
}

.pagination a.active {
  background-color: #a47148;
  color: #fff;
}

.pagination a:hover {
  background-color: #8b5a2b;
  color: #fff;
}

/* ------------------------------
   CART POPUP
------------------------------ */
#cart {
  display: none;
  position: fixed;
  top: 70px;
  right: 20px;
  width: 300px;
  background-color: #fff;
  border: 2px solid #d2b48c;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 100;
  animation: slideIn 0.5s ease-out;
}

#cart h3 {
  margin-bottom: 10px;
  color: #a47148;
}

#cart ul {
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.cart-actions {
  display: flex;
  justify-content: space-between;
}

.btn {
  padding: 6px 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  color: #fff;
}

.clear {
  background-color: #888;
}

.checkout {
  background-color: #a47148;
}

/* ------------------------------
   PAYMENT MODAL
------------------------------ */
.payment-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 200;
}

.payment-content {
  background: #fff;
  padding: 25px;
  border-radius: 15px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  animation: slideIn 0.5s ease-out;
}

.payment-content h2 {
  color: #a47148;
  margin-bottom: 15px;
}

.payment-content button {
  margin-top: 15px;
  background-color: #a47148;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 15px;
  cursor: pointer;
  transition: 0.3s;
}

.payment-content button:hover {
  background-color: #8b5a2b;
}

/* ------------------------------
   WHATSAPP FLOAT BUTTON
------------------------------ */
.whatsapp-float {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #25d366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  z-index: 1200;
  text-decoration: none;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.whatsapp-float img {
  width: 60%;
  height: 60%;
  object-fit: cover;
  border-radius: 50%;
}

/* ------------------------------
   FOOTER
------------------------------ */
footer {
  text-align: center;
  padding: 20px;
  background-color: #fffaf0;
  color: #a47148;
  border-top: 3px solid #d2b48c;
}

/* ------------------------------
   ANIMATIONS
------------------------------ */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  }
  70% {
    transform: scale(1.08);
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

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

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

/* ------------------------------
   RESPONSIVE DESIGN
------------------------------ */
@media (max-width: 768px) {
  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .search-box input {
    width: 100%;
  }

  #cart {
    right: 10px;
    width: 90%;
  }

  .product img {
    height: 180px;
  }

  header h1 {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .whatsapp-float img {
    width: 35px;
    height: 35px;
  }
}