* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
}

body {
    background: #f5f5f5;
    color: #333;
}

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

.container {
    width: 95%;
    max-width: 1100px;
    margin: 0 auto;
}

.site-header {
    background: #111827;
    color: #fff;
    padding: 14px 0;   /* 原本是 10px */
    margin-bottom: 20px;

}

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

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #f97316;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo-sub {
    font-size: 11px;
    color: #9ca3af;
}


.nav a {
    color: #e5e7eb;
    margin-left: 15px;
    font-size: 14px;
}

.nav a:hover {
    color: #fff;
}

.nav-user {
    margin-left: 10px;
    color: #9ca3af;
    font-size: 13px;
}

.main-content {
    min-height: 70vh;
    padding-bottom: 30px;
}

.site-footer {
    background: #111827;
    color: #9ca3af;
    text-align: center;
    padding: 10px 0;
    margin-top: 30px;
}

/* Product grid */
h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.product-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.product-info h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

.product-info h2 a {
    color: #111827;
}

.product-info .category {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.product-info .price {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}

/* Forms & buttons */
.add-to-cart-form,
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.add-to-cart-form input[type="number"],
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    width: 100%;
}

.add-to-cart-form label,
.auth-form label {
    font-size: 14px;
    color: #374151;
}

.add-to-cart-form button,
.btn-primary,
.btn-outline,
.btn-link-btn {
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-block;
    text-align: center;
}

.add-to-cart-form button,
.btn-primary {
    background: #2563eb;
    color: #fff;
}

.add-to-cart-form button:hover,
.btn-primary:hover {
    background: #1d4ed8;
}

.btn-outline {
    background: transparent;
    border: 1px solid #9ca3af;
    color: #374151;
}

.btn-outline:hover {
    border-color: #4b5563;
}

.btn-link {
    color: #2563eb;
    text-decoration: none;
}

/* Cart table */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.cart-table th,
.cart-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 14px;
}

.cart-table th {
    background: #f3f4f6;
    font-weight: 600;
}

.cart-summary {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

.cart-summary .total {
    font-size: 18px;
    margin-bottom: 10px;
}

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

/* Product detail */
.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr);
    gap: 20px;
    margin-top: 20px;
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.product-detail-image img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
}

.product-detail-info h1 {
    font-size: 22px;
    margin-bottom: 8px;
}

.product-detail-info .desc {
    margin-top: 10px;
    white-space: pre-wrap;
    line-height: 1.5;
}

/* Auth forms */
.auth-form {
    max-width: 400px;
    margin-top: 15px;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.auth-form button {
    margin-top: 5px;
}

.error {
    color: #b91c1c;
    margin: 10px 0;
}

/* Admin layout */
.admin-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    background: #111827;
    color: #e5e7eb;
    padding: 20px;
}

.admin-sidebar h2 {
    margin-bottom: 15px;
    font-size: 18px;
}

.admin-sidebar a {
    display: block;
    color: #e5e7eb;
    padding: 6px 0;
    font-size: 14px;
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
    color: #fff;
}

.admin-main {
    padding: 20px;
    background: #f3f4f6;
}

.admin-main h1 {
    margin-bottom: 10px;
}
/* ====== 首頁 Hero 區塊 ====== */
.hero {
    background: radial-gradient(circle at top left, #2563eb 0, #1e293b 45%, #020617 100%);
    color: #f9fafb;
    padding: 32px 0 40px;
    border-radius: 0 0 24px 24px;
    margin-bottom: 24px;
}

.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr);
    gap: 24px;
    align-items: center;
    padding: 0 8px;
}

.hero-content h1 {
    font-size: 32px;
    margin: 8px 0 10px;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 14px;
    line-height: 1.7;
    color: #e5e7eb;
    max-width: 430px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.hero-cta {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary.btn-lg {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
}

.hero-note {
    font-size: 12px;
    color: #d1d5db;
}

/* Hero 右側小卡 */
.hero-highlight {
    display: grid;
    gap: 10px;
}

.hero-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.hero-card-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.hero-card-text h3 {
    font-size: 14px;
    margin-bottom: 2px;
}

.hero-card-text p {
    font-size: 12px;
    color: #cbd5f5;
}

/* ====== 三大賣點 ====== */
.feature-section {
    margin-top: 10px;
    margin-bottom: 10px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.feature-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
    border: 1px solid #e5e7eb;
}

.feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.feature-card h3 {
    font-size: 15px;
    margin-bottom: 4px;
}

.feature-card p {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

/* ====== 商品區塊標題 ====== */
.product-section {
    margin-top: 18px;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
}

.section-subtitle {
    font-size: 13px;
    color: #6b7280;
}

/* ====== 商品卡片 Hover 效果優化 ====== */
.product-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    border: 1px solid #e5e7eb;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    border-color: #bfdbfe;
}
/* ====== momo 風格 icon 分類列 ====== */
.category-bar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.04);
}

.category-inner {
    padding: 6px 0;
}

.category-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 0 4px;
    -webkit-overflow-scrolling: touch;
}

.category-grid::-webkit-scrollbar {
    height: 4px;
}
.category-grid::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 999px;
}

.category-item {
    flex: 0 0 auto;
    width: 80px;
    padding: 6px 4px 8px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    text-align: center;
    text-decoration: none;
    color: #374151;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.category-label {
    font-size: 12px;
    white-space: nowrap;
}

.category-item:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.category-item.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.category-item.active .category-label {
    color: #ffffff;
}

/* 桌機稍微放大一點卡片 */
@media (min-width: 768px) {
    .category-grid {
        justify-content: flex-start;
    }
    .category-item {
        width: 90px;
    }
}

/* RWD Hero 調整 */
@media (max-width: 768px) {
    .hero {
        border-radius: 0 0 18px 18px;
        padding: 20px 0 24px;
    }
    .hero-inner {
        grid-template-columns: 1fr;
    }
    .hero-content h1 {
        font-size: 24px;
    }
    .hero-subtitle {
        font-size: 13px;
    }
    .hero-highlight {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .logo-title {
        font-size: 16px;
    }
    .logo-sub {
        font-size: 10px;
    }
    .logo-mark {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        text-align: center;
        position: relative; /* 讓 nav-toggle 依這個定位 */
    }

    .logo {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .logo a {
        justify-content: center;
    }

    .nav-toggle {
        position: absolute;
        right: 12px;
        top: 6px;          /* 往上拉高一點 */
    }

    .nav {
        top: 52px !important;  /* 稍微跟著往上，讓展開選單不壓到分類列 */
    }
}


/* Admin forms/tables reuse .cart-table, .auth-form */
/* ====== 導覽列：蝦皮 / momo 風格 + 漢堡 ====== */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.nav a {
    color: #e5e7eb;
    margin-left: 0;
}

.nav-toggle {
    display: none;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: transparent;
    padding: 4px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #e5e7eb;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ====== 分類列（蝦皮 / momo 風格） ====== */
.category-bar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.04);
}

.category-inner {
    padding: 6px 0;
}

.category-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
}

.cat-pill {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
    white-space: nowrap;
}

.cat-pill:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.cat-pill.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* ====== 手機版：漢堡收合選單 ====== */
@media (max-width: 768px) {
    .nav-toggle {
        display: inline-flex;
    }
    .nav {
        position: absolute;
        top: 52px;
        right: 10px;
        left: 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px 12px;
        background: #020617;
        border-radius: 14px;
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.6);
        display: none;
        z-index: 20;
    }
    .nav.open {
        display: flex;
    }
    .nav a,
    .nav-user {
        font-size: 14px;
    }
    .header-inner {
        position: relative;
    }
}

/* RWD */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .product-detail {
        grid-template-columns: 1fr;
    }
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    .admin-sidebar a {
        padding-right: 10px;
    }
    /* =========================
   Skincare Luxury Theme
   （貼在 styles.css 最後面）
   ========================= */

/* 字體與整體基調 */
:root{
  --bg: #fbfaf7;         /* 奶油白 */
  --panel: #ffffff;      /* 卡片白 */
  --ink: #111827;        /* 深字 */
  --muted: #6b7280;      /* 灰字 */
  --line: #ece7df;       /* 柔和邊線 */
  --gold: #b89b5e;       /* 霧金 */
  --gold2:#d8c08a;       /* 淺金 */
  --shadow: 0 14px 34px rgba(17,24,39,.08);
  --radius: 18px;
}

html, body{
  background: var(--bg);
  color: var(--ink);
}

body{
  font-family: ui-sans-serif, system-ui, -apple-system, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  letter-spacing: .2px;
}

/* container 更像精品站：寬一點、留白多 */
.container{
  max-width: 1120px;
  padding-left: 14px;
  padding-right: 14px;
}

/* ===== Header：深色改成精品淡色 ===== */
.site-header{
  background: rgba(251,250,247,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin-bottom: 14px;
}

/* Logo 區：霧金點綴 */
.logo a{
  color: var(--ink) !important;
}

.logo-mark{
  background: radial-gradient(circle at 30% 30%, var(--gold2), var(--gold));
  color: #1f2937;
  box-shadow: 0 10px 24px rgba(184,155,94,.22);
}

.logo-title{
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.logo-sub{
  color: var(--muted);
}

/* 主選單字色改深灰 + hover 金 */
.nav a{
  color: #374151 !important;
  font-weight: 700;
}

.nav a:hover{
  color: var(--gold) !important;
}

/* 手機漢堡按鈕：改成淡色邊框 */
.nav-toggle{
  border: 1px solid var(--line) !important;
  background: rgba(255,255,255,.7) !important;
}
.nav-toggle span{
  background: #374151 !important;
}

/* ===== 分類列：momo icon 也變質感 ===== */
.category-bar{
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
}

.category-inner{
  padding: 8px 0 2px;
}

.category-item{
  background: rgba(255,255,255,.75);
  border: 1px solid var(--line);
  box-shadow: 0 10px 20px rgba(17,24,39,.05);
  border-radius: 18px;
}

.category-icon{
  filter: saturate(.9);
}

.category-item:hover{
  border-color: rgba(184,155,94,.55);
  background: #fff;
}

.category-item.active{
  background: linear-gradient(135deg, rgba(184,155,94,.15), rgba(216,192,138,.18));
  border-color: rgba(184,155,94,.55);
  color: #111827;
}
.category-item.active .category-label{
  color: #111827;
}

/* ===== Hero：改成保養品「柔霧漸層」 ===== */
.hero{
  background: radial-gradient(circle at 20% 10%, rgba(216,192,138,.20), rgba(255,255,255,0) 50%),
              radial-gradient(circle at 85% 40%, rgba(184,155,94,.16), rgba(255,255,255,0) 55%),
              linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%);
  color: var(--ink);
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 26px 0 26px;
}

.hero-tag{
  background: rgba(184,155,94,.12);
  border: 1px solid rgba(184,155,94,.28);
  color: #6b5b33;
}

.hero-content h1{
  color: var(--ink);
  font-size: 30px;
  letter-spacing: 1.4px;
}

.hero-subtitle{
  color: #4b5563;
}

.hero-note{
  color: #6b7280;
}

/* CTA 按鈕：霧金質感 */
.btn-primary,
.btn-primary.btn-lg,
.add-to-cart-form button,
button.btn-primary{
  background: linear-gradient(135deg, var(--gold), var(--gold2)) !important;
  color: #1f2937 !important;
  border: 0 !important;
  box-shadow: 0 14px 26px rgba(184,155,94,.22) !important;
  border-radius: 999px !important;
  font-weight: 900 !important;
}

.btn-primary:hover,
.add-to-cart-form button:hover{
  transform: translateY(-1px);
  filter: brightness(.98);
}

/* Hero 右側賣點卡：玻璃感精品 */
.hero-card{
  background: rgba(255,255,255,.68);
  border: 1px solid var(--line);
  box-shadow: 0 16px 28px rgba(17,24,39,.08);
}

.hero-card-text p{
  color: #6b7280;
}

/* ===== 賣點卡（feature） ===== */
.feature-card{
  background: rgba(255,255,255,.8);
  border: 1px solid var(--line);
  box-shadow: 0 12px 26px rgba(17,24,39,.06);
  border-radius: var(--radius);
}

.feature-card p{
  color: #6b7280;
}

/* ===== 商品卡：更像精品電商 ===== */
.product-grid{
  gap: 16px;
}

.product-card{
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(17,24,39,.07);
  overflow: hidden;
}

.product-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(17,24,39,.10);
  border-color: rgba(184,155,94,.35);
}

.product-image{
  background: linear-gradient(180deg, rgba(216,192,138,.14), rgba(255,255,255,0));
}

.product-image img{
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: transform .25s ease;
}

.product-card:hover .product-image img{
  transform: scale(1.04);
}

.product-info h2 a{
  color: #111827;
  font-weight: 900;
  letter-spacing: .6px;
}

.product-info .category{
  color: #7c6a3a;
  font-weight: 800;
  font-size: 12px;
}

.price{
  color: #111827;
  font-weight: 900;
}

/* 數量 input 也變圓潤 */
.add-to-cart-form input[type="number"]{
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 6px 10px;
}

/* 表單/輸入 */
input, select, textarea{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255,255,255,.8);
}

input:focus, select:focus, textarea:focus{
  outline: none;
  border-color: rgba(184,155,94,.55);
  box-shadow: 0 0 0 4px rgba(184,155,94,.14);
}

/* ===== 手機：讓 hero 更像保養品落地頁 ===== */
@media (max-width: 768px){
  .hero{
    border-radius: 18px;
    padding: 18px 0 18px;
  }
  .hero-content h1{
    font-size: 24px;
  }
  .product-image img{
    height: 190px;
  }
}
