/* ==========================================================================
   سلة الاستفسار - وادي السلاطين
   Inquiry Cart System
   ========================================================================== */

/* Navbar Cart Button - Disabled in favor of Desktop bottom-left button and Mobile hamburger */
.nav-cart-btn {
  display: none !important;
}

/* Floating Cart Button (Bottom-left button: Desktop only access) */
.floating-cart-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 55;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 100px;
  background: var(--wine, #6B1E1E);
  color: var(--cream, #F3E9D7);
  border: 1px solid rgba(243,233,215,.25);
  box-shadow: 0 10px 28px -6px rgba(62,15,15,.45);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.25,.8,.25,1), background .3s, box-shadow .3s;
}
.floating-cart-btn:hover {
  transform: translateY(-3px) scale(1.02);
  background: var(--deep, #3E0F0F);
  box-shadow: 0 14px 32px -4px rgba(62,15,15,.55);
}
.floating-cart-btn svg {
  width: 19px;
  height: 19px;
  flex: none;
}
.floating-cart-btn .floating-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: var(--gold, #E8A84B);
  color: var(--deep, #3E0F0F);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

/* Mobile Hamburger Menu and Drawer */
.burger {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.burger span {
  position: absolute;
  right: 11px;
  left: 11px;
  height: 1.5px;
  background: var(--ink, #1F1410);
  pointer-events: none;
  transition: transform .35s cubic-bezier(.25,.8,.25,1), top .35s cubic-bezier(.25,.8,.25,1), opacity .2s;
}
.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 20px; }
.burger span:nth-child(3) { top: 26px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

.drawer {
  position: fixed;
  top: 0;
  left: 14px;
  right: 14px;
  z-index: 40;
  padding: 86px 20px 24px;
  border-radius: 0 0 32px 32px;
  background: rgba(243,233,215,.96);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(31,20,16,.08);
  border-top: 0;
  display: none;
  flex-direction: column;
  gap: 6px;
  transform: translateY(-110%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .4s cubic-bezier(.25,.8,.25,1), opacity .3s ease, visibility .4s ease;
  box-shadow: 0 16px 40px -10px rgba(31,20,16,.25);
}
.drawer.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.drawer a, .drawer button.drawer-cart-btn {
  padding: 13px 18px;
  border-radius: 16px;
  color: var(--ink, #1F1410);
  text-decoration: none;
  font-size: 16.5px;
  font-family: inherit;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 0;
  width: 100%;
  cursor: pointer;
  text-align: right;
  transition: background .25s, color .25s;
  -webkit-tap-highlight-color: transparent;
}
.drawer a:hover, .drawer a:active,
.drawer button.drawer-cart-btn:hover, .drawer button.drawer-cart-btn:active {
  background: rgba(107,30,30,.09);
  color: var(--wine, #6B1E1E);
}
.drawer button.drawer-cart-btn .badge {
  background: var(--gold, #E8A84B);
  color: var(--deep, #3E0F0F);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 100px;
}
.drawer a.drawer-cta {
  margin-top: 6px;
  padding: 13px 20px;
  border-radius: 100px;
  background: var(--wine, #6B1E1E);
  color: var(--cream, #F3E9D7) !important;
  font-weight: 500;
  text-align: center;
  justify-content: center;
  box-shadow: 0 6px 18px -4px rgba(107,30,30,.35);
  transition: background .3s cubic-bezier(.25,.8,.25,1), transform .3s cubic-bezier(.25,.8,.25,1);
}
.drawer a.drawer-cta:hover, .drawer a.drawer-cta:active {
  background: var(--deep, #3E0F0F);
  color: var(--cream, #F3E9D7) !important;
  transform: scale(1.02);
}

/* Mobile rules: hide bottom-left button and navbar actions, show burger and drawer */
@media (max-width: 900px) {
  .floating-cart-btn {
    display: none !important;
  }
  .nav-r {
    display: none !important;
  }
  .burger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  .drawer {
    display: flex !important;
  }
  /* Ensure company logo and name remain fully visible in navbar on mobile */
  nav .logo {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
  }
  nav .logo span {
    display: inline-block !important;
    font-size: clamp(17px, 4.4vw, 20px) !important;
    color: var(--deep, #3E0F0F) !important;
  }
  nav .logo .logo-mark {
    display: inline-block !important;
    flex: none !important;
  }
}

/* Add to Cart button on product items */
.items li button.i-go {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  padding: 7px 18px;
  border-radius: 100px;
  border: 1px solid rgba(107,30,30,.28);
  color: var(--wine, #6B1E1E);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .25s, color .25s, border-color .25s, transform .2s cubic-bezier(.25,.8,.25,1);
}
.items li button.i-go:hover {
  background: var(--wine, #6B1E1E);
  color: var(--cream, #F3E9D7);
  border-color: var(--wine, #6B1E1E);
  transform: translateY(-1px);
}
.items li button.i-go.is-added {
  background: var(--wine, #6B1E1E);
  color: var(--cream, #F3E9D7);
  border-color: var(--wine, #6B1E1E);
  box-shadow: 0 2px 8px rgba(107,30,30,.25);
}
.items li button.i-go.is-added:hover {
  background: #8A2A2A;
  border-color: #8A2A2A;
}

/* ==========================================================================
   Cart Overlay & Drawer
   ========================================================================== */
.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31,20,16,.58);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .32s ease, visibility .32s ease;
  z-index: 998;
}
.cart-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(440px, 100%);
  max-width: 100%;
  background: var(--cream, #F3E9D7);
  color: var(--ink, #1F1410);
  box-shadow: 10px 0 40px rgba(31,20,16,.3);
  transform: translateX(-100%);
  transition: transform .35s cubic-bezier(.25,.8,.25,1);
  z-index: 999;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open {
  transform: translateX(0);
}

/* Cart Header */
.cart-drawer-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(31,20,16,.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(243,233,215,.96);
}
.cart-drawer-title-group h3 {
  font-family: 'Aref Ruqaa', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--deep, #3E0F0F);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.cart-drawer-title-group h3 span.badge {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  background: rgba(107,30,30,.1);
  color: var(--wine, #6B1E1E);
  padding: 2px 10px;
  border-radius: 100px;
}
.cart-drawer-title-group p {
  margin: 4px 0 0;
  font-size: 13px;
  color: rgba(31,20,16,.7);
}
.cart-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(31,20,16,.12);
  background: transparent;
  color: var(--ink, #1F1410);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, transform .2s;
  flex: none;
}
.cart-close-btn:hover {
  background: rgba(107,30,30,.1);
  color: var(--wine, #6B1E1E);
  transform: scale(1.08);
}
.cart-close-btn svg {
  width: 18px;
  height: 18px;
}

/* Cart Items Body */
.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  -webkit-overflow-scrolling: touch;
}

/* Empty State */
.cart-empty-state {
  height: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 16px;
}
.cart-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(107,30,30,.08);
  color: var(--wine, #6B1E1E);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.cart-empty-icon svg {
  width: 32px;
  height: 32px;
}
.cart-empty-state h4 {
  font-family: 'Aref Ruqaa', serif;
  font-size: 22px;
  color: var(--deep, #3E0F0F);
  margin-bottom: 8px;
}
.cart-empty-state p {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(31,20,16,.68);
  max-width: 28ch;
  margin: 0;
}

/* Item List */
.cart-items-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #EFE3CE;
  border: 1px solid rgba(31,20,16,.08);
  transition: transform .2s, background .2s;
}
.cart-item-row:hover {
  background: #E8D9C0;
}
.cart-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.cart-item-num {
  font-family: 'Aref Ruqaa', serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--clay, #C85A3A);
  flex: none;
  min-width: 22px;
}
.cart-item-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--deep, #3E0F0F);
  word-break: break-word;
}
.cart-item-remove-btn {
  background: transparent;
  border: 0;
  padding: 6px;
  border-radius: 8px;
  color: rgba(31,20,16,.45);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .2s, background .2s, transform .2s;
  flex: none;
}
.cart-item-remove-btn:hover {
  color: var(--wine, #6B1E1E);
  background: rgba(107,30,30,.12);
  transform: scale(1.1);
}
.cart-item-remove-btn svg {
  width: 17px;
  height: 17px;
}

/* Cart Footer */
.cart-drawer-footer {
  padding: 18px 24px 24px;
  border-top: 1px solid rgba(31,20,16,.1);
  background: rgba(243,233,215,.98);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cart-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  color: rgba(31,20,16,.75);
}
.cart-clear-btn {
  background: transparent;
  border: 0;
  color: var(--wine, #6B1E1E);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .2s, color .2s;
}
.cart-clear-btn:hover {
  background: rgba(107,30,30,.09);
  text-decoration: underline;
}

/* WhatsApp Inquiry Button */
.cart-wa-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 100px;
  background: #1B5E20;
  color: #FFFFFF;
  border: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 20px -4px rgba(27,94,32,.35);
  transition: background .25s, transform .25s cubic-bezier(.25,.8,.25,1), box-shadow .25s;
}
.cart-wa-submit-btn:hover {
  background: #154a19;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -2px rgba(27,94,32,.45);
}
.cart-wa-submit-btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.cart-wa-submit-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Toast Feedback */
.cart-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--deep, #3E0F0F);
  color: var(--cream, #F3E9D7);
  padding: 12px 22px;
  border-radius: 100px;
  box-shadow: 0 12px 30px rgba(31,20,16,.3);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: transform .35s cubic-bezier(.25,.8,.25,1), opacity .35s ease;
}
.cart-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   PRODUCT CARDS SYSTEM (Authentic Wadi Al-Salateen Design)
   ========================================================================== */
.items {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px clamp(24px, 4vw, 56px);
  padding-block: 14px;
  margin: 0;
  padding-inline: 0;
}

.items li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px 24px 24px 20px;
  border-radius: 40px 12px 40px 12px;
  background: #F6DDB0;
  transition: transform .4s cubic-bezier(.25, .8, .25, 1), box-shadow .4s cubic-bezier(.25, .8, .25, 1);
}

.items li:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 36px -22px rgba(62, 15, 15, .45);
}

.items .i-img {
  position: relative;
  flex: none;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #8A2A2A, var(--wine, #6B1E1E) 55%, var(--deep, #3E0F0F));
  width: 112px;
  aspect-ratio: 1;
  border-radius: 26px;
  border: 4px solid var(--cream, #F3E9D7);
  box-shadow: 0 12px 22px -12px rgba(62, 15, 15, .5);
  transform: rotate(-4deg) translateZ(0);
  transition: transform .5s cubic-bezier(.25, .8, .25, 1);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.items li:hover .i-img {
  transform: rotate(0) translateZ(0);
}

.i-ph {
  position: absolute;
  inset: 25%;
  width: 50%;
  height: 50%;
  color: var(--cream, #F3E9D7);
  opacity: .28;
}

.i-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  transition: transform .6s cubic-bezier(.25, .8, .25, 1);
}

.items li:hover .i-img img {
  transform: scale(1.07) translateZ(0);
}

.i-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.items .i-n {
  position: absolute;
  top: -14px;
  inset-inline-end: 26px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--wine, #6B1E1E);
  color: var(--cream, #F3E9D7);
  font-family: 'Aref Ruqaa', serif;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 8px 16px -8px rgba(62, 15, 15, .6);
  z-index: 2;
}

.i-name {
  font-family: 'Readex Pro', 'Tajawal', sans-serif;
  font-weight: 500;
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.5;
  color: var(--deep, #3E0F0F);
  margin: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}

.i-go {
  margin-top: 8px;
  padding: 9px 20px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 100px;
  border: 1px solid rgba(107, 30, 30, .3);
  background: transparent;
  color: var(--wine, #6B1E1E);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background .3s, color .3s, border-color .3s;
}

.items li:hover .i-go,
.i-go:hover {
  background: var(--wine, #6B1E1E);
  color: var(--cream, #F3E9D7);
}

.items li .i-go.is-added {
  background: var(--wine, #6B1E1E) !important;
  color: var(--cream, #F3E9D7) !important;
  border-color: var(--wine, #6B1E1E) !important;
  box-shadow: 0 4px 12px -2px rgba(107, 30, 30, .4);
}

@media (max-width: 760px) {
  .items {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .items li {
    gap: 16px;
    padding: 20px 18px 20px 16px;
    border-radius: 32px 10px 32px 10px;
  }
  .items .i-img {
    width: 92px;
    border-width: 3px;
    border-radius: 22px;
  }
  .items .i-n {
    width: 36px;
    height: 36px;
    font-size: 14px;
    inset-inline-end: 20px;
  }
}

