/**
 * Main Stylesheet v2 for Sylkene Studio
 * Classy redesign with brand colors
 *
 * Brand Colors:
 * - Primary (logo): #dca79c
 * - Secondary: #99b0ca
 * - Dark (footer): #52555b
 * - Background: #F8F6F3
 *
 * To revert to old design: change imports from main-v2.css to main.css
 */

/* CSS Variables for easy theming */
:root {
  /* Brand Colors */
  --brand-primary: #dca79c;
  --brand-primary-hover: #c99589;
  --brand-primary-light: rgba(220, 167, 156, 0.1);
  --brand-secondary: #99b0ca;
  --brand-secondary-hover: #8299b5;
  --brand-secondary-light: rgba(153, 176, 202, 0.1);
  --brand-dark: #52555b;
  --brand-dark-hover: #3d4044;
  --brand-bg: #F8F6F3;
  --brand-bg-alt: #ffffff;

  /* Text Colors */
  --text-primary: #2d2d2d;
  --text-secondary: #5a5a5a;
  --text-muted: #8a8a8a;
  --text-light: #b0b0b0;

  /* UI Colors */
  --border-color: #e8e4e0;
  --border-hover: #d4d0cc;
  --shadow-light: rgba(0, 0, 0, 0.06);
  --shadow-medium: rgba(0, 0, 0, 0.1);

  /* Functional Colors */
  --success: #6b9b7a;
  --error: #c77171;
  --warning: #d4a574;

  /* Spacing */
  --header-height: 50px;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.85rem;
  --font-size-base: 0.95rem;
  --font-size-lg: 1.1rem;
  --font-size-xl: 1.3rem;
  --font-size-2xl: 1.75rem;
  --font-size-3xl: 2.25rem;
  --font-size-4xl: 3rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--brand-bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  padding-top: var(--header-height);
  font-size: var(--font-size-base);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-primary-hover);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  letter-spacing: 0;
}

.btn-primary {
  background: var(--brand-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 167, 156, 0.3);
}

.btn-secondary {
  background: var(--brand-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
  border-color: var(--border-hover);
}

.btn-outline {
  background: transparent;
  color: var(--brand-primary);
  border: 1px solid var(--brand-primary);
}

.btn-outline:hover {
  background: var(--brand-primary-light);
}

.btn-dark {
  background: var(--brand-dark);
  color: white;
}

.btn-dark:hover {
  background: var(--brand-dark-hover);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--error);
  color: white;
}

.btn-danger:hover {
  background: #b56464;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-sm {
  padding: 6px 14px;
  font-size: var(--font-size-xs);
}

.btn-lg {
  padding: 14px 28px;
  font-size: var(--font-size-base);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  background: white;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-light);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 2px 8px var(--shadow-light);
  border: 1px solid var(--border-color);
}

.card-hover:hover {
  box-shadow: 0 4px 16px var(--shadow-medium);
  transform: translateY(-2px);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--brand-primary); }
.text-secondary { color: var(--brand-secondary); }
.text-muted { color: var(--text-muted); }

.bg-primary { background: var(--brand-primary); }
.bg-secondary { background: var(--brand-secondary); }
.bg-dark { background: var(--brand-dark); }
.bg-light { background: var(--brand-bg); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* Loading Spinner */
.spinner {
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--brand-primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Brand Gradient (for special elements) */
.brand-gradient {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
}

.brand-gradient-text {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Try-on Widget Styles */
.tryon-widget {
  position: relative;
  display: inline-block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 16px var(--shadow-medium);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.tryon-widget:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-medium);
}

.tryon-widget img {
  display: block;
  width: 100%;
  height: auto;
}

.tryon-widget-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.tryon-widget:hover .tryon-widget-overlay {
  opacity: 1;
}

.tryon-widget-btn {
  background: white;
  color: var(--brand-primary);
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tryon-widget-btn:hover {
  background: var(--brand-primary);
  color: white;
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding-top: var(--header-height);
  }

  .container {
    padding: 0 16px;
  }

  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-xl); }
}

/* Selection styling */
::selection {
  background: var(--brand-primary-light);
  color: var(--text-primary);
}

/* Scrollbar styling (webkit) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--brand-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ========================================
   Guide Template Styles
   ======================================== */

/* Hero Section - More technical/educational feel */
.guide-hero {
  background: var(--brand-dark, #52555b);
  color: white;
  padding: 48px 24px 72px;
  text-align: center;
}

.guide-hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.guide-hero-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  color: #dca79c; /* Pink color for better visibility on dark background */
}

.guide-hero-subtitle {
  font-size: 1.05rem;
  opacity: 0.85;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

/* Main Layout with TOC Sidebar */
.guide-layout {
  max-width: 1000px;
  margin: -40px auto 60px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 0 24px;
}

/* Table of Contents Sidebar */
.guide-toc {
  position: sticky;
  top: 70px;
  height: fit-content;
  background: white;
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid var(--border-color, #e8e4e0);
}

.guide-toc-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #8a8a8a);
  margin-bottom: 12px;
}

.guide-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-toc-item {
  margin-bottom: 8px;
}

.guide-toc-link {
  display: block;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--text-secondary, #5a5a5a);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}

.guide-toc-link:hover {
  background: var(--brand-bg, #F8F6F3);
  color: var(--brand-primary, #dca79c);
}

.guide-toc-link.active {
  background: var(--brand-bg, #F8F6F3);
  color: var(--brand-primary, #dca79c);
  border-left-color: var(--brand-primary, #dca79c);
  font-weight: 500;
}

/* Guide Container */
.guide-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  padding: 40px 48px;
  border: 1px solid var(--border-color, #e8e4e0);
}

/* Guide Content Typography */
.guide-content h1 {
  font-size: 1.9rem;
  margin-bottom: 20px;
  color: var(--text-primary, #2d2d2d);
  letter-spacing: -0.02em;
  line-height: 1.3;
  scroll-margin-top: 80px; /* Account for fixed header */
}

.guide-content h2 {
  font-size: 1.35rem;
  margin: 40px 0 16px;
  padding-top: 20px;
  color: var(--text-primary, #2d2d2d);
  letter-spacing: -0.01em;
  border-top: 1px solid var(--border-color, #e8e4e0);
  scroll-margin-top: 80px; /* Account for fixed header */
}

.guide-content h2:first-of-type {
  margin-top: 24px;
  padding-top: 0;
  border-top: none;
}

.guide-content h3 {
  font-size: 1.1rem;
  margin: 28px 0 12px;
  color: var(--text-primary, #2d2d2d);
  scroll-margin-top: 80px; /* Account for fixed header */
}

.guide-content p {
  margin-bottom: 16px;
  line-height: 1.75;
  color: var(--text-secondary, #5a5a5a);
  font-size: 1rem;
}

.guide-content img {
  max-width: 100%;
  border-radius: 10px;
  margin: 24px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.guide-content ul, .guide-content ol {
  margin: 16px 0 16px 20px;
  line-height: 1.75;
  color: var(--text-secondary, #5a5a5a);
}

.guide-content li {
  margin-bottom: 10px;
}

.guide-content blockquote {
  border-left: 3px solid var(--brand-secondary, #99b0ca);
  padding: 16px 20px;
  background: rgba(153, 176, 202, 0.08);
  margin: 24px 0;
  color: var(--text-secondary, #5a5a5a);
  border-radius: 0 8px 8px 0;
}

.guide-content code {
  background: var(--brand-bg, #F8F6F3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.88em;
}

.guide-content pre {
  background: var(--brand-dark, #52555b);
  color: #e5e5e5;
  padding: 16px 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 20px 0;
}

.guide-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.guide-content a {
  color: var(--brand-primary, #dca79c);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.guide-content a:hover {
  color: var(--brand-primary-hover, #c99589);
}

/* Info Box */
.guide-info-box {
  background: rgba(153, 176, 202, 0.1);
  border: 1px solid rgba(153, 176, 202, 0.3);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
}

.guide-info-box-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand-secondary, #99b0ca);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.guide-info-box p {
  margin: 0;
  font-size: 0.9rem;
}

/* Tip Box */
.guide-tip-box {
  background: rgba(220, 167, 156, 0.1);
  border: 1px solid rgba(220, 167, 156, 0.3);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
}

.guide-tip-box-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand-primary, #dca79c);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.guide-tip-box p {
  margin: 0;
  font-size: 0.9rem;
}

/* FAQ Section */
.guide-faq-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--border-color, #e8e4e0);
}

.guide-faq-title {
  font-size: 1.6rem;
  margin-bottom: 24px;
  color: var(--text-primary, #2d2d2d);
  text-align: center;
}

.guide-faq-item {
  background: var(--brand-bg, #F8F6F3);
  border: 1px solid var(--border-color, #e8e4e0);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s;
}

.guide-faq-item:hover {
  border-color: var(--brand-primary, #dca79c);
}

.guide-faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #2d2d2d);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: color 0.2s;
}

.guide-faq-question:hover {
  color: var(--brand-primary, #dca79c);
}

.guide-faq-icon {
  font-size: 1.2rem;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.guide-faq-item.active .guide-faq-icon {
  transform: rotate(180deg);
}

.guide-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 20px;
}

.guide-faq-item.active .guide-faq-answer {
  max-height: 500px;
  padding: 0 20px 16px;
}

.guide-faq-answer p {
  margin: 0;
  color: var(--text-secondary, #5a5a5a);
  line-height: 1.6;
}

/* CTA Section */
.cta-section {
  background: var(--brand-bg, #F8F6F3);
  padding: 36px 28px;
  text-align: center;
  margin-top: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-color, #e8e4e0);
}

.cta-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--text-primary, #2d2d2d);
}

.cta-description {
  font-size: 0.95rem;
  color: var(--text-secondary, #5a5a5a);
  margin-bottom: 18px;
}

.cta-button {
  background: #99b0ca; /* Solid blue for better readability */
  color: white;
  padding: 12px 32px;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 4px 16px rgba(153, 176, 202, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(153, 176, 202, 0.4);
  background: #8299b5; /* Darker blue on hover */
  color: white;
}

/* Guide Photo Widget - 40/60 split layout with text flow */
.guide-photo-widget {
  margin: 28px 0;
  overflow: auto; /* Clear floats */
}

/* Photo container - 40% width, floated left */
.guide-photo-widget-photo {
  float: left;
  width: 40%;
  margin-right: 24px;
  margin-bottom: 16px;
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 0.8;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.guide-photo-widget-photo:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.guide-photo-widget-photo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top;
  margin-top: 0;
}

/* Photo overlay with try-on button */
.guide-photo-widget-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 12px 0;
  opacity: 1;
  transition: opacity var(--transition-base);
}

.guide-photo-widget-photo:hover .guide-photo-widget-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
  opacity: 1;
}

.guide-photo-widget-btn {
  background: white;
  color: var(--brand-primary);
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.guide-photo-widget-btn:hover {
  background: var(--brand-primary);
  color: white;
  transform: scale(1.05);
}

/* Text content - flows around the photo */
.guide-photo-widget-content {
  color: var(--text-secondary);
  line-height: 1.75;
}

.guide-photo-widget-content h3 {
  margin-top: 0;
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.guide-photo-widget-content p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 12px;
}

/* Photo on right variant - float right instead */
.guide-photo-widget.photo-right .guide-photo-widget-photo {
  float: right;
  margin-right: 0;
  margin-left: 24px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .guide-photo-widget-photo,
  .guide-photo-widget.photo-right .guide-photo-widget-photo {
    float: none;
    width: 100%;
    margin-right: 0;
    margin-left: 0;
    margin-bottom: 16px;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .guide-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .guide-toc {
    position: static;
    order: -1;
  }
}

@media (max-width: 768px) {
  .guide-hero {
    padding: 40px 20px 56px;
  }

  .guide-hero-title {
    font-size: 1.7rem;
  }

  .guide-layout {
    margin: -24px 16px 40px;
    padding: 0;
  }

  .guide-container {
    padding: 28px 24px;
  }

  .guide-content h1 {
    font-size: 1.5rem;
  }

  .guide-content h2 {
    font-size: 1.2rem;
  }
}
