/* Shopping Plugin Styles - Liberium CMS */
.cms-shopping-container {
  width: 100%;
  margin: 1.5rem 0;
}

.cms-shopping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.cms-product-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cms-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

.cms-product-image-wrap {
  width: 100%;
  height: 200px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.cms-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cms-product-card:hover .cms-product-image {
  transform: scale(1.03);
}

.cms-product-placeholder {
  width: 64px;
  height: 64px;
  color: #94a3b8;
}

.cms-product-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cms-product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cms-product-type-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: #e0f2fe;
  color: #0369a1;
  text-transform: uppercase;
}

.cms-product-sku {
  font-size: 0.75rem;
  color: #64748b;
  font-family: monospace;
}

.cms-product-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.cms-product-desc {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.45;
  margin-bottom: 1.25rem;
  flex: 1;
}

.cms-product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.cms-product-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

.cms-btn-add-cart {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.cms-btn-add-cart:hover {
  background: #1d4ed8;
}

.cms-btn-add-cart:active {
  transform: scale(0.97);
}

/* Floating Cart Trigger */
.cms-cart-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 0.85rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 999;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cms-cart-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(0,0,0,0.4);
}

.cms-cart-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

/* Cart Slide-Over Drawer */
.cms-cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cms-cart-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cms-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  box-shadow: -5px 0 25px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1001;
}

.cms-cart-drawer.is-open {
  transform: translateX(0);
}

.cms-cart-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cms-cart-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.cms-cart-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.cms-cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}

.cms-cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
}

.cms-cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.cms-cart-item-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  background: #f8fafc;
}

.cms-cart-item-details {
  flex: 1;
}

.cms-cart-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.cms-cart-item-price {
  font-size: 0.875rem;
  color: #2563eb;
  font-weight: 700;
}

.cms-cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.cms-qty-btn {
  width: 26px;
  height: 26px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.cms-qty-count {
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cms-btn-remove {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.8rem;
  cursor: pointer;
  margin-left: auto;
}

.cms-cart-summary {
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.cms-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 0.4rem;
}

.cms-summary-row.total {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  border-top: 1px solid #cbd5e1;
  padding-top: 0.6rem;
  margin-top: 0.6rem;
}

.cms-checkout-form {
  padding: 1.25rem 1.5rem 0 1.5rem;
}

.cms-form-group {
  margin-bottom: 0.85rem;
}

.cms-form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.25rem;
}

.cms-form-group input,
.cms-form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  box-sizing: border-box;
}

.cms-form-group input:focus,
.cms-form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.cms-btn-checkout {
  width: 100%;
  background: #16a34a;
  color: #ffffff;
  border: none;
  padding: 0.85rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s ease;
  margin-top: 0.75rem;
}

.cms-btn-checkout:hover {
  background: #15803d;
}

.cms-btn-checkout:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Order Confirmation Card */
.cms-order-success-card {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2.5rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.cms-success-icon {
  width: 64px;
  height: 64px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem auto;
}

.cms-order-details {
  background: #f8fafc;
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  text-align: left;
}
