/* ==========================================================================
   1. Global Styles & Fonts
   ========================================================================== */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #f8f8f8, #ffffff);
}

body, input, button, textarea {
  font-family: 'Inter', sans-serif;
}

h1, h2, h3, header, footer, nav {
  font-family: 'Playfair Display', serif;
}

a {
  color: #000;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   2. Full-Width Layout Fix
   ========================================================================== */
body, main {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ==========================================================================
   3. Header
   ========================================================================== */
.main-header {
  background-color: #004d40;
  color: white;
  padding: 1rem 0;
  width: 100%;
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
}

.logo-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 80px; /* 로고 크기 조정 */
  margin-right: 1rem;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 1.5rem; /* 링크 간 간격 조정 */
  transition: color 0.3s;
}

.main-nav a:hover {
  color: #90caf9;
}

/* ==========================================================================
   4. Hero Section
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
  text-align: center;
  padding: 100px 20px;
  color: white;
  box-sizing: border-box;

  /* Background Image and Dark Overlay */
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero.png');
  background-size: cover;
  background-position: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.cta-button {
  background-color: #f1d8c1;
  color: #2b150d;
  padding: 15px 30px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s, transform 0.3s;
  display: inline-block;
  font-size: 1rem;
}

.cta-button:hover {
  background-color: #f6b28b;
  transform: translateY(-2px);
  text-decoration: none;
  color: #2b150d;
}

/* ==========================================================================
   5. Main Content & Features
   ========================================================================== */
.main-content {
  width: 100%;
  max-width: 1200px; /* 콘텐츠 너비 제한 */
  box-sizing: border-box;
  text-align: center;
  padding: 80px 20px;
  background-color: #fff;
}

.main-content h1 {
  font-size: 2.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-top: 50px;
  width: 100%;
}

.feature-item {
  text-align: center;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.feature-icon {
  height: 60px;
  margin-bottom: 20px;
}

.feature-item h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #004d40;
}

.feature-item p {
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
}


/* ==========================================================================
   6. Footer
   ========================================================================== */
.main-footer {
  width: 100%;
  background-color: #004d40;
  color: #fff;
  padding: 2rem 1rem;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
}

.footer-column {
  flex: 1;
}

.footer-column:nth-child(1) {
  text-align: left;
}
.footer-column:nth-child(2) {
  text-align: center;
}
.footer-column:nth-child(3) {
  text-align: right;
}

.footer-column p, .footer-column ul {
  margin: 0;
}

/* 링크 스타일 */
.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links a,
.back-to-top a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover,
.back-to-top a:hover {
  color: #90caf9;
}

/* ==========================================================================
   7. Chat Assistant
   ========================================================================== */
.chat-assistant {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
}

.chat-button {
  background-color: #f1d8c1;
  color: #333;
  border: none;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
  transition: background-color 0.3s;
}

.chat-button:hover {
  background-color: #f6b28b;
}

.chat-box {
  display: none;
  margin-top: 10px;
  width: 300px;
  height: 400px;
  background: #fffaf3;
  border: 2px dashed #d8a48f;
  border-radius: 16px;
  overflow-y: auto;
  padding: 12px;
}

.chat-title {
  font-weight: bold;
  margin-bottom: 8px;
}

/* ==========================================================================
   8. Auth Page Styles (Login/Register)
   ========================================================================== */
.auth-container {
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  margin: 40px auto;
}

.auth-container h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}

.auth-form label {
  margin-top: 1rem;
  font-weight: 500;
  display: block;
}

.auth-form input {
  padding: 0.7rem;
  border: 1px solid #ccc;
  background-color: #fdf4ef;
  font-size: 1rem;
}

.auth-form input::placeholder {
  color: #999;
  font-size: 0.9rem;
}

.auth-form button {
  background-color: #2b150d;
  color: #fff;
  padding: 0.8rem;
  border: none;
  cursor: pointer;
  margin-top: 1rem;
}

.auth-form button:hover {
  opacity: 0.9;
}

.help-link {
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.close-btn {
  position: absolute;
  right: 1rem;
  top: 1rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

.password-strength {
  margin-top: 0.5rem;
}

#strength-bar {
  height: 8px;
  background-color: #ccc;
  width: 100%;
  margin-bottom: 4px;
  border-radius: 4px;
  transition: background-color 0.3s, width 0.3s;
}

#strength-text {
  font-size: 0.85rem;
  color: #333;
}

/*9. ========= Products Page ========= */

/* Layout with centered max-width so it doesn't feel edge-to-edge */
.product-layout{
  display:flex; align-items:flex-start; gap:32px;
  width:100%; max-width:1400px; margin:20px auto; padding:0 1rem;
}

/* Filter panel (aligned under logo area, open by default) */
.filter-panel{ width:250px; flex-shrink:0; }
.filter-panel .filter-title{ font-family:'Playfair Display',serif; font-size:1.3rem; margin-bottom:12px; text-align:left; }
.filter-panel .filter-section{ margin-bottom:20px; }
.filter-panel h3{ margin:6px 0; font-size:1.1rem; color:#004d40; cursor:pointer; }
.filter-panel .panel.open{ display:block; }          /* default open */
.filter-panel .panel{ display:none; }                /* closed when .open not present */
.filter-panel .valuesButton{
  display:inline-block; border-radius:16px; margin:4px 6px 6px 0;
  background:#f6b28b; border:1px solid #f6b28b; padding:6px 14px; cursor:pointer;
}
.filter-panel .valuesButton:hover{ background:#d8a48f; }

/* 4 columns grid (100 items → 25 rows) */
.product-gallery{
  display:grid; grid-template-columns:repeat(4,1fr); grid-auto-rows:auto; gap:20px; flex:1;
}

/* Card */
.card{
  background:#fff; border-radius:16px; padding:14px;
  box-shadow:0 8px 24px rgba(0,0,0,.06);
  transition:transform .15s ease, box-shadow .15s ease; position:relative; overflow:hidden;
}
.card:hover{ transform:translateY(-4px); box-shadow:0 10px 28px rgba(0,0,0,.10); }
.card .media{ position:relative; border-radius:10px; overflow:hidden; }
.card img{ width:100%; height:170px; object-fit:cover; display:block; }
.card h3{ font-size:1.05rem; margin:10px 0 6px; font-weight:600; font-family:'Inter',sans-serif; color:#0f172a; }
.card .desc{ font-size:.9rem; color:#475569; margin-bottom:8px; }

/* Price list */
.price-list{ display:flex; flex-direction:column; gap:6px; }
.price-list div{ display:flex; justify-content:space-between; padding:6px 8px; background:#f8fafc; border-radius:8px; font-size:.95rem; }
.price-list .original{ text-decoration:line-through; opacity:.6; margin-right:6px; }

/* Discount badge (top-left) */
.badge{
  position:absolute; top:10px; left:10px; z-index:2;
  padding:6px 10px; border-radius:999px; font-weight:700; font-size:.8rem; color:#fff;
  box-shadow:0 2px 8px rgba(0,0,0,.15);
}
.badge[data-type="Half Price"]{ background:#0ea5e9; }
.badge[data-type="30% OFF"]{ background:#10b981; }
.badge[data-type="10% OFF"]{ background:#f59e0b; }
.badge[data-type="Big deal"]{ background:#ef4444; }

/* Wide search bar */
.searching-bar{ width:100%; display:flex; justify-content:center; }
.searching-bar input[type="text"]{
  margin-top:20px; width:90%; max-width:1000px; padding:12px 20px;
  border:1px solid #004d40; border-radius:24px; font-size:16px;
  background-color:rgba(0,77,64,.08);
}
.searching-bar input[type="text"]::placeholder{ text-align:center; font-size:16px; color:#444; }

/* Pagination */
.pagination{ display:flex; gap:8px; justify-content:center; align-items:center; margin:28px auto 40px; }
.pagination button{
  min-width:40px; height:36px; padding:0 12px; border-radius:9999px;
  border:1px solid #e2e8f0; background:#fff; cursor:pointer; font-weight:600;
}
.pagination button.active{ background:#004d40; color:#fff; border-color:#004d40; }
.pagination button:disabled{ opacity:.45; cursor:not-allowed; }

/* Responsive */
@media (max-width: 980px){
  .product-layout{ flex-direction:column; }
  .filter-panel{ width:100%; }
  .product-gallery{ grid-template-columns:repeat(2,1fr); }
}

/* Like button on product card */
.like-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
  cursor: pointer;
  color: #ccc;
  transition: color 0.2s;
}
.like-btn.active {
  color: #e63946; /* red when liked */
}

/*10. Watchlist Page */
/* Watchlist page container */
.watchlist-page {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 1rem;
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 12px;
  text-align: center;
  color: #004d40;
}

.email-notice {
  text-align: center;
  font-size: 0.95rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 auto 20px;
  max-width: 800px;
}

/* 1-column list style (each row fills width) */
.watchlist-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Row = table-like card */
.watch-row {
  display: grid;
  grid-template-columns: 110px 1fr 240px; /* thumb | details | actions */
  gap: 16px;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

/* Thumbnail block */
.watch-thumb {
  position: relative;
  width: 110px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
}
.watch-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.watch-thumb .badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .72rem;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.badge[data-type="Half Price"] { background: #0ea5e9; }
.badge[data-type="30% OFF"]   { background: #10b981; }
.badge[data-type="10% OFF"]   { background: #f59e0b; }
.badge[data-type="Big deal"]  { background: #ef4444; }

/* Details (name + store prices) */
.watch-details h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: #0f172a;
}
.store-prices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  font-size: .95rem;
}
.store-prices .price-line {
  display: flex;
  justify-content: space-between;
  background: #f8fafc;
  padding: 6px 8px;
  border-radius: 8px;
}
.store-prices .original {
  text-decoration: line-through;
  opacity: .6;
  margin-right: 6px;
}

/* Actions (remove + notify) */
.watch-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.remove-btn {
  border: 1px solid #ef4444;
  background: #fff;
  color: #ef4444;
  border-radius: 9999px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 600;
}
.remove-btn:hover {
  background: #fff1f2;
}
.notify-wrap {
  font-size: 0.9rem;
  color: #334155;
}
.notify-wrap input {
  margin-right: 6px;
}

/* Empty state */
.empty-message {
  text-align: center;
  font-size: 1.05rem;
  color: #555;
  margin-top: 30px;
}
.empty-message a {
  color: #004d40;
  font-weight: 600;
}
.empty-message a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 820px) {
  .watch-row {
    grid-template-columns: 90px 1fr;
  }
  .watch-actions {
    align-items: flex-start;
    grid-column: 1 / -1;
  }
}
