@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&display=swap');

@font-face {
  font-family: 'Izkfont';
  src: url('fonts/Fontizk1-Regular.ttf') format('truetype');
  font-display: swap;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

.top-menu {
  position: fixed;
  top: 0;
  width: 100%;
  background: white;
  text-align: center;
  padding: 1rem 0;
  z-index: 10;
}

.top-menu ul {
  list-style: none;
  display: inline-flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.top-menu li a {
  text-decoration: none;
  font-weight: 300;
  color: #111;
  font-size: 1.1rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.top-menu li a:hover {
  color: #ff4081;
  transform: scale(1.1);
}

.product-container {
  padding: 2rem;
  max-width: 1000px;
  margin: auto;
  margin-top: 90px; /* offset for fixed top menu */
}

.product-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

/* Better spacing on very small screens */
@media (max-width:600px){
  .product-container { padding: 1.1rem 1rem 2.4rem; margin-top: 82px; }
  .product-main { gap:1.2rem; }
  .product-text h1 { font-size:1.45rem; line-height:1.15; }
  .product-text p { font-size:0.95rem; }
}

/* Product gallery ensures consistent image size across pages */
.product-gallery { width: 100%; max-width: 480px; }
.pg-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4; /* A6-ish portrait */
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}
.pg-slides { display: none; }
.pg-slide { flex: 0 0 100%; height: 100%; display:flex; align-items:center; justify-content:center; }
.pg-slide img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.pg-viewport { perspective: 1200px; }
.pg-card { position:absolute; inset:0; width:100%; height:100%; transform-style: preserve-3d; transition: transform 0.6s ease; z-index:1; }
.pg-face { position:absolute; inset:0; backface-visibility: hidden; display:flex; align-items:center; justify-content:center; }
.pg-face img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.pg-face.back { transform: rotateY(180deg); }
.pg-card.is-flipped { transform: rotateY(180deg); }
.pg-prev, .pg-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  width: 48px; height: 48px; /* slightly larger hit area */
  border-radius: 0;
  display: grid; place-items: center;
  cursor: pointer;
  color: transparent; /* hide fallback arrow char */
  font-size: 0; /* prevent text layout shifting */
  box-shadow: none;
  z-index: 2;
}
.pg-prev { left: 10px; }
.pg-next { right: 10px; }
.pg-prev:hover, .pg-next:hover { opacity: 0.9; }
.pg-prev::before, .pg-next::before {
  content: "";
  display: block;
  width: 28px; height: 28px; /* slightly bigger icons */
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.28)); /* subtle shadow for pop */
}
.pg-prev::before { background-image: url('imgs/icons/arrow_left_icon.png'); }
.pg-next::before { background-image: url('imgs/icons/arrow_right_icon.png'); }
.pg-dots { display:none; gap:8px; justify-content:center; margin-top: 10px; }
.pg-dot { width:8px; height:8px; border-radius:50%; background:#ddd; cursor:pointer; }
.pg-dot[aria-current="true"] { background:#111; }
.pg-thumbs { display:flex; gap:10px; justify-content:center; margin-top: 12px; padding: 2px 4px; overflow-x:auto; }
.pg-thumb { border:2px solid transparent; border-radius:10px; padding:0; background:none; cursor:pointer; width:64px; aspect-ratio: 3/4; display:block; }
.pg-thumb img { width:100%; height:100%; object-fit: cover; border-radius:8px; display:block; }
.pg-thumb[aria-current="true"] { border-color:#111; }
.pg-thumb:hover { border-color:#bbb; }
.pg-thumb:focus-visible { outline:2px solid #ff4081; outline-offset:2px; }
.product-gallery.pg-single .pg-prev,
.product-gallery.pg-single .pg-next,
.product-gallery.pg-single .pg-dots,
.product-gallery.pg-single .pg-thumbs { display: none; }

.product-text {
  text-align: left;
  max-width: 600px;
}

/* Main product name uses Fredoka */
.product-text h1 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
}

.product-text button {
  padding: 0.75rem 1.5rem;
  background-color: #333;
  color: white;
  border: none;
  cursor: pointer;
}

/* Cart icon top right */
#cart-menu {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 20px;
  cursor: pointer;
  user-select: none;
  z-index: 1000;
}

#cart-count {
  background: #ff4081;
  color: white;
  font-size: 12px;
  border-radius: 50%;
  padding: 2px 6px;
  vertical-align: top;
  margin-left: 4px;
}

/* Quantity input */
input#quantity {
  width: 50px;
  margin-right: 10px;
  padding: 6px;
  font-size: 16px;
  border-radius: 4px;
  border: 1px solid #ccc;
  text-align: center;
}

.more-products {
  margin-top: 4rem;
}

.more-products h2 {
  text-align: center;
  margin-bottom: 1rem;
  font-family: 'Izkfont', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.product-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.suggested-product {
  width: 200px;
	height:200px;
  text-align: center;
  text-decoration: none;
  color: black;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.suggested-product img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border: 1px solid #ddd;
  border-radius: 8px;
  display: block;
}

.suggested-product p {
  margin-top: 0.5rem;
  font-weight: 400;
  font-size: 1rem;
  font-family: 'Fredoka', sans-serif;
}



/* Add to Cart button style */
button#add-to-cart {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  background-color: #222;
  color: white;
  cursor: pointer;
  font-size: 16px;
}

button#add-to-cart:hover {
  background-color: #444;
}

footer {
  background-color: #f4f4f4;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 4rem;
}

/* Sticky cart button on mobile for easier access */
@media (max-width:600px){
  #cart-menu { top:auto; bottom:18px; right:18px; background:#ffffffee; padding:12px 16px; border-radius:40px; box-shadow:0 6px 18px rgba(0,0,0,0.18); font-size:0.95rem; }
  #cart-count { position:static; margin-left:6px; background:#ff4081; color:#fff; }
}

footer a {
  text-decoration: none;
  color: #333;
}

@media (min-width: 768px) {
  .product-main {
    flex-direction: row;
    align-items: flex-start;
  }

  .product-text {
    padding-left: 2rem;
  }
}
