@import url(reset.css);

:root{
  --black:#404040;
  --darkgreen:#5A6E42;
  --secondary:#E8E5DC;
  --header-h: 64px;
  --cart-pd-tb: 1.5rem; 
}
* {
  box-sizing: border-box;
}

body {
  font-family: Helvetica, 'Noto Sans TC';
  margin-top: 64px;
}

/* 1rem = 16px*/
h1 {
  font-size: 4rem;
  font-weight: bold;
  line-height: 1.3;
  color: #404040;
}

h2 {
  font-size: 2rem; /* 32px */
  line-height: 1.2;
  font-weight: bold;
  color: #404040;
}

h3 {
  font-size: 1.25rem;
  color: #404040;
  line-height: 1.5;
}

a {
  font-size: 1rem; 
  text-decoration: none;
  line-height: 1.5;
  border-radius: 16px;
}

p,
li,
span,
label,
button {
  font-size: 1rem;
  line-height: 1.5;
  color: #404040;
}

/* section {
  padding-top: 64px;
} */


/* --------------置中& 拉滿--------------- */
.bg {
  background-color: #e8e5dc;
  width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* -------------頁首----------------- */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #fff;
  z-index: 999;
}

header .container {
  display: flex;
  height: var(--header-h);
  justify-content: space-between;
  align-items: center;
}

header .logo {
  height: 40px;
  margin-left: 20px;
  line-height: 64px;
}


.hd {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-right: 20px;
}

.hd a {
  color: #404040;
  text-decoration: none;
  line-height: 1.5;
}

.hd img {
  height: 24px;
}

/* ------------hero頁------------- */
.hero {
  padding-top: 64px;
  display: flex;
  position: relative;
}

.hero .bgc {
  background-color: #63511D;
  width: 30vw;
}

.hero img {
  width: 70vw;
  height: fit-content;
}

.hero .tx {
  font-size: 0;
  width: 60%;
  height: 65%;
  background-color: #fff;

  position: absolute;
  top: 100px;
  left: 10vw;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  gap: 16%;
  padding: 3%;
}


.hero p {
  font-size: 1.4rem;
  line-height: 1.5;
}

.hero a {
  color: #fff;
  background-color: #87B546;
  width: fit-content;
  border-radius: 8px;
  padding: 2.5% 10%;
}

/* ---------------------------卡片------------------ */
.pros {
  margin: 60px auto;
}

.pros img {
  height: 382px;
  border-radius: 12px;
}

.pros article {
  display: flex;
  column-gap: 120px;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 40px;
}

.pros h2 {
  margin-bottom: 36px;
  display: inline-block;
}

.pros .tx {
  flex-basis: 360px;
}

.pros p {
  line-height: 1.5;
  padding: 3% 10%;
  text-align: left;
}

.fo.tx {
  padding-right: 36px;
}

.eye.tx,
.su.tx {
  order: -1;
  padding-left: 36px;
}

/* ---------------------首頁產品列表------------------------ */
.prod {
  padding-top: 84px;
  padding-bottom: 84px;
}

.prod h2 {
  display: inline-block;
}

.prod a {
  display: inline-block;
  flex-basis: fit-content;
  margin: 0 auto;
  color: #404040;
  border: 1px solid #404040;
  border-radius: 16px;
  padding: 12px;
}

.prod h2+a {
  box-sizing: border-box;
  width: fit-content;
  float: right;
}

.prod ul {
  display: flex;
  margin-top: 84px;
  gap: 36px;
  align-items: flex-start;
  justify-content: center;
}

.prod li {
  flex-basis: 360px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.prod img {
  border-radius: 16px;
}

.prod p {
  line-height: 1.5;
  text-align: left;
}

.prod a~p {
  display: none;
}

.prod a.active~p {
  /*要做點擊 先用hover模擬*/
  display: block;
}

/*-----------------------實體通路-----------------*/
.loca {
  padding: 84px 0;
}

.loca h2 {
  display: inline-block;
  width: fit-content;
}

.fle {
  display: flex;
  justify-content: space-between;
  align-items: center
}

#area {
  display: flex;
  align-items: center;
  height: 48px;
  flex-basis: 240px;
  padding: 0 12px;
}

.search input {
  border: none;
}

.search img {
  width: 24px;
  margin-left: auto;
}

.search,
#area,
::picker(select) {
  appearance: base-select;
  border: 1px solid #404040;
  border-radius: 16px;
  box-sizing: border-box;
  width: 240px;
  color: #404040;
}

#area option {
  color: #404040;
  padding: 8px;
}

.f {
  display: flex;
  gap: 3rem;
  margin-top: 120px;
  justify-content: center;
}


.map iframe {
  height: 450px;
  width: 600px;
}

.thr,
.wes,
.dre {
  box-sizing: border-box;
  background-color: #fff;
  border: 1px solid #e8e5dc50;
  box-shadow: 4px 4px 4px rgba(0, 0, 0, .25);
  width: 440px;
  height: 136px;
  padding: 24px 32px;
  margin-bottom: 20px;

  transition: transform .3s;
}

.thr h2,
.wes h2,
.dre h2 {
  margin-bottom: 20px;
}

.thr:hover,
.wes:hover,
.dre:hover {
  transform: translateY(-5px);

}

.thr.active,
/*還沒寫js*/
.wes.active,
.dre.active {
  box-shadow: inset 4px 4px 4px rgba(0, 0, 0, .25);
  background-color: #E8E5DC;
}

/* ----------------------關於我們---------------------------- */
.about {
  padding: 160px 0;
  background-color: #E8E5DC;
}

.wra {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-basis: 960px;
}

.wra .tx {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 54px;
  flex-basis: 55%;
  height: 450px;
  padding: 8%;
  background-image: url(../img/about_us_bg.jpg);
  background-size: cover;
}

.wra p {
  /* padding: 0 ; */
  line-height: 2;
}

.wra img {
  height: fit-content;
}

/* --------------產品總表頁面------------------------ */
.prodAll {
  padding-top: 84px;
  padding-bottom: 84px;
}

.prodAll h2 {
  display: inline-block;
}

.prodAll a {
  display: inline-block;
  width: auto;
  margin: 0 auto;
  color: #404040;
  border: 1px solid #404040;
  border-radius: 16px;
  padding: 12px;
}

.prodAll ul.list {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  width: calc(360px * 3 + 36px * 2);
  margin: 36px auto;
}

.prodAll .list li {
  flex-basis: 360px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.prodAll img {
  border-radius: 16px;
  transition: .3s;
}

.prodAll img:hover {
  transform: scale(1.05);
}

.prodAll ul.page {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin: 0;
  max-width: 100%;

}

.prodAll ul.page .dir {
  transition: .3s;
}

.prodAll ul.page img:hover {
  transform: scale(1.2);
}

.page .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #e8e5dc;
  position: relative;
}

.dot.active::before {
  /*還沒寫js*/
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 4px solid #87B546;
}

/* ---------------------篩選------------------------- */
.btn-tofilter {
  font-size: 1rem;
  padding: 12px;
  color: #404040;
  border: 1px solid #404040;
  border-radius: 16px;
  cursor: pointer;
  background-color: transparent;
  height: 48px;
  float: right;
}

.popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  border-radius: 16px;
  width: 96%;
  max-width: 1150px;
  max-height: 440px;
  z-index: 10;
}

.popup.active {
  display: block;
}

.popup-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid #e8e5dc;
}

.cl-btn {
  width: 24px;
  height: 24px;
  border: none;
  background-color: transparent;
  cursor: pointer;
}

.bk {
  /* display: none; */
  opacity: 0;
  pointer-events: none;
  transition: all .2s;

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9;
}

.content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  padding: 32px;
  gap: 12px;
}

.content h3 {
  margin-bottom: 12px;
}

.c {
  padding: 0 24px;
  border-right: 1px solid #e8e5dc;
}

.c:last-child {
  border-right: none;
}

.opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.opt {
  /*選項內容物橫排*/
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 36px;
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: #87B546;
}

.popup-btns {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 24px 32px;
}

.popup-btns button {
  padding: 12px;
  border-radius: 16px;
  cursor: pointer;
}

.btn-x {
  background-color: transparent;
  color: #63511D;
  border: 1px solid #63511D;
}

.btn-o {
  background-color: #63511D;
  border: none;
  color: white;
}


.bk.active {
  /* display: block; */
  opacity: 1;
}

/*-------------------個別商品頁------------*/
.prodone {
  padding-top: 84px;
}

main .outer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  margin-top: 36px;
  margin-bottom: 54px;
}

.outer .pics {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pics button {
  background-color: transparent;
  border: none
}

.pics img {
  width: 116px;
  height: 116px;
  cursor: pointer;
}

.pics button img {
  /*要做hover 想做active*/
  width: 48px;
  height: 48px;
  transition: .3s;
}

.pics button img:hover {
  transform: scale(1.2);
}

img.big {
  width: 500px;
  height: 500px;
}

.pd_tx {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  flex-basis: 400px;
}

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

.pd_a a {
  background-color: #5A6E42;
  color: #fff;
  padding: 12px;
}

.pd_a a+a {
  background-color: transparent;
  color: #404040;
  border: 1px solid #404040;
}

main+.bg {
  height: 360px;
}

main+.bg h2 {
  width: fit-content;
  padding-top: 124px;
  margin: 0 auto 24px;
}

main+.bg p {
  width: fit-content;
  max-width: 960px;
  margin: 0 auto 124px;
  padding: 0 2%;
}

.wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 100px 1fr 1fr 1fr;
  grid-template-areas: 'h2 h2'
    'mon sto'
    'cpu con'
    'bat wp';
  margin: 16px auto 84px;
}


.wrapper h2 {
  grid-area: h2;
  padding: 36px;
}

.wrapper p {
  padding-left: 36px;
}

.monitor {
  grid-area: mon;
}

.stora {
  grid-area: sto;
}

.cpu {
  grid-area: cpu;
}

.connect {
  grid-area: con;
}

.battery {
  grid-area: bat;
}

.waterproof {
  grid-area: wp;
}

.monitor,
.stora,
.cpu,
.connect,
.battery,
.waterproof {
  padding: 36px;
  box-shadow: 0 4px #e8e5dc50;
}

/* --------------------結帳頁面--------------------- */

h2 {}


input[type="checkbox"] {
  accent-color: #87B546;

}

label {
  /* margin-left: 12px; */
}

form.wrapper {
  margin: 32px auto;
  display: flex;
  flex-direction: column;
  gap: 20px;

}

.in-wra {
  display: flex;
  gap: 20px;
}

.in-wra input[placeholder] {
  width: 230px;
}

input[placeholder],
button#continue {
  border: 1px solid #404040;
  border-radius: 16px;
  box-sizing: border-box;
  width: 480px;
  height: 48px;
  padding: 12px;
}

button#continue {
  width: 200px;
  border-color: #63511D;
  background-color: #63511D;
  color: #fff;
}

/* ----------------頁尾-------------------------------- */
footer {
  background-color: #5A6E42;
  position: relative;
  height: 256px;
}

footer>img {
  width: 104px;
  position: absolute;
  left: 2vw;
  bottom: 1.2vw;
}

footer ul {
  display: flex;
  gap: 10%;
  justify-content: center;
  /* align-items: center; */
  padding: 3% 0;
}

footer ol {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

footer li {
  color: #fff;
  display: flex;
  gap: 12px;
}

footer .soc img {
  width: 24px;
}

footer .soc {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 3%;
}

footer div:last-child {
  text-align: center;
  width: max-content;
  margin: 0 auto 1%;
}