/* ------------------------------
   Base Styles
--------------------------------*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: #f9f9f9;
  color: #333;
  line-height: 1.5;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  display: block;
  border-radius: 6px;
}
.container {
  max-width: 1200px;
  margin: auto;
  padding: 15px;
}

/* ------------------------------
   Header
--------------------------------*/
/* ------------------------------
   Header
--------------------------------*/
.site-header {
  background: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.logo img {
  height: 40px;
  border-radius: 6px;
}
.logo span {
  font-weight: 700;
  font-size: 22px;
  color: #128C7E;
}

/* ------------------------------
   Cart Icon
--------------------------------*/
.cart-link {
  position: relative;
  font-size: 20px;
  color: #333;
  text-decoration: none;
}
.cart-link:hover { color: #128C7E; }
.cart-count {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #25D366;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  padding: 2px 6px;
  line-height: 1;
}

.main-nav {
  display: flex;
  gap: 18px;
  align-items: center;
}
.main-nav a { font-weight: 500; font-size: 14px; }
.main-nav a:hover { color: #128C7E; }
.hamburger {
  display: none;
  font-size: 22px;
  background: none;
  border: none;
}
@media (max-width: 768px) {
  .hamburger { display: block; }
  .main-nav {
    display: none;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 60px; left: 0; right: 0;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  body.nav-open .main-nav { display: flex; }
}

/* ------------------------------
   Footer
--------------------------------*/
.site-footer {
  text-align: center;
  padding: 15px;
  background: #f7f7f7;
  font-size: 13px;
  color: #555;
  margin-top: 40px;
}
.whatsapp-fab {
  position: fixed;
  bottom: 20px; right: 20px;
  background: #25D366;
  color: #fff;
  font-size: 24px;
  padding: 12px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* ------------------------------
   Banners / Carousel
--------------------------------*/
.hero-carousel {
  position: relative;
  overflow: hidden;
}
.carousel {
  display: flex;
  transition: transform 0.5s ease;
}
.carousel-slide { min-width: 100%; }
.carousel-slide img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
}
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }
.carousel-dots {
  text-align: center;
  margin-top: 8px;
}
.carousel-dots .dot {
  display: inline-block;
  width: 10px; height: 10px;
  margin: 0 4px;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
}
.carousel-dots .dot.active { background: #128C7E; }
@media (max-width: 768px) {
  .carousel-slide img { height: 180px; }
}

/* ------------------------------
   Section Title
--------------------------------*/
.section-title {
  margin: 25px 0 15px;
  font-size: 18px;
  font-weight: 600;
  color: #128C7E;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ------------------------------
   Categories
--------------------------------*/
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}
.category-card {
  text-align: center;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}
.category-card:hover { transform: translateY(-4px); }
.cat-icon img {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: auto;
}
.cat-name {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

/* ------------------------------
   Product Cards
--------------------------------*/
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.card {
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  text-align: center;
  display: flex;
  flex-direction: column;
}
.card img {
  max-height: 180px;
  object-fit: contain;
  margin-bottom: 10px;
}
.card h3 { font-size: 15px; margin-bottom: 6px; }
.card .price { font-weight: bold; color: #128C7E; }
.card .mrp { text-decoration: line-through; color: #999; margin-left: 6px; }
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.card-actions .btn {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}
.cart-btn { background: #333; color: #fff; }
.cart-btn:hover { background: #000; }
.whatsapp-btn { background: #25D366; color: #fff; }
.whatsapp-btn:hover { background: #128C7E; }

/* ------------------------------
   Single Product
--------------------------------*/
.single-product {
  max-width: 1000px;
  margin: 20px auto;
}
.product-card {
  display: flex;
  gap: 20px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.product-images { flex: 1; }
.product-images img.main-image {
  width: 100%; max-height: 400px; object-fit: contain;
}
.product-images .thumbs {
  display: flex; gap: 8px; margin-top: 8px;
}
.product-images .thumbs img {
  width: 60px; height: 60px;
  object-fit: cover;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
}
.product-info { flex: 2; }
.product-info h2 { font-size: 22px; margin-bottom: 8px; color: #128C7E; }
.product-info .price { font-size: 18px; font-weight: bold; color: #128C7E; }
.product-info .mrp { text-decoration: line-through; color: #999; margin-left: 8px; }
.product-actions { display: flex; gap: 12px; margin-top: 15px; }
.product-actions .btn { flex: 1; padding: 12px; border-radius: 6px; }

/* ------------------------------
   Cart & Checkout
--------------------------------*/
.cart-form, .checkout-box {
  max-width: 900px;
  margin: 20px auto;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td {
  border: 1px solid #eee;
  padding: 10px;
  text-align: center;
}
.cart-table th {
  background: #128C7E;
  color: #fff;
}
.cart-total-box {
  margin: 15px 0;
  text-align: right;
  font-weight: bold;
  color: #0b5345;
}
.checkout-box { display: flex; flex-wrap: wrap; gap: 20px; }
.order-summary { flex: 1; }
.checkout-form { flex: 2; }
.checkout-form label { font-weight: 600; margin-top: 10px; display: block; }
.checkout-form input, .checkout-form textarea {
  width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 6px; margin-top: 4px;
}
.checkout-form button {
  margin-top: 15px; width: 100%; padding: 12px;
  border: none; border-radius: 6px;
  font-size: 15px; font-weight: bold;
  background: #25D366; color: #fff;
}
.checkout-form button:hover { background: #128C7E; }

/* ------------------------------
   Pagination
--------------------------------*/
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}
.pagination a {
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}
.pagination a.active {
  background: #128C7E;
  color: #fff;
}

/* ------------------------------
   Responsive Tweaks
--------------------------------*/
@media (max-width: 768px) {
  .product-card { flex-direction: column; }
  .product-info { text-align: center; }
  .product-actions { flex-direction: column; }
  .checkout-box { flex-direction: column; }
}


/* Cart table responsive */
.cart-form {
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.cart-table th, .cart-table td {
  border: 1px solid #eee;
  padding: 12px;
  text-align: center;
}
.cart-table th {
  background: #128C7E;
  color: #fff;
  font-weight: 600;
}

/* Total box */
.cart-total-box {
  background: #e8fdf4;
  border: 1px solid #25D366;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  text-align: right;
  font-size: 16px;
  font-weight: 600;
  color: #0b5345;
}

/* Buttons */
.cart-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cart-buttons .btn {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
}
.cart-btn { background: #333; color: #fff; }
.cart-btn:hover { background: #000; }
.whatsapp-btn { background: #25D366; color: #fff; }
.whatsapp-btn:hover { background: #128C7E; }
.btn.delete { background: #e74c3c; color: #fff; }
.btn.delete:hover { background: #c0392b; }

/* Responsive: convert table to cards */
@media (max-width: 768px) {
  .cart-table, .cart-table thead, .cart-table tbody, .cart-table th, .cart-table td, .cart-table tr {
    display: block;
    width: 100%;
  }
  .cart-table thead { display: none; }
  .cart-table tr {
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }
  .cart-table td {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    border: none;
    border-bottom: 1px solid #f2f2f2;
  }
  .cart-table td:last-child { border-bottom: none; }
  .cart-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #333;
  }
  .cart-buttons {
    flex-direction: column;
  }
  .cart-buttons .btn {
    width: 100%;
  }
}

/* Prevent long product names from breaking layout */
.cart-table td[data-label="Product"] {
  word-wrap: break-word;
  white-space: normal;
  max-width: 160px; /* adjust width */
}

/* Cart Table – Desktop default */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.cart-table th,
.cart-table td {
  border: 1px solid #eee;
  padding: 12px;
  text-align: center;
}
.cart-table th {
  background: #128C7E;
  color: #fff;
  font-weight: 600;
}
.cart-table td[data-label="Product"] {
  max-width: 200px;
  word-break: break-word;
  white-space: normal;
}

/* Responsive: Convert table into cards */
@media (max-width: 768px) {
  .cart-table,
  .cart-table thead,
  .cart-table tbody,
  .cart-table th,
  .cart-table tr {
    display: block;
    width: 100%;
  }

  .cart-table thead {
    display: none;
  }

  .cart-table tr {
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }

  .cart-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border: none;
    border-bottom: 1px solid #f2f2f2;
    padding: 8px 10px;
    text-align: left;
  }
  .cart-table td:last-child {
    border-bottom: none;
  }

  .cart-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #128C7E;
    flex: 1;
    text-align: left;
    margin-right: 8px;
  }

  /* Product name should wrap nicely */
  .cart-table td[data-label="Product"] {
    flex: 2;
    word-break: break-word;
    white-space: normal;
  }
}





