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

/* === Base Styles === */
html {
  font-size: 16px;
}

body,
html,
#root,
.app {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans KR', 'Noto Sans', sans-serif;
  background-color: black;
  color: white;
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app {
  max-width: 100vw;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === Footer === */
.footer {
  width: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 3vw;
  border-top: 1px solid #222;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.footer-logo {
  width: 230px;
  height: 18px;
  margin-right: 1.2rem;
}

.footer-copyright {
  color: #545454;
  font: 400 15px 'Noto Sans KR', 'Noto Sans', sans-serif;
  letter-spacing: 0.01em;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.social-icons {
  display: flex;
  gap: 0.7rem;
  margin-right: 56px;
}

.icon-box img {
  width: 44px;
  height: 44px;
}

.go-top-btn {
  width: 2.75rem;
  height: 2.75rem;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 9999;
  transition: opacity 0.3s;
}

.go-top-btn img {
  width: 2.75rem;
  height: 2.75rem;
}

/* Hide Go to Top button when menu is open */
.menu-overlay.active ~ header ~ main ~ .go-top-btn,
body:has(.menu-overlay.active) .go-top-btn {
  opacity: 0;
  pointer-events: none;
}

/* Hide core-content when menu overlay is active (similar to App.jsx) */
.menu-overlay.active ~ .core-content,
body:has(.menu-overlay.active) .core-content {
  display: none;
}

/* === Shop-specific Styles === */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 120px 2rem 4rem;
  min-height: calc(100vh - 90px);
}

.shop-header {
  text-align: center;
  margin: 13rem 0 4rem 0;
}

@media (max-width: 900px) {
  .shop-header {
    margin: 7rem 0 4rem 0;
  }
}

.shop-header-title {
  font-size: 2.5rem;
  line-height: 3.6rem;
  font-weight: 700;
  color: #d5b64c;
  margin: 0;
}

@media (max-width: 900px) {
  .shop-header-title {
    font-size: 2rem;
    line-height: 3rem;
  }
}
@media (max-width: 600px) {
  .shop-header-title {
    font-size: 1.8rem;
    line-height: 2.64rem;
  }
}

@media (max-width: 400px) {
  .shop-header-title {
    font-size: 1.4rem;
  }
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  justify-items: center;
}

/* Ensure single column on very small screens */
@media (max-width: 375px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.product-card {
  overflow: hidden;
  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
}

.product-image-placeholder {
  width: 100%;
  aspect-ratio: 1;
  /* Fallback for older browsers that don't support aspect-ratio */
  padding-top: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Reset padding when aspect-ratio is supported */
@supports (aspect-ratio: 1) {
  .product-image-placeholder {
    padding-top: 0;
  }
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* For browsers that don't support aspect-ratio */
  position: absolute;
  top: 0;
  left: 0;
}

/* Reset position when aspect-ratio is supported */
@supports (aspect-ratio: 1) {
  .product-image {
    position: static;
  }
}

.product-soldout .product-image {
  opacity: 40%;
}

.product-soldout-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  /* font: normal normal 600 30px/44px Noto Sans KR; */
  font-weight: 600;
  font-size: 30px;
  line-height: 44px;
  font-family: 'Noto Sans KR', sans-serif;
  letter-spacing: 0px;
  color: #ffffff;
  z-index: 10;
}

.product-upcoming {
  cursor: default;
}

.product-upcoming .product-image {
  background-color: #2f2f2f;
  background-image: none;
  background-position: 0% 0%;
  background-size: auto;
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-clip: padding-box;
}
.product-coming-soon {
  /* font: normal normal 600 30px/44px Noto Sans KR; */
  font-weight: 600;
  font-size: 30px;
  line-height: 44px;
  letter-spacing: 0px;
  color: #969696;
}

.product-info {
  padding: 1rem 0 0 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 70px; /* Ensure minimum height for product info */
}

.product-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #fff;
  line-height: 1.3;
}

.product-description {
  font-size: 1rem;
  line-height: 1.5;
  color: #999;
  margin: 0;
}

.products-error {
  color: white;
  text-align: center;
  width: 100%;
  padding: 2rem;
  font-size: 1.1rem;
  grid-column: 1 / -1;
}

/* === Utility & Misc === */
.product-highlight {
  color: #d5b64c !important;
}

/* === Responsive Styles === */

/* --- Large Screens (1280px+) --- */
@media (min-width: 1100px) {
  .social-icons {
    padding-right: 6rem;
  }
}

/* --- Laptops and Desktops (900px+) --- */
@media (min-width: 900px) {
  .footer {
    height: 150px !important;
  }

  .social-icons {
    padding-right: 6rem;
  }
}

/* --- Laptops (Up to 1024px) --- */
@media (max-width: 1024px) {
  .footer {
    padding: 1rem 2.5rem;
  }

  .footer-copyright {
    font-size: 14px;
  }

  .social-icons {
    padding-right: auto;
  }
}

/* --- Tablets (Up to 899px) --- */
@media (max-width: 899px) {
  .social-icons {
    justify-content: center !important;
    margin-right: 0 !important;
  }
}

/* --- Tablets (Up to 768px) --- */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    padding: 1rem 0;
  }
  .footer-left,
  .footer-right {
    width: 100%;
    justify-content: center;
  }
  .footer-left {
    margin-bottom: 1rem;
  }

  /* --- End Restored Rule --- */
  .shop-header {
    margin-bottom: 2.5rem;
  }
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* --- Large Phones (Up to 600px) --- */
@media (max-width: 600px) {
  .footer {
    gap: 1rem;
  }
  .footer-left {
    flex-direction: column;
    gap: 0.6rem;
  }
  .footer-logo {
    width: 150px !important;
    height: auto;
    margin: 0;
  }
  .social-icons {
    gap: 0.8rem;
  }
  .icon-box img {
    width: 36px;
    height: 36px;
  }
}

/* --- Standard Phones (Up to 480px) --- */
@media (max-width: 480px) {
  .footer-logo {
    width: 160px !important;
    margin: 0 0 1rem 0;
  }
  .footer-copyright {
    font-size: 0.8rem;
    text-align: center;
    width: 100%;
  }
  .social-icons {
    gap: 0.5rem;
  }
  .icon-box img {
    width: 32px;
    height: 32px;
  }
}

/* --- Small Phones (Up to 400px) --- */
@media (max-width: 400px) {
  .footer-logo {
    width: 130px !important;
  }
  .social-icons {
    gap: 0.6rem;
  }
  .icon-box img {
    width: 30px;
    height: 30px;
  }
}

/* Loading State Styles */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 60px 20px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  margin-top: 20px;
  font-size: 16px;
  color: #666;
  font-weight: 500;
}

.products-error {
  text-align: center;
  padding: 60px 20px;
  font-size: 18px;
  color: #999;
}
