:root {
  --primary-green: #5eb665;
  --dark-green: #3d8f43;
  --bg-white: #ffffff;
  --bg-gray: #f5f7f5;
  --text-dark: #1e1e1e;
  --text-gray: #7a7a7a;
  --accent-orange: #f27a54;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #e8ecef;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

/* Device Simulator */
.device-frame {
  width: 390px;
  height: 844px;
  background-color: #000;
  border-radius: 50px;
  padding: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2), inset 0 0 0 2px #444;
  position: relative;
}

.device-frame::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 30px;
  background: #000;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  z-index: 100;
}

.device-screen {
  width: 100%;
  height: 100%;
  background-color: var(--bg-gray);
  border-radius: 38px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Screen Management */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: opacity 0.3s ease, transform 0.3s ease;
  background-color: var(--bg-gray);
  z-index: 10;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 90px;
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  z-index: 1;
}

/* Common UI Elements */
.header-green {
  background-color: var(--primary-green);
  color: white;
  padding: 50px 24px 24px;
  border-bottom-left-radius: 32px;
  border-bottom-right-radius: 32px;
  position: relative;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.icon-btn-transparent {
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

.icon-btn-transparent.dark {
  color: var(--text-dark);
}

.search-bar {
  background: white;
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-gray);
  box-shadow: var(--shadow-sm);
  margin-top: 16px;
}

.search-bar input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 14px;
  font-family: 'Outfit';
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 12px;
}
.section-title h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
}
.section-title a {
  font-size: 14px;
  color: var(--text-gray);
  text-decoration: none;
  display: flex;
  align-items: center;
}

/* Horizontal Scroll Containers */
.h-scroll {
  display: flex;
  overflow-x: auto;
  padding: 0 24px 16px;
  gap: 16px;
  -webkit-overflow-scrolling: touch;
}
/* Show subtle scrollbar for desktop usability */
.h-scroll::-webkit-scrollbar {
  height: 4px;
}
.h-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.h-scroll::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
}

/* Product Card */
.product-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 12px;
  min-width: 140px;
  box-shadow: var(--shadow-sm);
  position: relative;
  flex-shrink: 0;
}
.product-card img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  margin-bottom: 8px;
}
.product-card .rating {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.9);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #f5a623;
}
.product-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-orange);
}

/* Article Card */
.article-card {
  display: flex;
  gap: 12px;
  background: white;
  padding: 12px;
  border-radius: var(--radius-md);
  margin: 0; /* Reset margin so it works in slider */
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.article-card img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.article-info {
  flex: 1;
}
.article-tag {
  font-size: 10px;
  color: var(--text-gray);
  margin-bottom: 4px;
}
.article-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.3;
}
.article-meta {
  font-size: 12px;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Bottom Nav with FAB */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: white;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top-left-radius: 32px;
  border-top-right-radius: 32px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
  z-index: 50;
  padding-bottom: 12px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.bottom-nav.hidden {
  transform: translateY(150px);
  opacity: 0;
  pointer-events: none;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-gray);
  cursor: pointer;
  flex: 1;
}
.nav-item.active {
  color: var(--primary-green);
}
.nav-item span:last-child {
  font-size: 12px;
  font-weight: 500;
}
.nav-fab-container {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
}
.nav-fab {
  width: 60px;
  height: 60px;
  background: var(--accent-orange);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  border: none;
  box-shadow: 0 8px 16px rgba(242, 122, 84, 0.4);
  position: absolute;
  bottom: 35px;
  cursor: pointer;
  transition: transform 0.2s;
}
.nav-fab:active {
  transform: scale(0.95);
}

