/*
Theme Name: Gopal Info Docs
Theme URI: https://gopalinfo.com
Author: Gopal Info
Author URI: https://gopalinfo.com
Description: Modern, dynamic product documentation and knowledge base WordPress theme with ACF support, multi-product switcher, interactive checklist, search modal, and document downloads.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gopalinfo-docs
Tags: documentation, knowledge-base, custom-post-type, acf, responsive-layout, translation-ready
*/

@import url('css/style.css');

/* ==========================================================================
   WordPress Core & Theme Extensions
   ========================================================================== */

/* Adjust sticky header when WordPress admin bar is present */
body.admin-bar .site-header {
  top: 32px;
}
@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

/* WordPress standard align classes */
.alignnone { margin: 1.5em 0; }
.aligncenter { display: block; margin: 1.5em auto; text-align: center; }
.alignleft { float: left; margin: 0 1.5em 1.5em 0; }
.alignright { float: right; margin: 0 0 1.5em 1.5em; }
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* ==========================================================================
   Product Switcher (Header & Sidebar)
   ========================================================================== */
.product-switcher-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.product-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-full);
  color: var(--slate-800);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.product-switcher-btn:hover,
.product-switcher-btn[aria-expanded="true"] {
  background: var(--white);
  border-color: var(--brand-secondary);
  box-shadow: var(--shadow-sm);
}

.product-switcher-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  z-index: 1000;
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-switcher-dropdown.is-open {
  display: block;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-switcher-header {
  padding: 8px 10px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-400);
  border-bottom: 1px solid var(--slate-100);
  margin-bottom: 6px;
}

.product-switcher-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--slate-700);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.product-switcher-item:hover {
  background: var(--slate-50);
  color: var(--brand-secondary);
}

.product-switcher-item.is-current {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  font-weight: 600;
}

.product-switcher-item .item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-switcher-footer {
  border-top: 1px solid var(--slate-100);
  margin-top: 6px;
  padding-top: 6px;
}

.product-switcher-all {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-secondary);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.product-switcher-all:hover {
  background: var(--brand-secondary-light);
}

/* ==========================================================================
   Hero Document Downloads Bar & Badges
   ========================================================================== */
.hero-docs-row {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(226, 232, 240, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-docs-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-600);
}

.hero-docs-list {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.doc-download-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-full);
  color: var(--slate-700);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.doc-download-chip:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-brand);
}

.doc-download-chip .chip-ext {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  background: var(--slate-100);
  color: var(--slate-600);
  text-transform: uppercase;
}

.doc-download-chip:hover .chip-ext {
  background: rgba(255, 255, 255, 0.25);
  color: var(--white);
}

.doc-download-chip .chip-size {
  font-size: 11px;
  color: var(--slate-400);
}

.doc-download-chip:hover .chip-size {
  color: rgba(255, 255, 255, 0.85);
}

/* Modal Downloads List */
.downloads-modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-glow);
  border: 1px solid var(--slate-200);
}

.downloads-modal-header {
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.downloads-modal-body {
  padding: 24px 28px;
}

.downloads-modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--slate-400);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.downloads-modal-close:hover {
  color: var(--ink-950);
  background: var(--slate-100);
}

.doc-file-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  transition: all var(--transition-fast);
  background: var(--slate-50);
}

.doc-file-card:hover {
  background: var(--white);
  border-color: var(--brand-secondary);
  box-shadow: var(--shadow-md);
}

.doc-file-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.doc-file-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--brand-secondary-light);
  color: var(--brand-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.doc-file-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--slate-800);
}

.doc-file-desc {
  font-size: 12.5px;
  color: var(--slate-500);
  margin-top: 2px;
}

/* ==========================================================================
   Products Archive Page (Catalog of all Products & Documentation)
   ========================================================================== */
.archive-hero {
  padding: 60px 0 40px;
  text-align: center;
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.6) 0%, rgba(255, 255, 255, 0) 100%);
  border-bottom: 1px solid var(--slate-100);
  margin-bottom: 40px;
}

.archive-hero h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--ink-950);
  margin-bottom: 12px;
}

.archive-hero p {
  font-size: 16px;
  color: var(--slate-600);
  max-width: 640px;
  margin: 0 auto;
}

.products-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.product-catalog-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.product-catalog-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-secondary);
  box-shadow: var(--shadow-lg);
}

.product-catalog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.product-catalog-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-950);
  margin-bottom: 8px;
}

.product-catalog-desc {
  font-size: 14px;
  color: var(--slate-600);
  line-height: 1.6;
  margin-bottom: 20px;
}

.product-catalog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--slate-100);
}
