html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  background-color: rgb(222, 222, 222);
  font-family: Roboto, Arial, sans-serif;
  box-sizing: border-box;
}

body > *:not(footer) {
  flex: 1;
}

*, *::before, *::after { box-sizing: inherit; }

.add-to-cart {
  margin-top: 10px;
  background-color: #3f51b5;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.25s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.topnav {
  width: 100%;
  height: 75px;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo {
  max-height: 70px;
  width: auto;
  display: block;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topnav a,
.nav-right a {
  color: #333;
  text-decoration: none;
  padding: 6px 12px;
  font-size: 18px;
  border-radius: 6px;
  transition: background-color 0.18s ease, color 0.18s ease;
  display: inline-block;
  line-height: 1;
}

.topnav a:hover,
.nav-right a:hover {
  background-color: #f0f0f0;
  color: #000;
}

.topnav a.active {
  background-color: #cbcbcb;
  color: #000;
}

.s {
  padding: 8px 14px;
  font-weight: 600;
  font-size: 16px;
}

.nav-main a {
  font-size: 20px;
}

.add-to-cart:hover {
  background-color: #2e3a8c;
  transform: translateY(-2px);
}

.add-to-cart.added {
  background-color: #4caf50 !important;
}

.cart-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 25px;
  max-width: 1040px;
  margin: 40px auto;
  align-items: start;
}

.cart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.cart-item {
  display: flex;
  align-items: center;
  background-color: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.cart-item:hover {
  transform: translateY(-4px);
}

.cart-img {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  margin-right: 20px;
  object-fit: cover;
}

.cart-info h3 {
  margin: 0 0 6px;
  font-size: 20px;
  color: #333;
}

.cart-info p {
  margin: 4px 0;
  color: #666;
  font-size: 15px;
}

.summary-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 25px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  position: sticky;
  top: 120px;
}

.summary-box h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 22px;
  color: #3f51b5;
  border-bottom: 2px solid #eee;
  padding-bottom: 8px;
}

.summary-box p {
  font-size: 16px;
  margin: 8px 0;
  color: #444;
}

.checkout-btn {
  width: 100%;
  background-color: #3f51b5;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  margin-top: 15px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.checkout-btn:hover {
  background-color: #2e3a8c;
  transform: translateY(-2px);
}

.empty-cart {
  text-align: center;
  font-size: 18px;
  color: #777;
  padding: 40px 0;
}

.footer {
  background-color: #1f1f1f;
  color: white;
  padding: 35px 20px;
  font-family: 'Poppins', sans-serif;
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.contact-title {
  color: #ffb347;
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.contact-info p {
  margin: 6px 0;
  font-size: 0.95rem;
  color: #ccc;
}

.footer-line {
  width: 80%;
  height: 1px;
  background-color: #444;
  margin: 25px auto;
}

.social-links {
  display: flex;
  gap: 15px;
  justify-content: center;
  padding: 20px 0;
}

.social-links a {
  color: #333;
  font-size: 28px;
  transition: 0.3s;
}

.social-links a:hover {
  color: #ff6347;
  transform: scale(1.2);
}

.copyright p {
  font-size: 0.9rem;
  color: #aaa;
}

@media (max-width: 768px) {
  .cart-container {
    grid-template-columns: 1fr;
  }

  .summary-box {
    position: relative;
    top: 0;
  }

  .footer-content {
    padding: 0 10px;
  }
}
