/* Figma Design System - Premium Group Buy */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&family=Roboto:wght@400;500;700&display=swap');

:root {
  /* Color Tokens */
  --primary-color: #D92027;
  --primary-hover: #B81820;
  --secondary-color: #F5F5F5;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --white: #FFFFFF;
  --black: #000000;
  
  /* Category Colors */
  --orange-light: #FEF3E8;
  --orange-dark: #D97706;
  --pink-light: #FDF2F8;
  --pink-dark: #BE185D;
  --blue-light: #EFF6FF;
  --blue-dark: #1E40AF;
  
  /* Badge Colors */
  --gold: #FFD700;
  --gray-border: #E2E8F0;
  --gray-bg: #F8FAFC;
  
  /* Spacing Scale */
  --spacing-xs: 0.25rem;  /* 4px */
  --spacing-sm: 0.5rem;   /* 8px */
  --spacing-md: 1rem;     /* 16px */
  --spacing-lg: 1.5rem;   /* 24px */
  --spacing-xl: 2rem;     /* 32px */
  --spacing-2xl: 3rem;    /* 48px */
  
  /* Border Radius */
  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Global Resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--text-primary);
  background-color: var(--white);
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
}

h1 { font-size: 3rem; }      /* 48px */
h2 { font-size: 1.875rem; }  /* 30px */
h3 { font-size: 1.5rem; }    /* 24px */
h4 { font-size: 1.25rem; }   /* 20px */

/* Header Styles */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--white);
  border-bottom: 1px solid var(--gray-border);
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-logo {
  flex-shrink: 0;
}

.header-logo h1 {
  font-size: 1.5rem;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
}

.header-search {
  flex: 1;
  max-width: 36rem;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg);
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
}

.header-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-btn {
  padding: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  transition: background-color 0.2s;
  position: relative;
}

.header-btn:hover {
  background-color: var(--secondary-color);
}

.header-btn-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: var(--radius-full);
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
}

/* Announcement Bar */
.announcement-bar {
  background: linear-gradient(to right, #D92027, #FF4655);
  color: var(--white);
  padding: 0.75rem 1rem;
  text-align: center;
  font-family: 'Noto Sans KR', sans-serif;
  position: sticky;
  top: 73px;
  z-index: 40;
}

.announcement-bar a {
  color: var(--white);
  text-decoration: underline;
  margin-left: 0.5rem;
}

.announcement-bar a:hover {
  text-decoration: none;
}

/* Hero Banner */
.hero-banner {
  background: linear-gradient(to bottom right, #FFF5F5, #FFFFFF);
  overflow: hidden;
}

.hero-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-badge {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-family: 'Noto Sans KR', sans-serif;
  width: fit-content;
}

.hero-title {
  font-size: 2rem;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3rem;
  }
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-family: 'Roboto', sans-serif;
}

.hero-countdown {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--white);
  padding: 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-border);
}

.hero-countdown-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-family: 'Roboto', sans-serif;
  margin-bottom: 0.25rem;
}

.hero-countdown-timer {
  display: flex;
  gap: 0.5rem;
}

.hero-countdown-unit {
  text-align: center;
}

.hero-countdown-value {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
}

.hero-countdown-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.hero-countdown-separator {
  font-size: 1.5rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
}

.hero-social-proof {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--text-secondary);
  font-family: 'Roboto', sans-serif;
}

.hero-social-proof strong {
  color: var(--primary-color);
}

.hero-cta {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s;
  font-size: 1.125rem;
}

.hero-cta:hover {
  background-color: var(--primary-hover);
  transform: scale(1.05);
}

.hero-image-wrapper {
  position: relative;
}

.hero-image {
  aspect-ratio: 1;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-discount-badge {
  position: absolute;
  top: -1rem;
  right: -1rem;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xl);
  transform: rotate(12deg);
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
}

/* Current Deals Section */
.deals-section {
  padding: 3rem 0;
  background-color: var(--white);
}

.deals-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.deals-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.deals-title {
  font-size: 1.875rem;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
}

.deals-view-all {
  color: var(--primary-color);
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
  transition: text-decoration 0.2s;
}

.deals-view-all:hover {
  text-decoration: underline;
}

.deals-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .deals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .deals-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Deal Card */
.deal-card {
  background-color: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
}

.deal-card:hover {
  box-shadow: var(--shadow-xl);
}

.deal-card-image-wrapper {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.deal-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.deal-card:hover .deal-card-image {
  transform: scale(1.1);
}

.deal-card-badge-top-left {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
}

.deal-card-badge-top-right {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
}

.deal-card-badge-bottom-left {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 10;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-family: 'Roboto', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-category-food {
  background-color: var(--orange-light);
  color: var(--orange-dark);
}

.badge-category-beauty {
  background-color: var(--pink-light);
  color: var(--pink-dark);
}

.badge-category-tech {
  background-color: var(--blue-light);
  color: var(--blue-dark);
}

.badge-urgent {
  background-color: var(--primary-color);
  color: var(--white);
  font-family: 'Noto Sans KR', sans-serif;
}

.badge-bestseller {
  background-color: var(--gold);
  color: var(--text-primary);
  font-family: 'Noto Sans KR', sans-serif;
}

.badge-discount {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
}

.deal-card-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.deal-card-title {
  font-size: 1.125rem;
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 3.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deal-card-prices {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.deal-card-original-price {
  color: var(--text-muted);
  text-decoration: line-through;
  font-family: 'Roboto', sans-serif;
}

.deal-card-price {
  font-size: 1.5rem;
  color: var(--primary-color);
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
}

.deal-card-purchase-count {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-family: 'Roboto', sans-serif;
}

/* Footer */
.footer {
  background-color: var(--text-primary);
  color: var(--white);
  padding: 3rem 0;
}

.footer-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-brand h3 {
  font-size: 1.25rem;
  color: var(--primary-color);
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: #9CA3AF;
  font-family: 'Roboto', sans-serif;
  margin-bottom: 1rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: #9CA3AF;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--white);
}

.footer-section h4 {
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 500;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: #9CA3AF;
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid #4B5563;
  padding-top: 2rem;
  text-align: center;
  color: #9CA3AF;
  font-family: 'Roboto', sans-serif;
}

/* Utility Classes */
.container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* Icons */
.icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-block;
}

.icon-lg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Responsive Utilities */
@media (max-width: 767px) {
  .mobile-hidden {
    display: none;
  }
}

@media (min-width: 768px) {
  .desktop-hidden {
    display: none;
  }
}
