.product-detail-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px 40px 16px;
}

.back-to-ctg {
  display: flex;
  gap: 0.5em;
  align-items: center;
  text-decoration: none;
  color: #0079D1;
  font-size: 0.8em;
  padding: 20px 0;
}

.back-to-ctg img {
    width: 1%;
}


/* TOP SECTION */
.product-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.product-image-box {
  position: relative;
  border: 1px solid #e5e7eb;
  padding: 20px;
  border-radius: 8px;
}

.product-image-box img {
  width: 100%;
  height: 420px;
  object-fit: contain;
}
.product-image {
  width: 100%;
  opacity: 1;
}

.product-image.placeholder-image {
  opacity: 0.3;
}

.discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #16a34a;
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
}

.product-info-box {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  padding: 1em;
}

.product-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 8px;
}

.product-title-mobile {
  display: none;
}

.product-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 12px;
}

.in-stock {
  color: #16a34a;
}

.product-short-desc {
  color: #6b7280;
  margin-bottom: 16px;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.price {
  font-size: 1em;
  font-weight: bold;
  color: #0284c7;
}
.mrp {
  font-size: 1.5em;
  font-weight: 700 
}

.old-price {
  font-size: 1em;
  text-decoration: line-through;
  color: #9ca3af;
}

.offer {
  font-size: 1em;
  color: #16a34a;
}

/* CART */
.cart-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.quantity-box {
  display: flex;
  border: 1px solid #d1d5db;
  border-radius: 0.6em;
  padding: 5px;
}

.quantity-box input {
  width: 40px;
  text-align: center;
  font-size: 1em;
  border: none;
}

.quantity-box button {
  width: 2em;
  height: 2.5em;
  background: white;
  border: none;
}

.qty-img {
  width: 0.8em;
}


/* BUTTON */
.add-to-cart-btn {
  flex: 1;
  background: #0079D1;
  color: #fff;
  text-align: center;
  font-size: 1em;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  position: relative;
  z-index: 2;
  cursor: pointer;
}
.add-to-cart-btn:hover {
  background: #04528a;
}

.buy {
  background: #2ebb77;
}

.buy:hover {
  background: #208051;
}

.wishlist-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background-color: #fff;
  cursor: pointer;
  padding: 0;
}

.wishlist-btn img {
  width: 24px;
  height: 24px;
}  

/* INFO BOXES */
.info-box {
  border: 1px dashed #d1d5db;
  border-radius: 0.5em;
  padding: 10px;
  font-size: 13px;
  margin-bottom: 10px;
  background-color: #FAFCFF;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.info-box.highlight {
  display: flex;
  flex-direction: row;
  background: #fff7ed;
  border-color: #edb800;
  color: #ffc100;
}

.info-box-row {
  font-size: 1.2em;
  display: flex;
  gap: 0.5em;
  align-items: center;
}

.info-box-row img {
  width: 1.5em;
}

.support-box {
  margin-top: auto;
  font-size: 0.9em;
  display: flex;
  flex-direction: row;
  gap: 1em;
  justify-content: left;
  align-items: center;
}

.share-row {
  gap: 10px;
  font-size: 13px;
  margin-top: auto;
}

.share-row .brand {
  margin-left: auto;
  color: #6b7280;
  align-self: center;
  font-size: 1.1em;
}

.social-icons {
  width: 3em;
}

/* FEATURES */
.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 60px 0;
}

.feature-card {
  border: 1px dashed #d1d5db;
  padding: 20px;
  text-align: center;
  border-radius: 8px;
}

.feature-card-img {
  margin-bottom: 5px;
}

/* TABS */
.product-tabs {
  margin-bottom: 60px;
  margin-top: 30px;
}

.tab-header {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 20px;
}

.tab-header span {
  padding-bottom: 10px;
  cursor: pointer;
}

.tab-header .active {
  color: #0284c7;
  font-weight: 600;
}

.tab-content {
  color: #4b5563;
  line-height: 1.6;
}

/* RELATED PRODUCTS */
.related-products {
  margin-top: 60px;
}

.related-products h2 {
  font-size: 1em;
}

/* GRID */
.related-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

/* BADGES */
.discount-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #22c55e;
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 2;
}

.wishlist-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 16px;
  z-index: 2;
}

/* TEXT */
.rating {
  font-size: 12px;
  color: #facc15;
  margin-bottom: 4px;
}

.rating span {
  color: #6b7280;
}

.title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  min-height: 2.6em; /* 2 lines */
  margin-bottom: 6px;
}

.product-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}



/* ================= PRODUCT CARD – HARDENED ================= */

/* Card spacing & consistency */
.product-card {
  border: 1px solid #e5e7eb;
  border-radius: 1em;
  background: #fff;
  padding: 1em 1em;
}

/* Prevent layout jump when cart toggles */
.product-card .card-info {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

/* Ensure price + subtitle never collapse */
.product-card-title {
    font-size: 0.8em;
}
.product-card-subtitle {
  line-height: 1.2;
}

/* Cart slot alignment */
.cart-slot {
  min-width: 110px;
  justify-content: flex-end;
}

/* Add button hit-area improvement */
.cart-action {
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}


/* Quantity control polish */
.cart-control {
  background: #fff;
}

.qty-input {
  font-weight: 600;
}

/* Hover safety: prevent overlay blocking buttons */
.product-card::after {
  pointer-events: none;
}
























/* RESPONSIVE */
@media (max-width: 1200px) {
    .related-grid {
    grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1025px) {
    .product-detail-page {
    padding: 0 16px;
    }
    .product-title {
    display: none;
    }
    .product-image-box {
    padding: 0 20px;
    }
    .product-title-mobile {
    display: block;
    font-size: 1.5em;
    font-weight: 700;
    }
    .product-top {
        grid-template-columns: 1fr;
        gap: 20px;
        }
    .product-info-box {
    padding: 0;
    gap: 20px;
    }
    .feature-card {
    width: 80%;
    justify-self: center;
    }
    .product-card {
        padding: 0.5em;
    }
    .product-card .card-info {
        align-items: normal;
    }
    .cart-action {
        padding: 0;
    }
    .price {
        font-size: 1.2em;
        color: #000;
    }
    .back-to-ctg img {
        width: 2%;
    }
}


@media (max-width: 900px) {
    .related-grid {
    grid-template-columns: repeat(3, 1fr);
    }
    
    .feature-row {
    grid-template-columns: 1fr;
    }
    .back-to-ctg img {
        width: 3%;
    }
}


@media (max-width: 600px) {
    .related-grid {
    grid-template-columns: repeat(2, 1fr);
    }
    .back-to-ctg img {
        width: 5%;
    }
}