/* ============================================================
   index.css — Public Page Styles
   PerfectLabelCut
   Used by: index.php
   ============================================================ */

/* ── RESET & BASE ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --logo-red: #e53935;
  --flipkart: #2b2b2b;
  --meesho: #0f9d9d;
  --amazon: #1565c0;
  --about: #2b2b2b;
  --bg: #ffffff;
  --border: #e0e0e0;
  --shadow: 0 2px 16px rgba(0,0,0,0.07);
  --nav-hover-bg: #f5f5f5;
  --mobile-menu-bg: #ffffff;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: #f0f0f0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── HEADER ──────────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  border-bottom: 1.5px solid var(--border);
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── LOGO ────────────────────────────────────────────────────── */
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.98rem;
  font-weight: 700;
  color: var(--logo-red);
  letter-spacing: 0.5px;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.logo:hover { opacity: 0.82; }

/* ── DESKTOP NAV ─────────────────────────────────────────────── */
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links li a {
  display: block;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 1.14rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.18s, transform 0.15s;
  letter-spacing: 0.2px;
}
.nav-links li a:hover { background: var(--nav-hover-bg); transform: translateY(-1px); }

.nav-links .link-flipkart a { color: var(--flipkart); }
.nav-links .link-meesho  a  { color: var(--meesho); }
.nav-links .link-amazon  a  { color: var(--amazon); }
.nav-links .link-about   a  { color: #fff; background: var(--flipkart); border-radius: 8px; }
.nav-links .link-about   a:hover { background: #444; transform: translateY(-1px); }

/* ── HAMBURGER ───────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  border-radius: 6px;
  transition: background 0.2s;
}
.hamburger:hover { background: var(--nav-hover-bg); }

.hamburger span {
  display: block;
  height: 2.2px;
  background: #333;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}
.hamburger span:nth-child(2) { width: 70%; }

.hamburger.open span:nth-child(1) { transform: translateY(7.2px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7.2px) rotate(-45deg); }

/* ── MOBILE MENU ─────────────────────────────────────────────── */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--mobile-menu-bg);
  border-top: 1px solid var(--border);
  padding: 12px 16px 20px;
  gap: 4px;
  animation: slideDown 0.25s ease;
}
.mobile-menu.open { display: flex; }

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

.mobile-menu a {
  display: flex;
  align-items: center;
  padding: 13px 14px;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: 500;
  text-decoration: none;
  color: #333;
  transition: background 0.18s;
  gap: 10px;
}
.mobile-menu a:hover { background: #f5f5f5; }

.mobile-menu a .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.mobile-menu .m-flipkart a .dot { background: var(--flipkart); }
.mobile-menu .m-meesho   a .dot { background: var(--meesho); }
.mobile-menu .m-amazon   a .dot { background: var(--amazon); }
.mobile-menu .m-about    a { background: #f9f9f9; border: 1.5px solid #ddd; }

/* ── SECTION COMMON SPACING ──────────────────────────────────── */
.how-section,
.help-section,
.keyfeat-section,
.features-section,
.faq-section {
  padding: 15px 5% 15px;
  background: #f0f2f5;
}
.features-section { padding-top: 35px; }
.faq-section      { padding-bottom: 35px; }

/* ── HOW TO USE ──────────────────────────────────────────────── */
.how-section { text-align: center; }
.how-inner { max-width: 100%; margin: 0 auto; }
.how-inner h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 2.3rem; font-weight: 800;
  color: #1a1a2e; margin-bottom: 18px; line-height: 1.25;
}
.how-inner .how-subtitle {
  font-size: 1rem; color: #555; line-height: 1.75;
  max-width: 720px; margin: 0 auto 35px;
}
.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.how-card {
  display: flex; align-items: flex-start; gap: 20px;
  background: #fff; border: 1px solid #e0e0e0;
  border-radius: 16px; padding: 28px;
  text-align: left;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.how-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(21,101,192,0.1); border-color: #90caf9; }
.how-card-icon {
  flex-shrink: 0; width: 52px; height: 52px;
  background: #1565c0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: 'DM Sans', sans-serif;
  font-size: 1.3rem; font-weight: 800;
  box-shadow: 0 4px 14px rgba(21,101,192,0.3);
}
.how-card-body h3 { font-size: 1.1rem; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.how-card-body p  { font-size: 0.95rem; color: #666; line-height: 1.7; }
.how-card-body p strong { color: #1a1a2e; }

/* ── HELP SECTION ────────────────────────────────────────────── */
.help-section { text-align: center; }
.help-inner { max-width: 100%; margin: 0 auto; }
.help-inner h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 2.3rem; font-weight: 800;
  color: #1a1a2e; margin-bottom: 18px; line-height: 1.25;
}
.help-inner .help-subtitle {
  font-size: 1rem; color: #555; line-height: 1.75;
  max-width: 720px; margin: 0 auto 35px;
}
.help-inner .help-subtitle strong { color: #1a1a2e; }
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.help-card {
  display: flex; align-items: flex-start; gap: 20px;
  background: #fff; border: 1px solid #e0e0e0;
  border-radius: 16px; padding: 28px;
  text-align: left;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.help-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(21,101,192,0.1); border-color: #90caf9; }
.help-card-icon {
  flex-shrink: 0; width: 52px; height: 52px;
  background: #e3f0ff; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #1565c0;
}
.help-card-icon svg { width: 28px; height: 28px; }
.help-card-body h3 { font-size: 1.1rem; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.help-card-body p  { font-size: 0.95rem; color: #666; line-height: 1.7; }

/* ── KEY FEATURES ────────────────────────────────────────────── */
.keyfeat-inner { max-width: 100%; margin: 0 auto; }
.keyfeat-box {
  background: #fff; border-radius: 24px;
  padding: 56px 60px; box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  border: 1px solid #eaeaea;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center;
}
.keyfeat-illustration {
  display: flex; align-items: center; justify-content: center;
}
.keyfeat-illustration svg { width: 100%; max-width: 420px; height: auto; }
.keyfeat-illustration img { width: 100%; max-width: 420px; height: auto; display: block; }

.keyfeat-content h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.85rem; font-weight: 800;
  color: #1a1a2e; margin-bottom: 20px; line-height: 1.3;
}
.keyfeat-content p {
  font-size: 1rem; color: #555; line-height: 1.85; margin-bottom: 18px;
}
.keyfeat-content p strong { color: #1a1a2e; }
.keyfeat-content .kf-label { font-size: 1rem; font-weight: 700; color: #1a1a2e; margin-bottom: 14px; }

.keyfeat-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.keyfeat-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 0.97rem; color: #444; line-height: 1.6; }
.keyfeat-list li .kf-dot { flex-shrink: 0; margin-top: 7px; width: 8px; height: 8px; border-radius: 50%; background: #1565c0; }

/* ── FEATURES SECTION ────────────────────────────────────────── */
.features-inner { max-width: 100%; margin: 0 auto; text-align: center; }
.features-inner h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.3rem; font-weight: 700;
  color: #1a1a2e; margin-bottom: 35px; line-height: 1.3;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feat-card {
  background: #fff; border-radius: 18px;
  padding: 40px 28px 36px;
  border: 1px solid #eaeaea;
  box-shadow: 0 3px 18px rgba(0,0,0,0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-align: center;
}
.feat-card:hover { transform: translateY(-5px); box-shadow: 0 10px 32px rgba(0,0,0,0.1); }
.feat-icon { width: 60px; height: 60px; margin: 0 auto 20px; color: #1565c0; }
.feat-icon svg { width: 100%; height: 100%; }
.feat-card h3 { font-size: 1.2rem; font-weight: 700; color: #1a1a2e; margin-bottom: 14px; }
.feat-card p  { font-size: 0.96rem; color: #666; line-height: 1.75; }

/* ── FAQ SECTION ─────────────────────────────────────────────── */
.faq-section { flex-grow: 1; }
.faq-inner { max-width: 100%; margin: 0 auto; }
.faq-inner h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 2.3rem; font-weight: 800;
  color: #1a1a2e; margin-bottom: 25px; line-height: 1.3; text-align: center;
}
.faq-list { display: flex; flex-direction: column; gap: 2px; max-width: 100%; }
.faq-item {
  background: #fff; border: 1px solid #eaeaea;
  border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  overflow: hidden; transition: all 0.25s ease;
}
.faq-item.active {
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  border-color: #90caf9;
  border-top: 3px solid #1565c0;
}
.faq-question {
  width: 100%; background: none; border: none; text-align: left;
  padding: 20px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem; font-weight: 700; color: #1a1a2e;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  transition: background 0.2s;
}
.faq-question:hover { background: #fafafa; }
.faq-icon { flex-shrink: 0; width: 20px; height: 20px; color: #1565c0; transition: transform 0.3s ease; }
.faq-item.active .faq-icon { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fff;
}
.faq-answer p { padding: 0 24px 24px; font-size: 0.98rem; color: #555; line-height: 1.7; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  background: #ffffff; border-top: 1px solid #e0e0e0;
  padding: 30px 24px; text-align: center;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.footer-links {
  display: flex; align-items: center;
  justify-content: center; flex-wrap: wrap; gap: 8px;
}
.footer-links a { color: #000; text-decoration: none; font-size: 0.95rem; font-weight: 500; padding: 4px 6px; transition: opacity 0.2s; }
.footer-links a:hover { opacity: 0.7; text-decoration: underline; }
.footer-sep     { color: #000; font-size: 0.9rem; opacity: 0.6; margin: 0 4px; }
.footer-copyright { color: #000; font-size: 0.9rem; opacity: 0.8; margin-top: 6px; }

/* ── PDF TOOL WRAPPER ────────────────────────────────────────── */
#meesho-tool-wrapper {
  --bg-main: #f4f7f6;
  --bg-panel: #ffffff;
  --text-main: #2b2d42;
  --text-muted: #6c757d;
  --border-color: #e0e0e0;
  --accent: #4361ee;
  --accent-hover: #3f37c9;
  --success: #2a9d8f;
  --upload-bg: #f8f9fa;
  --upload-hover: #4361ee10;
  --preview-bg: #e9ecef;
  --btn-text: #ffffff;
  --panel-shadow: 0 4px 24px rgba(0,0,0,0.04);
}

.wrapper { max-width: 100%; margin: auto; position: relative; }

.main-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

#meesho-tool-wrapper .panel {
  background: var(--bg-panel); border-radius: 16px; padding: 28px;
  border: 1px solid var(--border-color); box-shadow: var(--panel-shadow);
  transition: background 0.3s, border-color 0.3s;
}

.panel-title { font-family: 'Space Mono', monospace; font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 20px; }

.upload-zone { border: 2px dashed var(--border-color); border-radius: 12px; padding: 40px 20px; text-align: center; cursor: pointer; transition: all 0.2s; background: var(--upload-bg); }
.upload-zone:hover, .upload-zone.dragging { border-color: var(--accent); background: var(--upload-hover); }
.upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.upload-zone h3 { font-size: 1rem; color: var(--text-main); margin-bottom: 6px; }
.upload-zone p  { font-size: 0.8rem; color: var(--text-muted); }
#fileName { margin-top: 14px; font-size: 0.8rem; color: var(--success); font-weight: 700; min-height: 20px; }

.mode-toggle { display: flex; gap: 10px; margin: 20px 0; }
.mode-btn { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--upload-bg); color: var(--text-muted); font-family: 'DM Sans', sans-serif; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; }
.mode-btn.active { background: var(--accent); color: var(--btn-text); border-color: var(--accent); font-weight: 700; }

.options-row { background: var(--upload-bg); padding: 16px; border-radius: 10px; margin-bottom: 20px; border: 1px solid var(--border-color); transition: background 0.3s; }
.option-group { margin-bottom: 14px; }
.option-group:last-child { margin-bottom: 0; }
.option-group label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.option-group select { width: 100%; padding: 10px; border-radius: 6px; background: var(--bg-panel); border: 1px solid var(--border-color); color: var(--text-main); font-family: 'DM Sans', sans-serif; outline: none; transition: border-color 0.2s; }
.option-group select:focus { border-color: var(--accent); }

.checkbox-label { display: flex !important; align-items: center; gap: 10px; font-size: 0.9rem !important; color: var(--text-main) !important; text-transform: none !important; letter-spacing: 0 !important; cursor: pointer; font-weight: 500 !important; }
.checkbox-label input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

#processBtn { width: 100%; padding: 14px; border-radius: 10px; border: none; background: var(--accent); color: var(--btn-text); font-family: 'Space Mono', monospace; font-size: 0.9rem; font-weight: 700; letter-spacing: 1px; cursor: pointer; transition: all 0.2s; margin-top: 8px; }
#processBtn:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(67,97,238,0.3); }
#processBtn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

.status-msg { margin-top: 12px; font-size: 0.82rem; text-align: center; min-height: 20px; color: var(--success); display: none; font-weight: 700; }

.preview-panel { display: flex; flex-direction: column; }
.preview-area { flex: 1; background: var(--preview-bg); border-radius: 12px; border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; min-height: 340px; overflow: hidden; position: relative; transition: background 0.3s; }
.preview-placeholder { text-align: center; color: var(--text-muted); }
.preview-placeholder span { font-size: 3rem; display: block; margin-bottom: 10px; opacity: 0.5; }
.preview-placeholder p  { font-size: 0.8rem; }
#previewCanvas { max-width: 100%; max-height: 420px; border-radius: 8px; display: none; object-fit: contain; box-shadow: var(--panel-shadow); }

.page-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.nav-btn { background: var(--upload-bg); border: 1px solid var(--border-color); color: var(--text-main); border-radius: 6px; padding: 6px 14px; cursor: pointer; font-size: 1rem; transition: all 0.2s; }
.nav-btn:hover:not(:disabled) { background: var(--border-color); }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
#pageInfo { font-size: 0.8rem; color: var(--text-muted); min-width: 80px; text-align: center; font-weight: 700; }

.loading-spinner { width: 36px; height: 36px; border: 3px solid var(--border-color); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.crop-info { margin-top: 14px; font-size: 0.75rem; color: var(--text-muted); text-align: center; line-height: 1.6; }
.meta-tag  { display: inline-block; background: var(--border-color); padding: 2px 6px; border-radius: 4px; color: var(--accent); margin: 0 4px; font-weight: bold; }

.summary-container { margin-top: 24px; display: none; }
.table-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.table-wrapper { background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; box-shadow: var(--panel-shadow); }
.table-wrapper h4 { padding: 16px 20px; margin: 0; border-bottom: 1px solid var(--border-color); background: var(--upload-bg); font-size: 0.9rem; color: var(--text-main); font-family: 'Space Mono', monospace; text-transform: uppercase; letter-spacing: 1px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.85rem; }
th, td { padding: 12px 20px; border-bottom: 1px solid var(--border-color); color: var(--text-main); }
th { color: var(--text-muted); font-weight: 700; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px; background: var(--bg-main); }
tr:last-child td { border-bottom: none; }
.table-total-row { font-weight: 700; background: var(--upload-bg); color: var(--accent) !important; }
.table-total-row td { color: var(--accent) !important; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav-links li a { padding: 8px 12px; font-size: 1.08rem; }
  .how-inner h2 { font-size: 2rem; }
  .how-card { padding: 24px 22px; }
  .help-inner h2 { font-size: 2rem; }
  .help-card { padding: 24px 22px; }
  .keyfeat-box { padding: 44px 40px; gap: 36px; }
  .keyfeat-content h2 { font-size: 1.65rem; }
  .features-inner h2 { font-size: 1.95rem; }
  .features-grid { gap: 18px; }
  .feat-card { padding: 32px 22px 28px; }
  .faq-inner h2 { font-size: 2rem; }
}

@media (max-width: 768px) {
  .table-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-container { height: 65px; padding: 0 18px; }
  .logo { font-size: 1.74rem; }

  .how-section  { padding: 15px 5%; }
  .how-inner h2 { font-size: 1.65rem; }
  .how-grid     { grid-template-columns: 1fr; gap: 16px; }

  .help-section  { padding: 15px 5%; }
  .help-inner h2 { font-size: 1.65rem; }
  .help-grid     { grid-template-columns: 1fr; gap: 16px; }

  .keyfeat-section { padding: 15px 5%; }
  .keyfeat-box { grid-template-columns: 1fr; padding: 32px 24px; border-radius: 16px; gap: 28px; }
  .keyfeat-illustration { display: none; }
  .keyfeat-content h2 { font-size: 1.45rem; }

  .features-section { padding: 15px 20px; }
  .features-inner h2 { font-size: 1.6rem; margin-bottom: 25px; }
  .features-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; gap: 18px; }

  .faq-section    { padding: 15px 5%; }
  .faq-inner h2   { font-size: 1.65rem; }
  .faq-question   { padding: 18px 20px; font-size: 1rem; }
  .faq-answer p   { padding: 0 20px 20px; }
}

@media (max-width: 680px) {
  .main-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .footer-links { flex-direction: column; gap: 12px; }
  .footer-sep   { display: none; }
  .footer-copyright { font-size: 0.85rem; }
}

@media (max-width: 420px) {
  .nav-container { padding: 0 14px; height: 60px; }
  .logo { font-size: 1.56rem; }
  .how-inner h2 { font-size: 1.4rem; }
  .how-card  { padding: 20px 18px; gap: 14px; }
  .how-card-icon { width: 44px; height: 44px; }
  .help-inner h2 { font-size: 1.4rem; }
  .help-card { padding: 20px 18px; gap: 14px; }
  .help-card-icon { width: 44px; height: 44px; }
  .keyfeat-box { padding: 24px 18px; border-radius: 14px; }
  .keyfeat-content h2 { font-size: 1.25rem; }
  .keyfeat-content p  { font-size: 0.95rem; }
  .features-inner h2  { font-size: 1.35rem; }
  .feat-card h3  { font-size: 1.08rem; }
  .feat-icon     { width: 50px; height: 50px; }
}
