/* Marketplace specific styles – inherits global variables from ../style.css */

/* Hero section overrides */
.marketplace-hero {
  min-height: 80vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  overflow: hidden;
  padding-top: 6rem;
}

.marketplace-hero .hero-container {
  position: relative;
  z-index: 2;
  max-width: 900px;
  text-align: center;
}

.marketplace-hero .hero-title {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.marketplace-hero .hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--text-light-muted);
}

/* Category navigation */
.category-nav {
  padding: 4rem 0;
  background: var(--dark-bg-alt);
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.category-tab {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-tab:hover,
.category-tab.active {
  background: var(--secondary);
  color: var(--text-light);
  box-shadow: var(--shadow-glow-cyan);
}

/* Product grid */
.product-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 1.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0.5rem 1.25rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 240, 255, 0.3) rgba(255, 255, 255, 0.05);
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.product-grid::-webkit-scrollbar {
  height: 6px; /* Horizontal scrollbar height */
  width: 6px;
}

.product-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

.product-grid::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.3);
  border-radius: 10px;
}

.product-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 240, 255, 0.6);
}

.product-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  height: 380px; /* Compact height for absolute symmetry */
  width: 240px; /* Fixed width to support horizontal scroll list */
  flex-shrink: 0;
  box-sizing: border-box;
  scroll-snap-align: start;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow-blue);
}

.product-card .card-image-wrap {
  width: 100%;
  height: 125px; /* Compact image container */
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.product-card h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.product-card .description {
  font-size: 0.78rem;
  color: var(--text-light-muted);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.2rem; /* Lock height to 2 lines of text */
  flex-shrink: 0;
}

.product-card .features {
  font-size: 0.78rem;
  color: var(--text-light-muted);
  margin-bottom: 0.75rem;
  list-style: none;
  padding: 0;
  overflow: hidden;
  height: 3.2rem; /* Lock height for list */
  flex-shrink: 0;
}

.product-card .features li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card .features li::before {
  content: "•";
  color: var(--secondary);
  position: absolute;
  left: 0.1rem;
  font-weight: bold;
}

.product-card .badge-price {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--secondary);
  color: var(--secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.65rem;
  z-index: 2;
}

.product-card .card-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: nowrap;
  margin-top: auto; /* Push to bottom of the card */
  flex-shrink: 0;
}

.product-card .card-actions a {
  flex: 1 1 0%;
  text-align: center;
  font-size: 0.65rem;
  padding: 0.45rem 0.1rem;
  letter-spacing: -0.2px;
}

.product-card .badge-contact {
  display: block;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--secondary);
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 4px;
  padding: 0.35rem 0.5rem;
  margin-top: 0.6rem;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px rgba(0, 240, 255, 0.05);
  flex-shrink: 0;
}

.product-card:hover .badge-contact {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--secondary);
  color: var(--text-light);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

/* Demo modal */
.demo-modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
  z-index: 1000;
}

.demo-modal.active {
  opacity: 1;
  visibility: visible;
}

.demo-content {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  max-width: 1100px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 240, 255, 0.15);
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 240, 255, 0.3) rgba(255, 255, 255, 0.05);
}

.demo-modal.active .demo-content {
  transform: scale(1);
}

.demo-desc {
  font-size: 0.9rem;
  color: var(--text-light-muted);
  margin: 0.25rem 0 0 0;
  max-width: 90%;
  line-height: 1.4;
}

.btn-pricing-cta {
  font-weight: 700;
  box-shadow: var(--shadow-glow-cyan);
  border: 1px solid var(--secondary) !important;
}

.demo-content .demo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.demo-content .demo-header h3 {
  margin: 0; font-size: 1.5rem; color: var(--text-light);
}

.demo-content .close-demo {
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 2rem;
  cursor: pointer;
}

.demo-content iframe {
  width: 100%;
  height: 500px;
  border: none;
  border-radius: var(--radius-md);
}

.demo-cta a {
  margin-top: 0.5rem;
}

/* Conversion Section */
.conversion-section {
  background: var(--dark-bg);
  color: var(--text-light);
  padding: 4rem 0;
  text-align: center;
}

.conversion-section .conversion-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* Demo Modal Tabs & Screenshots Gallery */
.demo-tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.demo-tabs .tab-btn {
  background: transparent;
  border: none;
  color: var(--text-light-muted);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  position: relative;
}

.demo-tabs .tab-btn:hover {
  color: var(--text-light);
}

.demo-tabs .tab-btn.active {
  color: var(--secondary);
}

.demo-tabs .tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -0.65rem;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--secondary);
  box-shadow: var(--shadow-glow-cyan);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.gallery-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.main-screenshot-wrap {
  width: 100%;
  height: 480px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.4);
  position: relative;
}

.main-screenshot-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.screenshot-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(4px);
  padding: 0.85rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.95rem;
}

.thumbnails-row {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 0.75rem 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 240, 255, 0.3) rgba(255, 255, 255, 0.05);
}

.thumbnails-row::-webkit-scrollbar {
  height: 4px;
}

.thumbnails-row::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.3);
  border-radius: 10px;
}

.thumb-item {
  width: 120px;
  height: 75px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.3s ease;
  opacity: 0.5;
}

.thumb-item:hover {
  opacity: 0.9;
}

.thumb-item.active {
  border-color: var(--secondary);
  opacity: 1;
  box-shadow: var(--shadow-glow-cyan);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .main-screenshot-wrap {
    height: 280px;
  }
  .thumb-item {
    width: 80px;
    height: 50px;
  }
}

/* Meeting Scheduler Panel CSS */
.meeting-scheduler-container {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.scheduler-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.days-selector-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.day-chip {
  flex: 1;
  min-width: 75px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.5rem;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s ease;
}

.day-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.day-chip.active {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--secondary);
  box-shadow: var(--shadow-glow-cyan);
}

.day-chip .day-name {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-light-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.day-chip.active .day-name {
  color: var(--secondary);
}

.day-chip .day-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-light);
}

.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.5rem;
}

.time-slot {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s ease;
}

.time-slot:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.time-slot.active {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--secondary);
  color: var(--secondary);
  box-shadow: var(--shadow-glow-cyan);
}

.scheduler-input {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

.scheduler-input:focus {
  border-color: var(--secondary);
  outline: none;
  box-shadow: var(--shadow-glow-cyan);
}

.select-platform option {
  background: #0b0f19;
  color: #fff;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .marketplace-hero .hero-title {font-size: 2.5rem;}
  .category-tabs {flex-direction: column; align-items: stretch;}
  .time-slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

#product-laptop-3d-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  outline: none;
}
