/* Haunté luxury + subtle Halloween */
:root{
  --bg:#fbf6f2;
  --cream:#fff8f3;
  --ink:#211915;
  --muted:#7c6a5a;
  --accent: #ff0000;
  --accent-2:#4b2b1a;
  --card:#fffaf6;
  --glass: rgba(255,255,255,0.6);
}

*{box-sizing:border-box;}
html,body{height:100%}
body{
  margin:0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:var(--bg);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
}

/* Prevent horizontal scroll on mobile */
body, html {
  overflow-x: hidden;
}

.container, .product-page, .product-grid, .categories-grid, .cart-container {
  max-width: 100%;
  width: 100%;
}

.container{max-width:1200px;margin:0 auto;padding:0 20px}

/* Header */
.site-header{
  position:sticky;top:0;z-index:110;
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,248,240,0.85));
  border-bottom: 1px solid rgba(75,43,26,0.04);
}
.header-inner{
  max-width:1200px;margin:0 auto;padding:14px 20px;
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  flex-wrap: wrap;
}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--accent-2)}
.brand-logo{width:46px;height:46px;object-fit:cover;border-radius:8px;border:1px solid rgba(75,43,26,0.06)}
.brand-name{font-family:'Playfair Display', serif;font-size:22px;color:var(--accent-2);letter-spacing:0.6px}

/* Nav */
.nav-links{display:flex;gap:14px;align-items:center}
.nav-links a{color:var(--muted);text-decoration:none;font-weight:600;font-size:0.95rem}
.header-actions{display:flex;gap:14px;align-items:center;width: auto;justify-content: flex-start;}
.header-actions input{padding:10px 12px;border-radius:22px;border:1px solid rgba(75,43,26,0.08);width:220px;background:var(--cream);color:var(--accent-2);box-sizing: border-box;}

/* Hero full-bleed */
.hero{width:100%;min-height: 0vh;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;/* background:black; */}
.hero-overlay{width:100%;display:flex;align-items:center;justify-content:center;padding:0;margin:0}
.hero-image-wrap{position:absolute;inset:0;overflow:hidden}
.hero-image{width:100%;height:100%;object-fit:cover;display:block;filter:contrast(0.95) saturate(0.95);opacity:0.98}
.hero-copy{
  position:relative;
  z-index:3;
  max-width:1200px;
  width:100%;
  /* display:grid; */
  /* grid-template-columns:1fr 420px; */
  gap:28px;
  padding:72px 20px;
  align-items:center;
  /* background: linear-gradient(90deg, rgba(255,255,255,0.88), rgba(255,250,245,0.78)); */
  margin:48px;
  border-radius:12px;
  /* box-shadow:0 18px 40px rgba(41,28,18,0.08); */
}
.hero-copy h1{font-family:'Playfair Display',serif;font-size:clamp(42px,6vw,84px);margin:0;color: #fffefe;letter-spacing:0.2px}
.tagline{margin:8px 0 18px;color: #ffffff;font-size:1.05rem;line-height:1.5;font-weight:300}
.hero-actions{display:flex;gap:12px;align-items:center}
.btn-primary{background:linear-gradient(180deg,var(--accent),var(--accent-2));color:white;padding:12px 18px;border-radius:12px;border:none;cursor:pointer;font-weight:600;box-shadow:0 8px 22px rgba(168,119,79,0.18)}
.btn-ghost{background:transparent;padding:10px 16px;border-radius:10px;border:1px solid rgba(75,43,26,0.06);font-weight:600;color: #ffffff;cursor:pointer}

/* categories */
.categories{padding:40px 0}
.categories-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}
.cat-card{display:block;background:var(--card);border-radius:10px;padding:18px;text-align:center;text-decoration:none;color:var(--accent-2);box-shadow:0 8px 20px rgba(41,28,18,0.06);transition:transform .18s,box-shadow .18s}
.cat-card img{width:100%;height:160px;object-fit:cover;border-radius:8px;margin-bottom:12px}
.cat-card h3{margin:0;font-family:'Playfair Display',serif}

/* new arrivals */
.new-arrivals{padding:28px 0}
.section h2{font-family:'Playfair Display',serif;margin-bottom:10px;color:var(--accent-2);font-weight:600}

/* product grid (keeps same classes your script uses) */
.product-grid{display:grid;grid-template-columns: repeat(auto-fill,minmax(220px,1fr));gap:22px;padding-bottom:18px}
.product-card{background:transparent;border-radius:10px;padding:0;text-align:left;cursor:pointer}
.product-card img{width:100%;height:320px;object-fit:cover;border-radius:10px;box-shadow:0 12px 30px rgba(23,15,11,0.06)}
.product-info{padding:10px 0}
.product-info h3{margin:0;font-size:1.05rem;font-weight:600;color:var(--accent-2);font-family:'Poppins'}
.product-info p{margin:6px 0;color:var(--muted);font-size:0.95rem}

/* about */
.about{padding:28px 0}

/* footer */
.site-footer{background:var(--cream);border-top:1px solid rgba(75,43,26,0.04);padding:28px 0;margin-top:40px}
.footer-inner{display:flex;justify-content:space-between;align-items:center;gap:20px}

/* modal (quick view) keep it centered and above header */
.modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,0.35);z-index:9999}
.modal-content{width:100%;max-width:920px;background:var(--card);padding:30px;border-radius:12px;box-shadow:0 30px 80px rgba(16,10,8,0.3);position:relative}
.modal-close{position:absolute;right:18px;top:18px;border:none;background:transparent;font-size:28px;cursor:pointer;color:var(--accent-2)}
.main-modal-img{width:100%;height:480px;object-fit:cover;border-radius:10px}

/* cart-link minor tweaks */
.cart-link{color:var(--accent-2);text-decoration:none;font-weight:600}

/* Cart page styling to match homepage */
.cart-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 0;
}

.cart-item {
  display: flex;
  align-items: center;
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  gap: 16px;
  box-shadow: 0 12px 30px rgba(23,15,11,0.06);
}

.cart-item img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-item-info span {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  color: var(--ink);
}

.remove-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s;
}

.remove-btn:hover {
  transform: scale(1.05);
}

#cart-total {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--accent-2);
  margin-top: 16px;
}

#paypal-button-container {
  margin-top: 12px;
}

/* Mobile enhancements for all screens */
@media (max-width: 980px){
  .hero-copy{grid-template-columns:1fr; padding:36px}
  .categories-grid{grid-template-columns:repeat(2,1fr)}
  .product-card img{height:260px}
}
@media (max-width:768px) {
  /* Header */
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .header-actions input {
    width: 70%;
  }

  /* Hero / banners */
  .hero-copy {
    padding: 36px 16px;
    margin: 20px;
  }

  /* Categories grid */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Product grid */
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px,1fr));
    gap: 12px;
  }

  /* Product card images */
  .product-card img {
    height: 200px;
  }

  /* Product info */
  .product-info h3 {
    font-size: 1rem;
  }
  .product-info p {
    font-size: 0.85rem;
  }

  /* Buttons */
  .btn-primary, .btn-ghost {
    padding: 10px 14px;
    font-size: 1rem;
  }

  /* Cart items */
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .cart-item img {
    width: 100%;
    height: auto;
  }
  .cart-item-info {
    width: 100%;
  }
}
@media (max-width:520px){
  .categories-grid{grid-template-columns:1fr}
  .header-inner{padding:10px}
  .header-actions input{width:140px}
  .main-modal-img{height:260px}
}
@media (max-width: 480px) {
  /* Categories and product grids */
  .categories-grid, .product-grid {
    grid-template-columns: 1fr;
  }

  .product-card img {
    height: 150px;
  }

  .product-info h3 {
    font-size: 0.95rem;
  }
  .product-info p {
    font-size: 0.8rem;
  }

  /* Header input */
  .header-actions input {
    width: 60%;
  }

  /* Buttons */
  .btn-primary, .btn-ghost {
    padding: 8px 12px;
    font-size: 0.95rem;
  }
}

/* Flexible images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile product page image fix */
@media (max-width: 768px) {
  .product-page {
    flex-direction: column; /* stack gallery above info panel */
    gap: 20px;
  }

  .product-gallery {
    width: 100%;
    margin-bottom: 16px; /* spacing between gallery and info panel */
  }

  .product-gallery img {
    width: 100%;
    height: auto; /* scale proportionally */
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    position: relative; /* prevent overlapping text */
  }

  .product-info-panel {
    width: 100%;
  }

  .product-info-panel h2,
  .product-info-panel p,
  .product-info-panel label,
  .product-info-panel select,
  .btn-add {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
  }
}
/* Hide search input on mobile */
@media (max-width: 768px) {
  .header-actions input#searchInput {
    display: none;
  }
  
  .header-actions {
    justify-content: flex-end; /* adjust spacing since search is hidden */
    gap: 0;
  }
}