/* 일본 전통 장인 쇼핑몰 스타일 */

/* 일본 전통 색상 팔레트 */
:root {
  --sumi-black: #1a1a1a;          /* 먹색 */
  --washi-white: #fefefe;          /* 화지 흰색 */
  --urushi-red: #cc2936;           /* 옻칠 빨강 */
  --indigo-blue: #003f5c;          /* 쪽빛 남색 */
  --bamboo-green: #68a357;         /* 대나무 녹색 */
  --gold-accent: #d4af37;          /* 금박 액센트 */
  --warm-beige: #f5f2e8;           /* 따뜻한 베이지 */
  --clay-brown: #8b4513;           /* 점토 갈색 */
  --soft-gray: #e8e8e8;           /* 부드러운 회색 */
  --charcoal: #36454f;             /* 숯색 */
}

/* 기본 폰트 설정 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;500;600;700&family=Noto+Sans+KR:wght@300;400;500;600;700&display=swap');

body {
  font-family: 'Noto Sans KR', 'Noto Serif JP', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  line-height: 1.7;
  color: var(--sumi-black);
  background-color: var(--washi-white);
}

.jp-font {
  font-family: 'Noto Serif JP', serif;
}

/* 헤더 스타일 */
.header-gradient {
  background: linear-gradient(135deg, var(--indigo-blue) 0%, var(--charcoal) 100%);
}

.logo-text {
  font-family: 'Noto Serif JP', serif;
  font-weight: 600;
  color: var(--washi-white);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 네비게이션 */
.nav-link {
  position: relative;
  transition: all 0.3s ease;
  color: var(--washi-white);
}

.nav-link:hover {
  color: var(--gold-accent);
  transform: translateY(-1px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* 히어로 섹션 */
.hero-section {
  background: linear-gradient(rgba(0,63,92,0.7), rgba(54,69,79,0.7)), 
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 300"><path fill="%23f5f2e8" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1008,160,1032,176L1056,192L1056,320L1032,320C1008,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"/></svg>') center/cover;
  color: var(--washi-white);
  min-height: 70vh;
}

.hero-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 3.5rem;
  font-weight: 300;
  text-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-weight: 300;
  opacity: 0.95;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 버튼 스타일 */
.btn-primary {
  background: linear-gradient(135deg, var(--urushi-red) 0%, #a91e2a 100%);
  border: none;
  padding: 12px 32px;
  border-radius: 0;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(204,41,54,0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #a91e2a 0%, var(--urushi-red) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(204,41,54,0.4);
}

.btn-outline {
  border: 2px solid var(--urushi-red);
  color: var(--urushi-red);
  background: transparent;
  padding: 10px 30px;
  border-radius: 0;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: var(--urushi-red);
  color: var(--washi-white);
  transform: translateY(-1px);
}

/* 카드 스타일 */
.product-card {
  background: var(--washi-white);
  border: none;
  border-radius: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.artisan-card {
  background: var(--warm-beige);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 0;
  padding: 2rem;
  transition: all 0.3s ease;
}

.artisan-card:hover {
  background: var(--washi-white);
  border-color: var(--gold-accent);
  transform: translateY(-4px);
}

/* 섹션 제목 */
.section-title {
  font-family: 'Noto Serif JP', serif;
  font-weight: 400;
  color: var(--sumi-black);
  position: relative;
  margin-bottom: 3rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--urushi-red), var(--gold-accent));
}

/* 카테고리 탭 */
.category-tab {
  background: var(--soft-gray);
  border: none;
  color: var(--charcoal);
  padding: 12px 24px;
  margin: 0 5px 10px 0;
  border-radius: 0;
  font-weight: 400;
  transition: all 0.3s ease;
}

.category-tab:hover,
.category-tab.active {
  background: var(--urushi-red);
  color: var(--washi-white);
}

/* 가격 표시 */
.price-display {
  color: var(--urushi-red);
  font-weight: 600;
  font-size: 1.2rem;
}

.price-krw {
  color: var(--bamboo-green);
  font-size: 0.9rem;
  opacity: 0.8;
}

/* 특별 뱃지 */
.featured-badge {
  background: linear-gradient(45deg, var(--gold-accent), #f4d03f);
  color: var(--sumi-black);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.handmade-badge {
  background: var(--bamboo-green);
  color: var(--washi-white);
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.75rem;
}

/* 푸터 */
.footer {
  background: linear-gradient(135deg, var(--sumi-black) 0%, var(--charcoal) 100%);
  color: var(--washi-white);
}

.footer-link {
  color: var(--soft-gray);
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--gold-accent);
}

/* 일본 전통 패턴 장식 */
.traditional-pattern {
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 20%, rgba(104, 163, 87, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 30% 80%, rgba(204, 41, 54, 0.05) 0%, transparent 50%);
}

/* 애니메이션 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .product-card {
    margin-bottom: 2rem;
  }
}

/* 로딩 스피너 */
.loading-spinner {
  border: 3px solid var(--soft-gray);
  border-top: 3px solid var(--urushi-red);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 스크롤바 커스터마이징 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--soft-gray);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--urushi-red), var(--gold-accent));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(var(--gold-accent), var(--urushi-red));
}

/* 장바구니 및 결제 스타일 */
.cart-icon {
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cart-icon:hover {
  color: var(--gold-accent);
  transform: scale(1.1);
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--urushi-red);
  color: var(--washi-white);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 20px;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--washi-white);
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  z-index: 1000;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.cart-sidebar.open {
  right: 0;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cart-overlay.show {
  opacity: 1;
  visibility: visible;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--soft-gray);
  transition: background-color 0.3s ease;
}

.cart-item:hover {
  background-color: var(--warm-beige);
}

.cart-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 1rem;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  color: var(--sumi-black);
  margin-bottom: 0.25rem;
}

.cart-item-price {
  color: var(--urushi-red);
  font-weight: 500;
}

.quantity-controls {
  display: flex;
  align-items: center;
  margin: 0.5rem 0;
}

.quantity-btn {
  background: var(--soft-gray);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quantity-btn:hover {
  background: var(--urushi-red);
  color: var(--washi-white);
}

.quantity-input {
  width: 50px;
  text-align: center;
  border: 1px solid var(--soft-gray);
  margin: 0 0.5rem;
  padding: 0.25rem;
  border-radius: 4px;
}

.remove-item-btn {
  background: none;
  border: none;
  color: var(--charcoal);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.remove-item-btn:hover {
  color: var(--urushi-red);
}

.checkout-form {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.form-section {
  background: var(--washi-white);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.form-section h3 {
  color: var(--sumi-black);
  margin-bottom: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.form-section h3 i {
  margin-right: 0.5rem;
  color: var(--urushi-red);
}

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

.form-grid.single {
  grid-template-columns: 1fr;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--charcoal);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--soft-gray);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--urushi-red);
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.payment-method {
  border: 2px solid var(--soft-gray);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--washi-white);
}

.payment-method:hover {
  border-color: var(--urushi-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(204,41,54,0.2);
}

.payment-method.selected {
  border-color: var(--urushi-red);
  background: linear-gradient(135deg, rgba(204,41,54,0.1), rgba(212,175,55,0.1));
}

.payment-method img {
  width: 60px;
  height: auto;
  margin-bottom: 0.5rem;
}

.payment-method span {
  display: block;
  font-weight: 500;
  color: var(--sumi-black);
}

.order-summary {
  background: var(--warm-beige);
  border-radius: 8px;
  padding: 2rem;
  position: sticky;
  top: 2rem;
}

.order-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0;
}

.order-line.total {
  border-top: 2px solid var(--urushi-red);
  margin-top: 1rem;
  padding-top: 1rem;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--urushi-red);
}

.place-order-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--urushi-red), var(--gold-accent));
  color: var(--washi-white);
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.place-order-btn:hover {
  background: linear-gradient(135deg, var(--gold-accent), var(--urushi-red));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(204,41,54,0.3);
}

.place-order-btn:disabled {
  background: var(--soft-gray);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 결제 프로세싱 상태 */
.processing-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(26,26,26,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.processing-overlay.show {
  opacity: 1;
  visibility: visible;
}

.processing-content {
  background: var(--washi-white);
  padding: 3rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.processing-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--soft-gray);
  border-top: 4px solid var(--urushi-red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .cart-sidebar {
    width: 100vw;
    right: -100vw;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .payment-methods {
    grid-template-columns: 1fr;
  }
  
  .checkout-form {
    padding: 1rem;
  }
}