
:root{
  --bg: #fbfbfa;
  --card: #ffffff;
  --muted: #7b7b7b;
  --text: #23303b;
  --accent: #7aa6a1; /* 茶绿色调 */
  --accent-2: #c49a6c; /* 茶汤暖色 */
}

[data-theme="dark"]{
  --bg: #071018;
  --card: #071822;
  --muted: #9aa6b0;
  --text: #e6eef8;
  --accent: #6fb2a8;
  --accent-2: #caa97a;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Noto Sans SC', 'Helvetica Neue', Arial;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
}

/* Background image */
body{
  background-image: url('images/background.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.container{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:stretch;
}

header{padding:20px 18px;text-align:center}
header h1{margin:0;font-size:20px;letter-spacing:1px}
.tagline{margin:10px auto 0;color:var(--muted);font-size:15px;line-height:1.6;max-width:820px;padding:0 12px;text-align:center}
.tagline .lead{margin:0 0 8px}
.guide-title{margin:6px 0 8px;font-size:15px;color:var(--text);font-weight:700}
.guide-list{margin:0;padding-left:20px;display:inline-block;text-align:left}

main{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:16px;gap:20px}
.card{
  width:100%;
  max-width:520px;
  background:var(--card);
  border-radius:12px;
  padding:20px;
  box-shadow:0 6px 18px rgba(35,48,59,0.06);
}
.card h2{margin-top:0}
.controls{display:flex;gap:10px;margin-top:14px}
button{
  flex:1;
  padding:10px 12px;
  border:0;
  border-radius:8px;
  background:var(--accent);
  color:white;
  font-weight:600;
  font-size:15px;
}
button[aria-label="切换主题"]{background:transparent;color:var(--text);border:1px solid rgba(0,0,0,0.06)}

footer{padding:14px 16px;text-align:center;font-size:13px;color:rgba(0,0,0,0.45)}

@media (prefers-color-scheme: dark){
  :root:not([data-theme]){background:var(--bg)}
}

@media (max-width:420px){
  .card{padding:16px;border-radius:10px}
  header h1{font-size:16px}
}

/* Product grid */

.topbar{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:12px 16px;max-width:1100px;margin:0 auto}
.topbar .intro h2{margin:0;font-size:18px}
.topbar .intro p{margin:4px 0 0;color:var(--muted)}
.topbar .actions{display:flex;gap:8px}

/* Shop quality cover */
.shop-quality{max-width:1100px;margin:18px auto;padding:12px 16px}
.shop-quality h2{margin:0 0 8px;font-size:20px}
.shop-cover{width:100%;border-radius:10px;overflow:hidden;box-shadow:0 8px 20px rgba(35,48,59,0.06)}
.shop-cover img{display:block;width:100%;height:auto;object-fit:cover}

.products{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:18px;padding:18px;max-width:1100px;margin:0 auto;flex:1;justify-items:start}
.product-card{background:var(--card);border-radius:12px;padding:12px;box-shadow:0 8px 24px rgba(35,48,59,0.04);display:flex;flex-direction:column;gap:8px;width:100%;}
.product-card .imgwrap{width:100%;padding-top:78%;position:relative;border-radius:8px;overflow:hidden;background:linear-gradient(135deg, rgba(0,0,0,0.02), rgba(0,0,0,0.01))}
.product-card img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.product-card h3{margin:0;font-size:16px}
.product-card .meta{color:var(--muted);font-size:13px}
.price-row{display:flex;justify-content:space-between;align-items:center;margin-top:6px}
.price{font-weight:800;color:var(--accent-2);font-size:18px}
.badge{background:linear-gradient(90deg, rgba(122,166,161,0.06), rgba(202,154,108,0.04));color:var(--text);padding:6px 8px;border-radius:999px;font-size:12px}
.product-card .controls{display:flex;gap:8px;margin-top:8px}
.btn{flex:1;padding:8px 10px;border-radius:8px;border:0;font-weight:700;cursor:pointer}
.btn.buy{background:var(--accent);color:#fff}
.btn.info{background:transparent;border:1px solid rgba(0,0,0,0.06)}

/* Modal */
.modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:1200}
.modal.show{display:flex}
.modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,0.6)}
.modal-content{position:relative;max-width:92vw;max-height:92vh;border-radius:10px;overflow:hidden;z-index:2;background:var(--card);padding:12px;display:flex;flex-direction:column;gap:8px;align-items:center}
.modal-content .carousel{display:flex;align-items:center;gap:12px}
.carousel-track{display:flex;gap:8px;overflow:hidden;width:70vw;height:60vh;align-items:center;justify-content:center}
.carousel-track{touch-action:pan-y}
.carousel-track img{max-width:70vw;max-height:60vh;object-fit:contain}
.carousel-arrow{border:0;background:transparent;font-size:34px;color:var(--muted);cursor:pointer}
.modal-close{position:absolute;right:8px;top:6px;border:0;background:transparent;font-size:22px}
.modal-caption{font-size:14px;color:var(--muted);margin-top:6px}


@media (max-width:420px){
  .products{padding:12px;grid-template-columns:repeat(2,1fr);gap:12px}
  .product-card{padding:10px}
  .product-card .imgwrap{padding-top:72%}
  .carousel-track{width:92vw;height:48vh}
}

/* Desktop: force 3 columns so three products sit in one row */
@media (min-width: 1000px){
  .products{grid-template-columns:repeat(3,340px);max-width:1100px}
}

/* env section */
.env{padding:14px 16px;max-width:1100px;margin:18px auto;background:rgba(255,255,255,0.6);backdrop-filter: blur(4px);border-radius:10px;display:flex;flex-direction:column;align-items:center}
.env h2{margin:8px 0 12px;text-align:center;font-size:20px}
.env-desc{color:var(--muted);margin:0 0 10px;text-align:center;max-width:900px}
.env-gallery{display:flex;flex-direction:row;gap:12px;align-items:center;width:100%;max-width:980px;padding:8px;overflow-x:auto;-webkit-overflow-scrolling:touch}
/* Horizontal thumbnails */
.env-gallery img{width:180px;height:120px;object-fit:cover;border-radius:8px;box-shadow:0 6px 18px rgba(35,48,59,0.06);cursor:pointer;transition:transform .16s ease,box-shadow .16s ease}
.env-gallery img:hover{transform:scale(1.03);box-shadow:0 10px 28px rgba(35,48,59,0.12)}
.env-gallery::-webkit-scrollbar{height:8px}
.env-gallery::-webkit-scrollbar-thumb{background:rgba(0,0,0,0.06);border-radius:4px}

@media (max-width:420px){
  .env-gallery{gap:10px;padding:6px}
  .env-gallery img{width:92%;height:140px}
}

.contact-info{margin:16px 0 0;font-size:14px;color:var(--accent);font-weight:600;text-align:center}


