/* =========================================
   1. Settings & Navigation
   ========================================= */
:root {
  --primary: #066832;
  --m-wahabapp: #066832;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-sub: #64748b;
  
  --radius-card: 12px;
  --radius-btn: 6px;
  --shadow-card: 0 2px 5px rgba(0,0,0,0.05);
}

body {
  background-color: var(--bg-body) !important;
  margin: 0;
  padding-top: 60px; /* Space for Navbar */
}

#shopnavbar {
  left: 0; top: 0; width: 100%; height: 60px;
  background-color: var(--m-wahabapp);
  display: flex; justify-content: space-between; align-items: center;
  position: fixed; z-index: 500; padding: 0 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-left, .nav-right { display: flex; align-items: center; gap: 15px; }
.btn-lg { color: white; background: transparent; border: none; padding: 5px; }
.bi { font-size: 22px !important; }

/* Dropdowns */
.dropdown-content {
  display: none; position: absolute; right: 10px; top: 50px;
  background: white; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  min-width: 150px; z-index: 1000; overflow: hidden;
}
.dropdown-content-display { display: block; }
.dropdown-content a {
  display: block; padding: 12px; color: #333; text-decoration: none; font-size: 1.3rem;
  border-bottom: 1px solid #f1f1f1;
}

/* =========================================
   2. Compact Profile Header
   ========================================= */
#profile_section {
  background: #fff;
  margin-bottom: 15px;
  padding-bottom: 15px; /* Reduced bottom padding */
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.user-header-wrapper {
  height: 160px; /* Reduced height to be more compact */
  position: relative;
  overflow: hidden;
}

.user-header { width: 100%; height: 100%; object-fit: cover; }
.user-header-overlay { background: rgba(0,0,0,0.3); position: absolute; top:0; left:0; width:100%; height:100%; }

.user-info-bar {
  text-align: center;
  margin-top: -50px; /* Pulls content up slightly less */
  position: relative;
  z-index: 10;
  padding: 0 15px;
}

.user-icon {
  width: 100px;  /* Smaller, compact size */
  height: 100px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  background: #fff;
  object-fit: cover;
  margin-bottom: 5px;
}

.username-dev {
  font-size: 1.8rem !important; /* Smaller Font */
  font-weight: 800;
  margin: 5px 0;
  color: var(--text-main);
}

.ufo-bar-fff {
  display: inline-block;
  background: #f1f5f9;
  padding: 4px 12px;
  border-radius: 15px;
  text-decoration: none;
  font-weight: 600;
  color: var(--text-sub);
  font-size: 1.1rem; /* Smaller Font */
  margin-top: 10px;
}

.ufo-bar-fff p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* New Organized Meta Section (Left & Right) */
.profile-meta-row {
  display: flex;
  justify-content: space-between; /* Spreads items to edges/center */
  align-items: center;
  margin: 15px auto 10px auto;
  max-width: 400px; /* Constrain width for better look on wide screens */
  padding: 0 10px;
}

.profile-meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 10px;
  position: relative;
}

/* Vertical divider lines between items */
.profile-meta-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background-color: #e2e8f0;
}

.meta-value {
  font-size: 1.3rem; /* Compact Value Font */
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.meta-label {
  font-size: 1rem; /* Smaller Label Font */
  color: var(--text-sub);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Delivery Badge - Compact */
.delivery-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #ecfdf5;
  color: #065f46;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 1.1rem; /* Smaller Font */
  font-weight: 600;
  margin-top: 8px;
  border: 1px solid #d1fae5;
}

.delivery-badge i {
  font-size: 1.2rem;
}

/* =========================================
   3. The 2-Column Grid (Grid View)
   ========================================= */
#BodySection {
  display: grid !important;
  /* Forces 2 columns: Min width 150px, Max 1fr */
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)) !important;
  gap: 15px !important;
  padding: 15px !important;
  margin: 0 auto !important;
  max-width: 1200px;
}

/* Mobile: Force 2 columns explicitly if screen is small */
@media (max-width: 400px) {
  #BodySection {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    padding: 10px !important;
  }
}

/* Reset Bootstrap overrides */
.profile-list {
  width: 100% !important;
  max-width: none !important;
  flex: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* =========================================
   4. Grid Product Card
   ========================================= */
.res-card {
  min-height:450px;
  background: white;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid #f1f5f9;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pc-res-image {
  width: 100%;
  padding-top: 75%; /* 4:3 Aspect Ratio for images */
  position: relative;
  background: #f8fafc;
}

.pc-image-res {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pc-res-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center; /* Ensure contents are centered horizontally */
  flex-grow: 1;
}

.res-name {
  width: 100%; /* Force full width to ensure text-align works */
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  margin-bottom: 5px !important;
  line-height: 1.3 !important;
  height: 3.6rem; /* Limit to 2 lines height approx */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-align: center; /* Centered as requested */
}

.pc-res-info-text {
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center; /* Center badges */
}

/* Price Tags */
.badge {
  font-size: 1.1rem !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
}
.pricetag { background: rgba(6,104,50,0.1) !important; color: var(--primary) !important; }
.text-dark { background: #f1f5f9 !important; color: #64748b !important; }

.bg-wahab {
--bs-bg-opacity: 1;
background-color: var(--m-wahabapp) !important;
}

/* Add Button */
.addtothecart {
  margin-top: auto;
  width: 100%;
}

.btn-success {
  width: 100%;
  background: var(--primary) !important;
  border: none !important;
  border-radius: var(--radius-btn) !important;
  padding: 8px !important;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
}

/* =========================================
   5. Cart Modal Specific Updates
   ========================================= */

/* 1. Reset the card container to be flat and list-like */
#cart_modal .profile-list {
    width: 100% !important; /* Ensure full width in modal */
    margin: 0 !important;
}

#cart_modal .res-card {
    min-height:150px;
    flex-direction: row; /* Switch from vertical to horizontal layout */
    box-shadow: none;    /* Remove shadow for cleaner list look */
    border: none;
    border-bottom: 1px solid #f1f5f9; /* Separator line */
    border-radius: 0;
    padding: 10px 0;
    align-items: center;
    height: auto; /* Allow height to adjust to content */
}

/* 2. Target the specific Cart Item Container generated in JS */
.pc-res-cart {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
    gap: 15px;
}

/* 3. Fix the Image Thumbnail */
/* We need to override the padding-top: 75% hack from the main grid */
.pc-res-cart .pc-res-image {
    width: 80px;  /* Fixed thumbnail size */
    height: 80px;
    padding-top: 0 !important; /* Remove aspect ratio hack */
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0; /* Prevent squishing */
}

.pc-image-cart-res {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: static; /* Reset absolute positioning */
}

/* 4. Fix the Info Area (Name, Price, Qty) */
.pc-res-cart .pc-res-info {
    padding: 0;
    align-items: flex-start; /* Left align text */
    text-align: left;
    width: 100%;
    justify-content: center;
}

/* Product Name in Cart */
.pc-res-cart .res-name {
    font-size: 1.1rem !important;
    text-align: left;
    margin-bottom: 5px !important;
    height: auto; /* Remove fixed height constraint */
    -webkit-line-clamp: 2; /* Allow 2 lines of text */
}

/* Price and Quantity Row */
.pc-res-cart .pc-res-info-text {
    display: flex;
    justify-content: space-between; /* Push price left, qty right */
    align-items: center;
    width: 100%;
    margin: 0;
}

/* Price Styling */
.pc-res-cart .res-desc {
    color: var(--primary);
    font-weight: 800;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* 5. Clean up the Quantity Inputs */
#cart_modal .input-group {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: none;
}

#cart_modal .input-group-text {
    padding: 5px 10px;
    cursor: pointer;
}

#cart_modal .form-control {
    border: none;
    background: #fff;
    font-weight: 700;
    color: var(--text-main);
    height: auto;
    padding: 5px;
}

/* 6. Total Price Footer Area */
#TotalPriceDiv {
    background-color: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

#TotalPrice {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.3rem;
    text-align: right;
}


.txt-medium{

font-size:18px !important;

}
.txt-large{

font-size:20px !important;

}
.txt-small{

font-size:12px !important;

}
.txt-xsmall{

font-size:12px !important;

}
.txt-xxsmall{

font-size:13px !important;
