/* ============================================
   PIXELBABU — Products Store Styles (Rich Modern SaaS)
   ============================================ */

/* Products Page Layout */
.products-hero-section {
  padding: 160px 0 60px; text-align: center;
  background: #FFFFFF; border-bottom: 1px solid #E2E8F0;
  position: relative; overflow: hidden;
}
.products-hero-section .hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(124,58,237,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2,132,199,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}
.products-hero-section .orb-ph {
  position: absolute; width: 650px; height: 650px; border-radius: 50%;
  background: radial-gradient(circle,
    rgba(124,58,237,0.12),
    rgba(0,210,255,0.08),
    rgba(255,42,133,0.08),
    transparent 70%);
  top: -160px; left: 50%; transform: translateX(-50%); pointer-events: none;
}
.products-hero-content { position: relative; z-index: 2; }

/* Store Search Bar */
.store-search-container {
  max-width: 620px; margin: 28px auto 0;
}
.store-search-box {
  position: relative; display: flex; align-items: center;
  background: #FFFFFF; border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-full); padding: 6px 18px 6px 20px;
  box-shadow: 0 8px 30px -4px rgba(15,23,42,0.08), 0 0 0 4px rgba(124,58,237,0.04);
  transition: all 0.3s var(--ease);
}
.store-search-box:focus-within {
  border-color: #7C3AED;
  box-shadow: 0 12px 35px -4px rgba(124,58,237,0.15), 0 0 0 4px rgba(124,58,237,0.1);
}
.store-search-box .search-icon {
  color: #7C3AED; font-size: 17px; margin-right: 12px;
}
.store-search-box input {
  flex: 1; border: none; background: transparent;
  padding: 10px 0; font-size: 15px; color: #0F172A; font-family: 'Outfit', sans-serif;
  font-weight: 500;
}
.store-search-box input::placeholder { color: #94A3B8; }
.search-clear {
  background: #F1F5F9; border: none; width: 28px; height: 28px;
  border-radius: 50%; color: #64748B; cursor: pointer;
  display: none; align-items: center; justify-content: center; font-size: 12px;
  transition: var(--transition);
}
.search-clear:hover { background: #FEE2E2; color: #EF4444; }
.search-clear.show { display: flex; }

/* Trust Strip */
.store-trust-strip {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.store-trust-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #F8FAFC; border: 1px solid #E2E8F0;
  padding: 8px 16px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; color: #334155;
  box-shadow: 0 2px 6px rgba(15,23,42,0.03);
}

/* Filter Toolbar */
.filter-wrap {
  padding: 16px 0; position: sticky; top: 72px; z-index: 50;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid #E2E8F0;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.03);
}
.filter-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
}
.filter-tabs {
  display: flex; gap: 8px; flex-wrap: nowrap;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding: 4px 0;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  flex-shrink: 0; white-space: nowrap;
  padding: 9px 18px; border-radius: var(--radius-full);
  background: #F8FAFC; border: 1px solid #E2E8F0;
  color: #475569; font-weight: 700; font-size: 13px;
  cursor: pointer; transition: all 0.25s var(--ease); font-family: 'Outfit', sans-serif;
}
.filter-tab:hover {
  border-color: #7C3AED; color: #7C3AED; background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.1);
}
.filter-tab.active {
  background: var(--grad-brand); color: white;
  border-color: transparent; box-shadow: 0 4px 18px rgba(124, 58, 237, 0.35);
}
.filter-meta {
  display: flex; align-items: center; gap: 14px; margin-left: auto;
}
.results-count {
  font-size: 13px; font-weight: 700; color: #64748B; white-space: nowrap;
}
.store-sort-select {
  padding: 8px 14px; border-radius: var(--radius-full);
  background: #FFFFFF; border: 1px solid #CBD5E1;
  color: #0F172A; font-size: 13px; font-weight: 600; font-family: 'Outfit', sans-serif;
  cursor: pointer; outline: none; transition: var(--transition);
}
.store-sort-select:focus { border-color: #7C3AED; }

/* Products Grid */
.products-section { padding: 48px 0 90px; }
.products-full-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.p-no-results {
  grid-column: 1/-1; text-align: center; padding: 80px 20px;
  color: #64748B;
}
.p-no-results i { font-size: 48px; margin-bottom: 16px; opacity: 0.4; color: #7C3AED; }

/* Enhanced Modern Product Card */
.product-card {
  background: #FFFFFF; border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl); overflow: hidden;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex; flex-direction: column;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 10px 25px -4px rgba(124, 58, 237, 0.04);
}
.product-card:hover {
  transform: translateY(-8px); border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 25px 60px -10px rgba(124, 58, 237, 0.2), 0 10px 20px -4px rgba(15, 23, 42, 0.04);
}
.p-img {
  height: 220px; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #FAF5FF 0%, #F0F9FF 50%, #FFF1F2 100%);
  border-bottom: 1px solid #F1F5F9;
}
.p-img img {
  width: 100%; height: 100%; object-fit: contain; padding: 14px;
  transition: transform 0.5s var(--ease);
  filter: drop-shadow(0 8px 20px rgba(124, 58, 237, 0.2));
}
.product-card:hover .p-img img { transform: scale(1.08); }

.p-cat-pill {
  position: absolute; top: 14px; left: 14px;
  background: #FFFFFF; backdrop-filter: blur(8px);
  border: 1px solid rgba(124, 58, 237, 0.25); color: #7C3AED;
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.12);
}
.p-badge-discount {
  position: absolute; top: 14px; right: 14px;
  background: linear-gradient(135deg, #FF2A85, #7928CA);
  color: white; padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(255, 42, 133, 0.35);
}

.p-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.p-verified {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: #059669; margin-bottom: 8px;
}
.p-verified i { font-size: 12px; }
.p-name { font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; color: #0F172A; line-height: 1.35; }
.p-desc { color: #475569; font-size: 13.5px; line-height: 1.6; margin-bottom: 16px; flex: 1; }

.p-meta-rating {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; font-size: 12px; color: #64748B;
}
.p-stars { color: #F59E0B; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.p-downloads { font-weight: 600; color: #64748B; }

.product-features {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px;
  background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: var(--radius);
  padding: 12px 14px;
}
.pf-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: #334155; font-weight: 500;
}
.pf-item i { color: #10B981; font-size: 12px; }

.p-price-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 18px; padding-top: 8px;
}
.p-price-left { display: flex; align-items: baseline; gap: 10px; }
.p-price-main { font-size: 1.7rem; font-weight: 900; color: #7C3AED; }
.p-price-orig { color: #94A3B8; font-size: 14px; text-decoration: line-through; }
.p-savings-tag {
  background: #ECFDF5; color: #059669; border: 1px solid #A7F3D0;
  font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: var(--radius-full);
}

/* Store Benefits Section */
.store-benefits-section {
  background: #FFFFFF; border-top: 1px solid #E2E8F0; border-bottom: 1px solid #E2E8F0;
  padding: 80px 0;
}
.store-benefits-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.benefit-card {
  background: #F8FAFC; border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg); padding: 32px 24px;
  text-align: center; transition: all 0.3s var(--ease);
}
.benefit-card:hover {
  background: #FFFFFF; border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px -8px rgba(124, 58, 237, 0.12);
}
.benefit-icon {
  width: 60px; height: 60px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin: 0 auto 18px;
}
.benefit-card h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 10px; color: #0F172A; }
.benefit-card p { font-size: 13.5px; color: #475569; line-height: 1.6; }
/* ============================
   PURCHASE MODAL (Dual Checkout)
   ============================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px) saturate(180%); z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.35s var(--ease);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: #FFFFFF; border: 1px solid #E2E8F0;
  border-radius: var(--radius-xl); max-width: 680px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(30px) scale(0.97);
  transition: transform 0.35s var(--ease);
  box-shadow: 0 25px 70px -10px rgba(15, 23, 42, 0.25), 0 10px 30px -5px rgba(124, 58, 237, 0.15);
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 28px; border-bottom: 1px solid #F1F5F9;
  position: sticky; top: 0; background: #FFFFFF; z-index: 10;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-title { font-size: 1.25rem; font-weight: 800; color: #0F172A; }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  background: #F1F5F9; border: 1px solid #E2E8F0;
  color: #475569; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); font-family: inherit;
}
.modal-close:hover { background: #FEE2E2; border-color: #FECACA; color: #EF4444; }

.modal-body { padding: 28px; }

.modal-product-info {
  display: flex; gap: 20px; align-items: center;
  background: #F8FAFC; border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg); padding: 18px; margin-bottom: 24px;
}
.modal-product-icon {
  width: 68px; height: 68px; border-radius: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.modal-product-details h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 6px; color: #0F172A; }
.modal-product-details .price-row { display: flex; align-items: baseline; gap: 10px; }
.modal-product-details .p-price-main { font-size: 1.6rem; font-weight: 900; color: #7C3AED; }
.modal-product-details .p-price-orig { color: #94A3B8; font-size: 14px; text-decoration: line-through; }

.modal-features {
  margin-bottom: 24px; background: #F8FAFC; border: 1px solid #E2E8F0;
  border-radius: var(--radius); padding: 16px 20px;
}
.modal-features h4 { font-size: 12px; color: #64748B; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; font-weight: 700; }
.modal-features-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mf-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #334155; font-weight: 500; }
.mf-item i { color: #10B981; }

.form-label { font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 8px; display: block; }
.form-input {
  width: 100%; background: #FFFFFF;
  border: 1px solid #CBD5E1; border-radius: var(--radius);
  padding: 12px 16px; color: #0F172A; font-size: 14px;
  font-family: 'Outfit', sans-serif; transition: var(--transition);
}
.form-input:focus { border-color: #7C3AED; outline: none; box-shadow: 0 0 0 3px rgba(124,58,237,0.15); }
.form-input::placeholder { color: #94A3B8; }
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.pay-btn {
  width: 100%; padding: 15px; font-size: 15px; font-weight: 800;
  border-radius: var(--radius-full); background: linear-gradient(90deg, #00D2FF 0%, #7928CA 50%, #FF2A85 100%);
  color: white; border: 2.5px solid #0A071E; cursor: pointer;
  box-shadow:
    inset 0 2.5px 3px rgba(255, 255, 255, 0.8),
    inset 0 -2.5px 4px rgba(0, 0, 0, 0.35),
    0 8px 24px rgba(124, 58, 237, 0.35);
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1); font-family: 'Outfit', sans-serif;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  position: relative; overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.pay-btn::after {
  content: '';
  position: absolute;
  top: 2px; left: 10px; right: 10px; height: 46%;
  border-radius: 9999px 9999px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.12) 80%, transparent 100%);
  pointer-events: none;
}
.pay-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    inset 0 2.5px 4px rgba(255, 255, 255, 0.95),
    0 12px 35px rgba(124, 58, 237, 0.5);
}
.pay-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.secure-note {
  text-align: center; margin-top: 14px;
  color: var(--text-3); font-size: 12px;
}
.secure-note i { color: #10B981; margin-right: 4px; }

/* ============================
   SUCCESS MODAL
   ============================ */
.success-box { padding: 40px 24px; text-align: center; }
.success-icon {
  width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(135deg, #10B981, #059669);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; margin: 0 auto 18px;
  box-shadow: 0 0 40px rgba(16,185,129,0.4);
  animation: successPop 0.6s var(--ease);
}
@keyframes successPop {
  0% { transform: scale(0); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.success-box h2 { font-size: 1.7rem; margin-bottom: 10px; }
.order-id-badge {
  display: inline-block; background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.3); color: var(--purple-xl);
  padding: 10px 24px; border-radius: var(--radius-full);
  font-family: monospace; font-size: 14px; margin-bottom: 24px;
}

/* Trust Grid */
.trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center;
}

/* Light Mode Overrides for Products Page & Modal */
[data-theme="light"] .filter-wrap {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: #E2E8F0;
}
[data-theme="light"] .modal-box {
  background: #FFFFFF;
  border-color: #E2E8F0;
  box-shadow: 0 25px 70px -10px rgba(15, 23, 42, 0.15), 0 10px 30px -5px rgba(124, 58, 237, 0.1);
}
[data-theme="light"] .modal-header {
  background: #FFFFFF;
  border-bottom-color: #F1F5F9;
}
[data-theme="light"] .modal-product-info {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}
[data-theme="light"] .modal-features {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}
[data-theme="light"] .modal-features h4 {
  color: #0F172A;
}
[data-theme="light"] .mf-item {
  color: #334155;
}
[data-theme="light"] .modal-close {
  background: #F1F5F9;
  border-color: #E2E8F0;
  color: #475569;
}
[data-theme="light"] .modal-close:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
  color: #EF4444;
}
[data-theme="light"] .trust-badge {
  background: #F8FAFC;
  border-color: #E2E8F0;
  color: #334155;
}

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

@media (max-width: 768px) {
  .products-full-grid { grid-template-columns: 1fr; gap: 18px; }
  .modal-features-list { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .modal-actions-grid { grid-template-columns: 1fr !important; }
  
  /* Mobile Bottom-Sheet Modal */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal-box {
    border-radius: 24px 24px 0 0;
    max-height: 92vh;
    max-width: 100%;
    transform: translateY(100%);
  }
  .modal-overlay.open .modal-box {
    transform: translateY(0);
  }
  .modal-header {
    padding: 20px 20px 16px;
    border-radius: 24px 24px 0 0;
  }
  .modal-body {
    padding: 20px;
  }
  .modal-product-info {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 16px;
  }
  .modal-product-details .price-row {
    justify-content: center;
  }
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}
