/* ============================================
   FreshPro Foodmart - Design System
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=Inter:wght@400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --color-black: #000000;
  --color-dark: #222222;
  --color-gray-900: #2d2d2d;
  --color-gray-700: #555555;
  --color-gray-400: #999999;
  --color-gray-200: #e0e0e0;
  --color-gray-100: #f0f0f0;
  --color-white: #ffffff;
  --color-bg: #f5f5f5;
  --color-accent: #e67e22;
  --color-accent-dark: #d35400;
  --color-accent-light: #f39c12;
  --color-green: #27ae60;
  --color-red: #c0392b;

  --font-primary: 'Noto Sans SC', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Noto Sans SC', 'Inter', sans-serif;

  --max-width: 1100px;
  --border-width: 160px;
  --header-height: 80px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --transition: all 0.3s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-black);
  background-image: url('../images/bg.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  color: var(--color-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.3;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
  background-color: var(--color-black);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  height: 50px;
  width: auto;
}

.logo-text {
  color: var(--color-white);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 1px;
}

.logo-text .highlight {
  color: var(--color-accent);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-menu a {
  color: var(--color-white);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-menu a .zh {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
}

.nav-menu a .en {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.7;
}

.nav-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-accent);
}

.nav-menu a.active {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.nav-menu a.active .en {
  opacity: 1;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background-color: var(--color-white);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Orange accent line below header */
.header-accent {
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light), var(--color-accent));
}

/* ============================================
   PAGE LAYOUT WITH DECORATIVE BORDERS
   ============================================ */
.page-wrapper {
  flex: 1;
  display: flex;
  position: relative;
}

.border-left,
.border-right {
  width: var(--border-width);
  flex-shrink: 0;
  background: transparent;
  position: relative;
}

.main-content {
  flex: 1;
  min-width: 0;
  background-color: var(--color-bg);
}

/* ============================================
   SECTION STYLES
   ============================================ */
.section {
  padding: 48px 32px;
}

.section--white {
  background-color: var(--color-white);
}

.section--gray {
  background-color: var(--color-bg);
}

.section--dark {
  background-color: var(--color-gray-900);
  color: var(--color-white);
}

.section--gradient {
  background: linear-gradient(180deg, var(--color-white) 0%, var(--color-bg) 100%);
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h1,
.section-title h2 {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-dark);
}

.section-title .zh-title {
  font-size: 2rem;
  font-weight: 900;
}

.section-title .en-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-gray-700);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.section--dark .section-title h1,
.section--dark .section-title h2,
.section--dark .section-title .zh-title {
  color: var(--color-white);
}

.section--dark .section-title .en-title {
  color: var(--color-gray-400);
}

/* Accent underline on section titles */
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* ============================================
   CARD COMPONENTS
   ============================================ */
.cards-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.cards-grid>.card {
  flex: 0 0 calc(50% - 8px);
}

.card {
  width: 100%;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-header {
  padding: 16px 20px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-dark);
  border-bottom: 1px solid var(--color-gray-200);
  background: var(--color-gray-100);
}

.card-body {
  padding: 20px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-body a {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-body img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.card-body img:hover {
  opacity: 0.9;
  transform: scale(1.01);
}

/* ============================================
   STORE INFO CARDS
   ============================================ */
.store-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  justify-items: center;
}

.store-cards>*:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: calc(50% - 16px);
  width: 100%;
}

.store-card {
  text-align: center;
  padding: 32px 24px;
}

.store-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.store-card .store-name-zh {
  color: var(--color-dark);
}

.store-card .store-name-en {
  color: var(--color-gray-700);
  font-weight: 600;
}

.store-card .store-branch {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.store-card .divider {
  width: 40px;
  height: 2px;
  background: var(--color-gray-200);
  margin: 16px auto;
}

.store-card .store-details {
  font-size: 0.9rem;
  color: var(--color-gray-700);
  line-height: 1.8;
}

.store-card .store-details .tel {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-dark);
}

/* ============================================
   MAP SECTION
   ============================================ */
.maps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  justify-items: center;
}

.maps-grid>*:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: calc(50% - 16px);
  width: 100%;
}

.maps-grid--three {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.maps-grid--three>*:last-child:nth-child(odd) {
  grid-column: auto;
  max-width: 100%;
}

.map-container {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--color-white);
}

.map-container iframe {
  width: 100%;
  height: 280px;
  border: none;
}

.map-container .map-info {
  padding: 16px 20px;
  text-align: center;
}

.map-container .map-info h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.map-container .map-info p {
  font-size: 0.85rem;
  color: var(--color-gray-700);
  line-height: 1.6;
}

/* ============================================
   HERO BANNER (Join Us page)
   ============================================ */
.hero-banner {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-color: var(--color-dark);
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
}

.hero-banner .hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--color-white);
  padding: 40px 24px;
}

.hero-banner .hero-content h1 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-banner .hero-content p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* ============================================
   STORE INFO PAGE - Photo Gallery
   ============================================ */
.store-info-section {
  max-width: var(--max-width);
  margin: 0 auto;
}

.store-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.store-photos img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: var(--transition);
  aspect-ratio: 16/10;
  object-fit: cover;
}

.store-photos img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.store-photos img.full-width {
  grid-column: 1 / -1;
}

/* Store detail info */
.store-detail-block {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 32px;
  box-shadow: var(--shadow-card);
}

.store-detail-block h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--color-dark);
}

.store-detail-block .detail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-gray-100);
  font-size: 0.95rem;
}

.store-detail-block .detail-row:last-child {
  border-bottom: none;
}

.store-detail-block .detail-label {
  font-weight: 600;
  color: var(--color-gray-700);
  min-width: 100px;
  flex-shrink: 0;
}

.store-detail-block .detail-value {
  color: var(--color-dark);
}

/* ============================================
   JOIN US - Application Info
   ============================================ */
.join-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.join-cards>.join-card {
  flex: 0 0 calc(33.333% - 11px);
}

.join-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: var(--transition);
}

.join-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.join-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: 24px;
}

.join-card .join-method {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-gray-100);
}

.join-card .join-method:last-child {
  border-bottom: none;
}

.join-card .join-method .method-label {
  font-size: 0.8rem;
  color: var(--color-gray-400);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
  font-weight: 600;
}

.join-card .join-method .method-value {
  font-size: 0.95rem;
  color: var(--color-dark);
  font-weight: 500;
}

.join-card .join-method .method-value.phone {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-accent-dark);
}

/* ============================================
   CONTACT INFO SECTION
   ============================================ */
.contact-section {
  max-width: var(--max-width);
  margin: 0 auto;
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.contact-grid>.contact-block {
  flex: 0 0 calc(33.333% - 11px);
}

.contact-block {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.contact-block .map-wrapper {
  position: relative;
  overflow: hidden;
}

.contact-block iframe {
  width: 100%;
  height: 260px;
  border: none;
  display: block;
}

.contact-block .contact-info {
  padding: 24px;
}

.contact-block .contact-info h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-accent);
}

.contact-block .info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.9rem;
}

.contact-block .info-row .info-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.contact-block .info-row .info-text {
  color: var(--color-gray-700);
  line-height: 1.5;
}

.contact-block .info-row .info-text strong {
  color: var(--color-dark);
  font-weight: 600;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background-color: var(--color-black);
  padding: 20px 24px;
  text-align: center;
  border-top: 3px solid var(--color-accent);
}

.site-footer p {
  color: var(--color-gray-400);
  font-size: 0.85rem;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 40px;
  cursor: pointer;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: var(--radius-md);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: var(--color-white);
  font-size: 2rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  :root {
    --border-width: 100px;
  }
}

@media (max-width: 1024px) {

  .border-left,
  .border-right {
    display: none;
  }

  .header-inner {
    padding: 0 16px;
  }

  .section {
    padding: 36px 24px;
  }
}

@media (max-width: 768px) {

  /* Mobile Navigation */
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-black);
    flex-direction: column;
    padding: 100px 24px 40px;
    gap: 8px;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu a {
    font-size: 1rem;
    padding: 12px 16px;
    text-align: left;
    border-radius: var(--radius-sm);
  }

  .nav-menu a .zh {
    font-size: 1rem;
  }

  .nav-menu a .en {
    font-size: 0.8rem;
  }

  /* Overlay */
  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .nav-overlay.active {
    display: block;
  }

  /* Grids (CSS Grid) */
  .store-cards,
  .maps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .store-photos {
    grid-template-columns: 1fr;
  }

  /* Grids (Flexbox) */
  .cards-grid,
  .join-cards,
  .contact-grid {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  .cards-grid>.card,
  .join-cards>.join-card,
  .contact-grid>.contact-block {
    flex: 0 0 100%;
    width: 100%;
  }

  /* Reset max-width for odd children */
  .store-cards>*:last-child:nth-child(odd),
  .maps-grid>*:last-child:nth-child(odd) {
    max-width: 100%;
  }

  /* Typography */
  .section-title .zh-title {
    font-size: 1.5rem;
  }

  .section-title .en-title {
    font-size: 1rem;
    letter-spacing: 2px;
  }

  .hero-banner .hero-content h1 {
    font-size: 1.8rem;
  }

  .section {
    padding: 32px 16px;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* Staggered animation delays */
.animate-delay-1 {
  animation-delay: 0.1s;
}

.animate-delay-2 {
  animation-delay: 0.2s;
}

.animate-delay-3 {
  animation-delay: 0.3s;
}

.animate-delay-4 {
  animation-delay: 0.4s;
}

/* Placeholder for images before user provides them */
.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-gray-200), var(--color-gray-100));
  color: var(--color-gray-400);
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 200px;
  border-radius: var(--radius-sm);
}