/* ============================================================
   實體特約店家 前台樣式
   physical_stores_list.php & physical_stores_store.php
   ============================================================ */

/* 導航列高亮 */
.nc-nav-menu li.ps-nav-highlight a span {
  color: #e74c3c;
  font-weight: 700;
}

/* ── 全局容器 ── */
.ps-front-wrap,
.ps-store-page {
  width: 1000px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 0 40px;
  font-family: "Noto Sans TC", "微軟正黑體", "Microsoft JhengHei", sans-serif;
  float: none !important;
}

/* ── 頁首 Banner ── */
.ps-front-banner {
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 50%, #c0392b 100%);
  padding: 36px 20px;
  text-align: center;
  margin-bottom: 24px;
  border-radius: 10px;
}

.ps-front-banner h1 {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.ps-front-banner p {
  font-size: 14px;
  color: rgba(255,255,255,0.88);
  margin: 0;
}

/* ── 搜尋區 ── */
.ps-front-search-bar {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 0 0 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.ps-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.ps-search-icon {
  font-size: 18px;
  color: #ccc;
  flex-shrink: 0;
}

.ps-search-input {
  flex: 1;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s;
  font-family: "Noto Sans TC", "微軟正黑體", "Microsoft JhengHei", sans-serif;
}

.ps-search-input:focus {
  border-color: #e74c3c;
  box-shadow: 0 0 0 2px rgba(231,76,60,0.1);
}

.ps-search-btn {
  height: 40px;
  padding: 0 24px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  font-family: "Noto Sans TC", "微軟正黑體", "Microsoft JhengHei", sans-serif;
  white-space: nowrap;
}

.ps-search-btn:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
}

.ps-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.ps-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #555;
}

.ps-filter-group select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  font-family: "Noto Sans TC", "微軟正黑體", "Microsoft JhengHei", sans-serif;
  outline: none;
  cursor: pointer;
  background: #fff;
}

.ps-filter-clear {
  font-size: 12px;
  color: #aaa;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  transition: all 0.18s;
}

.ps-filter-clear:hover {
  color: #e74c3c;
  border-color: #e74c3c;
  text-decoration: none;
}

/* ── 結果資訊 ── */
.ps-front-content {
  padding: 0;
}

.ps-result-info {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
  padding-left: 2px;
}

.ps-result-info strong {
  color: #e74c3c;
  font-size: 15px;
}

.ps-result-filter em {
  color: #555;
  font-style: normal;
  font-weight: 600;
}

/* ── 店家卡片 Grid ── */
.ps-front-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .ps-front-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .ps-front-grid { grid-template-columns: 1fr; }
}

.ps-front-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.22s;
}

.ps-front-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(231,76,60,0.15);
  border-color: #fadbd8;
  text-decoration: none;
}

.ps-front-card-img {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #fef0f0, #fff);
  position: relative;
  overflow: hidden;
}

.ps-front-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.ps-front-card:hover .ps-front-card-img img {
  transform: scale(1.04);
}

.ps-front-card-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
}

.ps-front-card-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(231,76,60,0.88);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  font-family: "Noto Sans TC", "微軟正黑體", "Microsoft JhengHei", sans-serif;
}

.ps-front-card-body {
  padding: 14px 14px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ps-front-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  margin: 0 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-front-card-desc {
  font-size: 12px;
  color: #999;
  line-height: 1.5;
  margin: 0 0 8px;
  flex: 1;
}

.ps-front-card-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 10px;
}

.ps-front-card-addr,
.ps-front-card-hours {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-front-card-cta {
  font-size: 13px;
  font-weight: 700;
  color: #e74c3c;
  text-align: right;
}

/* ── 空白提示 ── */
.ps-front-empty {
  text-align: center;
  padding: 60px 20px;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
}

.ps-front-empty-icon {
  font-size: 52px;
  margin-bottom: 12px;
}

.ps-front-empty h3 {
  font-size: 16px;
  color: #555;
  margin: 0 0 8px;
  font-family: "Noto Sans TC", "微軟正黑體", "Microsoft JhengHei", sans-serif;
}

.ps-front-empty p {
  font-size: 13px;
  color: #aaa;
  margin: 0;
}

.ps-front-empty a {
  color: #e74c3c;
  text-decoration: none;
}

/* ── 分頁 ── */
.ps-front-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.ps-page-btn {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 13px;
  color: #555;
  text-decoration: none;
  transition: all 0.18s;
  font-family: "Noto Sans TC", "微軟正黑體", "Microsoft JhengHei", sans-serif;
  background: #fff;
}

.ps-page-btn:hover {
  border-color: #e74c3c;
  color: #e74c3c;
  text-decoration: none;
}

.ps-page-current {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border-color: #c0392b;
  color: #fff;
  font-weight: 700;
}

.ps-page-current:hover {
  color: #fff;
}

/* ============================================================
   店家首頁
   ============================================================ */

/* ── 頂部 Header ── */
.ps-store-header {
  background: linear-gradient(135deg, #2c2c2c 0%, #3d3d3d 100%);
  padding: 0;
  margin-bottom: 24px;
  border-radius: 10px;
  overflow: hidden;
}

.ps-store-header-inner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 20px;
  flex-wrap: wrap;
}

.ps-store-logo {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-store-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ps-store-logo-placeholder {
  font-size: 36px;
}

.ps-store-header-info {
  flex: 1;
  min-width: 200px;
}

.ps-store-header-info h1 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  font-family: "Noto Sans TC", "微軟正黑體", "Microsoft JhengHei", sans-serif;
}

.ps-store-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}

.ps-store-meta-row span {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
}

.ps-store-cat-badge {
  background: rgba(231,76,60,0.85);
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
}

.ps-store-hours {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 6px;
}

.ps-store-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin: 6px 0 0;
  line-height: 1.6;
}

.ps-store-header-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.ps-back-btn {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.18s;
  font-family: "Noto Sans TC", "微軟正黑體", "Microsoft JhengHei", sans-serif;
  white-space: nowrap;
}

.ps-back-btn:hover {
  background: rgba(255,255,255,0.22);
  color: #fff;
  text-decoration: none;
}

.ps-qr-btn {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(231,76,60,0.35);
  transition: all 0.18s;
  font-family: "Noto Sans TC", "微軟正黑體", "Microsoft JhengHei", sans-serif;
  white-space: nowrap;
}

.ps-qr-btn:hover {
  background: linear-gradient(135deg, #c0392b, #a93226);
  text-decoration: none;
  color: #fff;
}

/* ── 菜單分類 Tab ── */
.ps-store-content {
  padding: 0 0 40px;
}

.ps-menu-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0f0f0;
}

.ps-menu-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 13px;
  color: #555;
  text-decoration: none;
  transition: all 0.18s;
  font-family: "Noto Sans TC", "微軟正黑體", "Microsoft JhengHei", sans-serif;
}

.ps-menu-tab:hover {
  border-color: #e74c3c;
  color: #e74c3c;
  text-decoration: none;
}

.ps-menu-tab-active {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border-color: #c0392b;
  color: #fff;
  font-weight: 700;
}

.ps-menu-tab-active:hover {
  color: #fff;
}

.ps-menu-tab small {
  font-size: 11px;
  opacity: 0.75;
}

/* ── 菜單分組 ── */
.ps-store-menu-group {
  margin-bottom: 30px;
}

.ps-store-menu-group-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f5f5f5;
  font-family: "Noto Sans TC", "微軟正黑體", "Microsoft JhengHei", sans-serif;
}

/* ── 品項卡片（前台版）── */
.ps-store-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

@media (max-width: 600px) {
  .ps-store-item-grid { grid-template-columns: repeat(2, 1fr); }
}

.ps-store-item-card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.2s;
}

.ps-store-item-card:hover {
  box-shadow: 0 6px 20px rgba(231,76,60,0.12);
  transform: translateY(-2px);
  border-color: #fadbd8;
}

.ps-store-item-img {
  width: 100%;
  height: 140px;
  background: #f8f8f8;
  overflow: hidden;
}

.ps-store-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.ps-store-item-card:hover .ps-store-item-img img {
  transform: scale(1.04);
}

.ps-store-item-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #ddd;
}

.ps-store-item-body {
  padding: 12px 14px;
}

.ps-store-item-name {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  margin-bottom: 4px;
  font-family: "Noto Sans TC", "微軒正黑體", "Microsoft JhengHei", sans-serif;
}

.ps-store-item-desc {
  font-size: 11px;
  color: #aaa;
  line-height: 1.5;
  margin-bottom: 8px;
}

.ps-store-item-price {
  font-size: 16px;
  font-weight: 700;
  color: #e74c3c;
  font-family: "Noto Sans TC", "微軒正黑體", "Microsoft JhengHei", sans-serif;
}
