/* Shop design system – shared across shop index, product, profile, checkout modal */
.shop-page {
  --shop-accent: #059669;
  --shop-accent-hover: #047857;
  --shop-accent-light: rgba(5, 150, 105, 0.08);
  --shop-muted: #64748b;
  --shop-muted-bg: #f8fafc;
  --shop-card-bg: #fff;
  --shop-border: #e2e8f0;
  --shop-radius: 14px;
  --shop-radius-lg: 20px;
  --shop-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.08);
  --shop-shadow-hover: 0 20px 45px -15px rgba(0, 0, 0, 0.12);
}

/* ----- Hero ----- */
.shop-hero {
  background: linear-gradient(135deg, #0c4a6e 0%, #0f172a 50%, #1e293b 100%);
  color: #fff;
  padding: 2.75rem 2rem;
  border-radius: var(--shop-radius-lg);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px -20px rgba(12, 74, 110, 0.4);
}
.shop-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.shop-hero .shop-hero-inner {
  position: relative;
  z-index: 1;
}
.shop-hero h1 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  line-height: 1.25;
  color: #fff;
}
.shop-hero .shop-hero-desc {
  font-size: 1rem;
  opacity: 0.92;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
  max-width: 28em;
}
.shop-hero .r-g-btn {
  border-radius: 12px;
  padding: 0.6rem 1.35rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.shop-hero .r-g-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.25);
}
.shop-hero .shop-hero-secondary {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

/* ----- Toolbar / Filters ----- */
.shop-toolbar {
  background: var(--shop-muted-bg);
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.shop-toolbar .form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--shop-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.shop-toolbar .form-control,
.shop-toolbar select.form-control {
  border-radius: 10px;
  border-color: var(--shop-border);
  padding: 0.5rem 0.75rem;
}
.shop-toolbar .form-control:focus,
.shop-toolbar select.form-control:focus {
  border-color: var(--shop-accent);
  box-shadow: 0 0 0 3px var(--shop-accent-light);
}
.shop-toolbar .r-g-btn {
  border-radius: 10px;
  font-weight: 600;
  padding: 0.5rem 1rem;
}
.shop-result-count {
  font-size: 0.9rem;
  color: var(--shop-muted);
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  background: #fff;
  border-radius: 999px;
  border: 1px solid var(--shop-border);
}

/* ----- Alerts ----- */
.shop-alert {
  border-radius: var(--shop-radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: none;
  font-size: 0.9rem;
  line-height: 1.5;
  border-left: 4px solid transparent;
}
.shop-alerts-wrap {
  margin-top: 0.25rem;
}
.shop-alert-warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef9c3 100%);
  color: #78350f;
  border-left-color: #eab308;
}
.shop-alert-success {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
  border-left-color: #10b981;
}
.shop-alert-info {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  border-left-color: #3b82f6;
}
.shop-alert-danger {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  color: #b91c1c;
  border-left-color: #ef4444;
}

/* ----- Product cards (listing) ----- */
.shop-product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--shop-radius-lg);
  overflow: hidden;
  background: var(--shop-card-bg);
  border: 1px solid var(--shop-border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.shop-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shop-shadow-hover);
  border-color: var(--shop-border);
}
.shop-product-card .card-img-wrap {
  overflow: hidden;
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  position: relative;
}
.shop-product-card .card-img-wrap a {
  display: block;
  text-decoration: none;
  color: inherit;
}
.shop-product-card .card-img-wrap img {
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100%;
  transition: transform 0.4s ease;
}
.shop-product-card:hover .card-img-wrap img {
  transform: scale(1.06);
}
.shop-product-card .card-body {
  padding: 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.shop-product-card .card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.35;
  color: #0f172a;
}
.shop-product-card .card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.shop-product-card .card-title a:hover {
  color: var(--shop-accent);
}
.shop-product-card .card-desc {
  color: var(--shop-muted);
  font-size: 0.875rem;
  flex: 1;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.shop-product-card .card-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--shop-accent);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.shop-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.shop-badge.owned {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #166534;
}
.shop-badge.new {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1d4ed8;
}
.shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.shop-actions .r-g-btn {
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

/* ----- Empty state ----- */
.shop-empty {
  border: 2px dashed var(--shop-border);
  border-radius: var(--shop-radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  background: linear-gradient(180deg, #fafafa 0%, var(--shop-muted-bg) 100%);
}
.shop-empty h4 {
  color: #475569;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.shop-empty p {
  color: var(--shop-muted);
  margin: 0;
}

/* ----- Checkout modal ----- */
.shop-checkout-modal .modal-content {
  border-radius: var(--shop-radius-lg);
  border: none;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.shop-checkout-modal .modal-header {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--shop-border);
  padding: 1.25rem 1.5rem;
}
.shop-checkout-modal .modal-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: #0f172a;
}
.shop-checkout-modal .modal-body {
  padding: 1.5rem 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
}
.shop-checkout-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--shop-border);
  background: #f8fafc;
}
.shop-checkout-modal-footer .r-g-btn {
  padding: 0.65rem 1.25rem;
  font-weight: 700;
}
.shop-checkout-modal .checkout-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--shop-accent);
  margin-bottom: 1.25rem;
}
.shop-checkout-modal .checkout-section {
  margin-bottom: 1.5rem;
}
.shop-checkout-modal .checkout-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--shop-muted);
  margin-bottom: 0.75rem;
}
.shop-checkout-modal .form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
}
.shop-checkout-modal .form-control {
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  border-color: var(--shop-border);
}
.shop-checkout-modal .form-control:focus {
  border-color: var(--shop-accent);
  box-shadow: 0 0 0 3px var(--shop-accent-light);
}
.shop-checkout-modal .payment-divider {
  height: 1px;
  background: var(--shop-border);
  margin: 1.25rem 0;
}
.shop-checkout-modal .payment-option-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  margin-bottom: 0.75rem;
}
.shop-checkout-modal .payment-detail-block {
  background: var(--shop-muted-bg);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--shop-border);
}
.shop-checkout-modal .payment-detail-block strong {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--shop-muted);
}
.shop-checkout-modal .r-g-btn {
  border-radius: 10px;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
}

/* ----- Product detail page ----- */
.shop-product-detail .product-image-wrap {
  border-radius: var(--shop-radius-lg);
  overflow: hidden;
  background: #f1f5f9;
  box-shadow: var(--shop-shadow);
}
.shop-product-detail .product-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
}
.shop-product-detail .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--shop-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.shop-product-detail .back-link:hover {
  color: var(--shop-accent);
}
.shop-breadcrumb {
  font-size: 0.9rem;
  color: var(--shop-muted);
}
.shop-breadcrumb a {
  color: var(--shop-muted);
  text-decoration: none;
}
.shop-breadcrumb a:hover {
  color: var(--shop-accent);
}
.shop-breadcrumb-sep {
  margin: 0 0.35rem;
  opacity: 0.7;
}
.shop-breadcrumb [aria-current="page"] {
  color: #0f172a;
  font-weight: 600;
}
.shop-product-detail .product-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.shop-product-detail .product-desc {
  color: var(--shop-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}
.shop-product-detail .product-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--shop-accent);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.shop-product-detail .product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.shop-product-detail .r-g-btn {
  border-radius: 10px;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
}
.shop-product-detail .payment-detail-block {
  background: var(--shop-muted-bg);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--shop-border);
}

/* ----- Profile / My Orders ----- */
.shop-profile .profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.shop-profile .profile-stat {
  background: #fff;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shop-shadow);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.shop-profile .profile-stat:hover {
  border-color: var(--shop-accent);
  box-shadow: 0 8px 25px -8px rgba(5, 150, 105, 0.2);
}
.shop-profile .profile-stat .num {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.shop-profile .profile-stat .lbl {
  font-size: 0.8rem;
  color: var(--shop-muted);
  font-weight: 500;
  margin-top: 0.25rem;
}
.shop-profile .profile-card,
.shop-profile .orders-card {
  background: #fff;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shop-shadow);
}
.shop-profile .profile-card h2,
.shop-profile .orders-card h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--shop-border);
}
.shop-profile .profile-info p {
  margin-bottom: 0.5rem;
  color: #334155;
  font-size: 0.95rem;
}
.shop-profile .form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
  margin-bottom: 0.35rem;
  display: block;
}
.shop-profile .form-group .form-control {
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  border-color: var(--shop-border);
  width: 100%;
  max-width: 320px;
}
.shop-profile .form-group .form-control:focus {
  border-color: var(--shop-accent);
  box-shadow: 0 0 0 3px var(--shop-accent-light);
}
.shop-profile .order-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--shop-border);
  font-size: 0.95rem;
}
.shop-profile .order-row:last-child {
  border-bottom: none;
}
.shop-profile .order-product {
  font-weight: 600;
  color: #0f172a;
  flex: 1 1 180px;
}
.shop-profile .order-product-link {
  color: #0f172a;
  text-decoration: none;
}
.shop-profile .order-product-link:hover {
  color: var(--shop-accent);
}
.shop-profile .order-amount {
  color: var(--shop-muted);
  font-weight: 600;
}
.shop-profile .order-date {
  flex: 0 0 auto;
}
.shop-profile .order-status {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}
.shop-profile .order-status.paid {
  background: #dcfce7;
  color: #166534;
}
.shop-profile .order-status.pending {
  background: #fef3c7;
  color: #92400e;
}
.shop-profile .order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.shop-profile .order-actions .btn-sm {
  border-radius: 8px;
  font-size: 0.85rem;
}
.shop-profile .order-download .r-g-btn,
.shop-profile .order-actions .r-g-btn {
  border-radius: 8px;
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
}
.shop-profile .alert {
  border-radius: var(--shop-radius);
  padding: 0.85rem 1rem;
}

/* ----- Responsive ----- */
@media (max-width: 767px) {
  .shop-hero {
    padding: 1.5rem 1.25rem;
  }
  .shop-hero h1 {
    font-size: 1.4rem;
  }
  .shop-toolbar .col-md-2,
  .shop-toolbar .col-md-3,
  .shop-toolbar .col-md-4 {
    margin-top: 0.5rem;
  }
  .shop-result-count {
    margin-top: 0.5rem;
    margin-left: 0 !important;
  }
  .shop-product-detail .product-title {
    font-size: 1.4rem;
  }
  .shop-profile .order-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
