/* Style for related product links */
.related_card a {
    color: inherit;          /* use parent text color */
    text-decoration: none;   /* remove underline */
    cursor: pointer;         /* keep pointer on hover */
}

/* Prevent color change on hover/visited */
.related_card a:visited,
.related_card a:hover,
.related_card a:active {
    color: inherit;          /* same color as normal text */
    text-decoration: none;   /* no underline */
}



@media (max-width: 370px) {

/* Overall container */
.product_detail {
    margin: 1rem auto;
    /* padding: 1rem; */
    box-sizing: border-box;
    background: #fff;
    padding: 0 10px 0 10px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.205);
}

/* First row: flex layout */
.product_row {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Left column: photos */
.product_photos {
    flex: 1;
    min-width: 300px;
}

/* Main display area (image or video) */
.main_photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;       /* key change */
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  overflow: hidden;
}

.main_photo img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;   /* prevent hidden media from blocking scroll */
}

.main_photo img.show {
  opacity: 1;
  display: block;
  pointer-events: auto;   /* only active media can be interacted with */
}



.photo_gallery::-webkit-scrollbar {
  display: none;          /* hide scrollbar for cleaner look */
}

.photo_gallery {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;       /* allow horizontal scrolling */
  scroll-behavior: smooth;
  max-width: 100%;        /* constrain to parent width */
}

.photo_gallery img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s, border 0.2s;
}

.photo_gallery img:hover {
  transform: scale(1.05);
  border-color: #999;
}

.photo_gallery img.active {
  border: 2px solid #ff9900;
}

/* Right column: product info */
.product_info {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product_name {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    text-align: center;
}



/*  == PRICE STYLES == */
.product_price {
    display: flex;
    gap: 1rem;
    align-items: center;
    height: 30px;
    justify-content: center;
}

.card_promo_price {
    color: #d9534f;
    font-weight: bold;
    font-size: 1.1rem;
}

.card_old_price {
    text-decoration: line-through;
    color: #888;
    font-size: 1.1rem;
}

.discount_percent {
    background: #ff9900;
    color: #fff;
    font-size: 1.1rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.fix_price {
    font-size:1.1rem;
    font-weight: bold;
}

/* == PRODUCT QUANTITY STYLE == */
.product_qty {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    justify-content: center;
}

.product_qty input {
    width: 60px;
    padding: 0.25rem;
    text-align: center;
}

.qty_available {
    color: #555;
}

/* Inline related products */
.related_products_inline h3 {
    margin-bottom: 0.5rem;
}

.related_inline_grid {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;       /* no wrapping */
  overflow-x: auto;        /* scroll if too many */
  justify-content: flex-start;
}

.related_inline_grid .related_card {
  flex: 0 0 auto;        /* don’t stretch */
  width: 220px;          /* card width slightly bigger than image */
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.5rem;
  transition: box-shadow 0.3s;
}

.related_inline_grid .related_card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related_inline_grid img {
  width: 200px;       /* fixed width */
  height: 200px;      /* fixed height */
  aspect-ratio: 1 / 1; /* ensures square ratio */
  object-fit: cover;   /* crop to fill square without distortion */
  border-radius: 4px;
  margin: 0 auto;
  display: block;
}

/* == ACTION BUTTON == */
.product_actions {
    display: flex;
    gap: 1rem;
}

.product_actions button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.btn_add_cart {
    background: #f0c14b;
    color: #111;
    font-weight: bold;
}

.btn_add_cart:hover {
    background: #ddb347;
}

.btn_buy_now {
    background: #ff9900;
    color: #fff;
    font-weight: bold;
}

.btn_buy_now:hover {
    background: #e68a00;
}

/* Second row: description */
/* .product_description {
    margin-top: 2rem;
    line-height: 1.6;
    color: #333;
    font-size: 1rem; 
} */
.product_description {
    margin: 2rem 0 2rem 0;
    line-height: 1.6;
    color: inherit;
    font-size: inherit;
    padding: 0 5px 10px 5px;
}
/* .product_description [style] {
    all: revert;   /* ✅ restores browser defaults so inline styles apply */
/* } */ 


/* ===========================================================
   TOAST FRIENDLY POPUP
   =========================================================== */
.toast {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px;
  background-color: #4CAF50; /* green */
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 12px;
  position: fixed;
  z-index: 9999;
  left: 40%;
  bottom: 30px;
  font-size: 16px;
  transition: visibility 0s, opacity 0.5s ease-in-out;
  opacity: 0;
}
.toast.show {
  visibility: visible;
  opacity: 1;
}

/* css for arrow left and right */
.photo_gallery_wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;       /* space between button and gallery */
  margin-top: 1rem;
}
.photo_gallery {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;  /* allow scrolling */
  scroll-behavior: smooth;
  flex: 1;           /* take up remaining space between buttons */
}
.banner-btn {
  background: #fdf5e6;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;    /* keep fixed size */
  font-size: 20rem;
}

.banner-btn.left {
  left: 0.5rem;             /* small offset from left edge */
}

.banner-btn.right {
  right: 0.5rem;            /* small offset from right edge */
}

.banner-btn:hover {
  background: #ffe4b5;
  transform: scale(1.1);
}




}

@media (min-width: 371px) and (max-width: 490px) {

/* Overall container */
.product_detail {
    margin: 1rem auto;
    /* padding: 1rem; */
    box-sizing: border-box;
    background: #fff;
    padding: 0 10px 0 10px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.205);
}

/* First row: flex layout */
.product_row {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Left column: photos */
.product_photos {
    flex: 1;
    min-width: 300px;
}

/* Main display area (image or video) */
.main_photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;       /* key change */
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  overflow: hidden;
}

.main_photo img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;   /* prevent hidden media from blocking scroll */
}

.main_photo img.show {
  opacity: 1;
  display: block;
  pointer-events: auto;   /* only active media can be interacted with */
}



.photo_gallery::-webkit-scrollbar {
  display: none;          /* hide scrollbar for cleaner look */
}

.photo_gallery {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;       /* allow horizontal scrolling */
  scroll-behavior: smooth;
  max-width: 100%;        /* constrain to parent width */
}

.photo_gallery img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s, border 0.2s;
}

.photo_gallery img:hover {
  transform: scale(1.05);
  border-color: #999;
}

.photo_gallery img.active {
  border: 2px solid #ff9900;
}

/* Right column: product info */
.product_info {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product_name {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    text-align: center;
}



/*  == PRICE STYLES == */
.product_price {
    display: flex;
    gap: 1rem;
    align-items: center;
    height: 30px;
    justify-content: center;
}

.card_promo_price {
    color: #d9534f;
    font-weight: bold;
    font-size: 1.3rem;
}

.card_old_price {
    text-decoration: line-through;
    color: #888;
    font-size: 1.3rem;
}

.discount_percent {
    background: #ff9900;
    color: #fff;
    font-size: 1.1rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.fix_price {
    font-size:1.1rem;
    font-weight: bold;
}

/* == PRODUCT QUANTITY STYLE == */
.product_qty {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.product_qty input {
    width: 60px;
    padding: 0.25rem;
    text-align: center;
}

.qty_available {
    color: #555;
}

/* Inline related products */
.related_products_inline h3 {
    margin-bottom: 0.5rem;
}

.related_inline_grid {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;       /* no wrapping */
  overflow-x: auto;        /* scroll if too many */
  justify-content: flex-start;
}

.related_inline_grid .related_card {
  flex: 0 0 auto;        /* don’t stretch */
  width: 220px;          /* card width slightly bigger than image */
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.5rem;
  transition: box-shadow 0.3s;
}

.related_inline_grid .related_card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related_inline_grid img {
  width: 200px;       /* fixed width */
  height: 200px;      /* fixed height */
  aspect-ratio: 1 / 1; /* ensures square ratio */
  object-fit: cover;   /* crop to fill square without distortion */
  border-radius: 4px;
  margin: 0 auto;
  display: block;
}

/* == ACTION BUTTON == */
.product_actions {
    display: flex;
    gap: 1rem;
}

.product_actions button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.btn_add_cart {
    background: #f0c14b;
    color: #111;
    font-weight: bold;
}

.btn_add_cart:hover {
    background: #ddb347;
}

.btn_buy_now {
    background: #ff9900;
    color: #fff;
    font-weight: bold;
}

.btn_buy_now:hover {
    background: #e68a00;
}

/* Second row: description */
/* .product_description {
    margin-top: 2rem;
    line-height: 1.6;
    color: #333;
    font-size: 1rem; 
} */
.product_description {
    margin: 2rem 0 2rem 0;
    line-height: 1.6;
    color: inherit;
    font-size: inherit;
    padding: 0 5px 10px 5px;
}
/* .product_description [style] {
    all: revert;   /* ✅ restores browser defaults so inline styles apply */
/* } */ 


/* ===========================================================
   TOAST FRIENDLY POPUP
   =========================================================== */
.toast {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px;
  background-color: #4CAF50; /* green */
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 12px;
  position: fixed;
  z-index: 9999;
  left: 40%;
  bottom: 30px;
  font-size: 16px;
  transition: visibility 0s, opacity 0.5s ease-in-out;
  opacity: 0;
}
.toast.show {
  visibility: visible;
  opacity: 1;
}

/* css for arrow left and right */
.photo_gallery_wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;       /* space between button and gallery */
  margin-top: 1rem;
}
.photo_gallery {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;  /* allow scrolling */
  scroll-behavior: smooth;
  flex: 1;           /* take up remaining space between buttons */
}
.banner-btn {
  background: #fdf5e6;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;    /* keep fixed size */
}

.banner-btn.left {
  left: 0.5rem;             /* small offset from left edge */
}

.banner-btn.right {
  right: 0.5rem;            /* small offset from right edge */
}

.banner-btn:hover {
  background: #ffe4b5;
  transform: scale(1.1);
}




}

@media (min-width: 491px) and (max-width: 800px) {

/* Overall container */
.product_detail {
    margin: 1rem auto;
    /* padding: 1rem; */
    box-sizing: border-box;
    background: #fff;
    padding: 0 20px 0 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.205);
}

/* First row: flex layout */
.product_row {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Left column: photos */
.product_photos {
    flex: 1;
    width: 100%;
}

/* Main display area (image or video) */
.main_photo {
  width: 90%;
  height: auto;
  aspect-ratio: 1 / 1;
  position: relative;       /* key change */
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-self: center;
}

.main_photo img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;   /* prevent hidden media from blocking scroll */
}

.main_photo img.show {
  opacity: 1;
  display: block;
  pointer-events: auto;   /* only active media can be interacted with */
}



.photo_gallery::-webkit-scrollbar {
  display: none;          /* hide scrollbar for cleaner look */
}

.photo_gallery {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;       /* allow horizontal scrolling */
  scroll-behavior: smooth;
  max-width: 100%;        /* constrain to parent width */
}

.photo_gallery img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s, border 0.2s;
}

.photo_gallery img:hover {
  transform: scale(1.05);
  border-color: #999;
}

.photo_gallery img.active {
  border: 2px solid #ff9900;
}

/* Right column: product info */
.product_info {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product_name {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    text-align: center;
}



/*  == PRICE STYLES == */
.product_price {
    display: flex;
    gap: 1rem;
    align-items: center;
    height: 30px;
    justify-content: center;
}

.card_promo_price {
    color: #d9534f;
    font-weight: bold;
    font-size: 1.4rem;
}

.card_old_price {
    text-decoration: line-through;
    color: #888;
    font-size: 1.4rem;
}

.discount_percent {
    background: #ff9900;
    color: #fff;
    font-size: 1.1rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.fix_price {
    font-size:1.4rem;
    font-weight: bold;
}

/* == PRODUCT QUANTITY STYLE == */
.product_qty {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.product_qty input {
    width: 60px;
    padding: 0.25rem;
    text-align: center;
}

.qty_available {
    color: #555;
}

/* Inline related products */
.related_products_inline h3 {
    margin-bottom: 0.5rem;
}

.related_inline_grid {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;       /* no wrapping */
  overflow-x: auto;        /* scroll if too many */
  justify-content: flex-start;
}

.related_inline_grid .related_card {
  flex: 0 0 auto;        /* don’t stretch */
  width: 220px;          /* card width slightly bigger than image */
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.5rem;
  transition: box-shadow 0.3s;
}

.related_inline_grid .related_card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related_inline_grid img {
  width: 200px;       /* fixed width */
  height: 200px;      /* fixed height */
  aspect-ratio: 1 / 1; /* ensures square ratio */
  object-fit: cover;   /* crop to fill square without distortion */
  border-radius: 4px;
  margin: 0 auto;
  display: block;
}

/* == ACTION BUTTON == */
.product_actions {
    display: flex;
    gap: 1rem;
}

.product_actions button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.btn_add_cart {
    background: #f0c14b;
    color: #111;
    font-weight: bold;
}

.btn_add_cart:hover {
    background: #ddb347;
}

.btn_buy_now {
    background: #ff9900;
    color: #fff;
    font-weight: bold;
}

.btn_buy_now:hover {
    background: #e68a00;
}

/* Second row: description */
/* .product_description {
    margin-top: 2rem;
    line-height: 1.6;
    color: #333;
    font-size: 1rem; 
} */
.product_description {
    margin: 2rem 0 2rem 0;
    line-height: 1.6;
    color: inherit;
    font-size: inherit;
    padding: 0 5px 10px 5px;
    
}
/* .product_description [style] {
    all: revert;   /* ✅ restores browser defaults so inline styles apply */
/* } */ 


/* ===========================================================
   TOAST FRIENDLY POPUP
   =========================================================== */
.toast {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px;
  background-color: #4CAF50; /* green */
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 12px;
  position: fixed;
  z-index: 9999;
  left: 40%;
  bottom: 30px;
  font-size: 16px;
  transition: visibility 0s, opacity 0.5s ease-in-out;
  opacity: 0;
}
.toast.show {
  visibility: visible;
  opacity: 1;
}

/* css for arrow left and right */
.photo_gallery_wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;       /* space between button and gallery */
  margin-top: 1rem;
}
.photo_gallery {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;  /* allow scrolling */
  scroll-behavior: smooth;
  flex: 1;           /* take up remaining space between buttons */
}
.banner-btn {
  background: #fdf5e6;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;    /* keep fixed size */
}

.banner-btn.left {
  left: 0.5rem;             /* small offset from left edge */
}

.banner-btn.right {
  right: 0.5rem;            /* small offset from right edge */
}

.banner-btn:hover {
  background: #ffe4b5;
  transform: scale(1.1);
}




}

@media (min-width: 801px) and (max-width: 1025px) {

/* Overall container */
.product_detail {
    margin: 1rem auto;
    /* padding: 1rem; */
    box-sizing: border-box;
    background: #fff;
    padding: 0 20px 0 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.205);
}

/* First row: flex layout */
.product_row {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Left column: photos */
.product_photos {
    flex: 1;
    width: 100%;
}

/* Main display area (image or video) */
.main_photo {
  width: 90%;
  height: auto;
  aspect-ratio: 1 / 1;
  position: relative;       /* key change */
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-self: center;
}

.main_photo img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;   /* prevent hidden media from blocking scroll */
}

.main_photo img.show {
  opacity: 1;
  display: block;
  pointer-events: auto;   /* only active media can be interacted with */
}



.photo_gallery::-webkit-scrollbar {
  display: none;          /* hide scrollbar for cleaner look */
}

.photo_gallery {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;       /* allow horizontal scrolling */
  scroll-behavior: smooth;
  max-width: 100%;        /* constrain to parent width */
}

.photo_gallery img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s, border 0.2s;
}

.photo_gallery img:hover {
  transform: scale(1.05);
  border-color: #999;
}

.photo_gallery img.active {
  border: 2px solid #ff9900;
}

/* Right column: product info */
.product_info {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product_name {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    text-align: center;
}



/*  == PRICE STYLES == */
.product_price {
    display: flex;
    gap: 1rem;
    align-items: center;
    height: 30px;
    justify-content: center;
}

.card_promo_price {
    color: #d9534f;
    font-weight: bold;
    font-size: 1.6rem;
}

.card_old_price {
    text-decoration: line-through;
    color: #888;
    font-size: 1.6rem;
}

.discount_percent {
    background: #ff9900;
    color: #fff;
    font-size: 1.1rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.fix_price {
    font-size:1.6rem;
    font-weight: bold;
}

/* == PRODUCT QUANTITY STYLE == */
.product_qty {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}
.product_qty label {
  font-size: 1.2rem;
}
.product_qty input {
    width: 60px;
    padding: 0.25rem;
    text-align: center;
    font-size: 1.2rem;
}

.qty_available {
    color: #555;
    font-size: 1.2rem;
}

/* Inline related products */
.related_products_inline h3 {
    margin-bottom: 0.5rem;
}

.related_inline_grid {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;       /* no wrapping */
  overflow-x: auto;        /* scroll if too many */
  justify-content: flex-start;
}

.related_inline_grid .related_card {
  flex: 0 0 auto;        /* don’t stretch */
  width: 220px;          /* card width slightly bigger than image */
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.5rem;
  transition: box-shadow 0.3s;
}

.related_inline_grid .related_card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related_inline_grid img {
  width: 200px;       /* fixed width */
  height: 200px;      /* fixed height */
  aspect-ratio: 1 / 1; /* ensures square ratio */
  object-fit: cover;   /* crop to fill square without distortion */
  border-radius: 4px;
  margin: 0 auto;
  display: block;
}

/* == ACTION BUTTON == */
.product_actions {
    display: flex;
    gap: 1rem;
}

.product_actions button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.btn_add_cart {
    background: #f0c14b;
    color: #111;
    font-weight: bold;
}

.btn_add_cart:hover {
    background: #ddb347;
}

.btn_buy_now {
    background: #ff9900;
    color: #fff;
    font-weight: bold;
}

.btn_buy_now:hover {
    background: #e68a00;
}

/* Second row: description */
/* .product_description {
    margin-top: 2rem;
    line-height: 1.6;
    color: #333;
    font-size: 1rem; 
} */
.product_description {
    margin: 2rem 0 2.5rem 0;
    line-height: 1.6;
    color: inherit;
    font-size: inherit;
    padding: 0 5px 20px 5px;
    
}
/* .product_description [style] {
    all: revert;   /* ✅ restores browser defaults so inline styles apply */
/* } */ 


/* ===========================================================
   TOAST FRIENDLY POPUP
   =========================================================== */
.toast {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px;
  background-color: #4CAF50; /* green */
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 12px;
  position: fixed;
  z-index: 9999;
  left: 40%;
  bottom: 30px;
  font-size: 16px;
  transition: visibility 0s, opacity 0.5s ease-in-out;
  opacity: 0;
}
.toast.show {
  visibility: visible;
  opacity: 1;
}

/* css for arrow left and right */
.photo_gallery_wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;       /* space between button and gallery */
  margin-top: 1rem;
}
.photo_gallery {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;  /* allow scrolling */
  scroll-behavior: smooth;
  flex: 1;           /* take up remaining space between buttons */
}
.banner-btn {
  background: #fdf5e6;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;    /* keep fixed size */
}

.banner-btn.left {
  left: 0.5rem;             /* small offset from left edge */
}

.banner-btn.right {
  right: 0.5rem;            /* small offset from right edge */
}

.banner-btn:hover {
  background: #ffe4b5;
  transform: scale(1.1);
}




}

@media (min-width: 1026px) and (max-width: 1205px) {

/* Overall container */
.product_detail {
    margin: 1rem 1.2rem;
    /* padding: 1rem; */
    box-sizing: border-box;
    background: #fff;
    padding: 0 20px 0 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.205);
}

/* First row: flex layout */
.product_row {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Left column: photos */
.product_photos {
    flex: 1;
    width: 100%;
}

/* Main display area (image or video) */
.main_photo {
  width: 90%;
  height: auto;
  aspect-ratio: 1 / 1;
  position: relative;       /* key change */
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-self: center;
}

.main_photo img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;   /* prevent hidden media from blocking scroll */
}

.main_photo img.show {
  opacity: 1;
  display: block;
  pointer-events: auto;   /* only active media can be interacted with */
}



.photo_gallery::-webkit-scrollbar {
  display: none;          /* hide scrollbar for cleaner look */
}

.photo_gallery {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;       /* allow horizontal scrolling */
  scroll-behavior: smooth;
  max-width: 100%;        /* constrain to parent width */
}

.photo_gallery img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s, border 0.2s;
}

.photo_gallery img:hover {
  transform: scale(1.05);
  border-color: #999;
}

.photo_gallery img.active {
  border: 2px solid #ff9900;
}

/* Right column: product info */
.product_info {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product_name {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    text-align: center;
}



/*  == PRICE STYLES == */
.product_price {
    display: flex;
    gap: 1rem;
    align-items: center;
    height: 30px;
    justify-content: center;
}

.card_promo_price {
    color: #d9534f;
    font-weight: bold;
    font-size: 1.6rem;
}

.card_old_price {
    text-decoration: line-through;
    color: #888;
    font-size: 1.6rem;
}

.discount_percent {
    background: #ff9900;
    color: #fff;
    font-size: 1.1rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.fix_price {
    font-size:1.6rem;
    font-weight: bold;
}

/* == PRODUCT QUANTITY STYLE == */
.product_qty {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}
.product_qty label {
  font-size: 1.2rem;
}
.product_qty input {
    width: 60px;
    padding: 0.25rem;
    text-align: center;
    font-size: 1.2rem;
}

.qty_available {
    color: #555;
    font-size: 1.2rem;
}

/* Inline related products */
.related_products_inline h3 {
    margin-bottom: 0.5rem;
}

.related_inline_grid {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;       /* no wrapping */
  overflow-x: auto;        /* scroll if too many */
  justify-content: flex-start;
}

.related_inline_grid .related_card {
  flex: 0 0 auto;        /* don’t stretch */
  width: 220px;          /* card width slightly bigger than image */
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.5rem;
  transition: box-shadow 0.3s;
}

.related_inline_grid .related_card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related_inline_grid img {
  width: 200px;       /* fixed width */
  height: 200px;      /* fixed height */
  aspect-ratio: 1 / 1; /* ensures square ratio */
  object-fit: cover;   /* crop to fill square without distortion */
  border-radius: 4px;
  margin: 0 auto;
  display: block;
}

/* == ACTION BUTTON == */
.product_actions {
    display: flex;
    gap: 1rem;
}

.product_actions button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.btn_add_cart {
    background: #f0c14b;
    color: #111;
    font-weight: bold;
}

.btn_add_cart:hover {
    background: #ddb347;
}

.btn_buy_now {
    background: #ff9900;
    color: #fff;
    font-weight: bold;
}

.btn_buy_now:hover {
    background: #e68a00;
}

/* Second row: description */
/* .product_description {
    margin-top: 2rem;
    line-height: 1.6;
    color: #333;
    font-size: 1rem; 
} */
.product_description {
    margin: 2rem 0 2.5rem 0;
    line-height: 1.6;
    color: inherit;
    font-size: inherit;
    padding: 0 5px 20px 5px;
    
}
/* .product_description [style] {
    all: revert;   /* ✅ restores browser defaults so inline styles apply */
/* } */ 


/* ===========================================================
   TOAST FRIENDLY POPUP
   =========================================================== */
.toast {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px;
  background-color: #4CAF50; /* green */
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 12px;
  position: fixed;
  z-index: 9999;
  left: 40%;
  bottom: 30px;
  font-size: 16px;
  transition: visibility 0s, opacity 0.5s ease-in-out;
  opacity: 0;
}
.toast.show {
  visibility: visible;
  opacity: 1;
}

/* css for arrow left and right */
.photo_gallery_wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;       /* space between button and gallery */
  margin-top: 1rem;
}
.photo_gallery {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;  /* allow scrolling */
  scroll-behavior: smooth;
  flex: 1;           /* take up remaining space between buttons */
}
.banner-btn {
  background: #fdf5e6;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;    /* keep fixed size */
}

.banner-btn.left {
  left: 0.5rem;             /* small offset from left edge */
}

.banner-btn.right {
  right: 0.5rem;            /* small offset from right edge */
}

.banner-btn:hover {
  background: #ffe4b5;
  transform: scale(1.1);
}




}

@media (min-width: 1206px) {



/* Overall container */
.product_detail {
    max-width: 1200px;
    margin: 2rem auto;
    /* padding: 1rem; */
    box-sizing: border-box;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.205);
}

/* First row: flex layout */
.product_row {
    display: flex;
    flex-wrap: wrap; /* allows stacking on small screens */
    gap: 2rem;
}

/* Left column: photos */
.product_photos {
    flex: 1;
    min-width: 300px;
}

/* Main display area (image or video) */


.main_photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;       /* key change */
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  overflow: hidden;
}

.main_photo img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;   /* prevent hidden media from blocking scroll */
}

.main_photo img.show {
  opacity: 1;
  display: block;
  pointer-events: auto;   /* only active media can be interacted with */
}



.photo_gallery::-webkit-scrollbar {
  display: none;          /* hide scrollbar for cleaner look */
}

.photo_gallery {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;       /* allow horizontal scrolling */
  scroll-behavior: smooth;
  max-width: 100%;        /* constrain to parent width */
}

.photo_gallery img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s, border 0.2s;
}

.photo_gallery img:hover {
  transform: scale(1.05);
  border-color: #999;
}

.photo_gallery img.active {
  border: 2px solid #ff9900;
}

/* Right column: product info */
.product_info {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product_name {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

/*  == PRICE STYLES == */
.product_price {
    display: flex;
    gap: 1rem;
    align-items: center;
    height: 30px;
    justify-content: space-around;
}

.card_promo_price {
    color: #d9534f;
    font-weight: bold;
    font-size: 1.6rem;
    
}

.card_old_price {
    text-decoration: line-through;
    color: #888;
    font-size: 1.6rem;
}

.discount_percent {
    background: #ff9900;
    color: #fff;
    font-size: 1.1rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.fix_price {
    font-size:1.6rem;
    font-weight: bold;
}



/* == PRODUCT QUANTITY STYLE == */
.product_qty {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: left;
}
.product_qty label {
  font-size: 1.2rem;
}
.product_qty input {
    width: 60px;
    padding: 0.25rem;
    text-align: center;
    font-size: 1.2rem;
}

.qty_available {
    color: #555;
    font-size: 1.2rem;
}

/* Inline related products */
.related_products_inline h3 {
    margin-bottom: 0.5rem;
}

.related_inline_grid {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;       /* no wrapping */
  overflow-x: auto;        /* scroll if too many */
  justify-content: flex-start;
}

.related_inline_grid .related_card {
  flex: 0 0 auto;        /* don’t stretch */
  width: 220px;          /* card width slightly bigger than image */
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.5rem;
  transition: box-shadow 0.3s;
}

.related_inline_grid .related_card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related_inline_grid img {
  width: 200px;       /* fixed width */
  height: 200px;      /* fixed height */
  aspect-ratio: 1 / 1; /* ensures square ratio */
  object-fit: cover;   /* crop to fill square without distortion */
  border-radius: 4px;
  margin: 0 auto;
  display: block;
}

/* Actions */
.product_actions {
    display: flex;
    gap: 1rem;
}

.product_actions button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn_add_cart {
    background: #f0c14b;
    color: #111;
}

.btn_add_cart:hover {
    background: #ddb347;
}

.btn_buy_now {
    background: #ff9900;
    color: #fff;
}

.btn_buy_now:hover {
    background: #e68a00;
}

/* Second row: description */
.product_description {
    margin-top: 2rem;
    line-height: 1.6;
    color: #333;
    font-size: 1rem; /* base size */
}

.product_description [style] {
    all: revert;   /* ✅ restores browser defaults so inline styles apply */
}




/* ===========================================================
   TOAST FRIENDLY POPUP
   =========================================================== */
.toast {
  visibility: hidden;
  min-width: 250px;
  margin-left: -125px;
  background-color: #4CAF50; /* green */
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 12px;
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 30px;
  font-size: 16px;
  transition: visibility 0s, opacity 0.5s ease-in-out;
  opacity: 0;
}
.toast.show {
  visibility: visible;
  opacity: 1;
}

/* css for arrow left and right */
.photo_gallery_wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;       /* space between button and gallery */
  margin-top: 1rem;
}
.photo_gallery {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;  /* allow scrolling */
  scroll-behavior: smooth;
  flex: 1;           /* take up remaining space between buttons */
}
.banner-btn {
  background: #e6fdec;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;    /* keep fixed size */
}

.banner-btn.left {
  left: 0.5rem;             /* small offset from left edge */
}

.banner-btn.right {
  right: 0.5rem;            /* small offset from right edge */
}

.banner-btn:hover {
  background: #ffe4b5;
  transform: scale(1.1);
}


}



