/* Reset & basics */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}
body {
  background: #f5f5f5;
  color: #333;
  line-height: 1.4;
}
a {
  text-decoration: none;
  color: #007185;
}
a:hover {
  text-decoration: underline;
}
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

#mainImage {
    max-width: 400px;
}

/* Header */
.header {
  background: #0052a1;
  color: #fff;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.header .logo {
  font-size: 1.5rem;
  font-weight: bold;
}
.header .cart {
  position: relative;
  cursor: pointer;
}
.header .cart::after {
  content: "0";
  position: absolute;
  top: -5px;
  right: -10px;
  background: red;
  color: #fff;
  border-radius: 50%;
  padding: 0 6px;
  font-size: 0.8rem;
}
.navbar-icon {
  filter: invert(100%);
  height: 1.5rem;
  margin-right: 0.2rem;
}

/* Breadcrumb */
.breadcrumb {
  margin: 1rem 0;
  font-size: 0.9rem;
}
.breadcrumb a {
  color: #007185;
}

/* Product Header */
.product-header {
  display: flex;
  flex-wrap: wrap;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.product-images {
  flex: 1;
  min-width: 250px;
  margin-right: 1rem;
}
.product-images img {
  width: 100%;
  border-radius: 8px;
  cursor: zoom-in;
}
.thumbnail-row {
  display: flex;
  margin-top: 0.5rem;
  gap: 0.5rem;
  max-width: 400px;
  overflow-x: scroll;
  padding-bottom: 1rem;
}
.thumbnail-row img {
  width: 60px;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.thumbnail-row img.active {
  border-color: #007185;
}

.product-stars {
    font-size: 1.2rem;
    color: #ffa41c;
}
.product-score {
    font-size: 0.8rem;
}

.product-info {
  flex: 2;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.product-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}
.product-price {
  font-size: 1.2rem;
  color: #b12704;
  margin-bottom: 0.5rem;
}
.badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.badge {
  background: #0052a1;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #fff;
}
.stock {
  margin-bottom: 0.5rem;
  color: green;
  font-size: 1rem;
  font-weight: bold;
}
.shipping {
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: #555;
}

/* Add to cart */
.add-cart {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
}
.add-cart input {
  width: 60px;
  padding: 0.3rem;
  text-align: center;
}
.add-cart button {
  background: #ffd814;
  border: 1px solid #fcd200;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}
.add-cart button:hover {
  background: #f7ca00;
}

/* Collapsible sections */
.section {
  background: #fff;
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
}
.section-header {
  padding: 1rem;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-content {
  padding: 1rem;
  display: none;
  border-top: 1px solid #ddd;
  font-size: 0.8rem;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-top: 1rem;
}
.tab {
  padding: 0.5rem 1rem;
  cursor: pointer;
}
.tab.active {
  border-bottom: 2px solid #007185;
  font-weight: bold;
}
.tab-content {
  display: none;
  padding: 1rem 0;
}
.tab-content.active {
  display: block;
}

.zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  z-index: 9999;
}
.zoom-overlay img {
  max-width: 90%;
  max-height: 90%;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}
.zoom-overlay img.zoomed {
  transform: scale(1);
}


/* Reviews */
.review {
  border-bottom: 1px solid #ddd;
  padding: 0.5rem 0;
  display: flex;
  gap: 0.5rem;
}
.review:last-child {
  border-bottom: none;
}
.review .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #fff;
}
.review .content {
  flex: 1;
  font-size: 0.8rem;
}
.review .rating {
  color: #ffa41c;
  font-size: 0.9rem;
}
.review .reviewer {
  font-weight: bold;
  font-size: 0.9rem;
}
.review .date {
  font-size: 0.8rem;
  color: #777;
}
.comment-box {
  margin-top: 1rem;
}
.comment-box textarea {
  width: 100%;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 0.8rem;
  resize: vertical;
  max-height: 120px;
}
.comment-box button {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background: #007185;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.comment-box button:hover {
  background: #005f5f;
}

#nameInput {
  flex: 1;
}
.comment-box input,
.comment-box select {
  width: 20%;
  min-width: 100px;
  padding: 0.5rem;
  margin-bottom: 0.4rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 0.8rem;
}

.comment-box-name-row {
  display: flex;
  gap: 1rem;
}

/* Related products */
.related {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.related h3 {
  margin-bottom: 1rem;
}
.related-products {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
}
.related-products img {
  width: 150px;
  border-radius: 8px;
  cursor: zoom-in;
}

/* Responsive */
@media (max-width: 768px) {
  .product-header {
    flex-direction: column;
  }
  .product-images {
    margin-right: 0;
    margin-bottom: 1rem;
  }
  .add-cart button {
    flex: 1;
  }
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.6rem 1rem;
  align-items: center;
}

.form-grid label {
  font-size: 0.8rem;
  color: #555;
  font-weight: 600;
}

.form-grid input,
.form-grid select {
  width: 100%;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 0.8rem;
}

/* Make expiry + CVC sit nicely */
.form-grid .inline {
  display: flex;
  gap: 0.5rem;
}

/* Mobile: stack labels on top */
@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}