﻿@charset "UTF-8";

/* =========================================================
   01. Reset / Base
========================================================= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: url(images/bg.png) center / cover fixed no-repeat;
}

ol,
ul {
  list-style: none;
}

a {
  text-decoration: none;
}

button {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid #d32f2f;
  border-radius: 5px;
  background-color: #D25353;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.4;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s ease,
              border-color 0.2s ease,
              color 0.2s ease,
              box-shadow 0.2s ease;
}

/* =========================================================
   02. Layout
========================================================= */
header {
  width: 100%;
  height: auto;
  overflow: hidden;
  margin: 0 auto;
  background: #727171;
}

img.logo {
  margin-left: 20px;
}

article,
section {
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

section {
  height: auto;
}

section div {
  width: 1100px;
  height: auto;
  overflow: hidden;
  margin: 0 auto;
}

footer {
  padding: 5px 15px;
  text-align: center;
  letter-spacing: 0.065rem;
}

/* =========================================================
   03. Header Title
========================================================= */
.title {
  width: 100%;
  height: 450px;
  padding: 0 30px;
  text-align: center;
}

.title .title_pc {
  position: absolute;
  z-index: 99999;
  height: auto;
}

.title .title_m,
.moblie {
  display: none;
}

/* =========================================================
   04. Navigation
========================================================= */
.top-nav {
  width: 100%;
  background: #8b4a2f;
  padding: 10px 0;
  overflow: hidden;

  position: sticky;
  top: 0;
  z-index: 9999;
}

.top-nav-scroll {
  overflow-x: auto;
    position: static;
}

.top-nav ol {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
}

.top-nav li {
  flex: 0 0 auto;
  margin: 0 10px;
}

.top-nav a {
  display: inline-block;
  padding: 8px 14px;
  margin: 4px;
  border-radius: 999px;
  color: #fff;
  font-size: 1.2rem;
}

.top-nav a:hover {
  background: rgba(255,255,255,0.2);
}

.top-nav a.active {
  background: #fff;
  color: #8b4a2f;
  font-weight: bold;
}

.top-nav ol:nth-child(2),
.top-nav ol:last-child {
  margin: 5px auto;
  padding: 3px;
  color: #fff;
}

.top-nav ol:nth-child(2){
	margin-top:10px;
}

.top-nav ol:nth-child(2) li a,
.top-nav ol:last-child li a {
  padding: 3px;
  margin: 0;
  color: #ffdd00;
  font-size: 1.025rem;
}

.sub-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px auto;
  text-align: center;
}

.sub-nav a {
  display: inline-block;
  padding: 8px 14px;
  margin: 10px 5px;
  border: 1px solid #d8b79f;
  border-radius: 999px;
  background: #f6eadf;
  color: #8b4a2f;
  font-size: 1.085rem;
}

.sub-nav a.active {
  background: #8b4a2f;
  color: #fff;
  font-weight: bold;
}

/* =========================================================
   05. Cart
========================================================= */
#membercar ol {
  position: fixed;
  right: 20px;
  bottom: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100px;
  height: 60px;
  margin: 0;
  background-color: #ff4f81;
}

.shopcar {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.shopcar-content {
  position: absolute;
  right: 0;
  bottom: 60px;
  z-index: 10000;
  display: none;
  flex-direction: column;
  width: 250px;
  max-height: 250px;
  padding: 0;
  border-radius: 8px 8px 0 0;
  background-color: #fff;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.shopcar:hover .shopcar-content {
  display: block;
}

.shopcar-list {
  max-height: 250px;
  overflow-y: auto;
  padding: 5px;
}

.shopcar-content::-webkit-scrollbar {
  width: 6px;
}

.shopcar-content::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: #ccc;
}

.shopcar-content li {
  width: 95%;
  height: auto;
  overflow: hidden;
  margin: 5px auto;
  padding: 5px 0;
}

.shopcar-content mark {
  float: left;
  width: 15px;
  margin-right: 5px;
  padding: 5px 0;
  text-align: center;
}

.shopcar-content li a {
  float: right;
  width: auto;
  margin: 0 auto;
  padding: 0;
  background: #eee;
}

.shopcar-content li img {
  width: 25px;
  height: auto;
  margin: 0 auto;
}

.shopcar-content p {
  width: 80%;
  padding: 0 0 3px;
  text-align: left;
}

.shopcar-content .qty {
  padding: 0 3px;
}

.shopcar-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-top: 1px dashed #ccc;
  background-color: #f9f9f9;
  font-size: 0.9rem;
}

.btn-bg-secondary {
  padding: 5px 10px;
  border-radius: 4px;
  background-color: #333;
  color: #fff;
}

/* =========================================================
   06. Titles
========================================================= */
.shadow,
.main-title {
  font-weight: 900;
  color: #b8364e;
  text-shadow:
    -1px -1px 0 #fff,
     1px -1px 0 #fff,
    -1px  1px 0 #fff,
     1px  1px 0 #fff;
}

.shadow {
  height: 80px;
  line-height: 80px;
  font-size: 1.925rem;
}

.title-block {
  margin: 30px auto 20px;
  text-align: center;
}

.main-title {
  padding: 5px;
  font-size: 1.85rem;
}

.sub-title {
  margin-top: 8px;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1.6;
}

/* =========================================================
   07. Product List
========================================================= */
.product {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: auto;
  overflow: hidden;
  margin: 30px auto;
  padding: 10px 0 0;
  border-radius: 10px;
  background: #fff;
  text-align: center;
  box-shadow:
    rgba(0, 0, 0, 0.16) 0 3px 6px,
    rgba(0, 0, 0, 0.23) 0 3px 6px;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 auto;
}

.product-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 5px auto;
  padding: 10px 5px;
}

.product-image {
  width: 85%;
  height: 195px;
  margin: 0 auto;
  border: 1px solid #f0f0f0;
}

.product-image a img {
  width: 100%;
  height: 195px;
  object-fit: contain;
  text-align: center;
}

.product-title {
  display: -webkit-box;
  width: 85%;
  height: 48px;
  overflow: hidden;
  margin: 5px auto;
  font-weight: 450;
  line-height: 1.3;
  align-content: center;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.product-title a {
  color: #333;
  font-size: 0.98rem;
}

.product-price {
  width: 85%;
  height: 55px;
  overflow: hidden;
  margin: 0 auto;
  color: #111;
  font-size: 0.9rem;
  font-weight: normal;
  line-height: 1.5;
}

.product-price .price {
  padding: 12px 0 8px;
  text-decoration: line-through;
}

.product-button {
  gap: 15px;
  margin: 0 auto 10px;
  text-align: center;
}

.product-button a {
  flex: 1;
  padding: 8px 10px;
  margin: 0 3px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
}

/* 原 CSS 有 .product-buttons，推測應為 .product-button */
.product-button a:hover {
  text-decoration: none;
}

/* =========================================================
   08. Fixed Buttons / Side Menu
========================================================= */
#TOP {
  position: fixed;
  right: 10px;
  bottom: 100px;
  z-index: 9;
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  text-align: center;
  opacity: 0.65;
  transition: opacity 0.5s ease;
  box-shadow:
    rgba(60, 64, 67, 0.3) 0 1px 2px 0,
    rgba(60, 64, 67, 0.15) 0 2px 6px 2px;
}

.side-menu {
  position: fixed;
  top: 50%;
  right: 10px;
  z-index: 999999;
  width: 50px;
  padding: 10px 15px;
  border-radius: 20px;
  background: #333;
  color: #fff200;
  font-weight: bold;
  line-height: 1.5;
  text-align: center;
  opacity: 0.75;
}

.side-menu a {
  color: #fff200;
  font-size: 1rem;
  cursor: pointer;
}

/* =========================================================
   09. Modal / Discount Rules
========================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: none;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  width: 650px;
  margin: 5% auto;
  padding: 20px;
  border-radius: 10px;
  background: #fff;
  animation: fadeIn 0.3s ease-in-out;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.close {
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.modal-title {
  margin-bottom: 24px;
  color: #8b4a2f;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
}

.discount-rules {
  margin: 0;
  padding: 0;
  list-style: none;
}

.discount-rules li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #f1e5dc;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.rule-badge {
  flex-shrink: 0;
  min-width: 58px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  text-align: center;
}

.sale  { background: #e67e22; }
.gift  { background: #d35400; }
.hot   { background: #c0392b; }
.limit { background: #8e44ad; }
.team  { background: #2980b9; }

.rule-text {
  flex: 1;
  color: #5a3a2e;
  font-size: 15px;
  line-height: 1.9;
}

.price-tag,
.cp-tag,
.hot-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: bold;
}

.price-tag {
  background: #ffe8d9;
  color: #d35400;
}

.gift-tag {
  color: #c0392b;
  font-weight: bold;
}

.cp-tag {
  background: #fff3cd;
  color: #856404;
}

.hot-tag {
  background: #ff4d6d;
  color: #fff;
}

.count-tag {
  color: #1565c0;
  font-size: 17px;
  font-weight: bold;
}

.rule-note {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #faf3ee;
  color: #7a5a4d;
  font-size: 13px;
}

/* =========================================================
   10. Pagination
========================================================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 50px auto 30px;
  font-size: 14px;
}

.pagination a,
.pagination .current {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #555;
  transition: all 0.2s ease;
}

.pagination a:hover,
.pagination .current {
  background: #8b4a2f;
  color: #fff;
  border-color: #8b4a2f;
}

.pagination .current {
  font-weight: bold;
}

.pagination a:first-child,
.pagination a:last-child {
  padding: 0 14px;
  font-weight: 500;
}

/* =========================================================
   11. Mobile
========================================================= */
@media screen and (max-width: 768px) {
  .title {
    width: 100%;
    height: auto;
    margin: 0 auto;
    padding: 0;
    text-align: center;
  }

  .title .title_pc{
    display: none;
  }
  
  .side-menu {
  top: 35%;
  right: 0;
  width: 60px;
  padding: 5px 5px;
  border-radius: 0;
  }

  .title .title_m {
    display: block;
    width: 100%;
  }

  .moblie {
    display: block;
  }

  img.logo {
    margin-left: 5px;
  }

  .top-nav {
    width: 100%;
    overflow: hidden;
    background: #8b4a2f;
  }

  .top-nav-scroll {
    display: flex;
    justify-content: center;
    overflow-x: visible;
  }

  .top-nav ol {
    justify-content: left;
  }

  .top-nav li {
    flex: 0 0 auto;
    margin: 0 5px;
  }

  .top-nav a {
    display: inline-block;
    padding: 5px 10px;
    font-size: 1rem;
  }

.top-nav ol:nth-child(2),
.top-nav ol:last-child {
display:none;
}


  .sub-nav {
    margin: 20px auto;
  }

  .sub-nav a {
    padding: 5px 8px;
    margin: 5px 3px;
    font-size: 0.95rem;
  }

  nav.menu {
    height: auto;
    margin: 5px auto;
  }

  .menu-list {
    width: 98%;
  }

  .title-3 {
    font-size: 1rem;
  }

  section div {
    width: 98%;
  }

  .title-block {
    margin: 0 auto;
    text-align: center;
  }

  .main-title {
    font-size: 1.35rem;
  }

  .sub-title {
    font-size: 1rem;
  }

  .product-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-content {
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 22px 18px;
  }

  .discount-rules li {
    flex-direction: column;
  }

  .rule-badge {
    min-width: auto;
  }

  .modal-title {
    font-size: 20px;
  }

  footer br {
    display: none;
  }
  .product-price{
  	height:50px;
  }
  
}
