/* ============================================================
   제주 농산물 마켓 — Simplified CSS
   Brand: #7e1e00 (dark brown)  Background: #fff8e7 (warm cream)
   ============================================================ */

/* ----- Reset & Base ----- */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable.min.css');

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

:root {
  --brand: #7e1e00;
  --brand-light: #a0350e;
  --brand-hover: #ffa10d;
  --bg: #fff8e7;
  --bg-dark: #f5eed8;
  --text: #7e1e00;
  --text-light: rgba(126, 30, 0, 0.7);
  --white: #ffffff;
  --max-w: 1280px;
  --header-h: 72px;
  --transition: .3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Pretendard Variable', 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-hover); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 767px) {
  .container { padding: 0 20px; }
}

/* ----- Selection ----- */
::selection { background-color: var(--brand); color: var(--white); }

/* =====================
   HEADER / NAVIGATION
   ===================== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  border-bottom: 1px solid rgba(126, 30, 0, 0.3);
  transition: background var(--transition), border-color var(--transition);
}

.header--transparent { background: transparent; }
.header--solid { background: var(--bg); border-color: rgba(126, 30, 0, 0.7); }

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo {
  font-family: 'Montserrat', 'Pretendard Variable', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: color var(--transition);
}

.header--transparent .header__logo { color: var(--white); }
.header--solid .header__logo { color: var(--brand); }

.header__nav { display: flex; align-items: center; gap: 8px; }

.header__nav a {
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 4px;
  transition: all var(--transition);
}

.header--transparent .header__nav a { color: var(--white); }
.header--solid .header__nav a { color: var(--brand); }

.header__nav a:hover {
  background: rgba(126, 30, 0, 0.08);
  color: var(--brand-hover);
}

/* Mobile menu toggle */
.header__toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px;
}

.header__toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--brand);
  margin: 5px 0;
  transition: var(--transition);
}

.header--transparent .header__toggle span { background: var(--white); }

@media (max-width: 767px) {
  .header__toggle { display: block; }
  .header__nav {
    display: none;
    position: absolute;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    background: var(--bg);
    padding: 20px;
    border-bottom: 1px solid rgba(126, 30, 0, 0.2);
    gap: 4px;
  }
  .header__nav.open { display: flex; }
  .header__nav a { color: var(--brand) !important; width: 100%; padding: 12px 16px; }
}

/* =====================
   HERO SECTION
   ===================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(126, 30, 0, 0.25) 0%, rgba(126, 30, 0, 0.55) 100%);
  z-index: -1;
}

.hero__content { max-width: 640px; padding: 0 20px; }

.hero__subtitle {
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.85;
  font-weight: 400;
}

.hero__title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero__desc {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 36px;
  opacity: 0.9;
}

.hero__scroll {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.hero__scroll span {
  display: block;
  width: 28px; height: 44px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 14px;
  position: relative;
}

.hero__scroll span::after {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: rgba(255,255,255,0.7);
  border-radius: 2px;
  animation: scroll-dot 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@keyframes scroll-dot {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(16px); }
}

/* =====================
   BUTTONS
   ===================== */
.btn {
  display: inline-block;
  padding: 14px 40px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn--primary {
  background: var(--brand);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--brand-hover);
  color: var(--white);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.6);
}
.btn--outline:hover {
  background: var(--white);
  color: var(--brand);
}

.btn--brand-outline {
  background: transparent;
  color: var(--brand);
  border: 1px solid rgba(126,30,0,0.3);
}
.btn--brand-outline:hover {
  background: var(--brand);
  color: var(--white);
}

.btn--accent {
  background: var(--brand-hover);
  color: var(--white);
  animation: pulse-glow 2s infinite;
}

.btn--accent:hover {
  background: var(--brand);
  color: var(--white);
  animation: none;
}

@keyframes pulse-glow {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 161, 13, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(255, 161, 13, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 161, 13, 0);
  }
}

/* =====================
   SECTION BASICS
   ===================== */
.section {
  padding: 100px 0;
}

.section--alt {
  background: var(--bg-dark);
}

.section__header {
  text-align: center;
  margin-bottom: 60px;
}

.section__label {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 12px;
  font-weight: 500;
}

.section__title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section__desc {
  font-size: 16px;
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}

/* =====================
   SPLIT (Text + Image)
   ===================== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }

.split__img {
  border-radius: 4px;
  overflow: hidden;
}

.split__img img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.split__img:hover img { transform: scale(1.03); }

.split__text h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.split__text .sub {
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 20px;
}

.split__text p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.9;
  margin-bottom: 28px;
}

@media (max-width: 991px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split--reverse { direction: ltr; }
}

/* =====================
   PRODUCT GRID
   ===================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(126, 30, 0, 0.1);
}

.product-card__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.product-card__body { padding: 20px; }

.product-card__category {
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.product-card__name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-card__price {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand);
}

.product-card__price .original {
  font-size: 14px;
  color: var(--text-light);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 6px;
}

@media (max-width: 991px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* =====================
   BANNER / CTA
   ===================== */
.banner {
  position: relative;
  padding: 100px 0;
  text-align: center;
  color: var(--white);
  overflow: hidden;
}

.banner__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.banner__overlay {
  position: absolute;
  inset: 0;
  background: rgba(126, 30, 0, 0.6);
  z-index: -1;
}

.banner__title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: 16px;
}

.banner__desc {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* =====================
   FEATURES (Icon Grid)
   ===================== */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.feature {
  text-align: center;
  padding: 40px 24px;
}

.feature__icon {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  object-fit: contain;
}

.feature__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature__desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.8;
}

@media (max-width: 767px) {
  .features { grid-template-columns: 1fr; gap: 20px; }
}

/* =====================
   NOTICE / BOARD
   ===================== */
.notice-list { max-width: 800px; margin: 0 auto; }

.notice-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid rgba(126, 30, 0, 0.1);
  transition: padding-left var(--transition);
}

.notice-item:first-child { border-top: 1px solid var(--brand); }

.notice-item:hover { padding-left: 8px; }

.notice-item__title {
  font-size: 16px;
  font-weight: 500;
}

.notice-item__date {
  font-size: 13px;
  color: var(--text-light);
  white-space: nowrap;
  margin-left: 24px;
}

/* =====================
   FOOTER
   ===================== */
.footer {
  background: var(--brand);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 40px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer__brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.footer__info p {
  font-size: 13px;
  line-height: 2;
}

.footer__heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.footer__links a {
  display: block;
  font-size: 14px;
  padding: 4px 0;
  color: rgba(255,255,255,0.6);
}

.footer__links a:hover { color: var(--white); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.footer__social { display: flex; gap: 16px; }

.footer__social a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: all var(--transition);
}

.footer__social a:hover {
  background: var(--white);
  color: var(--brand);
  border-color: var(--white);
}

@media (max-width: 767px) {
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; gap: 16px; text-align: center; }
}

/* =====================
   GALLERY / IMAGE GRID
   ===================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: filter 0.4s ease;
}

.gallery-grid img:hover { filter: brightness(1.1); }

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

/* =====================
   UTILITY & ANIMATIONS
   ===================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-40 { margin-bottom: 40px; }

/* Fade-in on scroll (JS activated) */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Divider */
.divider {
  width: 60px;
  height: 2px;
  background: var(--brand);
  margin: 24px auto;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 44px; height: 44px;
  background: var(--brand);
  color: var(--white);
  border: none; border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  opacity: 0; visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
}

.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--brand-hover); transform: translateY(-2px); }
