* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

body {
  line-height: 1.6;
}

.header {
  display: flex;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: #111;
  color: #fff;
}

.header a {
  color: #fff;
  margin: 0 10px;
  text-decoration: none;
}

.hero {
  padding: 4rem 2rem;
  text-align: center;
  background: #f5f5f5;
}

.hero button {
  margin: 10px;
  padding: 10px 20px;
  cursor: pointer;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
}

.btn,
.add-to-cart-btn {
  background: #111;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn:hover,
.add-to-cart-btn:hover {
  background: #c0e909;
  color:#111 ;
}

button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.hero .secondary {
  background: transparent;
  border: 1px solid #000;
}

.section {
  padding: 3rem 2rem;
  /* max-width: 1200px;
  margin: auto; */
}

.section.light {
  background: #f9f9f9;
}

.hero {
  background: url('images/hero.jpg') center/cover no-repeat;
  padding: 100px 20px;
  text-align: center;
  color: #fff;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.hero h1,
.hero p,
.hero .btn {
  position: relative;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.card {
  border: 1px solid #ddd;
  padding: 1rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform 0.2s ease;
  /* position: relative; */
}

.card:hover {
  transform: translateY(-5px);
}

.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 10px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  flex-grow: 1;
}

.card h3 {
  font-size: 16px;
  margin: 10px 0;
  line-height: 1.4;
  min-height: 40px;
}

.card p {
  font-weight: bold;
  margin-bottom: 12px;
}

.card button {
  margin-top: 10px;
  width: 100%;
}

.categories {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.category {
  padding: 1rem;
  background: #ddd;
  cursor: pointer;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.promo {
  background: #111;
  color: #fff;
  text-align: center;
  padding: 2rem;
}

.testimonials blockquote {
  margin: 1rem 0;
}

.footer {
  background: #111;
  color: #fff;
  text-align: center;
  padding: 1rem;
}

/* =========================
   RESET & BASE STYLES
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #f8f8f8;
  color: #333;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =========================
   HEADER / NAVIGATION
========================= */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e5e5;
}

.site-header nav {
  max-width: 1200px;
  margin: auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header .logo {
  font-size: 1.2rem;
  font-weight: bold;
}

.site-header ul {
  list-style: none;
  /* display: flex; */
  gap: 1.2rem;
}
/* =================
  PRODUCTS PAGE HEADER
=====================*/

/* Navigation layout */
.site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  gap: 25px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Dropdown */
.nav-item {
  position: relative;
  padding-bottom: 10px;
}

.dropdown-toggle {
  text-decoration: none;
  color: #000;
  font-weight: 500;
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 180px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 8px 0;
  display: none;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.dropdown-menu li {
  list-style: none;
  /* display: none; */
}

.dropdown-menu a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}

.dropdown-menu a:hover {
  background: #f5f5f5;
}

/* Show dropdown on hover */
.nav-item:hover .dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
}
.cart-icon {
  position: relative;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s ease;
}

.cart-icon:hover {
  transform: scale(1.05);
}


/* =========================
   SEARCH SECTION
========================= */
.search-section {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.search-section input {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
}

/* =========================
   PRODUCTS GRID
========================= */
.products-section {
  max-width: 1200px;
  margin: auto;
  padding: 0 1rem 3rem;
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  background-color: #ddd;
}

/* =========================
   PRODUCT CARD
========================= */
.product {
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-link:hover .product {
  transform: translateY(-4px);
  transition: transform 0.2s ease;
}

/* =========================
   PRODUCT IMAGE
========================= */
.product__media-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: red !important;
  position: relative;
}

.availability-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  color: #fff;
  z-index: 2;
}

/* Badge variants */
.badge--in-stock {
  background-color: #2e7d32; /* green */
}

.badge--preorder {
  background-color: #ed6c02; /* orange */
}

.badge--out-of-stock {
  background-color: #c62828; /* red */
}

.file-wrapper {
  width: 100%;
  height: 100%;
}

.product-view__media--img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================
   PRODUCT DETAILS
========================= */
.product__details {
  padding: 1rem;
}

.product__details__name span {
  font-size: 0.95rem;
  font-weight: 500;
  display: block;
  margin-bottom: 0.4rem;
}

.product__details__price {
  font-size: 0.95rem;
  font-weight: bold;
  color: #000;
}

.product-detail {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.product-detail__image img {
  width: 100%;
  max-width: 420px;
  border-radius: 8px;
  background: #f0f0f0;
}

.product-detail__price {
  font-size: 1.4rem;
  font-weight: bold;
  margin: 1rem 0;
}

.btn-primary {
  padding: 0.8rem 1rem;
  border: none;
  background: #000;
  color: #fff;
  cursor: pointer;
  border-radius: 4px;
  transition: 0.2s ease;
}

.btn-primary:hover {
  background: #333;
}
.modalbtn{
  padding: 0.4rem 1rem;
}
.editcart{
  color:rgb(255, 23, 23);
}

.quantity-selector{
  display:flex;
  align-items:center;
  gap:10px;
  margin:20px 0;
}

.quantity-selector button{
  width:35px;
  height:35px;
  cursor:pointer;
}

.quantity-selector input{
  width:50px;
  text-align:center;
}

.toast{
  position:fixed;
  bottom:30px;
  right:30px;
  background:#222;
  color:#fff;
  padding:14px 20px;
  border-radius:6px;
  opacity:0;
  visibility:hidden;
  transition:.3s;
  z-index:9999;
}

.toast.show{
  opacity:1;
  visibility:visible;
}

/* Modal */
.cart-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.cart-actions {
  display: flex;
  gap: 12px;              /* space between buttons */
  margin-top: 20px;
}

.cart-actions button,
.cart-actions a {
  flex: 1;                /* both take equal width */
  text-align: center;
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}


.close-modal:hover {
  color: red;
}

.cart-modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.cart-modal-content {
  background: #fff;
  position: relative;
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  border-radius: 8px;
}

.hidden {
  display: none;
}


/* category */
.category {
  display: block;
  padding: 1rem;
  background: #f3f3f3;
  text-align: center;
  border-radius: 6px;
  text-decoration: none;
  color: #000;
}

.category:hover {
  background: #c0e909;
}

/* SHOW TOAST */
.toast-message {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #111;
  color: #fff;
  padding: 12px 18px;
  border-radius: 6px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 9999;
  font-size: 14px;
}

.toast-message.show {
  opacity: 1;
  transform: translateY(0);
}

/*========== CART PAGE =========*/

/*======= CART PAGE LAYOUT =======*/
.cart-page {
  display: flex;
  gap: 40px;
  padding: 40px 5%;
  align-items: flex-start;
}

.cart-items {
  flex: 2;
}

.cart-summary-box {
  flex: 1;
  background: #f9f9f9;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: sticky;
  top: 20px;
}

/*======= Cart Item Rows =======*/
.cart-item-row {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
  align-items: center;
}

.cart-item-img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  background: #f0f0f0;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.cart-item-info p {
  margin: 0 0 10px;
  color: #666;
}

.cart-item-total {
  font-weight: bold;
  font-size: 16px;
  min-width: 100px;
  text-align: right;
}

/* =======Quantity Controls =======*/
.quantity-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.quantity-controls button {
  width: 28px;
  height: 28px;
  border: none;
  background: #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.quantity-controls span {
  min-width: 20px;
  text-align: center;
  font-weight: bold;
}
/*======= Remove Button =======*/
.remove-item {
  background: none;
  border: none;
  color: #c0392b;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

/*======= Order Summary =======*/
.cart-summary-box h2 {
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
}

.summary-row.total {
  font-size: 18px;
  font-weight: bold;
  border-top: 1px solid #ddd;
  padding-top: 12px;
  margin-top: 12px;
}

/*======= Shipping Preview =======*/
.shipping-preview {
  margin: 20px 0;
  font-size: 13px;
  color: #555;
  background: #fff;
  padding: 10px;
  border-radius: 6px;
}

/*======= Buttons =======*/
.checkout-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #111;
  color: #fff;
  padding: 12px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  margin-bottom: 12px;
}

.continue-shopping {
  display: block;
  text-align: center;
  font-size: 14px;
  color: #555;
  text-decoration: none;
}

/*======= Empty Cart State ======*/
.empty-cart {
  text-align: center;
  padding: 60px 20px;
}

.empty-cart p {
  margin-bottom: 15px;
  font-size: 16px;
}

.empty-cart .btn {
  background: #111;
  color: white;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
}


/* ===================
  CHECKOUT PAGE
======================= */
.checkout-container {
  display: flex;
  gap: 40px;
  padding: 40px;
  max-width: 1100px;
  margin: auto;
}

.checkout-form, .checkout-summary {
  flex: 1;
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.checkout-form h2,
.checkout-summary h2 {
  margin-bottom: 20px;
}

.checkout-form label {
  display: block;
  margin-top: 15px;
  font-weight: 600;
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 5px;
  border: 1px solid #ddd;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.summary-line.total {
  font-size: 18px;
  font-weight: bold;
  border-top: 1px solid #ddd;
  padding-top: 10px;
}

.checkout-btn {
  margin-top: 20px;
  width: 100%;
}

.quantity-controls button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.limit-msg {
  color: red;
  font-size: 12px;
  display: block;
  margin-top: 4px;
}

/* ========================
  ORDER-SUCCESS
 ========================*/
.success-page {
  background: #f4f6f8;
  font-family: Arial, sans-serif;
}

.success-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.success-card {
  background: #ffffff;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.success-icon {
  font-size: 50px;
  margin-bottom: 15px;
}

.success-card h1 {
  margin-bottom: 10px;
  color: #2e7d32;
}

.order-info {
  margin: 20px 0;
  background: #f9fafb;
  padding: 15px;
  border-radius: 8px;
  font-size: 14px;
}

.success-actions {
  margin-top: 25px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  background: black;
  color: white;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
}

.btn-outline {
  border: 1px solid black;
  padding: 10px 18px;
  border-radius: 6px;
  text-decoration: none;
  color: black;
}

/* =========================
   FOOTER
========================= */
.site-footer {
  background-color: #ffffff;
  border-top: 1px solid #e5e5e5;
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
  color: #666;
}

/* =========================
   RESPONSIVE TWEAKS
========================= */
/* CART PAGE MOBILE */
@media (max-width: 768px) {
  .cart-page {
    flex-direction: column;
  }

  .cart-summary-box {
    position: static;
    width: 100%;
  }

  .cart-item-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-item-total {
    text-align: left;
    margin-top: 10px;
  }
  .checkout-container{
    flex-direction: column;
  }
}


@media (max-width: 600px) {
  .site-header nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  .site-header ul {
    gap: 0.8rem;
  }
}
