/* css/style.css */

/* 1. Variables */
:root {
  --primary-color: #8B5E3C;
  --accent-color: #D9825D;
  --bg-color: #FFF8F0;
  --text-color: #4F4037;
  --card-bg: #FFFFFF;
  --border-radius: 12px;
  --transition-speed: 0.3s;
}

/* 2. Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 3. Base Styles */
body {
  font-family: 'Open Sans', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 90%;
  max-width: 960px;
  margin: 0 auto;
}

/* 4. Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary-color);
  padding: 1rem 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: #FFF;
  font-weight: 700;
}

.site-nav a {
  margin-left: 1.5rem;
  color: #FFF;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background var(--transition-speed);
}

.site-nav a:hover {
  background: rgba(255,255,255,0.1);
}

/* 5. Hero Section */
.hero {
  background: var(--accent-color);
  color: #FFF;
  text-align: center;
  padding: 4rem 1rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.2rem;
  font-weight: 300;
}

/* 6. Controls: Search & Filters */
.controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
}

#searchInput {
  flex: 1;
  max-width: 400px;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}

.filters button {
  background: var(--card-bg);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition-speed), color var(--transition-speed);
}

.filters button:hover,
.filters button.active {
  background: var(--primary-color);
  color: #FFF;
}

/* 7. Product Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
  margin: 1rem 0 2rem;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #eee;
  display: block;
}

.card-content {
  flex: 1;
  padding: 1rem;
}

.card-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.card-content p {
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.4;
}

/* 8. Contact Section */
.contact-section {
  margin: 3rem 0;
  text-align: center;
}

.contact-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

/* 9. Footer */
.site-footer {
  margin-top: auto;
  background: #ECECEC;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-color);
  border-top: 1px solid #DDD;
}

/* 10. Responsive Breakpoints */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .site-nav {
    display: none; /* or swap to a hamburger menu */
  }
  .hero h1 {
    font-size: 2rem;
  }
}
/* Lightbox overlay */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}
/* Product description under price */
.product-card .description {
  font-size: 0.95rem;
  color: #333;
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* Lightbox overlay */
.lightbox {
  display: none;
  position: fixed;
  inset: 0; /* shorthand for top/left/right/bottom: 0 */
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

/* Lightbox inner container to limit width */
.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  overflow: auto;
  text-align: center;
}

/* The image itself */
.lightbox-img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  transition: transform 0.3s ease;
}
.lightbox-img:hover {
  transform: scale(1.02);
}

/* Caption text */
.lightbox-caption {
  color: #333;
  font-size: 1rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: #333;
  font-size: 1.5rem;
  cursor: pointer;
}
.lightbox-close:hover {
  color: #000;
}

/* Fade in keyframes */
@keyframes fadeIn {
  from { background: rgba(0,0,0,0); }
  to   { background: rgba(0,0,0,0.85); }
}
/* “Contact to Order” button */
.product-card .order-btn {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background-color: #8B5E3C;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}
.product-card .order-btn:hover {
  background-color: #6f4a2e;
}
/* Modal backdrop */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

/* Modal inner box */
.modal-content {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  position: relative;
}

/* Close “×” */
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
}

/* Form styling */
#order-form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
#order-form input,
#order-form textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.25rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
}
#order-form button[type="submit"] {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  background: #8B5E3C;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}
#order-form button[type="submit"]:hover {
  background: #6f4a2e;
}
