/* ============================================================
   YASHREE DESIGNER — Search + Cart Styles
   ============================================================ */

/* ── CART ICON BADGE ── */
.cart-icon-wrap{position:relative;display:inline-flex}
.cart-badge{
  position:absolute;top:-7px;right:-7px;
  min-width:18px;height:18px;
  background:var(--gold);color:var(--white);
  border-radius:50%;font-family:var(--ff-sans);
  font-size:.62rem;font-weight:700;
  display:flex;align-items:center;justify-content:center;
  line-height:1;padding:0 3px;pointer-events:none;
}

/* ── SEARCH OVERLAY ── */
.search-overlay{
  display:none;position:fixed;inset:0;z-index:2000;
  background:rgba(26,10,10,0.65);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
  align-items:flex-start;justify-content:center;
  padding-top:80px;
  animation:searchFadeIn .22s ease;
}
.search-overlay.open{display:flex}
@keyframes searchFadeIn{from{opacity:0;padding-top:60px}to{opacity:1;padding-top:80px}}
.search-box{
  animation:searchSlideIn .25s cubic-bezier(0.25,0.46,0.45,0.94);
}
@keyframes searchSlideIn{from{opacity:0;transform:translateY(-16px)}to{opacity:1;transform:translateY(0)}}
.search-box{
  background:var(--white);border-radius:16px;
  width:100%;max-width:680px;margin:0 20px;
  box-shadow:0 20px 60px rgba(59,16,16,0.25);
  overflow:hidden;max-height:80vh;display:flex;flex-direction:column;
}
.search-top{
  display:flex;align-items:center;gap:12px;
  padding:16px 20px;border-bottom:1px solid var(--ivory-dk);
}
.search-icon-svg{color:var(--text-muted);flex-shrink:0;width:20px;height:20px}
#searchInput{
  flex:1;border:none;outline:none;
  font-family:var(--ff-sans);font-size:1.05rem;
  color:var(--text-body);background:transparent;
}
#searchInput::placeholder{color:var(--text-muted)}
.search-close-btn{
  background:var(--ivory);border:none;cursor:pointer;
  border-radius:8px;padding:6px 10px;
  font-family:var(--ff-sans);font-size:.72rem;
  color:var(--text-muted);font-weight:500;
  flex-shrink:0;transition:.2s;
}
.search-close-btn:hover{background:var(--ivory-dk)}
#searchResults{overflow-y:auto;flex:1}
.search-count{
  font-family:var(--ff-sans);font-size:.78rem;
  color:var(--text-muted);padding:10px 20px 6px;
  border-bottom:1px solid var(--ivory-dk);
}
.search-empty{
  font-family:var(--ff-sans);font-size:.9rem;
  color:var(--text-muted);text-align:center;
  padding:40px 20px;
}
.search-item{
  display:flex;align-items:center;gap:14px;
  padding:14px 20px;border-bottom:1px solid var(--ivory-dk);
  cursor:pointer;transition:background .2s;
}
.search-item:hover{background:var(--ivory-lt)}
.search-item:last-child{border-bottom:none}
.search-item-img{
  width:56px;height:72px;object-fit:cover;
  border-radius:8px;flex-shrink:0;background:var(--ivory-dk);
}
.search-item-info{flex:1;min-width:0}
.search-item-cat{
  font-family:var(--ff-sans);font-size:.65rem;font-weight:600;
  letter-spacing:.12em;text-transform:uppercase;color:var(--gold-dk);
  margin-bottom:3px;
}
.search-item-name{
  font-family:var(--ff-serif);font-size:1rem;color:var(--maroon);
  margin-bottom:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.search-item-code{
  font-family:var(--ff-sans);font-size:.75rem;color:var(--text-muted);
  margin-bottom:4px;
}
.search-item-price{
  font-family:var(--ff-sans);font-size:.9rem;font-weight:600;color:var(--maroon);
}
.search-item-mrp{
  font-size:.78rem;color:var(--text-muted);
  text-decoration:line-through;margin-left:6px;font-weight:400;
}
.search-add-btn{
  flex-shrink:0;background:var(--maroon);color:var(--white);
  border:none;border-radius:8px;padding:8px 14px;
  font-family:var(--ff-sans);font-size:.72rem;font-weight:600;
  letter-spacing:.06em;text-transform:uppercase;cursor:pointer;
  transition:.2s;white-space:nowrap;
}
.search-add-btn:hover{background:var(--maroon-dk)}
.search-add-btn.search-added{background:#2d8a4e;color:white}
.search-hint{
  font-family:var(--ff-sans);font-size:.72rem;color:var(--text-muted);
  text-align:center;padding:20px;
}
.search-hint kbd{
  background:var(--ivory-dk);border-radius:4px;
  padding:2px 6px;font-family:monospace;font-size:.78rem;
}

/* ── CART DRAWER ── */
.cart-drawer{
  position:fixed;top:0;right:0;bottom:0;
  width:440px;max-width:100vw;
  background:var(--white);z-index:2001;
  transform:translateX(102%);
  transition:transform .38s cubic-bezier(0.25,0.46,0.45,0.94);
  display:flex;flex-direction:column;
  box-shadow:-8px 0 48px rgba(59,16,16,0.18);
}
.cart-drawer.open{transform:translateX(0)}
.cart-overlay-bg{
  position:fixed;inset:0;
  background:rgba(26,10,10,0);
  backdrop-filter:blur(0px);
  z-index:2000;opacity:0;pointer-events:none;
  transition:all .38s cubic-bezier(0.25,0.46,0.45,0.94);
}
.cart-overlay-bg.visible{
  background:rgba(26,10,10,0.5);
  backdrop-filter:blur(3px);
  opacity:1;pointer-items:all;pointer-events:all;
}

.cart-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:20px 24px;border-bottom:1px solid var(--ivory-dk);
  background:var(--white);flex-shrink:0;
  gap:12px;
}
.cart-header-left{display:flex;align-items:center;gap:12px}
.cart-header-title{
  font-family:var(--ff-serif);font-size:1.4rem;color:var(--maroon);
}
.cart-header-count{
  font-family:var(--ff-sans);font-size:.72rem;font-weight:600;
  background:var(--maroon);color:var(--white);
  border-radius:100px;padding:3px 10px;
}
.cart-close-btn{
  background:var(--ivory-dk);border:none;cursor:pointer;
  width:40px;height:40px;border-radius:50%;
  font-size:1rem;color:var(--maroon);
  display:flex;align-items:center;justify-content:center;
  transition:all .2s ease;
  flex-shrink:0;
  line-height:1;
  font-weight:600;
  box-shadow:0 1px 4px rgba(59,16,16,0.1);
}
.cart-close-btn:hover{
  background:var(--maroon);color:var(--white);
  transform:rotate(90deg);
  box-shadow:0 2px 12px rgba(59,16,16,0.2);
}

#cartBody{flex:1;overflow-y:auto;padding:12px 0}

.cart-empty{
  display:flex;flex-direction:column;align-items:center;
  justify-content:center;height:100%;padding:60px 20px;text-align:center;
}
.cart-empty-icon{font-size:3.5rem;margin-bottom:16px;opacity:.5}
.cart-empty p{font-family:var(--ff-serif);font-size:1.3rem;color:var(--maroon);margin-bottom:8px}
.cart-empty small{font-family:var(--ff-sans);font-size:.83rem;color:var(--text-muted)}

.cart-item{
  display:flex;align-items:flex-start;gap:14px;
  padding:16px 20px;border-bottom:1px solid var(--ivory-dk);
}
.cart-item:last-child{border-bottom:none}
.cart-item-img{
  width:64px;height:82px;object-fit:cover;
  border-radius:8px;flex-shrink:0;background:var(--ivory-dk);
}
/* Right side: stacked info + qty row + delete fully separated */
.cart-item-right{
  flex:1;min-width:0;display:flex;flex-direction:column;gap:6px;
}
.cart-item-top{
  display:flex;align-items:flex-start;justify-content:space-between;gap:8px;
}
.cart-item-info{flex:1;min-width:0}
.cart-item-name{
  font-family:var(--ff-serif);font-size:.95rem;color:var(--maroon);
  line-height:1.3;margin-bottom:3px;
}
.cart-item-code{
  font-family:var(--ff-sans);font-size:.67rem;color:var(--gold-dk);
  font-weight:600;letter-spacing:.1em;text-transform:uppercase;
}
/* Delete — top-right of info block, far from qty */
.cart-item-del{
  flex-shrink:0;
  width:28px;height:28px;
  background:var(--ivory-dk);border:none;cursor:pointer;
  border-radius:50%;display:flex;align-items:center;justify-content:center;
  color:var(--text-muted);font-size:.82rem;
  transition:.2s;margin-top:0;
}
.cart-item-del:hover{background:#fee2e2;color:#dc2626}
/* Bottom row: price left, qty controls right — fully separated */
.cart-item-bottom{
  display:flex;align-items:center;justify-content:space-between;
  margin-top:4px;
}
.cart-item-price{
  font-family:var(--ff-sans);font-size:.95rem;font-weight:700;color:var(--maroon);
}
.cart-item-qty{
  display:flex;align-items:center;
  background:var(--ivory);border:1.5px solid var(--ivory-dk);
  border-radius:100px;padding:3px 6px;gap:10px;
}
.ciq-btn{
  width:28px;height:28px;border-radius:50%;
  border:none;background:transparent;
  font-size:1.1rem;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  color:var(--maroon);font-weight:700;transition:.2s;line-height:1;
}
.ciq-btn:hover{background:var(--maroon);color:var(--white);border-radius:50%}
.cart-item-qty span{
  font-family:var(--ff-sans);font-size:.92rem;font-weight:700;
  color:var(--text-body);min-width:22px;text-align:center;
}

#cartFooter{
  padding:16px 20px;
  border-top:1px solid var(--ivory-dk);
  background:var(--white);flex-shrink:0;
}
.cart-summary{
  display:flex;justify-content:space-between;align-items:center;
  margin-bottom:14px;
}
.cart-summary-label{
  font-family:var(--ff-sans);font-size:.78rem;font-weight:600;
  letter-spacing:.1em;text-transform:uppercase;color:var(--text-muted);
}
#cartTotal{
  font-family:var(--ff-serif);font-size:1.6rem;font-weight:600;color:var(--maroon);
}
#cartCount{
  font-family:var(--ff-sans);font-size:.78rem;color:var(--text-muted);
}
.cart-checkout-btn{
  width:100%;padding:16px;background:var(--maroon);color:var(--white);
  border:none;border-radius:10px;cursor:pointer;
  font-family:var(--ff-sans);font-size:.82rem;font-weight:700;
  letter-spacing:.12em;text-transform:uppercase;
  display:flex;align-items:center;justify-content:center;gap:10px;
  transition:.2s;
}
.cart-checkout-btn:hover{background:var(--maroon-dk);transform:translateY(-1px)}
.cart-checkout-btn svg{width:20px;height:20px;fill:white;flex-shrink:0}
.cart-continue{
  text-align:center;margin-top:10px;
  font-family:var(--ff-sans);font-size:.78rem;color:var(--text-muted);
  cursor:pointer;text-decoration:underline;
}
.cart-continue:hover{color:var(--maroon)}

/* ── ADD TO CART BUTTON ON PRODUCT CARDS ── */
.pa-cart{
  flex:1;text-align:center;padding:9px 6px;
  border-radius:var(--r-sm);font-family:var(--ff-sans);
  font-size:.7rem;font-weight:600;letter-spacing:.08em;
  text-transform:uppercase;transition:var(--ease);
  background:var(--ivory-dk);color:var(--maroon);
  border:1.5px solid var(--ivory-dk);cursor:pointer;
  white-space:nowrap;
}
.pa-cart:hover{background:var(--maroon);color:var(--white);border-color:var(--maroon)}
.pa-cart.in-cart{
  background:var(--maroon);color:var(--white);
  display:flex;align-items:center;justify-content:space-between;
  padding:6px 8px;gap:4px;
}
.cart-btn-minus,.cart-btn-plus{
  width:22px;height:22px;background:rgba(255,255,255,.2);
  border-radius:4px;display:flex;align-items:center;justify-content:center;
  font-size:1rem;font-weight:700;cursor:pointer;flex-shrink:0;
}
.cart-btn-minus:hover,.cart-btn-plus:hover{background:rgba(255,255,255,.35)}
.cart-btn-qty{font-weight:700;font-size:.85rem;flex:1;text-align:center}

/* ── TOAST ── */
#ydToast{
  position:fixed;bottom:90px;left:50%;transform:translateX(-50%) translateY(20px);
  background:var(--maroon);color:var(--white);
  padding:10px 20px;border-radius:100px;
  font-family:var(--ff-sans);font-size:.82rem;font-weight:500;
  z-index:3000;opacity:0;transition:all .3s;pointer-events:none;
  white-space:nowrap;box-shadow:0 4px 20px rgba(59,16,16,0.3);
}
#ydToast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* ── MOBILE ── */
@media(max-width:480px){
  .cart-drawer{width:100vw}
  .search-box{margin:0;border-radius:0 0 16px 16px}
  .search-overlay{padding-top:0}
  #searchInput{font-size:.95rem}
  .search-item-img{width:48px;height:62px}
  .search-item-name{font-size:.9rem}
}

/* ── PRODUCT ACTION BUTTONS — Uniform layout ── */
.prod-actions{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:6px!important;
  margin-top:10px!important;
}
/* Enquire + WhatsApp = top row 50/50 */
.pa-enq,.pa-wa{
  display:flex;align-items:center;justify-content:center;
  padding:9px 6px!important;
  font-size:.7rem!important;font-weight:600!important;
  letter-spacing:.06em!important;text-transform:uppercase!important;
  border-radius:4px!important;transition:.2s!important;
}
/* Cart button = full width second row */
.pa-cart{
  grid-column:1 / -1!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  gap:6px!important;
  padding:9px 10px!important;
  font-size:.7rem!important;font-weight:700!important;
  letter-spacing:.06em!important;text-transform:uppercase!important;
  background:var(--ivory-dk)!important;color:var(--maroon)!important;
  border:1.5px solid var(--ivory-dk)!important;border-radius:4px!important;cursor:pointer;
  transition:.2s!important;
}
.pa-cart:hover{background:var(--maroon)!important;color:var(--white)!important;border-color:var(--maroon)!important}
.pa-cart.in-cart{
  background:var(--maroon)!important;color:var(--white)!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  padding:7px 10px!important;
}
/* In-cart +/- stepper */
.cart-btn-minus,.cart-btn-plus{
  width:24px;height:24px;background:rgba(255,255,255,.2);
  border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-size:1rem;font-weight:700;cursor:pointer;flex-shrink:0;
}
.cart-btn-minus:hover,.cart-btn-plus:hover{background:rgba(255,255,255,.35)}
.cart-btn-qty{font-weight:700;font-size:.85rem;flex:1;text-align:center}

@media(max-width:480px){
  .prod-actions{gap:5px!important}
  .pa-enq,.pa-wa{font-size:.65rem!important;padding:8px 4px!important}
  .pa-cart{font-size:.65rem!important;padding:8px 8px!important}
}

.cart-item-qty-note{
  font-size:.72rem;font-weight:400;
  color:var(--text-muted);margin-left:4px;
}

/* Collections page — sidebar layout makes cards narrower */
.products-main .prod-actions,
#galleryGrid .prod-actions{
  grid-template-columns:1fr 1fr!important;
  gap:5px!important;
}
.products-main .pa-cart,
#galleryGrid .pa-cart{
  grid-column:1 / -1!important;
}

/* Global products grid responsive */
.products-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:24px}
@media(max-width:1100px){.products-grid{grid-template-columns:repeat(2,1fr)!important}}
@media(max-width:600px){.products-grid{grid-template-columns:1fr!important;gap:16px!important}}

/* Shaily grid responsive (overrides inline) */
#shailyGrid{display:grid!important;grid-template-columns:1fr!important;gap:14px!important;opacity:1!important;transform:none!important}
@media(min-width:480px){#shailyGrid{grid-template-columns:repeat(2,1fr)!important}}
@media(min-width:768px){#shailyGrid{grid-template-columns:repeat(3,1fr)!important;gap:18px!important}}
@media(min-width:1100px){#shailyGrid{grid-template-columns:repeat(4,1fr)!important;gap:20px!important}}

/* ── Ensure <a> tags inside prod-actions behave like grid cells ── */
.prod-actions .pa-enq,
.prod-actions .pa-wa{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  padding:9px 6px!important;
}

/* ── Cart item right column (new structure) ── */
.cart-item-right{
  flex:1;min-width:0;
  display:flex;flex-direction:column;gap:8px;
}
.cart-item-top{
  display:flex;align-items:flex-start;
  justify-content:space-between;gap:10px;
}
.cart-item-bottom{
  display:flex;align-items:center;
  justify-content:space-between;gap:8px;
  padding-top:4px;
  border-top:1px solid var(--ivory-dk);
}

/* ── Mobile cart improvements ── */
@media(max-width:480px){
  .cart-item{padding:14px 16px;gap:10px}
  .cart-item-img{width:56px;height:72px}
  .cart-item-name{font-size:.88rem}
  .cart-item-del{width:26px;height:26px;font-size:.78rem}
  .cart-item-qty{gap:8px;padding:2px 5px}
  .ciq-btn{width:26px;height:26px}
  #cartFooter{padding:14px 16px}
  .cart-checkout-btn{padding:14px;font-size:.78rem}
}
