/**
 * Store Page Styles
 */

.seecommerce-store {
  max-width: 1000px;
  margin: 32px auto;
  padding: 0 20px;
}

.store-wrapper {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 32px;
}

@media (max-width: 1024px) {
  .seecommerce-store {
    padding: 0 16px;
  }

  .store-wrapper {
    padding: 24px;
  }
}

@media (max-width: 640px) {
  .seecommerce-store {
    margin: 16px auto;
    padding: 0 16px;
  }

  .store-wrapper {
    padding: 20px;
  }
}

/* Store Header */
.store-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid #e5e7eb;
}

.store-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}

.store-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-select {
  padding: 10px 36px 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.sort-select:hover {
  border-color: #2563eb;
}

.sort-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

@media (max-width: 640px) {
  .store-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .store-controls {
    width: 100%;
  }

  .sort-select {
    width: 100%;
  }
}

/* Store Content */
.store-content {
  min-height: 400px;
}

.store-loading,
.store-empty {
  text-align: center;
  padding: 80px 20px;
}

.store-loading p {
  font-size: 16px;
  color: #6b7280;
}

.store-empty h2 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.store-empty p {
  margin: 0;
  font-size: 16px;
  color: #6b7280;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

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

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

/* Product Card */
.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
}

.product-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
}

.product-link {
  display: block;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.product-image {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: #f9fafb;
  overflow: hidden;
}

.product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
}

.product-info {
  padding: 16px;
}

.product-name {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-description {
  margin: 0 0 12px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.price {
  font-size: 18px;
  font-weight: 700;
  color: #2563eb;
}

.price-regular {
  font-size: 14px;
  color: #9ca3af;
}

.price-sale {
  font-size: 18px;
  font-weight: 700;
  color: #dc2626;
}

.add-to-cart {
  width: 100%;
  padding: 14px 20px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-top: 1px solid #e5e7eb;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.add-to-cart:hover:not(:disabled) {
  background: #1d4ed8;
}

.add-to-cart:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.add-to-cart.success {
  background: #059669;
}

.add-to-cart.error {
  background: #dc2626;
}

/* Button Group for Add to Cart + View Bag */
.button-group {
  display: flex;
  gap: 8px;
  border-top: 1px solid #e5e7eb;
}

.button-group .add-to-cart {
  border-top: none;
  border-radius: 0;
}

.button-group .view-bag-btn {
  padding: 14px 20px;
  background: #059669;
  color: #fff;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0 !important;
}

.button-group .view-bag-btn:hover {
  background: #047857;
}

/* Pagination */
.store-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid #e5e7eb;
}

.pagination-btn,
.pagination-number {
  padding: 10px 16px;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled),
.pagination-number:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-number.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.pagination-ellipsis {
  padding: 0 8px;
  color: #9ca3af;
  font-weight: 500;
}

@media (max-width: 640px) {
  .store-pagination {
    flex-wrap: wrap;
    gap: 6px;
  }

  .pagination-btn,
  .pagination-number {
    padding: 8px 12px;
    font-size: 13px;
  }
}
