/* Layout Mobile Grid Toggles */
.woocro-grid-view-switcher {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.woocro-grid-view-switcher .view-label {
  font-size: 0.85em;
  font-weight: 700;
  color: #666;
}
.view-toggle-btn {
  background: #f1f1f1;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px 8px;
  cursor: pointer;
  color: #444;
}
.view-toggle-btn.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* Image Flip Container */
.woocommerce ul.products li.product {
  position: relative;
  overflow: hidden;
}
.woocommerce ul.products li.product img.woocro-flip-image {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 1;
}
.woocommerce ul.products li.product:hover img.woocro-flip-image {
  opacity: 1;
  z-index: 2;
}

/* Custom Savings Badge */
.woocommerce span.onsale.woocro-saving-badge {
  background: #e11d48 !important;
  color: #fff !important;
  font-weight: 700 !important;
  border-radius: 4px;
  font-size: 0.85em;
  padding: 4px 10px;
  z-index: 3;
}

/* Metadata Overlays on Grid Cards */
.woocro-grid-meta-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
  font-size: 0.85em;
}
.grid-meta-item {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 3px;
  color: #4b5563;
}
.grid-meta-item.in-stock {
  color: #15803d;
  background: #f0fdf4;
}
.grid-meta-item.out-of-stock {
  color: #b91c1c;
  background: #fef2f2;
}

/* Quick Buy Trigger Icon */
.woocro-quick-buy-trigger {
  display: block;
  width: 100%;
  background: #000;
  color: #fff;
  text-align: center;
  border: none;
  padding: 8px 0;
  margin-top: 10px;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
  transition: background 0.2s ease;
}
.woocro-quick-buy-trigger:hover {
  background: #222;
}

/* AJAX Selection Slide-Out Drawer Panel */
.woocro-drawer-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}
.woocro-drawer-wrapper.open {
  visibility: visible;
  opacity: 1;
}
.woocro-drawer-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}
.woocro-drawer-inner {
  position: absolute;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: #fff;
  box-shadow: -3px 0 15px rgba(0,0,0,0.2);
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 30px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.woocro-drawer-wrapper.open .woocro-drawer-inner {
  right: 0;
}
.woocro-drawer-close {
  position: absolute;
  top: 12px;
  right: 15px;
  background: none;
  border: none;
  font-size: 2em;
  cursor: pointer;
  color: #444;
}
.woocro-quick-select-details .quick-select-header {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 15px;
}
.woocro-quick-select-details .quick-select-header img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
}
.woocro-drawer-loader {
  width: 32px;
  height: 32px;
  border: 3px solid #ccc;
  border-top-color: #000;
  border-radius: 50%;
  margin: 50px auto;
  animation: rotateLoader 0.8s linear infinite;
}
@keyframes rotateLoader {
  to { transform: rotate(360deg); }
}