/* ============================================
   Shop / E-Commerce Styles - Mobile First
   ============================================ */

:root {
  --shop-primary: #0d6efd;
  --shop-danger: #dc3545;
  --shop-success: #198754;
  --shop-warning: #ffc107;
  --shop-dark: #212529;
  --shop-light: #f8f9fa;
  --shop-border: #dee2e6;
  --shop-text: #495057;
  --shop-text-muted: #6c757d;
}

/* ---- Product Card ---- */
.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.product-card .product-img {
  position: relative;
  width: 100%;
  padding-top: 75%;
  background: #f8f9fa;
  overflow: hidden;
}
.product-card .product-img img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.product-card:hover .product-img img {
  transform: scale(1.05);
}
.product-card .product-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card .product-category {
  font-size: 0.75rem;
  color: var(--shop-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}
.product-card .product-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--shop-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .product-subtitle {
  min-height: 2.7em;
  margin: 4px 0 8px;
  overflow: hidden;
  color: var(--shop-text-muted);
  font-size: 0.88rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product-card .product-price {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.product-card .price-current {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--shop-danger);
}
.product-card .price-original {
  font-size: 0.85rem;
  color: var(--shop-text-muted);
  text-decoration: line-through;
}
.product-card .product-tags {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
}
.product-card .tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 4px;
}
.tag-hot { background: #dc3545; color: #fff; }
.tag-new { background: #198754; color: #fff; }
.tag-recommend { background: #0d6efd; color: #fff; }

/* ---- Product Detail ---- */
.product-gallery {
  position: relative;
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
}
.product-gallery img {
  width: 100%;
  height: auto;
  max-height: 550px;
  object-fit: contain;
}
.product-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}
.product-thumbs img {
  width: 70px; height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}
.product-thumbs img.active {
  border-color: var(--shop-primary);
}
.product-info h1 {
  font-size: 1.5rem;
  font-weight: 700;
}
.product-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}
.product-quantity {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 16px 0;
}
.product-quantity button {
  width: 40px; height: 40px;
  border: 1px solid var(--shop-border);
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-quantity button:hover {
  background: #f0f0f0;
}
.product-quantity input {
  width: 60px; height: 40px;
  border: 1px solid var(--shop-border);
  border-left: none; border-right: none;
  text-align: center;
  font-size: 1rem;
}

/* ---- Cart ---- */
.cart-table {
  width: 100%;
}
.cart-table th {
  background: #f8f9fa;
  padding: 12px;
  font-weight: 600;
  font-size: 0.9rem;
}
.cart-table td {
  padding: 12px;
  vertical-align: middle;
}
.cart-item-img {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: 8px;
}
.cart-summary {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 24px;
}
.cart-summary .total-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--shop-border);
}
.cart-summary .total-row:last-child {
  border-bottom: none;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--shop-danger);
}

/* ---- Checkout ---- */
.checkout-section {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.checkout-section h5 {
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--shop-primary);
}
.payment-method-card {
  border: 2px solid var(--shop-border);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.payment-method-card:hover {
  border-color: var(--shop-primary);
}
.payment-method-card.selected {
  border-color: var(--shop-primary);
  background: rgba(13,110,253,0.03);
}
.payment-method-card .checkmark {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--shop-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.payment-method-card.selected .checkmark {
  border-color: var(--shop-primary);
  background: var(--shop-primary);
  color: #fff;
}
.payment-method-card img {
  width: 48px; height: 32px;
  object-fit: contain;
}

/* ---- Auth Pages ---- */
.auth-container {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 440px;
}
.auth-card h3 {
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}
.auth-card .subtitle {
  color: var(--shop-text-muted);
  text-align: center;
  margin-bottom: 28px;
  font-size: 0.95rem;
}

/* ---- User Center ---- */
.user-sidebar {
  background: #fff;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  overflow: hidden;
}
.user-sidebar .nav-link {
  padding: 14px 20px;
  color: var(--shop-text);
  border-left: 3px solid transparent;
  font-weight: 500;
  transition: all 0.2s;
}
.user-sidebar .nav-link:hover,
.user-sidebar .nav-link.active {
  color: var(--shop-primary);
  background: rgba(13,110,253,0.04);
  border-left-color: var(--shop-primary);
}
.user-sidebar .nav-link i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

/* ---- Order List ---- */
.order-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.order-card .order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--shop-light);
  margin-bottom: 12px;
}
.order-card .order-products {
  display: flex;
  gap: 12px;
  overflow-x: auto;
}

/* ---- Buttons ---- */
.btn-shop-primary {
  background: var(--shop-primary);
  color: #fff;
  border: none;
  padding: 10px 28px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-shop-primary:hover {
  background: #0b5ed7;
  color: #fff;
}
.btn-shop-cart {
  background: var(--shop-danger);
  color: #fff;
  border: none;
  padding: 10px 28px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-shop-cart:hover {
  background: #bb2d3b;
  color: #fff;
}
.btn-shop-outline {
  border: 2px solid var(--shop-primary);
  color: var(--shop-primary);
  background: transparent;
  padding: 8px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-shop-outline:hover {
  background: var(--shop-primary);
  color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
  .product-card .product-name { font-size: 0.9rem; }
  .product-card .price-current { font-size: 1rem; }
  .cart-table { font-size: 0.85rem; }
  .cart-item-img { width: 50px; height: 50px; }
  .auth-card { padding: 28px 20px; }
  .checkout-section { padding: 16px; }
}

/* ---- Loading & Empty States ---- */
.shop-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--shop-text-muted);
}
.shop-empty i {
  font-size: 4rem;
  display: block;
  margin-bottom: 16px;
  opacity: 0.3;
}

/* ---- Page Banner ---- */
.page-banner {
  background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
  padding: 80px 0 40px;
  color: #fff;
  text-align: center;
}
.page-banner h1 {
  font-weight: 800;
  margin-bottom: 8px;
}
.page-banner .breadcrumb {
  justify-content: center;
  background: transparent;
}
.page-banner .breadcrumb-item a { color: rgba(255,255,255,0.8); }
.page-banner .breadcrumb-item.active { color: #fff; }
