/* Body & Fonts */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
    background: #f8aab4;
  color: #333;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  color: #fff;
  padding: 12px 15px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

header .logo a {
  color: #fff;
  text-decoration: none;
  font-size: 22px;
  font-weight: bold;
}

header .header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

header .header-actions button.back-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.2s;
}

header .header-actions button.back-btn:hover {
  transform: scale(1.1);
}

/* Cart Button */
#menu-btn,#cart-btn {
  font-size: 22px;
  cursor: pointer;
  position: relative;
  background: transparent;
  border: none;
  color: #fff;
  transition: transform 0.2s;
}

#cart-btn:hover { transform: scale(1.1); }

#cart-count {
  background: #fff;
  color: #c0392b;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 12px;
  position: absolute;
  top: -8px;
  right: -10px;
  display: none;
}


/* Filters */
.filters {
  text-align: center;
  padding: 20px;
  background: rgba(192, 57, 43, 0.9);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  border-bottom: 3px solid #a93226;
}

.filters input,
.filters select {
  padding: 10px 15px;
  border-radius: 6px;
  border: none;
  outline: none;
  font-size: 14px;
  min-width: 150px;
}

.cart-gifts {
  margin: 15px 0;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.cart-gifts h4 {
  font-size: 14px;
  margin-bottom: 8px;
}

#cart-gift-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.cart-gift-item {
  min-width: 90px;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
}

.cart-gift-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
}

.cart-gift-item button {
  margin-top: 4px;
  font-size: 11px;
  padding: 4px 6px;
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 4px !important;
  cursor: pointer;
}

/* Products Grid */
.product-grid {
  display: grid;
  /*grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
 */ gap: 25px;
  justify-items: center;
  padding: 30px 20px;
}

.product-card {
  background: #faf3f3;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 240px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

.product-card h3 {
  font-size: 16px;
  margin: 10px 0 5px;
  color: #333;
}

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

/* Buttons */
.product-card .btns {
  display: flex;
  gap: 8px;
  padding: 0 10px 15px;
  margin-top: auto;
}

.product-card button,
.view-btn {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 65px;
  cursor: pointer;
  font-weight: bold;
  font-size: 13px;
  transition: all 0.3s ease;
}

.product-card button {
  background: #ce6876 !important;
  color: #fff;
  margin: 8px;
}

.product-card button:hover {
  background: #ff546b;
  transform: scale(1.05);
}

.view-btn {
  background: #c0392b;
  color: #fff;
  margin: 8px;
}

.view-btn:hover {
  background: #c0392b;
  transform: scale(1.05);
}
.view-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 15px;
  background: #c0392b; /* نفس اللون */
  color: #fff;
  text-align: center;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s;
}

.view-btn:hover {
  background: #c0392b;
}


/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px; /* ⬅️ زي الصفحة الرئيسية */
  height: 100%;
  background: #fff;
  padding: 20px;
  box-shadow: -2px 0 5px rgba(0,0,0,0.2); /* أخف */
  transition: right 0.3s ease-in-out;
  z-index: 999999;
  overflow-y: auto; /* ⬅️ مهم */
}

.cart-sidebar.active {
  right: 0;
}

#cart-sidebar h2 {
  margin: 0 0 15px;
  font-size: 18px;
  font-weight: bold;
}


/* Cart Items */
#cart-items {
  list-style: none;
  padding: 0;
  margin: 0 0 15px 0;
  flex-grow: 1;
  overflow-y: auto;
}

#cart-items li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
  font-size: 14px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-item button {
  background: #ce6876;
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.cart-item button:hover {
  background: #a93226;
}


#checkout-btn {
  width: 100%;
  padding: 14px;
  background:linear-gradient(135deg, #ce6876, #fa9eba);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

#checkout-btn:hover {
  background: linear-gradient(135deg, #e75480, #c0392b);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

#checkout-btn:hover {
  background: linear-gradient(135deg, #c0392b, #c0392b);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

#close-cart {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
}


/* Toast */
.cart-message {
  position: fixed;
  top: 65px;
  right: 20px;
  background: #e27382 !important;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px !important;
  font-weight: bold;
  display: none;
  z-index: 3000;
  animation: slideIn 0.3s ease-out;
}

.cart-message.show {
  display: block;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}
.old-price {
  text-decoration: line-through;
  color: #999;
  margin-right: 8px;
}

.sale-price {
  color: #ce6876;
  font-weight: bold;
  font-size: 1.2em;
}

.sale-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e63946;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 2;
}

/* عشان الكارد يكون relative */
.product-card {
  position: relative;
}


/* Footer */
footer {
  background: #f8aab4;
  color: #fff;
  text-align: center;
  padding: 20px;
}

/* Mobile */
@media (max-width: 768px) {
  header {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .product-grid {
   /* grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    */gap: 15px;
  }
  .product-card img {
    height: 150px;
  }

  #checkout-btn {
    font-size: 15px;
    padding: 12px;
  }

}

/* Desktop */
@media (min-width: 769px) {
  header {
    justify-content: flex-start;
    align-items: center;
  }
  .logo { margin: 0 auto; }
}

/* Default hidden on mobile */
/*.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}
//stay
/*.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #fff;
}*/


/* =========================
   SCOPE FIX (ALL PRODUCTS)
   ========================= */

/* خليه يؤثر على all-products بس */
.all-products .product-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.all-products .product-card h3 {
  min-height: 42px; /* اسم المنتج */
}

.all-products .price {
  min-height: 24px;
}

/* الصور بس في صفحة all-products */
.all-products .product-card img {
  height: 180px;
  object-fit: cover;
}

/* تأكيد إن زرار Add to Cart ظاهر */
.all-products .add-to-cart {
  display: block !important;
  background: #b3635a;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 65px;
  cursor: pointer;
  font-weight: bold;
}

/* زرار View Details */
.all-products .view-btn {
  display: block !important;
  margin: 8px;
}

/* منع تأثيره على checkout */
.checkout .product-card,
.checkout .product-card img {
  all: unset;
}

/* ===============================
   HEADER (NO COLOR)
================================ */
.main-header {
 /* position: sticky;*/
  top: 0;
  left: 0;
  z-index: 10000;
width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;

 padding: 14px 18px;
   background: transparent; /* ❌ بدون لون */
}



/* logo */
.logo {
  font-size: 20px;
   position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-weight: bold;
}

/* cart */
.cart-btn {
  font-size: 20px;
  cursor: pointer;
  position: relative;
  z-index: 9999;
}

#cart-count {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #fff;
  color: #c0392b;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
}


/* ===============================
   SIDE MENU (OFF CANVAS)
================================ */

/*.page-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin: 40px 0 25px;
  letter-spacing: 1px;
  color: #3a2f2f;
  position: relative;
}

.page-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #c29a5b; /* لونك الدافي 
  margin: 10px auto 0;
  border-radius: 3px;
}*/

.page-header {
  text-align: center;
  margin: 45px 0 30px;
}

.page-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 8px;
  position: relative;
}

/*.page-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #a1742c;
  margin: 10px auto 0;
  border-radius: 3px;
}
*/
.page-subtitle {
  font-size: 14px;
  color: #f8e7e4;
  font-style: italic;
  max-width: 280px;
  margin: 8px auto 0;
  line-height: 1.5;
  opacity: 0.9;
  letter-spacing: 0.3px;
}

v.catalog-header {
  background: #c23b2d;
  padding: 35px 20px 30px;
  text-align: center;

}

.catalog-title {
  color: rgb(255, 255, 255);
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 6px;
text-align: center;
}

.catalog-subtitle {
  color: #f8e7e4;
  font-size: 14px;
  font-style: italic;
  max-width: 300px;
  margin: 0 auto 22px;
  line-height: 1.5;
}

#search-input,
#category {
  width: 100%;
  max-width: 320px;
  margin: 10px auto;
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
}

#search-input {
  background: #fff;
}

#category {
  background: #fff;
}
/*.catalog-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: #f6dcdc;
  margin: 8px auto 0;
  border-radius: 2px;
}*/
#search-input,
#category {
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

/*=============================== */
.side-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 82%;
  max-width: 320px;
  height: 100vh;
  background: #fff;
  z-index: 9999;
  transition: left 0.35s ease;
  box-shadow: 4px 0 20px rgba(0,0,0,0.2);
  overflow-y: auto;
}

.side-menu.active {
  left: 0;
}

.menu-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 22px;
  font-weight: 700;
  color: #ff8091;
  border-bottom: 1px solid #eee;
}

#close-menu {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

/* ===============================
   MENU LINKS
=============================== */
.menu-links {
  list-style: none;
  padding: 15px 20px 30px;
  margin: 0;
}

.menu-links li {
  margin: 14px 0;
}

.menu-links a {
  text-decoration: none;
  font-size: 16px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-links a:hover {
  color: #c0392b;
}

.menu-section {
  margin-top: 22px;
  font-size: 12px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.menu-divider {
  height: 1px;
  background: #eee;
  margin: 20px 0;
}

.contact-link {
  font-weight: 700;
  color: #c0392b;
}
*{
  box-sizing: border-box;
}
.out-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #999;
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
}

.add-to-cart:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.cart-total {
  margin-top: 15px;
  padding: 12px 16px;

  background: #ffe6f0;        /* وردي فاتح من ألوان الصفحة */
  border: 1px solid #f5b3cc;
  border-radius: 12px;

  color: #7a1f4b;
  font-size: 16px;
  font-weight: 600;

  display: flex;
  justify-content: space-between;
  align-items: center;

  box-shadow: 0 4px 10px rgba(122, 31, 75, 0.12);
}

/* كلمة Total */
.cart-total::before {
  content: "🧾 Total";
  font-weight: 500;
  color: #a63a6b;
}

/* موبايل */
@media (max-width: 480px) {
  .cart-total {
    font-size: 15px;
    padding: 10px 14px;
  }
}
#cart-sidebar .sale-badge {
  display: none !important;
}
.all-products .add-to-cart {
  margin: 12px;
  margin-top: auto;        /* ⬅️ ينزل لتحت */
  padding: 12px 0;
  width: calc(100% - 24px);

  background: linear-gradient(135deg, #c0392b, #e75480);
  color: #fff;
  border: none;
  border-radius: 55px;

  font-size: 14px;
  font-weight: bold;
  cursor: pointer;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.all-products .add-to-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(192,57,43,0.35);
}
.all-products .view-btn,
.all-products .btns {
  display: none !important;
}
.all-products .product-card:hover img {
  transform: scale(1.03);
}

.all-products .product-card img {
  transition: transform 0.3s ease;
}


.product-card.out-of-stock {
  opacity: 0.6;
}
.product-card.out-of-stock img {
  filter: grayscale(10%);
}

.out-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #444;
  color: white;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  z-index: 2;
}

.add-to-cart:disabled {
  background: #aaa;
  cursor: not-allowed;
}
/* ❌ لو المنتج Out of Stock، اخفي Sale */
.product-card.out-of-stock .sale-badge {
  display: none !important;
}

/* زرار Out of stock يتحول لبادج */
.add-to-cart.out-of-stock {
  background: #9e9e9e !important;
  color: #fff !important;
  cursor: default !important;
  pointer-events: none;

  border-radius: 999px;      /* شكل badge */
  padding: 10px 0;
  font-size: 13px;
  letter-spacing: 0.3px;
  text-transform: uppercase;

  box-shadow: none !important;
  transform: none !important;
}

/* امنع hover */
.add-to-cart.out-of-stock:hover {
  background: #9e9e9e !important;
  transform: none !important;
  box-shadow: none !important;
}
/* 📱 موبايل = عمودين دايمًا */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px;
  }
}

/* 💻 ديسكتوب */
@media (min-width: 769px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
/* 🔒 override زرار Out of stock */
.all-products .add-to-cart:disabled,
.all-products .add-to-cart.out-of-stock {
  background: #bdbdbd !important;
  color: #555 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
}
.product-card {
  cursor: pointer;
}

.product-card.out-of-stock {
  opacity: 0.8;
  cursor: pointer; /* مهم */
}

.product-card.out-of-stock .add-to-cart {
  cursor: not-allowed;
}
.product-card {
  cursor: pointer;
}

.add-to-cart.out-of-stock {
  opacity: 0.5 !important;
  cursor: not-allowed;
}
