.titleCatecory {
    width: 100%;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    background: transparent;
    color: var(--color-bg);
    border-bottom: var(--color-icon) 1px solid;
}
.navbarsection h5{
    color: var(--color-icon);
    font-size: 14px;
}
.navbarsection span{
    color: var(--color-dark);
    font-weight: bolder;
}
.catecoryname{
    color: var(--color-dark);
    font-weight: bolder;
    font-size: 24px;
} 

.itemDiscription {
    display: flex;
    align-items: stretch; /* IMPORTANT */
    padding: 30px;
    border-bottom: var(--color-primary) 2px solid;
    gap: 4%;
}


.image,
.info {
    width: 48%;
}

.image {
    width: 48%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--color-white);
    border-radius: 18px;
    padding: 20px;

    max-height: 520px;   /* CONTROL HEIGHT HERE */
}



.image img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.image img {
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.12));
}


.info h2{
    color: var(--color-primary);
    font-family: Outfit;
    font-size: 36px;
    font-style: normal;
    font-weight: 600;
    line-height: 30px; /* 83.333% */
    letter-spacing: 1.44px;
}
.rating_item i{
    font-size: 14px;
}
.rating_item label{
    color: var(--color-muted);
    font-family: Poppins;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%; /* 21px */
}
.price h1{
    color: #000;
    font-family: Poppins;
    font-size: 24px;
    font-style: normal;
    font-weight: 500;
    line-height: 150%; /* 36px */
}
.shortdiscription,.ingredients{
    padding: 10px;
    border-bottom: var(--color-primary) 2px solid;
}
.ingredients h4{
 
    color: var(--color-muted);
    font-family: Poppins;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%; /* 21px */
}
.shortdiscription p,.ingredients p{
    color: #000;
    font-family: Poppins;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 21px; /* 150% */
}
.mini{
    margin: 10px;
    color: var(--color-muted);
    font-family: Poppins;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%; /* 21px */
}
.addtocart{
    display: flex;
    padding: 15px;
    border-bottom: var(--color-muted) 1px solid;
}
.inputquantity{
    padding: 8px;
    border-radius: 170px;
    border: 1px solid var(--Gray-Scale-Gray-100, #E6E6E6);
    background: var(--Gray-Scale-White, #FFF);
    margin-right: 15px;
}
.inputquantity input{
    border: transparent;
    width: 100px;
    text-align: center;
}
.btnquantity{
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: transparent;
}
.btnadd{
    margin: 0 15px;
    width: 150px;
    color: var(--color-bg);
    border: transparent;
    border-radius: 5px;
}
.btnbuy{
    background-color: var(--color-dark);
}
.btncart{
    background-color: var(--color-primary);
}
.shareitem {
    padding: 15px;
}
.shareitem button{
    background-color: transparent;
    border: transparent;
    margin:  0 8px;
}
.secure{
    padding: 15px;
    display: flex;
    justify-content: space-evenly;
}

.takeSection{
  margin: 30px 0;
  text-align: center;
  
}
.takeSection label{
  color: var(--color-muted);
  font-family: Outfit;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 24px; /* 150% */
  cursor: pointer;
  margin: 0 15px;
  padding: 5px 10px;
  border-bottom: 2px solid transparent;
}
#Description_section,
#reviws_section {
    display: none;          /* hidden by default */
    max-height: 50vh;       /* max visible height */
    overflow-y: auto;       /* enable vertical scroll only */
    overflow-x: hidden;
    padding-right: 10px;    /* prevents text under scrollbar */
}


#Description_section.active-section {
  display: flex; /* الوصف يظهر كـ flex */
}
 
#reviws_section.active-section {
  display: block; /* المراجعات تظهر كـ block */
}
.sec_Des_text{ 
  width: 48%;
  padding: 30px;
}
.sec_Des_img {
    width: 48%;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sec_Des_img img {
    max-width: 100%;
    max-height: 35vh;   /* LIMIT HERE */
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.active-tab {
        color: var(--color-primary) !important;
        border-bottom: 2px solid var(--color-primary) !important;
        font-weight: bold;
    }

    section {
        display: none;
    }

    section.active-section {
        display: block;
    }

    /* Container كل المراجعات */
#reviews_container {
    width: 80%;
    margin: 20px auto ;
}


/* كل مراجعة */
.review {
    border-bottom: 1px solid #ddd;
    padding: 15px 10px;
    margin-bottom: 10px;
}

/* Header الاسم و الوقت */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

/* اسم العميل */
.client-name {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

/* وقت المراجعة */
.review-time {
    font-size: 12px;
    color: #888;
}

/* تقييم النجوم */
.review-rate {
    color: #f5c518; /* لون النجوم أصفر */
    font-size: 14px;
    margin-bottom: 5px;
}

/* نص التعليق */
.review-comment {
    font-size: 14px;
    line-height: 1.4;
    color: #444;
    margin-bottom: 5px;
}

/* زر Load More */
#load_more {
    display: inline-block;
    padding: 8px 15px;
    margin: 15px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    color: #333;
    font-size: 14px;
    border-radius: 5px;
    transition: all 0.2s;
}

#load_more:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* نجوم التقييم (إذا أردت يمكن تحويلها إلى أيقونات) */
.review-rate span {
    margin-right: 2px;
}



/*items*/
.container_items {
    flex: 1;
    width: 100%;
    margin: 25px 0;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 3 per row on big screens */
    gap: 25px;
}


/* ========== CARD ========== */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.card-image {
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 220px; /* fixed height */
    object-fit: cover;
    transition: transform 0.3s;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    text-align: center;
    padding: 10px 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover .card-overlay {
    opacity: 1;
}

.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-title {
    display: flex;
    justify-content: space-between; /* name left, rating right */
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.item-rating {
    color: #f5c518;
    font-weight: bold;
    font-size: 14px;
}

.item-desc {
    font-size: 14px;
    color: #666;
    min-height: 40px;
}

.price {
    font-size: 16px;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 8px;
}

.price.login-required {
    color: #ff4d4f;
    font-weight: 600;
}

.btn-cart {
    padding: 10px;
    width: 100%;
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-cart:hover {
    background-color: var(--color-primary-variant);
}
 
.extra-shipping {
    display: inline-flex; /* inline makes it small, not full-width */
    justify-content: space-between;
    align-items: center;
    background: #f9fafb; /* soft light background */
    border: 1px solid #e0e0e0; /* subtle border */
    border-radius: 12px;
    padding: 8px 16px; /* smaller padding */
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.2s ease-in-out;
    margin-top: 15px;
}

.extra-shipping:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: #ffffff;
}

.extra-shipping label {
    font-weight: 500;
    margin-right: 8px;
}

.shipping-amount {
    font-weight: 600;
    color:var(--color-primary); /* blue accent for price */
}

/* remove overlay completely */
.card-overlay {
    display: none;
}

.title_item {
  margin: 25px;
  color: var(--color-primary);
  font-family: Outfit;
  font-size: 36px;
  font-style: normal;
  font-weight: 600;
  line-height: 48px; /* 133.333% */
  letter-spacing: 1.44px;
}

.discounts .alert {
    margin-bottom: 4px;
    font-weight: 500;
}

/* Large desktops / smaller wide screens */
@media (max-width: 1200px) {
  .itemDiscription {
    padding: 24px;
  }
  .image, .info {
    width: 48%;
  }
  .image img {
    max-width: 480px;
    width: 100%;
    height: auto;
  }
  .info h2 { font-size: 32px; line-height: 1.05; }
  .price h1 { font-size: 22px; }
  .inputquantity input { width: 90px; }
}

/* Medium screens / tablets */
@media (max-width: 992px) {
  .titleCatecory {
    padding: 20px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .itemDiscription {
    flex-direction: row;
    gap: 20px;
    padding: 20px;
  }
  .image, .info {
    width: 50%;
  }
  .image img {
    max-width: 420px;
  }
  .info h2 { font-size: 28px; }
  .price h1 { font-size: 20px; }
  .rating_item i { font-size: 13px; }
  .inputquantity input { width: 80px; }
  .btnadd { width: 140px; margin: 0 10px; }
}
.container_items {
    grid-template-columns: repeat(4, 1fr); /* 3 per row on big screens */

}

/* Small tablets / large phones */
@media (max-width: 768px) {
  .titleCatecory {
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  /* Stack image and info vertically for narrow viewports */
  .itemDiscription {
    flex-direction: column;
    padding: 16px;
  }
  .image, .info {
    width: 100%;
  }
  .image { margin-bottom: 18px; }
  .image img {
    width: 100%;
    max-width: 360px;
    height: auto;
    margin: 0 auto;
    display: block;
  }

  .info h2 {
    font-size: 26px;
    line-height: 1.1;
  }
  .price h1 { font-size: 20px; }
  .shortdiscription p { font-size: 14px; }

  .addtocart {
    flex-direction: column;
    align-items: stretch;
  }
  .inputquantity {
    margin-bottom: 12px;
    width: 160px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .inputquantity input { width: 60px; }
  .btnadd {
    width: 100%;
    margin: 6px 0;
  }

  .shareitem button { margin: 0 6px 6px 0; }
  .secure { flex-direction: column; gap: 12px; align-items: flex-start; }

  #Description_section.active-section{
    flex-direction:column-reverse;
  }
  .sec_Des_text,.sec_Des_img{
    width: 100%;
    padding: 30px;
  }
  .container_items {
    grid-template-columns: repeat(2, 1fr); /* 3 per row on big screens */

}
}

/* Phones / very small screens */
@media (max-width: 576px) {
  .titleCatecory {
    padding: 14px;
    text-align: center;
    align-items: center;
  }
  .titleCatecory .navbarsection h5 { font-size: 13px; }
  .titleCatecory .catecoryname h2 { font-size: 20px; }

  .itemDiscription {
    padding: 12px;
  }
  .image img {
    max-width: 100%;
  }

  .info h2 { font-size: 20px; }
  .price h1 { font-size: 18px; }

  .rating_item i { font-size: 12px; }
  .rating_item label { font-size: 13px; }

  .inputquantity {
    width: 140px;
    padding: 6px;
  }
  .inputquantity input { width: 48px; font-size: 14px; }

  .btnadd {
    font-size: 15px;
    padding: 10px;
  }

  /* Make share icons smaller and easier to tap */
  .shareitem button svg { width: 28px; height: 28px; }
  .shareitem { padding: 10px 0; }

  /* Secure cards stack */
  .secure { flex-direction: column; align-items: stretch; gap: 10px; }
  .card_secure { display: flex; gap: 12px; align-items: center; }
  .card_secure svg { width: 36px; height: 36px; }

  /* Reduce large image left-over space */
  .image, .info { padding-left: 0; padding-right: 0; }
  #reviews_container {
    width: 100%;
    margin: 20px 0 ;
}
.container_items {
    grid-template-columns: repeat(1, 1fr); /* 3 per row on big screens */

}
}

/* Utility tweak: make buttons easier to tap on touch devices */
@media (pointer: coarse) {
  .btnadd, .btnquantity, .inputquantity input, .shareitem button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
}
