/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0d6efd;
  color: white;
  padding: 15px 20px;
}

/* Logo */
.logo {
  font-size: 22px;
  font-weight: bold;
}

/* Navigation */
.nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

.nav ul li a {
  color: white;
  text-decoration: none;
  font-size: 16px;
  position: relative;
  transition: color 0.3s;
}

/* Hover effect for nav links */
.nav ul li a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: #ffc107; /* yellow line */
  left: 0;
  bottom: -4px;
  transition: width 0.3s;
}

.nav ul li a:hover {
  color: #ffc107;
}

.nav ul li a:hover::after {
  width: 100%;
}

/* Search Box */
.search-box {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 20px;
  padding: 5px 10px;
  margin-right: 15px;
}

.search-box input {
  border: none;
  outline: none;
  padding: 5px;
}

.search-box i {
  color: #0d6efd;
}

/* Cart */
.cart {
  position: relative;
  margin-right: 15px;
  cursor: pointer;
}

.cart i {
  font-size: 20px;
}

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

/* Hamburger */
.hamburger {
  display: none;
  font-size: 22px;
  cursor: pointer;
}

/* Responsive Header */
@media (max-width: 768px) {
  .nav {
    position: absolute;
    top: 60px;
    left: -100%;
    width: 100%;
    background: #0d6efd;
    transition: 0.3s;
  }

  .nav ul {
    flex-direction: column;
    text-align: center;
    padding: 10px 0;
  }

  .nav.active {
    left: 0;
  }

  .hamburger {
    display: block;
  }

  .search-box {
    display: none;
  }
}

/* Hero Section */
.hero {
  height: 100vh;
  background: url('https://source.unsplash.com/1600x900/?shopping,store') no-repeat center center/cover;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-content {
  text-align: center;
  max-width: 750px;
  padding: 20px;
  animation: fadeIn 2s ease-in-out;
}

.hero-content h1 {
  font-size: 3.2rem;
  font-weight: bold;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 30px;
  line-height: 1.6;
}

.cta-btn {
  background: #ff6600;
  color: white;
  padding: 15px 35px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.cta-btn:hover {
  background: #e65c00;
  transform: scale(1.07);
}

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

/* Sections */
.section {
  padding: 14px 20px;
  text-align: center;
  background: #f9f9f9;
}

.section:nth-child(even) {
  background: #fff;
}

.section h1, .section h2 {
  margin-bottom: 10px;
  color: #0d6efd;
}

.section p {
  margin: 0 auto;
  max-width: 700px;
  line-height: 1.5;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.product-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

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

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

.product-card p {
  font-size: 1rem;
  margin: 5px 0;
}

.product-card .price {
  font-weight: bold;
  color: #ff6600;
  margin: 10px 0;
}

.product-card button {
  background: #0d6efd;
  color: white;
  border: none;
  padding: 10px 20px;
  margin-bottom: 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.product-card button:hover {
  background: #0b5ed7;
}

/* Footer */
.footer {
  background: #0d6efd;
  color: white;
  padding: 30px 20px;
  text-align: center;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  margin: 0 12px;
  font-size: 15px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #ffc107;
}
/* Only applies on product.html, won't affect index.html */
.product-detail {
  display: flex;
  gap: 2rem;
}
.quantity-selector {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.quantity-selector button {
  width: 30px;
  height: 30px;
  background-color: #0077ff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.quantity-selector input {
  width: 50px;
  text-align: center;
  margin: 0 0.5rem;
}

/* Zoom result box */
#zoom-result {
  width: 300px;
  height: 300px;
  border: 1px solid #ccc;
  display: none; /* show only on hover if implementing zoom */
}
/* Toast notification styles */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #4BB543;
  color: white;
  padding: 12px 20px;
  border-radius: 5px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}
/* General Reset */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f9f9f9;
  color: #333;
}

header {
  background: #111827;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.5rem;
  margin: 0;
}

.cart {
  font-size: 1rem;
  background: #2563eb;
  padding: 0.4rem 0.8rem;
  border-radius: 5px;
  cursor: pointer;
}

.cart-count {
  font-weight: bold;
  margin-left: 5px;
}

/* Product Container */
.product-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
}

.product-container img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.product-container h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.product-container p {
  margin: 0.5rem 0;
  line-height: 1.5;
}

#product-price {
  font-size: 1.4rem;
  font-weight: bold;
  color: #2563eb;
  margin: 0.8rem 0;
}

/* Quantity Controls */
.quantity-control {
  display: flex;
  align-items: center;
  margin: 1rem 0;
}

.quantity-control button {
  width: 35px;
  height: 35px;
  font-size: 1.2rem;
  border: none;
  background: #e5e7eb;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.quantity-control button:hover {
  background: #d1d5db;
}

.quantity-control input {
  width: 50px;
  text-align: center;
  margin: 0 0.5rem;
  padding: 0.3rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
}

/* Action Buttons */
.action-buttons {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

.action-buttons button {
  flex: 1;
  padding: 0.8rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#addToCartBtn {
  background: #facc15;
  color: #111;
}

#addToCartBtn:hover {
  background: #eab308;
}

#buyNowBtn {
  background: #2563eb;
  color: white;
}

#buyNowBtn:hover {
  background: #1e40af;
}

.checkout-container {
  max-width: 700px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.checkout-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.checkout-item img {
  border-radius: 5px;
}

.total {
  font-size: 18px;
  margin-top: 15px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.btn-success {
  background: #28a745;
  color: white;
}
.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 1rem;
}

img {
  max-width: 100%;
  height: auto;
}

form, .card, .section {
  width: 100%;
}
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    gap: 1rem;
  }

  .form-container {
    width: 90%;
  }
}
