/* Font Face */
@font-face {
  font-family: 'Optician Sans';
  src: url('Optician-Sans.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

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

/* Base */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
  background: #fff;
  color: #333;
  line-height: 1.6;
}

/* Header */
header {
  text-align: center;
  padding: 60px 20px 40px;
  border-bottom: 1px solid #ddd;
}

.shop-title {
  font-family: 'Optician Sans', serif;
  font-size: 48px;
  font-weight: normal;
  color: #000;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Products Grid */
#products-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

/* Product Card */
.product {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-image-wrapper {
  width: 100%;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.product img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Image Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 36px;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
}

.description {
  padding: 20px;
}

.product h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: #000;
}

.product-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.product-size {
  font-size: 13px;
  color: #999;
  margin-bottom: 8px;
}

.product h5 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #000;
}

.product-quantity {
  font-size: 13px;
  color: #999;
  margin-bottom: 12px;
}

/* Buttons */
.buy-button {
  display: block;
  width: 100%;
  padding: 14px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.buy-button:hover {
  background: #333;
}

.sold-out-button {
  background: #ccc;
  color: #888;
  cursor: not-allowed;
}

.sold-out-button:hover {
  background: #ccc;
}

/* Loading */
#products-loading {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

/* Checkout Section */
#checkout-section {
  min-height: 500px;
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px 30px;
  border-top: 1px solid #ddd;
  margin-top: 40px;
}

footer a {
  color: #999;
  text-decoration: none;
  font-size: 14px;
}

footer a:hover {
  color: #333;
}

/* Privacy Page */
.privacy-page h2 {
  font-family: 'Optician Sans', serif;
  font-size: 32px;
  font-weight: normal;
  margin-bottom: 30px;
  color: #000;
}

.privacy-page section {
  margin-bottom: 30px;
}

.privacy-page h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #000;
}

.privacy-page p {
  color: #555;
  margin-bottom: 8px;
}

.privacy-page a {
  color: #000;
  text-decoration: underline;
}

/* Mobile */
@media (max-width: 768px) {
  .shop-title {
    font-size: 32px;
  }

  main {
    padding: 30px 15px;
  }

  #products-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .product-image-wrapper {
    height: 220px;
  }
}