:root {
    --primary-color: #1a73e8;
    --text-main: #0f1111;
    --bg-light: #f1f3f6;
    --telegram-blue: #0088cc;
}

body {
    margin: 0; font-family: 'Manrope', sans-serif;
    background-color: var(--bg-light); color: var(--text-main);
    overflow-x: hidden;
}

.page-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 250px;
    gap: 20px;
    max-width: 1600px;
    margin: 20px auto;
    padding: 0 15px;
    align-items: start;
}

.sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    position: sticky;
    top: 90px;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-header { font-size: 16px; font-weight: 800; margin-bottom: 15px; border-bottom: 2px solid #f7d55c; padding-bottom: 8px; color: #111; }
.side-card { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--text-main); padding: 10px 0; border-bottom: 1px solid #f9f9f9; transition: 0.2s; }
.side-card:hover { transform: translateX(4px); }
.side-card:last-child { border-bottom: none; }
.side-card img { width: 60px; height: 60px; object-fit: contain; border-radius: 6px; border: 1px solid #eee; }
.side-card-info { flex: 1; overflow: hidden; }
.side-title { font-size: 12px; font-weight: 600; line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-price { font-size: 14px; font-weight: 800; color: #B12704; }

.product-hero { background: #fff; padding: 30px 20px; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); border: 1px solid #eee; }
.article-section, .faq-section { background: #fff; padding: 30px 25px; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); border: 1px solid #eee; }
.product-galary-section{ background: #fff; padding: 30px 25px; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); border: 1px solid #eee; }
.product-galary-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  width: 100%;
}

.pg-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  margin: 2px auto;
  flex: 1 1 auto;
  max-width: 100%;
}

.pg-img-wrap img {
  display: block;
  width: 100%;      /* poora width le lega apne wrapper ka */
  height: auto;      /* natural aspect ratio - koi crop/distort nahi */
  border-radius: 8px;
  filter: brightness(1.05) contrast(1.12) saturate(1.2) drop-shadow(0 4px 10px rgba(0,0,0,0.15));
  transition: transform 0.4s ease, filter 0.4s ease;
}

.pg-img-wrap:hover img {
  filter: brightness(1.1) contrast(1.15) saturate(1.3) drop-shadow(0 6px 14px rgba(0,0,0,0.2));
}

/* Shine sweep */
.pg-img-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.12) 45%,
    rgba(255,255,255,0.25) 50%,
    rgba(255,255,255,0.12) 55%,
    rgba(255,255,255,0) 100%
  );
  transform: skewX(-20deg);
  z-index: 2;
  pointer-events: none;
  animation: shine-sweep 7s ease-in-out infinite;
}

@keyframes shine-sweep {
  0%   { left: -150%; }
  25%  { left: 150%; }
  100% { left: 150%; }
}

/* Sparkles */
.sparkle {
  position: absolute;
  color: #fff;
  text-shadow: 0 0 3px rgba(255,255,255,0.7), 0 0 6px rgba(255,215,0,0.4);
  z-index: 3;
  pointer-events: none;
}

.sparkle-1 { top: 10%; left: 15%; font-size: 7px; animation: twinkle 4s ease-in-out infinite; }
.sparkle-2 { top: 20%; right: 12%; font-size: 9px; animation: twinkle 5s ease-in-out infinite 1s; }
.sparkle-3 { bottom: 25%; left: 25%; font-size: 5px; animation: twinkle 4.5s ease-in-out infinite 2s; }
.sparkle-4 { bottom: 15%; right: 20%; font-size: 8px; animation: twinkle 5.5s ease-in-out infinite 3s; }
.sparkle-5 { top: 50%; left: 8%; font-size: 6px; animation: twinkle 4.2s ease-in-out infinite 1.5s; }

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6) rotate(0deg); }
  50%      { opacity: 0.6; transform: scale(1.1) rotate(15deg); }
}

/* --- MOBILE: har image apni poori row le, full width --- */
@media (max-width: 768px) {
  .product-galary-section {
    flex-direction: column;
    gap: 6px;
  }
  .pg-img-wrap {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }
}



.relate_product { width: 100%; }

.table-responsive br{ display: none; }
.product-container { width: 100%; display: flex; flex-wrap: wrap; gap: 30px; align-items: flex-start; }
.product-visuals { flex: 1; min-width: 300px; }

.main-image-container { 
    border-radius: 12px; 
    overflow: hidden; 
    margin-bottom: 10px; 
    background: #fff; 
    display: flex; 
    justify-content: center; 
    border: 1px solid #eee; 
    cursor: zoom-in; 
    position: relative;
    aspect-ratio: 1/1;
}
.main-image-container img#mainImage { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
    transition: transform 0.2s ease-out; 
    transform-origin: center center;
}
.zoom-hint { position: absolute; bottom: 10px; right: 10px; background: rgba(255,255,255,0.8); padding: 4px 8px; font-size: 11px; border-radius: 4px; color: #555; pointer-events: none; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
@media (hover: none) { .zoom-hint { display: none; } }

.thumbnail-container { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.thumbnail-container::-webkit-scrollbar { height: 4px; }
.thumbnail-container::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.thumbnail { width: 60px; height: 60px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; object-fit: cover; }
.thumbnail.active { border-color: var(--primary-color); }
.product-info { flex: 1.2; min-width: 300px; }
.badge { background: #fff3cd; color: #856404; padding: 5px 12px; border-radius: 50px; font-size: 13px; font-weight: 700; margin-bottom: 10px; display: inline-block; }
.offer-title { font-size: 24px; font-weight: 800; line-height: 1.3; margin-bottom: 15px; color: #111; }
.price-wrapper { margin-bottom: 20px; display: flex; align-items: center; gap: 15px; }
.offer-price { font-size: 34px; font-weight: 800; color: #B12704; }
.offer-oldprice { font-size: 16px; color: #888; text-decoration: line-through; }
.discount-badge-large { background: #ffe6e6; color: #d32f2f; padding: 2px 8px; border-radius: 4px; font-size: 14px; font-weight: bold; }
.offer-btn { display: block; width: 100%; max-width: 250px; background: #ffd814; color: #111; padding: 15px; border-radius: 50px; text-align: center; font-weight: 700; font-size: 16px; text-decoration: none; border: 1px solid #fcd200; box-shadow: 0 2px 5px rgba(213,217,217,0.5); transition: 0.2s; }
.offer-btn:hover { background: #f7ca00; transform: translateY(-2px); }

/* Telegram Style */
.telegram-promo-card { background: linear-gradient(135deg, #0088cc 0%, #00aaff 100%); border-radius: 12px; padding: 20px; margin-top: 25px; color: white; position: relative; overflow: hidden; }
.tg-icon-bg { position: absolute; right: -10px; bottom: -10px; font-size: 80px; opacity: 0.15; transform: rotate(-15deg); }
.tg-header { font-weight: 800; font-size: 18px; margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }
.tg-text { font-size: 13px; opacity: 0.9; margin-bottom: 15px; line-height: 1.4; }
.tg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tg-btn { background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.4); color: white; padding: 10px 5px; border-radius: 8px; text-align: center; font-weight: 700; font-size: 13px; text-decoration: none; transition: 0.3s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.tg-btn:hover { background: white; color: var(--telegram-blue); }

/* NEW: Community Hub Banner */
.community-promo-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; margin-top: 15px; position: relative; overflow: hidden; transition: 0.3s;}
.community-promo-card:hover { border-color: #cbd5e1; box-shadow: 0 4px 10px rgba(0,0,0,0.03); }
.comm-header { font-weight: 800; font-size: 18px; margin-bottom: 5px; display: flex; align-items: center; gap: 8px; color: #0f1419; }
.comm-header i { color: #8b5cf6; }
.comm-text { font-size: 13px; color: #536471; margin-bottom: 15px; line-height: 1.4; }
.comm-actions { display: flex; }
.comm-btn { color: white; padding: 12px 20px; border-radius: 8px; text-align: center; font-weight: 700; font-size: 14px; text-decoration: none; border: none; cursor: pointer; transition: 0.3s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 250px;}
.comm-btn.start-btn { background: #8b5cf6; }
.comm-btn.start-btn:hover { background: #7c3aed; transform: translateY(-2px); }
.comm-btn.active-btn { background: #10b981; }
.comm-btn.active-btn:hover { background: #059669; transform: translateY(-2px); }

/* Article & FAQ */
.article-content { font-size: 15px; line-height: 1.6; color: #333; }
.article-content h1 { font-size: 24px; margin: 20px 0 15px; }
.article-content h2 { font-size: 20px; margin-top: 25px; margin-bottom: 10px; border-left: 4px solid #f7d55c; padding-left: 12px; }
.article-content img { max-width: 100%; height: auto; border-radius: 8px; }
.table-responsive { width: 100%; overflow-x: auto; margin: 20px 0; border-radius: 8px; box-shadow: 0 1px 5px rgba(0,0,0,0.05); border: 1px solid #eee; }
.ai-table { width: 100%; border-collapse: collapse; min-width: 100%; }
.ai-table th, .ai-table td { padding: 10px 15px; text-align: left; border-bottom: 1px solid #f1f1f1; font-size: 14px;}
.ai-table th { background-color: #232f3e; color: white; font-weight: 600; text-transform: uppercase; width: 50%; }
.ai-table tr:nth-child(even) { background-color: #fafafa; }
.faq-title { font-size: 20px; margin-bottom: 20px; font-weight: 800; border-bottom: 2px solid #eee; padding-bottom: 10px; }
#product-galary-section-title{ font-size: 20px; margin-bottom: 20px; font-weight: 800; border-bottom: 2px solid #eee; padding-bottom: 10px; display:inline-block;  margin-top:-50px; position:absolute;}
.faq-item { padding: 12px 0; border-bottom: 1px solid #eee; font-size: 15px; }
.faq-question { font-weight: 700; color: #111; margin-bottom: 5px; }

/* Related Grid */
.headline { font-size: 20px; font-weight: 800; margin-bottom: 15px; padding-bottom: 10px; display: flex; justify-content: space-between; }
.grid-product-wrapper { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; }
.grid-product { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 10px; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }
.grid-product:hover { box-shadow: 0 4px 10px rgba(0,0,0,0.08); border-color: #ccc; }
.grid-product img { width: 100%; aspect-ratio: 1; object-fit: contain; margin-bottom: 10px; }
.grid-product .title { font-size: 13px; font-weight: 600; line-height: 1.4; height: 36px; overflow: hidden; margin-bottom: 5px; color: #007185;}
.grid-product .price { font-weight: 800; font-size: 16px; color: #B12704;}

.filter-bar { background: #fff; padding: 12px 15px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 15px; align-items: center; justify-content: space-between; border: 1px solid #eee; }
.filter-group { display: flex; align-items: center; gap: 10px; }
.filter-input { padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; outline: none; }
.filter-btn { background: #232f3e; color: white; border: none; padding: 6px 15px; border-radius: 4px; cursor: pointer; transition: 0.2s; font-size:13px; font-weight: bold; }
.filter-btn:hover { background: #37475a; }
.price-inputs { display: flex; gap: 5px; align-items: center; }
.price-inputs input { width: 70px; }

@keyframes gradientShimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } }
.shimmer-bg { background: #f6f7f8; background-image: linear-gradient(90deg, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%); background-repeat: no-repeat; background-size: 1000px 100%; animation: gradientShimmer 1.5s infinite linear; border-radius: 6px; }
.shimmer-card { border: 1px solid #eee; border-radius: 8px; padding: 10px; background: #fff; display: flex; flex-direction: column; }
.s-img { width: 100%; aspect-ratio: 1; border-radius: 6px; margin-bottom: 10px; }
.s-line { height: 12px; margin-bottom: 6px; border-radius: 4px; }
.s-line.short { width: 60%; }
.s-price { height: 18px; width: 40%; margin-top: 10px; border-radius: 4px; }

.side-skel-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f5f5f5;}
.side-skel-img { width: 60px; height: 60px; border-radius: 6px; flex-shrink:0;}
.side-skel-content { flex: 1; }

#infinite-trigger { height: 20px; width: 100%; margin-top: 20px; text-align: center; color: #888; font-size: 14px; font-weight: bold; }

#imagePopupOverlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 9999; display: none; justify-content: center; align-items: center; }
#imagePopupImg { max-width: 100%; max-height: 90vh; transition: transform 0.2s ease;}
.popup-close { position: absolute; top: 20px; right: 20px; color: white; font-size: 30px; cursor: pointer; z-index: 10001; background: rgba(0,0,0,0.5); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; line-height: 1; }
.popup-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.2); color: white; padding: 15px; cursor: pointer; border-radius: 50%; border: none; font-size: 20px; }
.popup-prev { left: 20px; }
.popup-next { right: 20px; }
#backToTop { position: fixed; bottom: 20px; right: 20px; background-color: #232f3e; color: white; width: 45px; height: 45px; border-radius: 50%; border: none; font-size: 20px; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.3); z-index: 1000; display: none; align-items: center; justify-content: center; transition: 0.3s; }

@media (max-width: 1024px) {
    .page-layout { display: flex; flex-direction: column; }
    .sidebar { width: 100%; position: static; margin-top: 10px; order: 3;}
    .main-content { order: 1; width: 100%; }
    .left-sidebar { order: 2; } 
    .right-sidebar { order: 3; }
}
@media (max-width: 768px) {
    .offer-title { font-size: 20px; }
    .grid-product-wrapper { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .popup-nav { display: none; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .mobile-sticky-footer { position: fixed; bottom: 0; left: 0; width: 100%; background: #fff; padding: 10px 15px; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); display: flex; justify-content: space-between; align-items: center; z-index: 1000; }
    body { padding-bottom: 60px; }
    #backToTop { bottom: 70px; right: 15px; } 
}
@media (min-width: 769px) { .mobile-sticky-footer { display: none; } }

.product-badge{
    position:absolute;
    top:10px;
    left:-8px;
    z-index:20;

    padding:6px 12px;
    font-size:12px;
    font-weight:800;
    letter-spacing:.5px;
    color:#fff;
    text-transform:uppercase;

    background:linear-gradient(
        180deg,
        #ff4b4b 0%,
        #e4002b 45%,
        #b40020 100%
    );

    border-radius:0 8px 8px 0;

    box-shadow:
        0 8px 18px rgba(0,0,0,.28),
        inset 0 2px 0 rgba(255,255,255,.35),
        inset 0 -2px 0 rgba(0,0,0,.2);

    transform:perspective(180px) rotateY(-15deg);
    transform-origin:left center;
}

.product-badge::before{
    content:"";
    position:absolute;
    left:0;
    bottom:-8px;

    border-top:8px solid #6f0014;
    border-left:8px solid transparent;
} 

.product-badge::after{
    content:"";
    position:absolute;
    inset:0;
    border-radius:inherit;

    background:linear-gradient(
        90deg,
        rgba(255,255,255,.45) 0%,
        rgba(255,255,255,.12) 25%,
        transparent 55%,
        rgba(255,255,255,.15) 100%
    );

    pointer-events:none;
}
.product-card:hover .product-badge{
    transform:
        perspective(180px)
        rotateY(-15deg)
        translateY(-2px)
        scale(1.04);
}  
/* style for related product show */
.show-related-wrap {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.show-related-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: #fff;
  color: #7c3aed;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid #7c3aed;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: color 0.3s ease, box-shadow 0.3s ease, transform 0.25s ease, top 0.3s ease;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.12);
}

.show-related-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
  z-index: 0;
}

.show-related-btn span,
.show-related-btn svg {
  position: relative;
  z-index: 1;
}

.show-related-btn:hover {
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.show-related-btn:hover::before {
  transform: scaleX(1);
}

.show-related-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.show-related-btn:hover svg {
  transform: translateY(2px);
}

/* STUCK state - sirf class add/remove hogi, same button */
.show-related-btn.btn-stuck {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
  z-index: 99999;
}

.show-related-btn.btn-stuck:hover {
  transform: translateX(-50%) translateY(-1px);
}

@media (max-width: 900px) {
  .show-related-btn.btn-stuck {
    top: 80px;
  }
}