/* ==========================================================================
   울동네농기계24시 - 공통 스타일시트
   ========================================================================== */

:root {
  --green-900: #123321;
  --green-800: #16442b;
  --green-700: #1c5334;
  --green-600: #24663f;
  --gold: #f4c430;
  --amber: #f0ad2c;
  --amber-dark: #d4941a;
  --cream: #f4f4ef;
  --bg-page: #eceee8;
  --text-dark: #1a1a1a;
  --text-mid: #4a4a4a;
  --border-soft: #e7e7e2;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --max-w: 640px;
  --shadow-card: 0 2px 10px rgba(20, 40, 25, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans KR", "Pretendard", "Apple SD Gothic Neo",
    "Malgun Gothic", sans-serif;
  background: var(--bg-page);
  color: var(--text-dark);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

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

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.page-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.06);
  overflow-x: hidden;
}

.wrap {
  padding: 0 18px;
}

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}

.logo {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-dark);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.logo span {
  color: var(--green-800);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
}

.icon-btn.phone-circle {
  background: var(--green-800);
}

.icon-btn.phone-circle svg {
  stroke: #fff;
}

.icon-btn.menu-btn svg {
  stroke: var(--text-dark);
}

/* ---------------- Mobile nav dropdown ---------------- */
.mobile-nav {
  max-height: 0;
  overflow: hidden;
  background: var(--cream);
  transition: max-height 0.28s ease;
  border-bottom: 1px solid var(--border-soft);
}

.mobile-nav.open {
  max-height: 480px;
}

.mobile-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 8px 18px 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.mobile-nav-inner a {
  display: block;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  color: var(--green-800);
}

.mobile-nav-inner a.call-link {
  grid-column: 1 / -1;
  background: var(--green-800);
  color: #fff;
}

/* ---------------- Breadcrumb ---------------- */
.breadcrumb {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 12px 18px 6px;
  font-size: 13px;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-mid);
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--green-800);
}

.breadcrumb .current {
  color: var(--green-800);
  font-weight: 700;
}

.breadcrumb svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-mid);
}

/* ---------------- Hero ---------------- */
.hero-wrap {
  margin: 8px 18px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cream);
}

.hero-wrap img {
  width: 100%;
  height: auto;
}

/* ---------------- Phone bar (real clickable) ---------------- */
.phone-bar {
  margin: 0 18px 18px;
  background: var(--green-800);
  border-radius: var(--radius-md);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.phone-bar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.phone-bar a strong {
  color: var(--gold);
  font-size: 16px;
  font-weight: 800;
  margin-left: 2px;
}

.phone-bar .sep {
  width: 1px;
  background: rgba(255, 255, 255, 0.25);
  margin: 12px 0;
}

.phone-bar svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  flex-shrink: 0;
}

/* ---------------- Section title ---------------- */
.section-title {
  padding: 4px 18px 12px;
  font-size: 21px;
  font-weight: 900;
  color: var(--text-dark);
}

.section-title .accent {
  color: var(--green-800);
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 18px 12px;
}

.section-title-row .section-title {
  padding: 0;
}

.sort-select {
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  background: #fff;
  color: var(--text-mid);
}

/* ---------------- Product grid image block ---------------- */
.grid-wrap {
  margin: 0 18px 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.grid-wrap img {
  width: 100%;
  height: auto;
}

.more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 18px 18px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-mid);
}

.more-btn:active {
  background: var(--cream);
}

.more-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-mid);
}

/* ---------------- Bottom two-tone call bar ---------------- */
.bottom-bar {
  display: flex;
  margin: 0 0 0;
}

.bottom-bar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 10px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.bottom-bar a.consult {
  background: var(--green-800);
}

.bottom-bar a.main-line {
  background: var(--amber);
  color: #21260f;
}

.bottom-bar a strong {
  font-size: 17px;
  font-weight: 900;
}

.bottom-bar svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  flex-shrink: 0;
}

/* ---------------- Narrow-screen phone number sizing ---------------- */
@media (max-width: 400px) {
  .phone-bar a {
    flex-direction: column;
    gap: 3px;
    padding: 12px 4px;
    font-size: 12px;
  }
  .phone-bar a strong {
    margin-left: 0;
    font-size: 14px;
    white-space: nowrap;
  }
  .bottom-bar a {
    flex-direction: column;
    gap: 3px;
    padding: 14px 6px;
    font-size: 13px;
  }
  .bottom-bar a strong {
    font-size: 15px;
    white-space: nowrap;
  }
}

/* ---------------- Main page: category grid ---------------- */
.category-section {
  padding-top: 6px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 18px 18px;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease;
}

.category-card:active {
  transform: scale(0.97);
}

.category-card .thumb {
  aspect-ratio: 1 / 0.82;
  overflow: hidden;
  background: var(--cream);
}

.category-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.category-card .label {
  margin: 0 8px 8px;
  padding: 9px 4px;
  border-radius: var(--radius-pill);
  background: var(--green-800);
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.category-card.all .thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8ede7;
}

.category-card.all .thumb svg {
  width: 46%;
  height: 46%;
}

/* ---------------- Feature icon row (main page) ---------------- */
.features-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 4px 18px 18px;
  padding: 20px 8px;
  background: var(--cream);
  border-radius: var(--radius-md);
}

.feature-item {
  text-align: center;
  font-size: 12px;
  color: var(--text-mid);
  font-weight: 600;
}

.feature-item .icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-800);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
}

.feature-item .icon-circle svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
}

.feature-item .title {
  color: var(--text-dark);
  font-weight: 800;
  margin-bottom: 3px;
  font-size: 13px;
}

/* ---------------- Final CTA (main page) ---------------- */
.final-cta {
  margin: 0 18px 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  box-shadow: var(--shadow-card);
}

.final-cta a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 14px;
}

.final-cta .cta-text {
  flex: 1.4;
  background: var(--green-800);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.final-cta .cta-text strong {
  display: block;
  color: var(--gold);
  font-size: 15px;
}

.final-cta .cta-btn {
  flex: 1;
  justify-content: center;
  background: var(--gold);
  color: #21260f;
  font-weight: 900;
  font-size: 15px;
}

.final-cta svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  flex-shrink: 0;
}

/* ---------------- Hero tagline (subpage top-copy variants share hero image) --- */

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  padding: 22px 18px 26px;
  font-size: 12.5px;
  line-height: 1.8;
}

.site-footer .foot-name {
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 4px;
}

.site-footer a {
  color: var(--gold);
  font-weight: 700;
}

/* ---------------- Utility ---------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
