/* ===== IMPORT FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Raleway:wght@400;600&display=swap');

/* ===== BASE STYLE ===== */
body {
  font-family: 'Raleway', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #fdf7f2;
  color: #4a3f35;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to right, #ffffff, #fce4ec);
  color: #333;
  z-index: 1000;
  padding: 15px 0;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: bold;
  color: #111;
}

header p {
  margin: 0;
  font-size: 1rem;
  color: #444;
}

/* ===== MENU BAR ===== */
.menu-bar {
  background-color: #b07d62;
  color: white;
  padding: 10px 20px;
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  z-index: 999;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.menu-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: auto;
  overflow: visible !important;
}

/* ===== MENU LINKS ===== */
.menu-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.menu-links a {
  color: white;
  text-decoration: none; /* removes underline */
  font-weight: bold;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background 0.3s;
}

.menu-links a:hover {
  background: #ffe8d6;
  color: #333;
}

/* ===== MENU TOGGLE (MOBILE) ===== */
.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.3rem;
  font-weight: bold;
  color: white;
}

/* ===== CART ICON ===== */
.cart {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: #8b5e3c;
  border-radius: 8px;
  cursor: pointer;
  color: white;
  font-size: 1.3rem;
  line-height: 1;
  margin-right: env(safe-area-inset-right);
  transition: background 0.2s ease;
}

.cart:hover {
  background: #a26b45;
}

.cart img,
.cart i {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ===== Item Count Bubble ===== */
#cartCount {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ff4d4d;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

/* ===== CONTAINER ===== */
.container {
  padding: 20px;
  max-width: 1000px;
  margin: auto;
  margin-top: 140px;
}

/* ===== PRODUCT GRID ===== */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

/* ===== PRODUCT CARD ===== */
.product {
  background: #fff;
  border: 1px solid #e5d4c0;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.product img {
  max-width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

/* ===== PRODUCT TITLE ===== */
.product h3 {
  margin: 12px 0 5px;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: #9b6b43;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.product a {
  text-decoration: none; /* remove underline */
}

.product a:visited h3 {
  color: #9b6b43;
}

.product a:hover h3,
.product a:active h3 {
  color: #7a5032;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  text-decoration: none;
}

/* ===== SOLD OUT OVERLAY ===== */
.sold-tag {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 0, 0, 0.85);
  color: white;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 1rem;
  text-transform: uppercase;
}

/* ===== PRODUCT DETAILS ===== */
.product-details {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 30px;
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  max-width: 900px;
  margin: 0 auto;
}

.product-details img {
  width: 100%;
  max-width: 400px;
  object-fit: cover;
  border-radius: 10px;
}

.details-text {
  flex: 1;
  text-align: left;
}

/* ===== MARK AS SOLD BUTTON ===== */
.mark-sold-btn {
  background-color: #d9534f;
  color: white;
  border: none;
  padding: 8px 12px;
  margin-top: 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

/* ===== CART OVERLAY ===== */
.cart-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.cart-overlay.show {
  display: flex;
}

.cart-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 300px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* ===== FOOTER ===== */
.site-footer {
  background: #333;
  text-align: center;
  color: #fff;
  padding: 15px 10px;
  margin-top: 40px;
}

.site-footer a {
  color: #f5c542;
  text-decoration: none;
  margin: 0 6px;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.5rem;
  }

  .menu-toggle {
    display: block;
  }

  .menu-links {
    display: none;
    flex-direction: column;
    background-color: #b07d62;
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    border-radius: 0 0 8px 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
  }

  .menu-links.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  .cart {
    margin-right: env(safe-area-inset-right, 8px);
  }

  .product-details {
    flex-direction: column;
    text-align: center;
  }

  /* Hide mark as sold on mobile */
  .mark-sold-btn {
    display: none !important;
  }
}

.mark-sold-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.add-to-cart {
  background: #c89b72;
  color: #fff;
  padding: 12px 18px;
  border: none;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 10px rgba(0,0,0,0.12);
  transition: 0.25s;
}

.add-to-cart:hover {
  background: #b88358;
  box-shadow: 0 8px 14px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.add-to-cart:active {
  transform: scale(0.96);
}

.add-product-btn {
  background-color: brown; 
  color: chocolate;
  border: none;
  padding: 10px 14px;
  width: 100%;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.25s ease;
}

.add-product-btn:hover {
  background-color: #e39ab3;
  box-shadow: 0 3px 10px rgba(243, 169, 197, 0.4);
  transform: translateY(-2px);
}

.add-product-btn:active {
  background-color: #d57b9a;
  transform: scale(0.97);
}

.checkout-container {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-top: 2rem;
}

.delivery-option {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.delivery-btn {
  background-color: #f1a9c1;
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.delivery-btn:hover {
  background-color: #e68aab;
}

#deliveryResult {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #444;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1; /* ensures main content takes up available space */
  padding: 20px;
}

footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 15px 10px;
  position: relative;
  bottom: 0;
  width: 100%;
}

#checkout {
  background: #fafafa;
  padding: 20px;
  margin-top: 30px;
  border-top: 2px solid #ddd;
  border-radius: 8px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  flex: 1;
}

.cart-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.cart-overlay.active {
  display: flex;
}

.checkout-container {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
}

.site-footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 15px;
}

