/* ===== LUX MARKET - Main Styles ===== */

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: #f5f5f5;
  color: #111;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.app {
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
.header-top {
  font-size: 12px;
  color: #777;
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 8px 24px;
  border-bottom: 1px solid #eee;
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #eee;
}
.logo {
  font-weight: 800;
  letter-spacing: 0.1em;
  font-size: 20px;
}
.logo span {
  font-weight: 400;
  font-size: 12px;
  margin-left: 4px;
  color: #999;
}
.gnb {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
}
.gnb a.active {
  border-bottom: 2px solid #111;
  padding-bottom: 4px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #555;
}
.search-box {
  position: relative;
  text-decoration: none;
}
.search-box input {
  padding: 6px 28px 6px 10px;
  border-radius: 999px;
  border: 1px solid #ddd;
  font-size: 12px;
  min-width: 160px;
  background: #fafafa;
  cursor: pointer;
}
.search-box span {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #aaa;
}

.cart-icon {
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
}
.cart-icon:hover { transform: translateY(-1px); }

/* ===== CATEGORY BAR ===== */
.category-bar {
  padding: 12px 24px 8px;
  border-bottom: 1px solid #eee;
  overflow-x: auto;
  white-space: nowrap;
  background: #fff;
}
.category-list {
  display: inline-flex;
  gap: 24px;
  font-size: 13px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-list::-webkit-scrollbar {
  display: none;
}
.category-item {
  cursor: pointer;
  color: #666;
  padding-bottom: 6px;
  position: relative;
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 44px;
}
.category-item.active {
  color: #111;
  font-weight: 600;
}
.category-item.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #111;
}

/* ===== BANNER SLIDER ===== */
.banner-slider {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 85%;
  overflow: hidden;
  background: #f5f5f5;
}
.banner-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}
.banner-slide.active {
  opacity: 1;
  z-index: 1;
}
.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}
.banner-dot.active {
  background: #fff;
  width: 24px;
  border-radius: 5px;
}

/* ===== SUBCATEGORY BAR ===== */
.subcategory-bar {
  padding: 8px 24px 4px;
  border-bottom: 1px solid #eee;
  background: #fff;
  position: relative;
}
.subcategory-wrapper {
  overflow: hidden;
  position: relative;
}
.subcategory-container {
  display: flex;
  transition: transform 0.3s ease;
  touch-action: pan-y;
}
.subcategory-page {
  min-width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 16px 12px;
  padding: 8px 0;
}
.subcategory-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  color: #666;
}
.subcategory-item span.thumb {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  text-align: center;
  transition: all 0.2s ease;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 2px solid #f3f4f6;
}
.subcategory-item span.thumb img {
  width: 200%;
  height: 200%;
  object-fit: cover;
  border-radius: 50%;
  filter: grayscale(30%);
  opacity: 0.85;
}
.subcategory-item span.label {
  margin-top: 4px;
  white-space: nowrap;
  font-size: 11px;
}
.subcategory-item.active span.thumb {
  background: #111;
  color: #fff;
  border-color: #111;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.subcategory-item.active span.thumb img {
  filter: brightness(0) invert(1);
  opacity: 1;
}
.subcategory-item:hover span.thumb {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-color: #ddd;
}
.subcategory-item:hover span.thumb img {
  filter: none;
  opacity: 1;
}
.subcategory-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 4px;
}
.subcategory-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ddd;
  cursor: pointer;
  transition: all 0.2s ease;
}
.subcategory-dot.active {
  background: #111;
  width: 20px;
}

/* ===== MAIN ===== */
.main {
  padding: 16px 24px 24px;
  background: #f5f5f5;
  flex: 1;
}

.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
  color: #555;
}
.toolbar-left span {
  font-weight: 600;
}
.toolbar-right {
  display: flex;
  gap: 8px;
}
.toolbar-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
}
.toolbar-btn.active {
  border-color: #111;
  font-weight: 600;
}

/* ===== PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}
.product-img {
  background: #e5e5e5;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #777;
  overflow: hidden;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-body {
  padding: 8px 10px 10px;
  font-size: 12px;
}
.product-brand {
  color: #555;
  margin-bottom: 2px;
}
.product-name {
  color: #111;
  font-weight: 500;
  margin-bottom: 6px;
  min-height: 30px;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.product-price {
  font-weight: 700;
}
.product-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #555;
}

.product-actions {
  margin: 6px 10px 10px;
  display: flex;
  justify-content: flex-end;
}
.add-to-cart-btn {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  cursor: pointer;
}
.add-to-cart-btn:hover { opacity: 0.9; }

.product-link {
  text-decoration: none;
  color: inherit;
}

/* ===== FOOTER ===== */
.footer {
  background: #111;
  color: #999;
  padding: 48px 20px 32px;
  font-size: 13px;
  line-height: 1.8;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-top {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #333;
}
.footer-logo {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.footer-desc {
  color: #888;
  font-size: 14px;
}
.footer-content {
  display: flex;
  justify-content: center;
  gap: 80px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.footer-section h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-section li {
  margin-bottom: 8px;
  color: #888;
}
.footer-section .label {
  color: #666;
  margin-right: 8px;
}
.footer-section a {
  color: #c9a962;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-section a:hover {
  color: #e0c080;
}
.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid #333;
  color: #555;
  font-size: 12px;
}

/* ===== SCROLL TO TOP ===== */
.to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ===== RESPONSIVE - Mobile (320px ~ 767px) ===== */
@media (max-width: 767px) {
  .header-top {
    display: none;
  }

  .header-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
  }

  .logo {
    font-size: 18px;
  }

  .header-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .search-box {
    flex: 1;
  }

  .search-box input {
    font-size: 13px;
    padding: 10px 12px;
  }

  .gnb {
    gap: 12px;
    font-size: 13px;
  }

  .main {
    padding: 12px 16px 20px;
  }

  .banner-slider {
    padding-bottom: 85%;
  }

  .category-bar {
    padding: 10px 16px 6px;
  }

  .category-item {
    font-size: 13px;
    padding: 8px 14px;
  }

  .subcategory-bar {
    padding: 6px 16px 2px;
  }

  .subcategory-page {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px;
  }

  .subcategory-item {
    font-size: 11px;
  }

  .subcategory-item .thumb {
    font-size: 18px;
  }

  .product-grid {
    gap: 10px;
  }

  .product-card {
    border-radius: 8px;
  }

  .product-body {
    padding: 8px;
  }

  .product-brand {
    font-size: 11px;
  }

  .product-name {
    font-size: 12px;
    line-height: 1.3;
  }

  .product-price {
    font-size: 13px;
  }

  .product-tag {
    font-size: 10px;
    padding: 2px 5px;
  }

  .toolbar {
    padding: 10px 16px;
    gap: 8px;
  }

  .sort-btn {
    font-size: 12px;
    padding: 6px 12px;
  }

  .floating-top {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .footer-content {
    flex-direction: column;
    gap: 32px;
    align-items: center;
    text-align: center;
  }
  .footer-section {
    width: 100%;
  }
}

/* ===== RESPONSIVE - Tablet (768px ~ 1023px) ===== */
@media (min-width: 768px) {
  .header-main {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
  }

  .logo {
    font-size: 20px;
  }

  .search-box input {
    font-size: 14px;
  }

  .main {
    padding: 16px 24px 32px;
  }

  .category-bar {
    padding: 12px 24px 8px;
  }

  .subcategory-bar {
    padding: 8px 24px 4px;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  .product-body {
    padding: 10px;
  }

  .product-brand {
    font-size: 12px;
  }

  .product-name {
    font-size: 13px;
  }

  .product-price {
    font-size: 14px;
  }

  .product-tag {
    font-size: 11px;
  }
}

/* ===== RESPONSIVE - Desktop (1024px+) ===== */
@media (min-width: 1024px) {
  .header-main {
    padding: 20px 32px;
  }

  .logo {
    font-size: 22px;
  }

  .main {
    padding: 20px 32px 40px;
  }

  .category-bar {
    padding: 14px 32px 10px;
  }

  .subcategory-bar {
    padding: 10px 32px 6px;
  }

  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .product-body {
    padding: 12px;
  }

  .product-brand {
    font-size: 12px;
  }

  .product-name {
    font-size: 14px;
  }

  .product-price {
    font-size: 15px;
  }

  .product-tag {
    font-size: 11px;
  }

  .product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  }

  .category-item:hover {
    background: #f0f0f0;
  }

  .subcategory-item:hover {
    background: #f5f5f5;
  }
}
