/* ================================================================
   PUNJABI HEAVEN — GLOBAL CART STYLES
   ================================================================ */

/* CART OVERLAY + DRAWER */
.co {
  position: fixed; inset: 0;
  background: rgba(15,15,15,0.6);
  z-index: 900;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s;
}
.co.open { opacity: 1; visibility: visible; }

  /* Bottom Right Floating Cart Button */
  .cf {
    position: fixed; bottom: 30px; right: 30px;
    z-index: 999;
    transform: translateY(100px) scale(0.9);
    opacity: 0; pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
    display: flex; align-items: center;
  }
  .cf.vis { 
    transform: translateY(0) scale(1);
    opacity: 1; pointer-events: auto;
  }
  
  .cf-btn {
    background: var(--primary, #0CA6A6); color: #fff;
    border: none; padding: 14px 28px;
    font-weight: 700; font-family: var(--font-heading, "Outfit", sans-serif);
    cursor: pointer; display: flex; align-items: center; gap: 10px;
    font-size: 1.1rem;
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(12,166,166,0.3);
    outline: none;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .cf-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(12,166,166,0.4);
  }
  .cf-btn i { font-size: 1.2rem; }
  
  .cf-badge {
    background: #fff; color: var(--primary, #0CA6A6);
    font-size: 0.85rem; font-weight: 800;
    padding: 3px 8px; border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }

  /* Cart Side Drawer */
  .cd {
    position: fixed; top: 0; right: -420px;
    width: 100%; max-width: 420px; height: 100vh;
    background: #fff; z-index: 1000;
    box-shadow: -10px 0 40px rgba(0,0,0,0.1);
    display: flex; flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16,1,0.3,1), transform 0.4s cubic-bezier(0.16,1,0.3,1);
  }
  .cd.open { right: 0; }

  .cd-head {
    padding: 24px; border-bottom: 1px solid rgba(0,0,0,0.06);
    display: flex; justify-content: space-between; align-items: center;
    background: #fff;
  }
  .cd-head h2 { font-size: 1.3rem; font-weight: 800; font-family: var(--font-heading, "Outfit", sans-serif); color: var(--text-dark, #1a1a1a); margin: 0; display:flex; align-items:center; gap:8px; }
  .cd-head .ic { font-size: 0.85rem; color: var(--text-light, #666); font-weight: 500; background: rgba(0,0,0,0.05); padding: 4px 10px; border-radius: 100px; margin-left: 10px; }
  .cd-close { background: #f5f5f5; border: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; cursor: pointer; color: var(--text-dark, #1a1a1a); transition: 0.2s; }
  .cd-close:hover { background: #e5e5e5; color: var(--secondary, #F15A29); transform: rotate(90deg); }

  /* Cart Items */
  .cd-items {
    flex: 1; overflow-y: auto; padding: 24px;
    display: flex; flex-direction: column; gap: 16px;
    background: #FDFDFD;
  }
  .cd-empty {
    text-align: center; padding: 60px 20px; color: var(--text-light, #666);
  }
  .cd-empty i { font-size: 3.5rem; color: rgba(0,0,0,0.06); margin-bottom: 15px; }
  .cd-empty h3 { font-size: 1.25rem; color: var(--text-dark, #1a1a1a); margin-bottom: 5px; font-weight: 700; }
  .cd-empty p { font-size: 0.95rem; }
.cd-items::-webkit-scrollbar { width: 4px; }
.cd-items::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }

/* Empty Cart */
.cd-empty {
  text-align: center; padding: 4rem 1.5rem;
}
.cd-empty i { font-size: 4rem; color: #ddd; margin-bottom: 1.2rem; display: block; }
.cd-empty h3 { font-size: 1.2rem; margin-bottom: 6px; color: #111; font-family: var(--font-heading, 'Outfit', sans-serif); font-weight: 700; }
.cd-empty p { font-size: 0.95rem; color: #666; }

/* Cart Item (Enhanced Card UI) */
.ci {
  display: flex; gap: 14px;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.04);
  animation: ciIn 0.3s ease;
  position: relative;
}
@keyframes ciIn { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }

.ci-img {
  width: 72px; height: 72px;
  border-radius: 12px; object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.ci-info { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; padding-right: 30px; }
.ci-name {
  font-weight: 700; font-size: 0.95rem;
  color: #111; margin-bottom: 4px;
  line-height: 1.3; font-family: var(--font-heading, 'Outfit', sans-serif);
}
.ci-pr {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-weight: 600; font-size: 0.85rem; color: #666;
}

.ci-right {
  display: flex; flex-direction: column;
  align-items: flex-end; justify-content: space-between;
  flex-shrink: 0; gap: 10px;
}
.ci-actions { display: flex; align-items: center; gap: 8px; }
.ci-del {
  background: rgba(226,55,68,0.08); border: none;
  color: #E23744; font-size: 0.85rem;
  cursor: pointer; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.ci-del:hover { background: #E23744; color: #fff; }

.ci-qc {
  display: inline-flex; align-items: center;
  border-radius: 8px; overflow: hidden;
  border: 1.5px solid rgba(0,0,0,0.08);
}
.ci-qc button {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  color: var(--primary, #0CA6A6); font-size: 1rem;
  font-weight: 800; cursor: pointer;
  transition: background 0.2s;
}
.ci-qc button:hover { background: rgba(12,166,166,0.08); }
.ci-qc .cqn {
  width: 28px; text-align: center;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-weight: 700; font-size: 0.85rem;
  color: #111; background: rgba(0,0,0,0.02);
  line-height: 30px;
}
.ci-total {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-weight: 800; font-size: 1rem;
  color: #111; margin-top: 6px;
}

/* Cart Summary */
.cd-sum {
  padding: 1.4rem 1.6rem 1.8rem;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.02);
}
.cd-row {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 8px;
  font-size: 0.95rem;
}
.cd-row .lb { color: #666; }
.cd-row .vl { font-weight: 700; color: #111; font-family: var(--font-heading, 'Outfit', sans-serif); }
.cd-row.tot {
  padding-top: 12px; margin-top: 8px;
  border-top: 1.5px solid rgba(0,0,0,0.08);
  font-size: 1.1rem;
}
.cd-row.tot .lb { font-weight: 800; color: #111; font-family: var(--font-heading, 'Outfit', sans-serif); }
.cd-row.tot .vl { font-size: 1.3rem; color: var(--primary, #0CA6A6); }

.cd-wa {
  width: 100%; margin-top: 16px;
  padding: 16px; border-radius: 14px;
  background: #25D366; color: #fff;
  border: none; font-weight: 800;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center;
  justify-content: center; gap: 10px;
  transition: all 0.2s;
  box-shadow: 0 6px 20px rgba(37,211,102,0.3);
}
.cd-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37,211,102,0.4);
}

/* TOAST */
.tbox {
  position: fixed; top: 100px; right: 24px;
  z-index: 2000; display: flex; flex-direction: column;
  gap: 10px; pointer-events: none;
}
.toast {
  background: #1A1A1A;
  color: #fff; padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.95rem; font-weight: 600;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  animation: slideInRight 0.3s cubic-bezier(0.16,1,0.3,1);
  pointer-events: auto; max-width: 320px;
}
.toast.hide {
  animation: slideOutRight 0.3s cubic-bezier(0.16,1,0.3,1) forwards;
}
.toast i { font-size: 1.2rem; }
.toast.add i { color: #25D366; }
.toast.rm i { color: #E23744; }

@keyframes slideInRight { from { transform: translateX(120%); } to { transform: translateX(0); } }
@keyframes slideOutRight { from { transform: translateX(0); } to { transform: translateX(120%); } }

/* Responsive */
@media (max-width: 768px) {
  .cd {
    width: 100%; height: auto; max-height: 85vh;
    top: auto; bottom: 0; right: 0;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
  }
  .cd.open { transform: translateY(0); right: 0; }
  .cf { bottom: 20px; right: 20px; }
  .cf-btn { 
    padding: 12px 20px; 
    font-size: 1rem;
    border-radius: 100px;
    height: auto; width: auto; 
  }
  .tbox { top: auto; bottom: 90px; right: 16px; left: 16px; align-items: center; }
  .toast { max-width: 100%; width: 100%; justify-content: center; }

  /* Mobile Cart Item Layout */
  .ci {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    grid-template-rows: auto auto;
    gap: 10px 14px;
    padding: 14px;
  }
  .ci-img { grid-column: 1; grid-row: 1 / 3; width: 64px; height: 64px; }
  .ci-info { grid-column: 2; grid-row: 1; padding-right: 0; justify-content: flex-start; }
  .ci-pr { display: none; }
  .ci-each { display: none; }
  .ci-right { display: contents; }
  .ci-total { grid-column: 3; grid-row: 1; margin-top: 0; text-align: right; }
  .ci-actions { grid-column: 2 / 4; grid-row: 2; display: flex; justify-content: flex-start; margin-top: 2px; }
}
