/* jyf168.com.tw — site stylesheet
   Rebuilt from the SuperhiPage "template 42" look as one responsive file.
   Replaces: common*.css, mobile*.css, layout.css, expansion.css, Font Awesome, Swiper,
   Magnific Popup, SweetAlert, Fine Uploader and Owl Carousel stylesheets. */

:root {
  --teal: #399;
  --teal-dark: #066;
  --teal-soft: #eef6f6;
  --teal-line: #dee;
  --teal-hover: #e6f3f3;
  --ink: #444;
  --text: #666;
  --muted: #999;
  --line: #ddd;
  --orange: #f60;
  --price: #e8800c;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  padding: 10px 0;
  background: #eee;
  color: var(--text);
  font: 13px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial,
        "PingFang TC", "Heiti TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }
a { color: var(--ink); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--teal); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  padding: 8px 14px; background: #fff; color: var(--teal-dark); border: 1px solid var(--teal);
}
.skip-link:focus { left: 8px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- frame ---------- */
#wrap {
  max-width: 920px;
  margin: 0 auto;
  background: #fcfcfc;
  border: 1px solid #ccc;
  box-shadow: 0 0 5px rgba(0, 0, 0, .1);
}
#header { position: relative; background: #fff; }
#logo { margin: 0; padding: 20px 40px; font-size: inherit; line-height: 1; }
#logo a { display: inline-block; }
#logo img { display: block; width: 300px; height: auto; }
.mobile-bar, .nav-backdrop, .nav-head, .subnav-toggle { display: none; }

/* ---------- primary navigation (desktop) ---------- */
#nav {
  position: relative;
  z-index: 30;
  background: #0e0e0e linear-gradient(#7d7e7d, #0e0e0e);
}
#nav .menu { display: flex; flex-wrap: wrap; }
#nav .menu > li { position: relative; }
#nav .menu > li > a {
  display: block;
  padding: 0 20px;
  line-height: 41px;
  color: #fff;
  text-shadow: 0 1px 0 #000;
  white-space: nowrap;
}
#nav .menu > li > a:hover,
#nav .menu > li:focus-within > a { background: #222; color: #fff; }
#nav .menu > li.current > a { background: var(--teal-soft); color: #333; text-shadow: 0 1px 0 #f9f9f9; }
#nav .has-sub > a::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  border-bottom-width: 0;
  vertical-align: middle;
  opacity: .7;
}
#nav .subnav {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 100%;
  padding: 6px 0;
  background: #fff;
  border: 1px solid #cdd;
  border-top: 0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
}
/* Fade in on hover/focus only; hiding is instant so nothing can animate on page load. */
#nav .menu > li:hover > .subnav,
#nav .menu > li:focus-within > .subnav {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .15s ease, transform .15s ease;
}
#nav .subnav a { display: block; padding: 8px 18px; color: #555; white-space: nowrap; }
#nav .subnav a:hover,
#nav .subnav .current > a { background: var(--teal-soft); color: var(--teal); }

/* ---------- banner ---------- */
#banner img { display: block; width: 100%; height: auto; }

/* ---------- two-column layout ---------- */
.main-wrap {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid #e6e6e6;
}
.main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 15px 20px;
  background: #fff;
  border: 1px solid #cdd;
  border-radius: 3px;
}
#side {
  flex: 0 0 190px;
  min-width: 0;
  padding: 10px;
  background: var(--teal-soft);
  border-radius: 3px;
  border-top: 1px solid var(--teal-line);
  border-bottom: 1px solid #fff;
  border-right: 1px solid #fff;
}

.breadcrumb { display: flex; flex-wrap: wrap; color: var(--muted); font-size: 12px; text-shadow: 0 1px 0 #fff; }
.breadcrumb li + li::before { content: ">"; margin: 0 6px; color: #bbb; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--teal); }

.page-title {
  margin: 10px 0 14px;
  padding: 6px 12px;
  background: var(--teal-soft);
  border-top: 1px solid var(--teal-line);
  border-bottom: 1px solid #fff;
  border-right: 1px solid #fff;
  color: var(--teal-dark);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.3;
  text-shadow: 0 1px 0 #fff;
}

/* ---------- sidebar ---------- */
.side-title {
  padding: 0 10px;
  border-bottom: 1px solid var(--teal-line);
  font-size: 19px;
  font-weight: 400;
  line-height: 36px;
  text-shadow: 0 1px 0 #fff;
}
.side-title a { color: var(--teal); }
.side-menu { margin-top: 10px; border-top: 1px solid #fff; }
.side-menu a {
  position: relative;
  display: block;
  padding: 7px 10px 7px 27px;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  color: var(--text);
  line-height: 1.5;
  text-shadow: 0 1px 0 #fff;
}
.side-menu a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 12px;
  width: 5px;
  height: 5px;
  margin-top: -3px;
  border-right: 1px solid #8bb;
  border-bottom: 1px solid #8bb;
  transform: rotate(-45deg);
}
.side-menu a:hover,
.side-menu .current > a {
  color: var(--teal);
  background: var(--teal-hover);
  border-color: #d3e3e3;
  box-shadow: 0 1px 0 #fff, inset 0 1px 0 #f6ffff;
}
.side-promo { margin-top: 16px; text-align: center; }
.side-promo img { width: 153px; }

/* ---------- rich text ---------- */
.entry { color: #333; font-size: 14px; line-height: 1.85; }
.entry p { margin: 0 0 .7em; }
.entry p:last-child { margin-bottom: 0; }
.entry ul { margin: 0 0 1em 1.4em; list-style: disc; }
.entry ol { margin: 0 0 1em 1.4em; list-style: decimal; }
.entry a { color: var(--teal); }
.entry a:hover { text-decoration: underline; }
.entry h2 {
  margin: 1.8em 0 .6em;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--teal-line);
  color: var(--teal-dark);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.4;
  text-shadow: 0 1px 0 #fff;
}
.entry h3 { margin: 1.3em 0 .4em; color: var(--ink); font-size: 14px; font-weight: 700; }
.entry > :first-child { margin-top: 0; }
.entry li { margin-bottom: .25em; }
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.list-intro { margin-bottom: 18px; }
.list-outro { margin-top: 18px; }
.map-embed {
  position: relative;
  margin: 20px 0 8px;
  aspect-ratio: 16 / 9;
  background: #f3f3f3;
  border: 1px solid var(--line);
}
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-link { font-size: 13px; }
.map-link a { color: var(--teal); }

/* ---------- product cards ---------- */
.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 22px 14px;
  margin: 0 0 10px;
}
.card { display: flex; flex-direction: column; height: 100%; color: inherit; }
.thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 3px;
  transition: border-color .2s ease;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb.noimg {
  background: #fafafa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cfd8d8' stroke-width='1.2'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='9' cy='10' r='1.6'/%3E%3Cpath d='M4 17l5-4.5 3.5 3 3-2.5L20 17'/%3E%3C/svg%3E") center / 42% no-repeat;
}
a.card:hover .thumb { border-color: #999; }
.card .name { margin: .6rem 0 .25rem; color: var(--teal); font-size: 13px; font-weight: 600; line-height: 1.5; }
a.card:hover .name { color: var(--teal-dark); }
.card .desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.card .price-row { margin-top: auto; padding-top: .5rem; line-height: 1.2; }
.price-label { margin-right: 4px; color: var(--muted); font-size: 12px; }
.price { color: var(--price); font-size: 20px; font-weight: 600; white-space: nowrap; }
.price::before { content: "NT$"; margin-right: 2px; font-size: 12px; font-weight: 400; }

.group { margin-bottom: 26px; }
.group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0 0 12px;
  padding: 6px 12px;
  background: #f6f6f6;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 400;
  text-shadow: 0 1px 0 #fff;
}
.group-head a { color: #333; }
.group-head a:hover { color: var(--teal); }
.group-head .show-all { color: var(--muted); font-size: 12px; }

/* ---------- product detail ---------- */
.pd-top {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}
.pd-top.no-img { grid-template-columns: minmax(0, 1fr); }
.pd-img { padding: 3px; background: #fff; border: 1px solid #ccc; text-align: center; }
.pd-img img { display: block; margin: 0 auto; }
.tag {
  display: inline-block;
  margin-bottom: 2px;
  padding: 1px 7px;
  background: var(--teal-soft);
  border: 1px solid var(--teal-line);
  border-radius: 3px;
  color: #4aa;
  font-size: 12px;
  text-shadow: 0 1px 0 #fff;
}
.pd-name { margin: 4px 0 12px; color: var(--teal); font-size: 20px; font-weight: 400; line-height: 1.35; }
.pd-spec-body { margin: 4px 0 12px; }
.shop-info {
  margin: 14px 0 0;
  padding: 6px 14px;
  background: #fafcfc;
  border: 1px solid var(--teal-line);
  border-radius: 3px;
}
.shop-info > div {
  display: grid;
  grid-template-columns: 5.5em minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-top: 1px dashed #dde8e8;
}
.shop-info > div:first-child { border-top: 0; }
.shop-info dt { color: var(--muted); }
.shop-info .price { font-size: 22px; }
.inline-list { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.how-to-order { margin-top: 10px; font-size: 13px; }
.how-to-order a { color: var(--teal); }
.pd-desc { margin: 10px 0 30px; }
.pd-desc .entry { margin-top: 6px; }
.section-title {
  margin: 0 0 12px;
  padding: 0 15px;
  background: #f6f6f6;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 1px 0 #fff;
  color: #333;
  font-size: 16px;
  font-weight: 400;
  line-height: 36px;
  text-shadow: 0 1px 0 #fff;
}

/* ---------- news ---------- */
.news-list li { border-top: 1px solid #eee; }
.news-list li:first-child { border-top: 0; }
.news-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 12px 6px;
}
.news-title { flex: 1 1 auto; min-width: 0; color: var(--teal); font-size: 15px; font-weight: 600; line-height: 1.5; }
.news-item time { flex: 0 0 auto; color: var(--muted); font-size: 13px; }

/* ---------- home ---------- */
.home { padding: 10px 20px 20px; }
.home-intro > h2 {
  color: var(--teal);
  font-size: 24px;
  font-weight: 400;
  line-height: 44px;
  border-bottom: 1px solid var(--line);
  text-shadow: 0 1px 0 #fff;
}
.home-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 16px 0;
}
.home-col h3 { margin-bottom: 8px; color: #000; font-size: 16px; font-weight: 700; }
.home-col h3 small { color: var(--orange); font-size: 14px; }
.home-col p { color: #000; font-size: 14px; line-height: 1.8; }
.home-col .more { color: var(--teal); white-space: nowrap; }
.home-col-media { display: flex; align-items: flex-start; justify-content: center; }
.cat-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin-top: 10px; }
.cat-links a { position: relative; display: block; padding-left: 12px; color: #333; font-size: 14px; line-height: 1.5; }
.cat-links a::before {
  content: "";
  position: absolute;
  top: .55em;
  left: 0;
  border: 4px solid transparent;
  border-left: 5px solid var(--orange);
  border-right: 0;
}
.cat-links a:hover { color: var(--teal); }
.home-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid #eee;
}
.order-dl img { width: 230px; }

/* ---------- social / share ---------- */
.follow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.btn-social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  line-height: 1.2;
  text-shadow: none;
}
.btn-social svg { width: 16px; height: 16px; fill: currentColor; }
.btn-fb { background: #3b5998; }
.btn-fb:hover { background: #2d4373; color: #fff; }
.btn-line { background: #06c755; }

.page-tools { display: flex; justify-content: flex-end; padding: 8px 12px; }
.share { display: none; align-items: center; gap: 6px; }
.js .share { display: flex; }
.share-label { color: var(--muted); font-size: 12px; }
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.share-btn:hover { transform: translateY(-1px); opacity: .9; }
.share-btn svg { width: 16px; height: 16px; fill: currentColor; }
.s-fb { background: #3b5998; }
.s-line { background: #06c755; }
.s-x { background: #111; }
.s-plurk { background: #ff574d; font-size: 15px; font-weight: 700; line-height: 1; }

/* ---------- footer ---------- */
#footer { background: var(--teal-soft); border-top: 1px solid #fff; text-shadow: 0 1px 0 #fff; }
#foot-nav { background: #f6f6f6; border-bottom: 1px solid #e6e6e6; }
#foot-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; padding: 0 10px; }
#foot-nav a { display: block; padding: 0 10px; color: #888; font-size: 12px; line-height: 26px; }
#foot-nav a:hover { color: #333; }
.footer-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 12px 15px 14px;
}
.contact-info li { line-height: 1.75; }
.contact-info .k { color: var(--muted); }
.contact-info a { color: var(--ink); }
.contact-info a:hover { color: var(--teal); }
.copyright { color: #888; font-size: 12px; }

/* ---------- 404 ---------- */
.notfound { padding: 30px 10px 40px; text-align: center; }
.notfound p { margin-bottom: 12px; font-size: 15px; }
.notfound a { color: var(--teal); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .pd-top { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
  body { padding: 0; }
  .js body { padding-top: 48px; }
  #wrap { border: 0; box-shadow: none; }
  #logo { padding: 16px 12px; text-align: center; }
  #logo img { width: 240px; margin: 0 auto; }

  /* fixed top bar */
  .js .mobile-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 6px;
    background: rgba(233, 233, 233, .96);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  }
  .menu-toggle, .mb-call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 10px;
    border: 0;
    background: none;
    color: #161616;
    font-size: 15px;
    cursor: pointer;
  }
  .menu-toggle .bars,
  .menu-toggle .bars::before,
  .menu-toggle .bars::after { display: block; width: 20px; height: 2px; background: #161616; border-radius: 1px; }
  .menu-toggle .bars { position: relative; }
  .menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; }
  .menu-toggle .bars::before { top: -6px; }
  .menu-toggle .bars::after { top: 6px; }
  .mb-call { color: var(--teal-dark); font-size: 14px; }
  .mb-call svg { width: 18px; height: 18px; fill: currentColor; }

  /* off-canvas drawer (same #nav element) */
  .js #nav {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    width: min(84vw, 320px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    box-shadow: 2px 0 14px rgba(0, 0, 0, .25);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
  }
  .js.nav-open #nav { transform: none; visibility: visible; transition: transform .25s ease; }
  .js .nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 4px 0 18px;
    background: #e9e9e9;
    color: #161616;
    font-size: 15px;
  }
  .nav-close { width: 44px; height: 44px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; }
  .js #nav .menu { display: block; }
  .js #nav .menu > li { border-bottom: 1px solid #eee; }
  .js #nav .menu > li > a {
    padding: 12px 54px 12px 18px;
    background: none;
    color: #222;
    font-size: 15px;
    line-height: 1.5;
    text-shadow: none;
    white-space: normal;
  }
  .js #nav .menu > li.current > a { background: var(--teal-soft); color: var(--teal-dark); }
  .js #nav .has-sub > a::after { display: none; }
  .js #nav .subnav {
    position: static;
    display: none;
    min-width: 0;
    padding: 0 0 6px;
    background: #f7fbfb;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .js #nav li.open > .subnav { display: block; }
  .js #nav .subnav a { padding: 9px 18px 9px 34px; font-size: 14px; white-space: normal; }
  .js .subnav-toggle {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 46px;
    border: 0;
    border-left: 1px solid #eee;
    background: none;
    cursor: pointer;
  }
  .js .subnav-toggle::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid #777;
    border-bottom: 2px solid #777;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .2s ease;
  }
  .js #nav li.open > .subnav-toggle::before { transform: translateY(2px) rotate(-135deg); }
  .js .nav-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .45); }
  html.nav-open { overflow: hidden; }
  html:not(.js) #nav .menu > li > a { padding: 0 12px; }

  /* stacking */
  .main-wrap { flex-direction: column; align-items: stretch; gap: 12px; padding: 8px; }
  .main, #side { flex: none; width: 100%; }
  .main { padding: 10px 12px 18px; }
  .page-title { font-size: 21px; }
  .home { padding: 6px 12px 16px; }
  .home-cols { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .home-cta { justify-content: center; }
  .product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .news-item { flex-direction: column; gap: 2px; }
  .footer-body { flex-direction: column; align-items: flex-start; }
  #foot-nav ul { justify-content: center; padding: 4px 6px; }
  .page-tools { justify-content: center; }
}

@media (max-width: 360px) {
  .cat-links { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .mobile-bar, #nav, #side, .page-tools, #banner, .nav-backdrop { display: none !important; }
  body { padding: 0; background: #fff; }
  #wrap { border: 0; box-shadow: none; }
}
