/**
 * SeeCommerce Frontend Blocks Styles
 */

/* Products Grid */
.seecommerce-products-grid {
  display: grid;
  grid-template-columns: repeat(var(--columns, 3), 1fr);
  gap: 24px;
  margin: 32px auto;
  max-width: 960px;
  padding: 0 20px;
}

@media (max-width: 1024px) {
  .seecommerce-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .seecommerce-products-grid {
    grid-template-columns: 1fr;
  }
}

/* Product Card */
.seecommerce-product-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.seecommerce-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.seecommerce-product-card .product-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.seecommerce-product-card .product-image {
  width: 100%;
  aspect-ratio: 1;
  background: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.seecommerce-product-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seecommerce-product-card .product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seecommerce-product-card .product-info {
  padding: 20px;
}

.seecommerce-product-card .product-name {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
}

.seecommerce-product-card .product-description {
  margin: 0 0 16px;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

.seecommerce-product-card .product-price {
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.seecommerce-product-card .price-regular {
  font-size: 16px;
  color: #9ca3af;
  margin-right: 8px;
}

.seecommerce-product-card .price-sale {
  color: #dc2626;
}

/* Single Product */
.seecommerce-product-single {
  margin: 32px 0;
}

.seecommerce-product-single .product-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 768px) {
  .seecommerce-product-single .product-content {
    grid-template-columns: 1fr;
  }
}

.seecommerce-product-single .product-image {
  width: 100%;
  aspect-ratio: 1;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seecommerce-product-single .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seecommerce-product-single .product-details {
  position: sticky;
  top: 32px;
}

.seecommerce-product-single .product-name {
  margin: 0 0 16px;
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.seecommerce-product-single .product-price {
  margin-bottom: 24px;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}

.seecommerce-product-single .price-regular {
  font-size: 22px;
  color: #9ca3af;
  margin-right: 12px;
}

.seecommerce-product-single .price-sale {
  color: #dc2626;
}

.seecommerce-product-single .product-description {
  margin-bottom: 32px;
  font-size: 16px;
  color: #6b7280;
  line-height: 1.6;
}

/* Buttons */
.seecommerce-btn {
  display: inline-block;
  padding: 12px 24px;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  width: 100%;
}

.seecommerce-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.seecommerce-btn:active {
  transform: translateY(0);
}

.seecommerce-btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

.seecommerce-btn.add-to-cart:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Empty State */
.seecommerce-no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: #6b7280;
  font-size: 16px;
}

/* Cart & Checkout Placeholders */
#seecommerce-cart-root,
#seecommerce-checkout-root {
  /* min-height and padding removed to prevent extra spacing */
}
