/* ==========================================================================
   Gmarket Native Mobile App Fullscreen Simulation Stylesheet
   100% Authentic Korean Shopping App Interface
   ========================================================================== */

:root {
  --gm-green: #00b050;
  --gm-green-dark: #00873d;
  --gm-green-light: #e8f7ee;
  --gm-red: #f03e3e;
  --gm-blue: #0070c0;
  --gm-bg: #f5f6f8;
  --gm-card-bg: #ffffff;
  --gm-text: #191f28;
  --gm-sub: #4e5968;
  --gm-muted: #8b95a1;
  --gm-border: #e5e8eb;
  --font-kr: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --bottom-nav-height: 56px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: #24292e;
  font-family: var(--font-kr);
  color: var(--gm-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Outer Shell: Centered Phone Simulator on PC, 100% Fullscreen on Mobile */
.app-screen-shell {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  margin: 0 auto;
  background-color: var(--gm-bg);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.35);
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 12px));
}

/* ==========================================================================
   Status Bar (Simulated iPhone / Android Status Bar)
   ========================================================================== */
.sim-status-bar {
  height: 38px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.status-left {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.battery-icon {
  width: 22px;
  height: 11px;
  border: 1.5px solid #111827;
  border-radius: 3px;
  padding: 1px;
  position: relative;
}

.battery-icon::after {
  content: "";
  position: absolute;
  right: -3.5px;
  top: 2px;
  width: 2px;
  height: 4px;
  background: #111827;
  border-radius: 0 1px 1px 0;
}

.battery-level {
  width: 85%;
  height: 100%;
  background: #111827;
  border-radius: 1px;
}

/* ==========================================================================
   Gmarket App Main Header (Search & Actions)
   ========================================================================== */
.app-main-header {
  background: #ffffff;
  padding: 8px 14px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 38px;
  z-index: 999;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.header-brand-logo {
  height: 24px;
  width: auto;
  flex-shrink: 0;
}

.header-search-bar {
  flex: 1;
  height: 38px;
  background: #f2f4f6;
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s;
}

.header-search-bar:active {
  border-color: var(--gm-green);
  background: #ffffff;
}

.search-icon-svg {
  width: 17px;
  height: 17px;
  fill: var(--gm-green);
  flex-shrink: 0;
}

.search-placeholder-rotator {
  font-size: 13px;
  color: #4e5968;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.camera-search-icon {
  width: 18px;
  height: 18px;
  color: #8b95a1;
  flex-shrink: 0;
}

.header-action-icons {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 2px;
}

.action-icon-btn {
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333d4b;
}

.badge-counter {
  position: absolute;
  top: -4px;
  right: -5px;
  background: var(--gm-red);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 10px;
  min-width: 15px;
  text-align: center;
}

/* ==========================================================================
   Top Category Navigation Tabs
   ========================================================================== */
.app-tabs-scroll {
  background: #ffffff;
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-bottom: 1px solid #edf0f2;
}

.app-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.app-tab-item {
  padding: 11px 12px 10px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7684;
  text-decoration: none;
  position: relative;
  flex-shrink: 0;
}

.app-tab-item.is-active {
  color: var(--gm-green-dark);
  font-weight: 800;
}

.app-tab-item.is-active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 3px;
  background: var(--gm-green);
  border-radius: 3px 3px 0 0;
}

/* ==========================================================================
   Hero Visual Banner
   ========================================================================== */
.app-hero-slider {
  position: relative;
  background: #ffffff;
  overflow: hidden;
}

.hero-slider-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.slider-floating-pill {
  position: absolute;
  bottom: 12px;
  right: 14px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 1px;
}

/* ==========================================================================
   10-Grid Main Category Navigation
   ========================================================================== */
.quick-categories-grid {
  background: #ffffff;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px 6px;
  padding: 16px 10px 18px;
  border-bottom: 8px solid var(--gm-bg);
}

.grid-category-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s;
}

.grid-category-btn:active {
  transform: scale(0.92);
}

.grid-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 6px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.grid-label-kr {
  font-size: 11px;
  font-weight: 600;
  color: #333d4b;
  letter-spacing: -0.3px;
}

/* ==========================================================================
   Super Deal (슈퍼딜) Section with Live Timer
   ========================================================================== */
.section-super-deal {
  background: #ffffff;
  padding: 18px 14px 20px;
  border-bottom: 8px solid var(--gm-bg);
}

.deal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.deal-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.deal-badge-red {
  background: var(--gm-red);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}

.deal-title-text {
  font-size: 17px;
  font-weight: 900;
  color: #111827;
  letter-spacing: -0.4px;
}

.deal-timer-box {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #4e5968;
}

.timer-digit {
  background: #191f28;
  color: #ffffff;
  padding: 2px 4px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

/* Horizontal Scroll Deals */
.deal-items-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.deal-items-scroll::-webkit-scrollbar {
  display: none;
}

.deal-product-card {
  width: 140px;
  flex-shrink: 0;
  cursor: pointer;
}

.deal-img-box {
  width: 140px;
  height: 140px;
  background: #f8fafc;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 54px;
  position: relative;
  overflow: hidden;
  border: 1px solid #edf0f2;
}

.deal-rank-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.deal-discount-tag {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: var(--gm-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.deal-info-box {
  padding-top: 8px;
}

.deal-prod-brand {
  font-size: 11px;
  color: #8b95a1;
  font-weight: 600;
}

.deal-prod-name {
  font-size: 13px;
  font-weight: 700;
  color: #191f28;
  margin-top: 2px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deal-price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 4px;
}

.deal-rate {
  font-size: 15px;
  font-weight: 900;
  color: var(--gm-red);
}

.deal-final-price {
  font-size: 15px;
  font-weight: 900;
  color: #191f28;
}

.deal-won {
  font-size: 12px;
  font-weight: 700;
}

.deal-free-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--gm-blue);
  background: #e8f3fc;
  padding: 1px 5px;
  border-radius: 3px;
  margin-top: 3px;
}

/* ==========================================================================
   Smile Delivery Banner (스마일배송)
   ========================================================================== */
.smile-delivery-strip {
  background: linear-gradient(90deg, #0070c0 0%, #0099ff 100%);
  color: #ffffff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.smile-strip-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.smile-strip-title {
  font-size: 13px;
  font-weight: 800;
}

.smile-strip-sub {
  font-size: 11px;
  opacity: 0.9;
}

.smile-strip-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-decoration: none;
}

/* ==========================================================================
   2-Column Recommendation Product Feed
   ========================================================================== */
.section-feed-grid {
  background: #ffffff;
  padding: 16px 14px 24px;
}

.feed-header {
  font-size: 16px;
  font-weight: 900;
  color: #111827;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feed-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
}

.grid-product-card {
  cursor: pointer;
}

.grid-product-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  position: relative;
  border: 1px solid #edf0f2;
}

.grid-prod-title {
  font-size: 13px;
  font-weight: 600;
  color: #333d4b;
  margin-top: 8px;
  line-height: 1.35;
  height: 35px;
  overflow: hidden;
}

.grid-price-block {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 4px;
}

.grid-discount {
  font-size: 15px;
  font-weight: 900;
  color: var(--gm-red);
}

.grid-price {
  font-size: 15px;
  font-weight: 900;
  color: #191f28;
}

.grid-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #8b95a1;
  margin-top: 4px;
}

/* ==========================================================================
   Bottom Native 5-Tab Bar (홈, 카테고리, 혜택, 찜, 마이)
   ========================================================================== */
.native-bottom-tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #e5e8eb;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding-top: 6px;
  z-index: 1000;
}

.bottom-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #8b95a1;
  flex: 1;
  cursor: pointer;
}

.bottom-tab-item.is-active {
  color: var(--gm-green);
}

.bottom-tab-icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 3px;
}

.bottom-tab-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

/* Top Back to Landing Pill */
.back-to-landing-pill {
  position: fixed;
  top: 48px;
  right: 14px;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
