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

/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Raleway', sans-serif;
  background-color: #fdf7f2;
  color: #4a3f35;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

header h1 {
  font-size: 1.9rem;
  color: #111;
}

header p {
  margin-top: 4px;
  font-size: 0.95rem;
  color: #444;
}

header h1,
header p{
  margin: 0;
}

/* =========================
   NAVBAR
========================= */
.menu-bar {
  position: fixed;
  top: 75px;
  width: 100%;
  background: #b07d62;
  z-index: 999;
}

.menu-container {
  max-width: 1200px;
  margin: auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.menu-toggle {
  display: none;
  font-size: 1.4rem;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

.menu-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.menu-links a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 5px;
  transition: 0.3s;
}

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

/* =========================
   CART
========================= */
.cart {
  position: relative;
  background: #8b5e3c;
  color: white;
  padding: 10px 16px;
  border-radius: 12px;
  min-width: 60px;
  font-size: 1.1rem;
  text-align: center;
  cursor: pointer;
}

.cart:hover {
  background: #a26b45;
}

#cartCount {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  background: #ff4d4d;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   MAIN OFFSET (Fix overlap)
========================= */
main {
  flex: 1;
  padding: 30px 15px;
  margin-top: 165px;
}

/* =========================
   PRODUCT GRID
========================= */
.products {
  max-width: 1200px;
  margin: 0 auto 50px;
  display: grid;
  gap: 20px;
}

/* Desktop */
@media (min-width: 1024px) {
  .products {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .products {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile */
@media (max-width: 767px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================
   PRODUCT CARD
========================= */
.product {
  background: #fff;
  border: 1px solid #e5d4c0;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: 0.25s ease;
  position: relative;
}

.product-link {
  text-decoration: none;
  color: inherit;
}


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

.product img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  background: #f8f1ec;
  border-radius: 12px;
}

.product-title {
  margin: 12px 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
}

.product .sold-badge + img {
  opacity: 0.6;
}

.product h3 {
  margin: 14px 0 8px;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: #9b6b43;
}

.price {
  font-weight: bold;
  margin-bottom: 10px;
}

.sold-overlay {
  position: absolute;
  top: 50px;
  left: 50px;
  transform: translate(-50%, -50%);

  background: rgba(255, 0, 0, 0.85);
  color: white;

  font-size: 16px;
  font-weight: bold;

  padding: 8px 14px;
  border-radius: 4px;

  z-index: 10px;
  white-space: nowrap;
}

.sold {
  opacity: 0.6;
}

.sold-btn {
  background: #888;
  cursor: not-allowed;
}

.sold-btn {
  background: #555;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: bold;
  cursor: not-allowed;
  width: 100%;
}

.sold-btn:hover {
  background: #555;
}


/* =========================
   BUTTONS
========================= */
.add-product-btn {
  background: #8b5e3c;
  color: white;
  cursor: pointer;
  border: none;
  padding: 10px;
  width: 100%;
  border-radius: 8px;
  transition: 0.3s ease;
  font-weight: 600;
}

.add-product-btn:hover {
  background: #e39ab3;
}

.add-product-btn:active {
  transform: scale(0.98);
}

.mark-sold-btn {
  display: none;
}

.back-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 18px;
  background: #b07d62;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  transition: 0.3s;
  font-weight: 600;
}

.back-btn:hover {
  background: #8b5e3c;
}




/* =========================
   PRODUCT DETAIL
========================= */

.product-details {
  max-width: 1100px;
  margin: 0 auto 60px;
  display: flex;
  gap: 50px;
  align-items: flex-start;
}

.product-details h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #9b6b43;
  text-decoration: none;
}

.product-details a {
  text-decoration: none;
}

.detail-price {
  font-size: 1.4rem;
  font-weight: bold;
  margin: 12px 0;
}

.detail-description {
  margin-bottom: 20px;
  line-height: 1.6;
}

.product a {
  text-decoration: none;
  color: inherit;
}

.product h3 {
  text-decoration: none;
}



/* Gallery Layout */
.product-gallery {
  display: flex;
  flex-direction: column;   /* STACK main image + thumbnails */
  align-items: center;
  width: 100%;
  gap: 15px;
}

/* Main Image */
.main-image {
  width: 470px;
  height: 470px;
  object-fit: cover;
  border-radius: 16px;
  background: #f8f1ec;
}

/* Thumbnails Row */
.thumbnail-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding: 10px 0;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.thumbnail-row ::-webkit-scrollbar {
  height: 6px;
}

.thumnail-row::-webkit-scrollbar-thumb {
  background: #b07d62;
  border-radius: 6px
}

/* Thumbnails */
.thumbnail-row img {
  flex: 0 0 auto;   /* VERY IMPORTANT*/
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
}

.thumbnail-row img:hover {
  border-color: #b07d62;
}
 

.details-text {
  flex: 1;
}

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

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

.checkout-container {
  background: #fff;
  width: 95%;
  max-width: 520px;
  padding: 30px;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  animation: fadeIn 0.3s ease;
}

.checkout-container h2,
.checkout-container h3 {
  margin-bottom: 15px;
  text-align: center;
}

.checkout-container input,
.checkout-container select {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 0.95rem;
}

.checkout-container button {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border-radius: 10px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.checkout-container button:first-of-type {
  background: #b07d62;
  color: white;
}

.checkout-container button:first-of-type:hover {
  background: #8b5e3c;
}

.checkout-container button:last-of-type {
  background: #444;
  color: white;
}

.checkout-container button:last-of-type:hover {
  background: #222;
}

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

/* =========================
   FOOTER
========================= */
.site-footer {
  background: #1f1f1f;
  color: #fff;
  padding: 14px 12px;
  margin-top: 60px;
}

.site-footer h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.site-footer p{
  margin: 4px 0;
  font-size: 0.9rem;
}

.footer-bottom {
  margin-top: 10px;
  font-size: 0.8rem;
  opacity: 0.8;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 30px;
  text-align: center;
}

.footer-brand h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: #ccc;
}

  /* Links */
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #f5c542;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

/* Contact Buttons */
.footer-contact {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.email-btn,
.whatsapp-btn {
  padding: 10px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s ease;
}

.email-btn {
  background: #444;
  color: white;
}

.email-btn:hover {
  background: #666;
}

.whatsapp-btn {
  background: #25D366;
  color: white;
}

.whatsapp-btn:hover {
  background: #1ebd5a;
}

.footer-bottom {
  font-size: 0.8rem;
  color: #aaa;
  margin-top: 20px;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {

  header h1 {
    font-size: 1.5rem;
  }

  .menu-toggle {
    display: block;
  }

  .menu-links {
    display: none;
    flex-direction: column;
    background: #b07d62;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    padding: 10px 0;
  }

  .menu-links.active {
    display: flex;
  }

  .product img {
    height: 180px;
  }

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

  .product-gallery {
    flex-direction: column;
    align-items: center;
  }

  .thumbnail-row {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .thumbnail-row img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s ease;
  }
  .thumbnail-row img:hover {
    transform: scale(1.08);
  }

  .main-image {
    width: 100%;
    max-width: 420px;
    height: auto;
  }

  .site-footer {
    padding: 10px 8px;
  }

  .footer-container {
    gap: 10px;
  }

  .footer-links {
    flex-direction: column;
    gap: 10px;
  }

  .footer-contact {
    flex-direction: column;
    gap: 12px;
  }
}

.detail-price {
  font-size: 1.4rem;
  font-weight: bold;
  margin: 12px 0;
}

.detail-description {
  margin-bottom: 20px;
  line-height: 1.6;
}



.product a:hover h3 {
  color: #7a4f32;
}