/* 門市頁面佈局樣式 */

.store-locator-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.store-content-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* PC版並排佈局 */
@media (min-width: 1024px) {
  .store-locator-container {
    max-width: 100%;
    padding: 20px 40px;
  }

  .store-content-layout {
    flex-direction: row;
    align-items: stretch;
    height: calc(100vh - 220px);
    min-height: 650px;
  }

  .store-side-panel {
    flex: 0 0 420px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
    background: #f9fafb;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
  }

  .store-list-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-right: 8px;
  }

  /* 客製化捲動條 */
  .store-list-container::-webkit-scrollbar {
    width: 6px;
  }
  .store-list-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
  }

  .store-main-map {
    flex: 1;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }

  .store-map-section,
  .store-map-wrapper {
    height: 100% !important;
  }

  #store-map-frame {
    height: 100%;
    width: 100%;
    border: 0;
  }
}

/* 篩選列樣式 */
.store-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}

.filter-chip {
  padding: 6px 14px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 999px;
  color: #4b5563;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-chip:hover {
  border-color: #DF7621;
  color: #DF7621;
}

.filter-chip.active {
  background: #DF7621;
  border-color: #DF7621;
  color: #fff;
}

/* 門市卡片樣式 */
.store-card {
  background: #fff;
  border-radius: 15px;
  padding: 15px;
  border: 1.5px solid #f3e2d3;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  margin-bottom: 5px;
}

/* 手機版店名 Chips 樣式 */
.store-nav-chips-wrapper {
  position: relative;
  margin: 0 -20px;
  padding: 0 10px;
}

/* 漸層遮罩提示左右還有內容 - 改為更細緻的陰影效果 */
.store-nav-chips-wrapper::before,
.store-nav-chips-wrapper::after {
  content: '';
  position: absolute;
  top: 5px;
  bottom: 20px;
  width: 40px;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.3s;
}

.store-nav-chips-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #f9fafb 10%, transparent);
}

.store-nav-chips-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #f9fafb 10%, transparent);
}

.store-nav-chips-mobile {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 5px 20px 20px;
  scrollbar-width: thin;
  scrollbar-color: #DF7621 transparent;
  -webkit-overflow-scrolling: touch;
  /* 確保至少有一個項目被切掉，達成 Cut-off 效果 */
  scroll-snap-type: x proximity;
}

/* 客製化水平捲動條（iOS 外的手機瀏覽器可見） */
.store-nav-chips-mobile::-webkit-scrollbar {
  height: 3px;
  display: block;
}

.store-nav-chips-mobile::-webkit-scrollbar-thumb {
  background: rgba(223, 118, 33, 0.3);
  border-radius: 10px;
}

.nav-chip {
  padding: 8px 20px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 999px;
  color: #4b5563;
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  scroll-snap-align: start;
  flex: 0 0 auto;
}

.store-nav-chips-mobile::-webkit-scrollbar {
  display: none;
}

.nav-chip {
  padding: 6px 16px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 999px;
  color: #4b5563;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.nav-chip.active {
  background: #DF7621;
  border-color: #DF7621;
  color: #fff;
  box-shadow: 0 4px 12px rgba(223, 118, 33, 0.4);
  transform: scale(1.05);
}

.active-store-detail {
  margin-top: 5px;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 標籤樣式 */
.badge-grooming {
  background: #fff3e9;
  color: #DF7621;
  font-size: 0.65em;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #f3e2d3;
  margin-left: 5px;
}

.card-hours-details {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e5e7eb;
}

.card-hours-details summary {
  font-size: 0.85em;
  color: #DF7621;
  cursor: pointer;
  font-weight: 600;
}

.card-hours-list {
  list-style: none;
  padding: 10px 0 0;
  margin: 0;
  font-size: 0.85em;
  color: #6b7280;
}

.card-hours-list li {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  border-bottom: 1px solid #f9fafb;
}

.store-hours-day {
  font-weight: 600;
}

/* 特別營業時間樣式 */
.special-hours-divider {
  font-size: 0.9em;
  letter-spacing: 1px;
}

.special-hours-item {
  background: #fff8f1;
  margin: 2px -5px;
  padding: 4px 5px !important;
  border-radius: 4px;
}

.special-hours-item .store-hours-day {
  color: #c2410c;
}

.special-hours-item .store-hours-slot {
  font-weight: 700;
}

/* 手機版微調 */
@media (max-width: 1023px) {
  .store-locator-container {
    padding: 10px;
  }

  .store-filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 10px;
    margin: 0 -10px;
    padding-left: 10px;
    scrollbar-width: none;
  }
  .store-filter-bar::-webkit-scrollbar { display: none; }

  .store-map-wrapper {
    height: 400px; /* 增加手機版地圖高度 */
    border-radius: 15px;
    overflow: hidden;
  }

  #store-map-frame {
    width: 100%;
    height: 100%;
    border: 0;
  }

  .store-side-panel {
    padding: 0;
    background: transparent;
    border: none;
  }
}

.status-open { color: #16a34a; }
.status-closed { color: #6b7280; }

.store-list-loading, .store-list-empty {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}
