/*==== General Page Styles ====*/
body {
  background: #f7fbff;
  font-family: 'Roboto Slab', serif;
}

/*==== Main container ====*/
.product-detail-main {
  min-height: 100vh;
  padding: 0;
}
.product-detail-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1100px;
  margin: 40px auto 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,128,0,0.08);
  padding: 40px 28px;
}

/*==== Images Column ====*/
.product-detail-images {
  flex: 1 1 320px;
  min-width: 280px;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.main-image-box {
  width: 100%;
  height: 320px;
  background: #f8f8f8;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,128,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}
.main-image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
  background: #f8f8f8;
}

/*==== Product Card Gallery and Buttons - START ====*/
/* Styling for product cards in grid view */
.products-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
}
.product-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 16px #0001;
  padding: 20px;
  margin: 16px 0;
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Product Gallery inside card */
.product-gallery {
  position: relative;
  width: 100%;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gallery-image-box {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
.gallery-image-box img {
  width: 320px;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 2px 10px #0002;
}
.gallery-prev, .gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border: none;
  color: #23a828;
  font-size: 2rem;
  border-radius: 50%;
  box-shadow: 0 2px 6px #0002;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s;
}
.gallery-prev { left: -22px; }
.gallery-next { right: -22px; }
.gallery-prev:disabled, .gallery-next:disabled {
  opacity: 0.5;
  cursor: default;
}
.gallery-thumbnails {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}
.gallery-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #eee;
  cursor: pointer;
  transition: border-color 0.2s;
  background: #fff;
}
.gallery-thumb.active, .gallery-thumb:hover {
  border-color: #23a828;
  box-shadow: 0 0 8px #23a82866;
}
/*==== Product Info and Buttons ====*/
.product-info {
  width: 100%;
  text-align: left;
  margin-top: 8px;
}
.product-tag {
  color: #23a828;
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.product-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #222;
  margin: 6px 0 4px 0;
  line-height: 1.2;
}

.product-price {
  color: #23a828;
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 6px;
}

.product-info a.view-details-btn {
  color: #1a0dab;
  text-decoration: underline;
  font-size: 1rem;
  margin-bottom: 8px;
  display: inline-block;
}

.product-btn, .buy-now-btn {
  display: block;
  width: 100%;
  margin: 10px 0 0 0;
  padding: 12px 0;
  font-size: 1.08rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s;
}
.product-btn {
  background: #23a828;
  color: #fff;
  margin-bottom: 8px;
}
.product-btn:hover {
  background: #158a1c;
}
.buy-now-btn {
  background: #ffa600;
  color: #222;
}
.buy-now-btn:hover {
  background: #ff8900;
}

/*==== Responsive for Product Cards ====*/
@media (max-width: 900px) {
  .product-card {
    max-width: 95vw;
    padding: 10px;
  }
  .gallery-image-box img {
    width: 95vw;
    height: 160px;
  }
  .gallery-thumb {
    width: 38px;
    height: 38px;
  }
}
/*==== Product Card Gallery and Buttons - END ====*/

/* --- Thumbnail Row Styling --- */
#thumbnail-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}
#thumbnail-row img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #eee;
  cursor: pointer;
  transition: border-color 0.2s;
  background: #fff;
  box-sizing: border-box;
  display: block;
}
#thumbnail-row img.active {
  border-color: #2ecc40;
  box-shadow: 0 0 6px #2ecc4033;
}
@media (max-width: 600px) {
  #thumbnail-row img {
    width: 45px;
    height: 45px;
  }
}
/*==== Info Column ====*/
.product-detail-info {
  flex: 1 1 360px;
  min-width: 260px;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 10px;
}
.product-detail-info h1 {
  font-size: 2.2rem;
  font-weight: bold;
  color: #008000;
  margin-bottom: 7px;
}
.product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  color: #d4af37;
}
.product-rating #product-stars {
  font-size: 1.18rem;
  color: #f4b400;
}
.product-rating #review-count {
  color: #333;
  font-size: 1.02rem;
}
.product-price-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 2px;
}
.product-price {
  font-size: 1.45rem;
  color: #008000;
  font-weight: bold;
}
.product-offer {
  font-size: 1.04rem;
  color: #e65100;
  font-weight: 600;
  background: #fff3e0;
  padding: 2px 14px;
  border-radius: 6px;
}
.product-stock {
  font-size: 1.07rem;
  color: #008000;
  font-weight: 500;
}
.product-variants {
  margin: 10px 0 8px 0;
}
.variant-select {
  margin-right: 18px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid #ddeedd;
  font-size: 1.02rem;
  background: #f7fbff;
  color: #222;
}
.product-qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.product-qty-row label {
  font-size: 1.04rem;
  font-weight: 500;
  color: #444;
}
#product-qty {
  width: 56px;
  padding: 6px 10px;
  font-size: 1.06rem;
  border-radius: 6px;
  border: 1px solid #d4ffd4;
  text-align: center;
}
.product-cta-row {
  display: flex;
  gap: 12px;
  margin: 10px 0 0 0;
}
.product-btn {
  background: #008000;
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 7px;
  padding: 13px 32px;
  font-size: 1.09rem;
  cursor: pointer;
  transition: background 0.16s;
}
.product-btn:hover { background: #006400; }
.buy-btn {
  background: #ff9800;
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 7px;
  padding: 13px 32px;
  font-size: 1.09rem;
  cursor: pointer;
  transition: background 0.16s;
}
.buy-btn:hover { background: #e65100; }
.wishlist-share-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
#wishlist-btn,
#share-btn {
  background: none;
  border: 1.5px solid #008000;
  color: #008000;
  border-radius: 5px;
  padding: 7px 18px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
}
#wishlist-btn:hover,
#share-btn:hover {
  background: #f7fff7;
  color: #005c00;
}
.shipping-info {
  font-size: 0.99rem;
  color: #444;
  margin-top: 7px;
}

/*==== Tabs ====*/
.product-tabs {
  display: flex;
  gap: 2px;
  margin: 34px auto 0 auto;
  max-width: 950px;
  border-bottom: 1.5px solid #eee;
}
.tab-btn {
  background: #f7fbff;
  border: none;
  color: #008000;
  font-weight: 600;
  font-size: 1.09rem;
  padding: 12px 22px;
  border-radius: 11px 11px 0 0;
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
  margin-bottom: -1px;
}
.tab-btn.active,
.tab-btn:hover {
  background: #fff;
  color: #222;
  border-bottom: 2px solid #008000;
}
.tab-content {
  background: #fff;
  max-width: 950px;
  margin: 0 auto 0 auto;
  padding: 20px 20px 10px 20px;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 10px rgba(0,128,0,0.04);
  font-size: 1.04rem;
  display: block;
}
.tab-content ul {
  padding-left: 24px;
  line-height: 2.2;
}
.tab-content table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
.tab-content th, .tab-content td {
  text-align: left;
  padding: 7px;
  border-bottom: 1px solid #eee;
}
.tab-content th {
  background: #f7fbff;
  font-weight: 600;
}
.tab-content .policy {
  color: #008000;
  font-weight: 500;
}
.tab-content .review-stars {
  color: #ffd600;
}

/*==== Related Products ====*/
.related-products-carousel {
  max-width: 950px;
  margin: 32px auto 0 auto;
  padding: 0 0 20px 0;
}
.related-products-title {
  font-size: 1.13rem;
  font-weight: bold;
  color: #008000;
  margin-bottom: 11px;
}
.related-products-list {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
}
.related-product-card {
  flex: 0 0 170px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,128,0,0.07);
  padding: 14px;
  text-align: center;
  transition: box-shadow 0.15s;
  cursor: pointer;
}
.related-product-card:hover {
  box-shadow: 0 6px 20px rgba(0,128,0,0.14);
}
.related-product-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 7px;
}
.related-product-name {
  font-size: 0.97rem;
  font-weight: bold;
  color: #222;
}
.related-product-price {
  color: #008000;
  font-size: 0.98rem;
  margin-top: 2px;
}

/*==== Breadcrumbs ====*/
.breadcrumbs {
  font-size: 1.07rem;
  color: #555;
  margin: 28px auto 12px auto;
  max-width: 1100px;
  padding-left: 0;
}
.breadcrumbs a {
  color: #008000;
  text-decoration: none;
  margin-right: 4px;
}
.breadcrumbs span {
  font-weight: bold;
  color: #222;
}

/*==== Responsive ====*/
@media (max-width: 900px) {
  .product-detail-container {
    flex-direction: column;
    padding: 28px 3vw 16px 3vw;
    gap: 18px;
    max-width: 97vw;
  }
  .product-detail-images,
  .product-detail-info {
    max-width: 100%;
    min-width: 0;
  }
  .main-image-box {
    height: 180px;
  }
  .breadcrumbs {
    padding-left: 4vw;
    max-width: 97vw;
  }
  .product-tabs { max-width: 97vw; }
  .tab-content { max-width: 97vw; padding: 14px 2vw 8px 2vw; }
  .related-products-carousel { max-width: 97vw; }
  /* Responsive for grid cards */
  .product-card {
    max-width: 95vw;
    padding: 10px;
  }
  .gallery-image-box img {
    width: 95vw;
    height: 160px;
  }
  .gallery-thumb {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 600px) {
  .breadcrumbs { font-size: 0.96rem; }
  .tab-btn { font-size: 0.97rem; padding: 10px 8px; }
  .tab-content { padding: 9px 2vw 4px 2vw; font-size: 1rem; }
  .product-detail-info h1 { font-size: 1.05rem; }
  .main-image-box { height: 110px; }
  /* Responsive for grid thumbnails */
  .gallery-thumb {
    width: 28px;
    height: 28px;
  }
}