body {
  background: #222;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* Container for both index and product detail */
.container {
  background: #fff;
  border-radius: 16px;
  max-width: 1100px;
  margin: 40px auto;
  /* Allow for more padding in product detail pages */
  padding: 32px 24px 32px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

/* Extra padding for product detail container */
.product-detail-container {
  padding: 40px 40px 40px 40px;
}

/* --- Index.html styles --- */
h1 {
  text-align: center;
  margin-bottom: 32px;
  font-size: 2rem;
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 24px;
  margin-bottom: 24px;
}
.grid-top {
  grid-template-columns: repeat(2, 1fr);
}
.grid-bottom {
  grid-template-columns: repeat(3, 1fr);
}
.item {
  background: #fafafa;
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 320px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.2s;
  position: relative;
}


.item:focus,
.item:hover {
  box-shadow: 0 6px 32px rgba(0,0,0,0.10);
  text-decoration: none;
}
.product-name {
  margin: 8px 0 0 0;
  font-weight: 500;
  font-size: 1.08rem;
  transition: color 0.2s;
}
.item:hover .product-name,
.item:focus .product-name {
  color: #0071e3;
}
.item img {
  width: 120px;
  height: 160px;
  object-fit: contain;
  margin-bottom: 16px;
  background: transparent;
}
.colors {
  margin: 8px 0;
}
.color-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 2px;
  border: 1px solid #ddd;
  vertical-align: middle;
  transition: border 0.2s;
}
.price {
  margin-top: 12px;
  font-weight: 500;
  font-size: 1.1rem;
  color: #222;
}
.engraving {
  color: #f90;
  font-weight: bold;
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.shop-link {
  display: block;
  text-align: center;
  color: #0071e3;
  text-decoration: none;
  font-size: 1rem;
  margin-top: 12px;
  transition: color 0.2s;
}
.shop-link:hover {
  color: #005bb5;
}

/* --- Product.html styles --- */
.product-details {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  margin-top: 32px;
}
.product-info {
  flex: 1.2;
  min-width: 320px;
  max-width: 420px;
}
.product-info h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.15;
}
.product-info .price {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 5px;
  margin-top: 8px;
  letter-spacing: 0.01em;
}
.monthly-price {
  font-size: 1rem;
  color: #444;
  margin-bottom: 6px;
  margin-top: 2px;
}
.applecard-link {
  display: inline-block;
  font-size: 0.98rem;
  color: #0071e3;
  text-decoration: none;
  margin-bottom: 18px;
  margin-top: 4px;
  transition: color 0.2s;
}
.applecard-link:hover { color: #005bb5; }
.info-icon {
  font-size: 0.95em;
  vertical-align: middle;
}
.select-row {
  margin-bottom: 18px;
  margin-top: 10px;
}
.select-label {
  display: block;
  font-size: 0.99rem;
  font-weight: 500;
  margin-bottom: 6px;
}
.size-select,
.product-details select {
  width: 100%;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #aaa;
  padding: 10px 12px;
  margin-bottom: 0;
  background: #f8f8f8;
  margin-top: 4px;
}
.color-row {
  margin-bottom: 18px;
}
.color-label {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}
.color-dots {
  margin-top: 2px;
  margin-bottom: 6px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.product-details .color-dot,
.color-dot.product-detail {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #eee;
  transition: border 0.2s;
  cursor: pointer;
}
.color-dot.selected {
  border: 2.5px solid #0071e3;
  box-shadow: 0 0 0 2px #eaf6ff;
}
.product-desc {
  margin-top: 18px;
  margin-bottom: 16px;
  font-size: 1rem;
  color: #444;
  line-height: 1.55;
}
.divider {
  margin: 22px 0 20px 0;
  border: none;
  border-top: 1px solid #eee;
}
.delivery-pickup-row {
  display: flex;
  gap: 60px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.delivery-section, .pickup-section {
  font-size: 1rem;
  color: #222;
}
.icon-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.icon {
  font-size: 1.12rem;
  vertical-align: middle;
}
.delivery-link, .pickup-link {
  color: #0071e3;
  text-decoration: none;
  font-size: 1rem;
  margin-top: 3px;
  display: inline-block;
  transition: color 0.2s;
}
.delivery-link:hover, .pickup-link:hover {
  color: #005bb5;
}
.add-to-bag, .add-to-bag:visited, .add-to-bag:active {
  margin-top: 36px;
  padding: 16px 0;
  width: 100%;
  font-size: 1.13rem;
  background: #0071e3;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
  transition: background 0.2s;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: inline-block;
}
.add-to-bag:hover {
  background: #005bb5;
}
.product-image-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.main-product-image {
  width: 330px;
  height: 420px;
  object-fit: contain;
  border-radius: 32px;
  background: #fafafa;
  margin-bottom: 26px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.image-strip {
  display: flex;
  gap: 18px;
  justify-content: flex-start;
  margin-top: 0;
  margin-left: 10px;
}
.thumb {
  width: 54px;
  height: 60px;
  object-fit: contain;
  border-radius: 12px;
  background: #fafafa;
  border: 2px solid #eee;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  opacity: 0.7;
  cursor: pointer;
  transition: border 0.2s, opacity 0.2s;
}
.thumb.selected {
  border: 2px solid #0071e3;
  opacity: 1;
}

/* --- Responsive styles --- */
@media (max-width: 900px) {
  .container, .product-detail-container {
    padding: 16px 8px;
  }
  .grid-top {
    grid-template-columns: 1fr;
  }
  .grid-bottom {
    grid-template-columns: 1fr;
  }
  .product-details {
    flex-direction: column;
    gap: 24px;
  }
  .main-product-image {
    width: 90vw;
    height: auto;
    margin-bottom: 22px;
  }
  .image-strip {
    gap: 10px;
    margin-left: 0;
  }
  .product-image img {
    width: 100%;
    height: 220px;
  }
}