/*
  MagicalCodes - Page-Specific Styles
  Extends index.css for sub-pages
*/

/* ═══════════════════════════════════════════
   PAGE HERO (reusable mini-hero for sub-pages)
   ═══════════════════════════════════════════ */
.page-hero {
  padding: 150px 0 60px;
  text-align: center;
  position: relative;
}

.page-hero.page-hero-sm {
  padding: 130px 0 40px;
}

.page-title {
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: -2px;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ═══════════════════════════════════════════
   BREADCRUMB
   ═══════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 110px 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumb a {
  transition: var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb i {
  font-size: 0.55rem;
  color: var(--text-muted);
  opacity: 0.5;
}

.breadcrumb-current {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ═══════════════════════════════════════════
   PRODUCT DETAIL PAGE
   ═══════════════════════════════════════════ */
.product-detail-section {
  padding: 0 0 4rem;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

.product-detail-gallery {
  position: sticky;
  top: 100px;
}

.product-detail-image-main {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail-image-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-image-main .product-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
}

.img-fallback {
  background: linear-gradient(135deg, #EEF2FF, #F5F3FF) !important;
}

.img-fallback::after {
  content: '\f121';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 3rem;
  color: var(--text-muted);
  opacity: 0.2;
}

.product-detail-info {
  padding-top: 0.5rem;
}

.product-detail-info .product-category {
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 2px;
}

.product-detail-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0.75rem 0;
  letter-spacing: -1px;
  line-height: 1.2;
}

.product-detail-rating {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #FFD700;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.rating-value {
  color: var(--text-main);
  font-weight: 700;
  margin-left: 0.25rem;
}

.rating-count {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.product-detail-desc {
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.product-detail-price-block {
  margin-bottom: 1.5rem;
}

.product-detail-price {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -1px;
}

.product-detail-price .price-currency {
  font-size: 1.4rem;
  color: var(--text-muted);
  vertical-align: super;
}

.product-detail-cart-btn {
  margin-bottom: 1rem;
}

/* Detail section blocks */
.product-detail-block {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
}

.product-detail-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.product-detail-block h3 i {
  color: var(--accent);
  font-size: 0.95rem;
}

.detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.detail-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.detail-list li i {
  margin-top: 0.2rem;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.detail-list.features-list li i {
  color: var(--success);
}

.detail-list.requirements-list li i {
  color: var(--accent);
}

/* Changelog */
.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.changelog-entry {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.changelog-version {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--accent);
  white-space: nowrap;
}

.changelog-date {
  color: var(--text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.changelog-notes {
  color: var(--text-secondary);
  font-size: 0.88rem;
  flex-basis: 100%;
}

/* Related Products */
.related-section {
  padding: 60px 0 100px;
  border-top: 1px solid var(--glass-border);
}

/* Not Found */
.not-found-state {
  text-align: center;
  padding: 8rem 0;
  color: var(--text-muted);
}

.not-found-state i {
  font-size: 4rem;
  opacity: 0.2;
  margin-bottom: 1.5rem;
  display: block;
}

.not-found-state h2 {
  color: var(--text-main);
  margin-bottom: 0.75rem;
  font-size: 1.8rem;
}

.not-found-state .btn {
  margin-top: 2rem;
}

/* ═══════════════════════════════════════════
   MARKETPLACE / SCRIPTS PAGE
   ═══════════════════════════════════════════ */
.marketplace-section {
  padding: 0 0 100px;
}

.marketplace-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 0.75rem 1.5rem;
  flex: 1;
  max-width: 480px;
  transition: var(--transition-fast);
}

.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.search-bar i {
  color: var(--text-muted);
}

.search-bar input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.92rem;
  outline: none;
  width: 100%;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.toolbar-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.sort-select {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-family: var(--font-main);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  transition: var(--transition-fast);
}

.sort-select:focus {
  border-color: var(--primary);
}

.sort-select option {
  background: var(--bg-card);
  color: var(--text-secondary);
}

.results-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.no-results {
  text-align: center;
  padding: 5rem 0;
  color: var(--text-muted);
}

.no-results i {
  font-size: 3rem;
  opacity: 0.2;
  margin-bottom: 1rem;
  display: block;
}

.no-results h3 {
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

/* ═══════════════════════════════════════════
   CONTACT PAGE
   ═══════════════════════════════════════════ */
.contact-section {
  padding: 0 0 80px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
}

.contact-form-card,
.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
}

.contact-form-card h3,
.contact-info-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.contact-info-item {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.contact-info-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(236, 72, 153, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-info-item h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.contact-info-item p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.map-placeholder {
  background: var(--bg-elevated);
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  color: var(--text-muted);
  margin-top: 1rem;
}

.map-placeholder i {
  font-size: 2rem;
  opacity: 0.3;
  margin-bottom: 0.75rem;
  display: block;
}

/* ═══════════════════════════════════════════
   ABOUT PAGE
   ═══════════════════════════════════════════ */
.about-story-section {
  padding: 0 0 80px;
}

.about-story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-story-grid p {
  color: var(--text-muted);
  line-height: 1.9;
  font-size: 0.95rem;
  margin-top: 1.25rem;
}

.about-visual {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(236, 72, 153, 0.06));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.about-visual-orb {
  width: 60%;
  height: 60%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.3;
  animation: float 8s ease-in-out infinite;
}

.about-stats-section {
  padding: 80px 0;
}

.about-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-6px);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-md);
}

.stat-card .stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  display: block;
  margin-bottom: 0.25rem;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  display: block;
}

.about-team-section {
  padding: 80px 0 100px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-6px);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-md);
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 auto 1.25rem;
}

.team-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.team-card .team-role {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.team-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

.about-values-section {
  padding: 80px 0;
  border-top: 1px solid var(--glass-border);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.value-card {
  text-align: center;
  padding: 2rem;
}

.value-card i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.value-card h4 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.value-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ═══════════════════════════════════════════
   FAQ ACCORDION
   ═══════════════════════════════════════════ */
.faq-section {
  padding: 80px 0 100px;
}

.faq-grid {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--glass-border-hover);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  background: none;
  border: none;
  color: var(--text-main);
  width: 100%;
  text-align: left;
  font-family: var(--font-main);
  gap: 1rem;
}

.faq-question i {
  transition: transform 0.3s ease;
  color: var(--text-muted);
  flex-shrink: 0;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
  padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 1.5rem 1.25rem;
}

/* ═══════════════════════════════════════════
   COMPARISON TABLE
   ═══════════════════════════════════════════ */
.comparison-section {
  padding: 80px 0;
}

.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
  font-size: 0.88rem;
}

.comparison-table th {
  background: var(--bg-elevated);
  font-weight: 700;
  font-size: 0.95rem;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table .fa-check {
  color: var(--success);
}

.comparison-table .fa-xmark {
  color: var(--text-muted);
  opacity: 0.4;
}

/* ═══════════════════════════════════════════
   IMG PLACEHOLDER (for missing images)
   ═══════════════════════════════════════════ */
.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #EEF2FF, #F5F3FF);
  color: var(--text-muted);
  font-size: 2rem;
  opacity: 0.3;
}

/* ═══════════════════════════════════════════
   RESPONSIVE - NEW PAGES
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .page-title { font-size: 2.6rem; }
  .product-detail-grid { gap: 2.5rem; }
  .about-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .page-title { font-size: 2.2rem; letter-spacing: -1.5px; }
  .page-hero { padding: 130px 0 40px; }
  .breadcrumb { padding-top: 90px; }
  .product-detail-grid { grid-template-columns: 1fr; gap: 2rem; }
  .product-detail-gallery { position: static; }
  .product-detail-title { font-size: 1.8rem; }
  .product-detail-price { font-size: 2.2rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-story-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .values-grid { grid-template-columns: 1fr; }
  .marketplace-toolbar { flex-direction: column; align-items: stretch; }
  .search-bar { max-width: 100%; }
  .toolbar-controls { justify-content: space-between; }
  .comparison-table { font-size: 0.8rem; }
  .comparison-table th, .comparison-table td { padding: 0.75rem 0.75rem; }
}

@media (max-width: 480px) {
  .page-title { font-size: 1.8rem; }
  .product-detail-title { font-size: 1.5rem; }
}
