/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --green: #27AE60;
  --green-light: #2ECC71;
  --green-dark: #1E8449;
  --green-bg: #EAFAF1;
  --white: #fff;
  --bg: #f2f6f3;
  --dark: #1a2e1a;
  --gray: #aaa;
  --gray-dark: #666;
  --border: #d5e8da;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #eef3ee;
  color: var(--dark);
  min-height: 100vh;
  padding-bottom: calc(60px + var(--safe-bottom));
}

/* ===== LAYOUT ===== */
.container {
  max-width: 750px;
  margin: 0 auto;
  background-color: #f5f9f6;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.page-header {
  text-align: center;
  font-size: 21px;
  font-weight: 700;
  color: var(--white);
  padding: 22px 20px 16px;
  background: linear-gradient(135deg, #1E8449 0%, #27AE60 50%, #2ECC71 100%);
  letter-spacing: 0.5px;
}

/* ===== NOTICE BAR (MARQUEE) ===== */
.notice-bar {
  margin: 0 20px 16px;
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  height: 36px;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(39,174,96,0.08);
}

.notice-bar .notice-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 14px;
}

.notice-bar .notice-content {
  display: flex;
  white-space: nowrap;
  font-size: 12px;
  color: var(--gray-dark);
  will-change: transform;
  animation: marquee-scroll 0s linear infinite;
  animation-play-state: paused;
}

.notice-bar .notice-content span {
  display: inline-block;
  padding-right: 8px;
}

.notice-bar .notice-content span::after {
  content: ' ,';
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== BANNER SLIDER ===== */
.banner-section {
  padding: 0 20px 16px;
}

.slider {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 154px;
  box-shadow: 0 4px 16px rgba(39,174,96,0.12);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.slider:active {
  cursor: grabbing;
}

.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.slide {
  min-width: 100%;
  height: 100%;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-1 { background: linear-gradient(135deg, #0d3d1a, #1E8449, #27AE60); }
.slide-2 { background: linear-gradient(135deg, #1E8449, #27AE60, #58D68D); }
.slide-3 { background: linear-gradient(135deg, #145a32, #1E8449, #27AE60); }

.slider-dots {
  display: none;
}

.slider-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  cursor: pointer;
  transition: all 0.3s;
}

.slider-dots .dot.active {
  background: var(--green);
  width: 24px;
  border-radius: 4px;
}

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  padding: 0 20px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 22px;
  background: var(--green);
  border-radius: 2px;
}

/* ===== PRODUCT LIST ===== */
.product-list {
  padding: 0 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ===== PRODUCT CARD ===== */
.product-card {
  background: var(--white);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid #e8f5e9;
  transition: box-shadow 0.25s, transform 0.25s;
}

.product-card:hover {
  box-shadow: 0 4px 20px rgba(39,174,96,0.15);
  transform: translateY(-2px);
}

.product-card .product-image {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-bg);
}

.product-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card .product-info {
  flex: 1;
  min-width: 0;
}

.product-card .product-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.product-card .product-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.35;
  flex: 1;
}

.product-card .product-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
}

.product-card .product-stats {
  background: #f8fffe;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-left: 3px solid var(--green-light);
}

.product-card .stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  line-height: 1.75;
}

.product-card .stat-label {
  color: var(--gray);
}

.product-card .stat-value {
  font-weight: 600;
  color: var(--dark);
}

.product-card .product-buy {
  display: flex;
  justify-content: flex-end;
}

.product-card .btn-buy {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(135deg, var(--green), var(--green-light));
  text-decoration: none;
  padding: 0 22px;
  cursor: pointer;
  transition: opacity 0.2s, box-shadow 0.2s;
  box-shadow: 0 3px 10px rgba(39,174,96,0.3);
}

.product-card .btn-buy:hover {
  opacity: 0.88;
  box-shadow: 0 5px 16px rgba(39,174,96,0.4);
}

/* ===== BOTTOM TAB BAR ===== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #e8f5e9;
  padding-bottom: var(--safe-bottom);
}

.tab-bar-inner {
  max-width: 750px;
  margin: 0 auto;
  display: flex;
  height: 58px;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  padding: 6px 0;
  gap: 3px;
}

.tab-item svg {
  width: 24px;
  height: 24px;
}

.tab-item .tab-label {
  font-size: 11px;
  line-height: 1;
  color: var(--gray);
  margin-top: 2px;
}

.tab-item.active .tab-label {
  color: var(--green);
  font-weight: 600;
}

.tab-item.active svg path,
.tab-item.active svg rect,
.tab-item.active svg circle {
  fill: var(--green);
}

/* ===== RESPONSIVE: Desktop ===== */
@media (min-width: 768px) {
  .container {
    max-width: 520px;
  }

  .page-header {
    font-size: 22px;
    padding: 26px 20px 16px;
  }

  .notice-bar {
    height: 38px;
    border-radius: 12px;
  }

  .notice-bar .notice-content {
    font-size: 13px;
  }

  .banner-section {
    padding: 0 20px 18px;
  }

  .slider {
    height: 180px;
    border-radius: 14px;
  }

  .section-title {
    font-size: 18px;
  }

  .product-card {
    padding: 16px;
    gap: 16px;
    border-radius: 16px;
  }

  .product-card .product-name {
    font-size: 15px;
  }

  .product-card .product-price {
    font-size: 15px;
  }

  .product-card .stat-row {
    font-size: 13px;
  }

  .product-card .btn-buy {
    font-size: 14px;
    height: 34px;
  }

  .tab-bar-inner {
    max-width: 520px;
    height: 58px;
  }
}
