main .container{
  padding: clamp(16px, 2.5vw, 32px);
}

.productDetails{
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 100px;

}
.productDetails .images img{
    width: 100%;
    height: auto;
}
.details .category_name{
    font-size: 14px;
    color: #868686;
    margin-bottom: 6px;
}
.details .product_name{
    font-size: 26px;
    font-weight: 400;
    color: #000;
    margin-bottom: 12px;
}
.details .product_price{
    font-size: 20px;
    font-weight: 400;
    color: #000;
    margin-bottom: 20px;
    position: relative;
}
.details .product_price::after{
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #86868694;
}
.product_des{
    font-size: 16px;
    color: #868686;
    margin: 20px 0;
}
.buttons{
    display: flex; 
    justify-content: left;
    align-items: center;
    width: 100%;
}
.buttons .counts{
    min-width: 140px;
    width: 140px;
    height: 55px;
    border: 2px solid rgb(134 134 134 / 50%);
    text-align: center;
    display: inline-block;
    position: relative;
    margin-right: 20px;
    touch-action:manipulation;
}
.counts_btns{
    position: absolute;
    display: block;
    padding: 0;
    top: 0;
    width: 30px;
    height: 51px;
    border: 0;
    background: 0 0;
    color:  rgb(134 134 134 / 50%);
    font-size: 24px;
    display: flex;
    align-items: center;
    cursor: pointer;
}
#minus{
    left: 0;
    text-align: left;
    padding-left: 15px;
}
#plus{
    right: 0;
    text-align: right;
    padding-right: 15px;
}
.product_count{
    width: 35px;
    border: 0px;
    height: 51px;
    background: 0px 0px;
    padding: 0;
    font-weight: 500;
    font-size: 18px;
    color: #000;
    text-align: center;
   
}
.product_count:focus{
    outline: none;
    
}
/* shareBtn */
/* ===== Share Button + Icons (Fixed) ===== */

.share-wrap{
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 18px;
}

/* زر Share */
#shareBtn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  height: 44px;
  padding: 0 16px;
  min-width: 120px;

  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #111827;
  color: #fff;

  font-weight: 600;
  font-size: 0.92rem;

  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}

#shareBtn ion-icon{
  font-size: 18px;
}

#shareBtn:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 12px 20px rgba(2, 8, 23, 0.18);
}

#shareBtn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.18), 0 12px 20px rgba(2, 8, 23, 0.18);
}

/* قائمة الأيقونات (Popup) */
.share-options{
  position: absolute;
  top: 54px;
  left: 0;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 12px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  box-shadow: 0 18px 35px rgba(2, 8, 23, 0.14);

  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: .2s ease;

  backdrop-filter: blur(10px);
  z-index: 100;
}

/* سهم صغير فوق القائمة */
.share-options::before{
  content:"";
  position:absolute;
  top: -6px;
  left: 18px;
  width: 12px;
  height: 12px;
  background: rgba(255,255,255,0.95);
  border-left: 1px solid rgba(15, 23, 42, 0.10);
  border-top: 1px solid rgba(15, 23, 42, 0.10);
  transform: rotate(45deg);
}

/* الحالة المفتوحة */
.share-options.show{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* شكل الأيقونات */
.share-options a{
  width: 40px;
  height: 40px;
  border-radius: 12px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  color: #111827;

  background: rgba(17, 24, 39, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.10);

  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}

.share-options a ion-icon{
  font-size: 20px;
}

/* Hover */
.share-options a:hover{
  transform: translateY(-1px);
  background: rgba(200, 0, 0, 0.08);
  border-color: rgba(200, 0, 0, 0.25);
}

/* موبايل: خليه صفين */
@media (max-width: 520px){
  .share-options{
    flex-wrap: wrap;
    width: 210px;
  }
}

/* to remove updown from input number */
/* Chrome, Safari, Edge, Opera */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
   margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}
#btn_add{
    background-color: #000;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    min-height: 55px;
    min-width: 55px;
    width: 70%;
    text-transform: uppercase;
    border: none;
    padding: 5px 25px;
    cursor: pointer;
}
.toast-overlay{
    position: absolute;
    top: -1000px;
    left: 0;
    width: 100%;
    height: 100vh;
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.toast-overlay.show{
    top: 0;
}
.success-msg{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    border: 1px solid #000;
    padding: 24px 50px;
}
.success-msg ion-icon{
    font-size: 48px;
    color: green;
    margin-bottom: 24px;

}
.success-msg h4{
    font-size: 14px;
    font-weight: 400;
}


/* تنسيق السعر */
.price_container { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.old_price { text-decoration: line-through; color: #999; font-size: 18px; }

/* التقييم */
.product_rating { color: #f1c40f; margin-bottom: 10px; font-size: 18px; }

/* خيارات الألوان */
.options_section { margin-bottom: 20px; }
.options_section h4 { font-size: 14px; margin-bottom: 10px; text-transform: uppercase; }
.color_options { display: flex; gap: 10px; }
.color_dot { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: 0.3s; }
.color_dot.active { border-color: #000; transform: scale(1.1); }

/* خيارات المقاسات */
.size_options { display: flex; gap: 10px; }
.size_box { padding: 8px 15px; border: 1px solid #ddd; cursor: pointer; font-size: 14px; transition: 0.3s; }
.size_box.active { background-color: #000; color: #fff; border-color: #000; }

/* التعليقات */
.reviews_section { margin-top: 50px; border-top: 1px solid #eee; padding-top: 30px; }
.review_card { background: #f9f9f9; padding: 15px; margin-bottom: 10px; border-radius: 5px; }
.review_card h5 { margin: 0 0 5px 0; }
.review_card p { font-size: 14px; color: #666; }

/* المنتجات المقترحة */
.related_products { margin-top: 80px; }
.products_grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    gap: 20px; 
    margin-top: 20px; 
}
/* استخدم نفس تنسيقات كارت المنتج من صفحة المنتجات الرئيسية */



.related-card{
  background:#fff;
  border:1px solid #eee;
  border-radius:10px;
  overflow:hidden;
  transition:.2s ease;
}
.related-card:hover{ transform: translateY(-2px); }

.related-img{ position:relative; overflow:hidden; }
.related-img img{ width:100%; display:block; }

.related-info{ padding:10px 12px; }
.related-info h4{ font-size:14px; font-weight:500; margin:0 0 6px; }
.related-info p{ margin:0; font-size:13px; color:#111; }

/* تنسيق قسم الصور بالكامل */
.productDetails .images {
    display: flex;
    flex-direction: column; /* ترتيب رأسي: الصورة الكبيرة ثم المصغرة */
    gap: 15px;
}

/* تحديد حجم الصورة الكبيرة فقط */
#product_image {
    width: 100%;
    height: auto;
    max-height: 700px; /* لضمان عدم خروجها عن الشاشة */
    object-fit: cover;
    border-radius: 15px; /* زوايا دائرية */
}

/* حاوية الصور المصغرة */
.thumbnails-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap; /* للسماح بنزول الصور لو كانت كثيرة */
}

/* تنسيق الصور المصغرة (Thumbnail) */
.thumb-item {
    width: 80px !important;  /* إجبار الحجم الصغير */
    height: 80px !important;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.3s;
}

/* عند اختيار الصورة */
.active-thumb {
    border-color: #000 !important;
    opacity: 0.8;
}

/* تحسين شكل الشبكة في الشاشات الكبيرة */
.productDetails {
    display: grid;
    grid-template-columns: 1fr 1fr; /* قسم للصور وقسم للبيانات */
    gap: 50px;
    align-items: start;
}


#checkIcon svg path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw 0.6s ease-in-out forwards;
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

.success-msg {
    text-align: center; /* لتوسيط الأيقونة والنص */
}
/* ===== Lightbox ===== */
.lightbox{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.lightbox.show{ display: block; }

.lightbox-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(2px);
}

.lightbox-panel{
  position: relative;
  width: min(980px, 92vw);
  height: min(78vh, 720px);
  margin: 8vh auto 0;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  display: grid;
  place-items: center;
}

.lb-figure{
  width: 100%;
  height: 100%;
  margin: 0;
  display: grid;
  place-items: center;
  position: relative;
}

#lbImg{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lb-cap{
  position: absolute;
  left: 14px;
  bottom: 14px;
  color: rgba(255,255,255,.92);
  font-size: 13px;
  background: rgba(0,0,0,.35);
  padding: 8px 10px;
  border-radius: 12px;
}

.lb-close{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.lb-close ion-icon{ font-size: 22px; }

.lb-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.lb-nav ion-icon{ font-size: 22px; }

.lb-prev{ left: 12px; }
.lb-next{ right: 12px; }

@media (max-width: 520px){
  .lightbox-panel{
    height: min(78vh, 560px);
    margin-top: 10vh;
  }
}

   /* ====== Mobile Bottom Bar ====== */
.bottom-bar{
  display:none;
}
@media (max-width: 820px){
  .bottom-bar{
    grid-template-columns: repeat(5, 1fr);
  }

  .bb-back ion-icon{
    font-size: 22px;
  }
}

/* موبايل */
@media (max-width: 820px){

  /* اخفاء منيو الهيدر العلوية */
  #navbar{ display:none; }

  /* تقليل الهيدر */
  .header_top{
    padding-bottom: 10px;
  }

  /* نخفي زر السلة العلوي (اختياري) */
  #cartBtnTop{ display:none; }

  /* نظبط مساحة المحتوى عشان البار اللي تحت */
  body{
    padding-bottom: 78px; /* نفس ارتفاع البار تقريباً */
  }

  .bottom-bar{
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;

    height: 64px;
    padding: 8px 10px;

    background: rgba(255,255,255,.92);
    border: 1px solid rgba(15,23,42,.10);
    border-radius: 18px;
    box-shadow: 0 18px 35px rgba(2,8,23,.14);

    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;

    backdrop-filter: blur(10px);
    z-index: 9998;
  }

  .bb-item{
    position: relative;
    text-decoration: none;
    border: 0;
    background: transparent;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;
    color: #111827;
    font-size: 11px;
    cursor: pointer;
    border-radius: 14px;
  }

  .bb-item ion-icon{
    font-size: 20px;
  }

  .bb-active{
    background: rgba(17,24,39,.08);
    font-weight: 600;
  }

  .bb-cart{
    outline: none;
  }

  .bb-badge{
    position: absolute;
    top: 6px;
    right: 18px;

    min-width: 18px;
    height: 18px;
    padding: 0 5px;

    background: #111827;
    color: #fff;
    font-size: 10px;
    line-height: 18px;
    border-radius: 999px;
    font-style: normal;
  }
}
