/* AcneParma - Clinical Luxury Design System */

:root {
  /* Brand Colors */
  --primary: #0f172a;      /* Slate 900 - Deep Navy */
  --primary-light: #334155; /* Slate 700 */
  --accent: #0ea5e9;       /* Sky 500 - Medical Blue */
  --accent-dark: #0284c7;  /* Sky 600 */
  --accent-light: #e0f2fe; /* Sky 100 */
  --success: #10b981;      /* Emerald 500 */
  
  /* Backgrounds */
  --bg-body: #ffffff;
  --bg-surface: #f8fafc;   /* Slate 50 */
  --bg-glass: rgba(255, 255, 255, 0.9);
  
  /* Borders */
  --border-color: #e2e8f0; /* Slate 200 */
  
  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Spacing */
  --container-width: 1200px;
  --header-height: 72px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  
  /* Radius */
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --safe-area-bottom: env(safe-area-inset-bottom);
}

/* 1. Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--primary);
  line-height: 1.6;
  font-size: 16px;
  padding-bottom: calc(80px + var(--safe-area-bottom)); /* Space for mobile nav */
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 2. Layout */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section.alt {
  background-color: var(--bg-surface);
}

/* 3. Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

p {
  color: var(--primary-light);
  margin-bottom: 1.5rem;
}

.text-center { text-align: center; }
.text-accent { color: var(--accent); }

/* 4. Components */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: black;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--border-color);
  color: var(--primary);
}

.btn-outline:hover {
  border-color: var(--primary);
  background-color: var(--bg-surface);
}

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-light);
}

.card-image {
  padding: 32px;
  background: white;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-image img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 24px;
  background: var(--bg-surface);
  flex-grow: 1;
  border-top: 1px solid var(--border-color);
}

.badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 10;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  height: var(--header-height);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
}

.nav-desktop {
  display: none;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
    gap: 32px;
    align-items: center;
  }
  
  .nav-desktop a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--primary-light);
  }
  
  .nav-desktop a:hover {
    color: var(--accent);
  }
}

/* Hero */
.hero {
  padding: 100px 0;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, var(--accent-light) 0%, transparent 70%);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
}

/* Footer */
.footer {
  background: var(--primary);
  color: white;
  padding: 64px 0 100px;
  text-align: center;
}

.footer p { color: #94a3b8; }
.footer small { color: #64748b; display: block; margin-top: 24px; font-size: 0.875rem; }

/* Mobile Nav */
.mobile-nav {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  padding: 12px 32px;
  border-radius: var(--radius-full);
  display: flex;
  gap: 32px;
  z-index: 100;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
}

.mobile-nav a.active { color: white; }
.mobile-nav a svg { width: 24px; height: 24px; stroke-width: 2px; }

@media (min-width: 768px) {
  .mobile-nav { display: none; }
}

/* WhatsApp */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 100px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 90;
  transition: transform 0.2s ease;
}

.whatsapp-float:hover { transform: scale(1.1); }
.whatsapp-float svg { width: 32px; height: 32px; fill: white; }

/* Admin Panel Overrides */
body.admin-body {
  background-color: #f1f5f9;
}

.admin-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  padding: 24px 0;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
}

.stat-card {
  background: white;
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--accent);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.admin-table th, .admin-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.admin-table th {
  background: var(--bg-surface);
  font-weight: 600;
  color: var(--primary);
}

/* Admin Layout Extras */
.dashboard-container { max-width: 1200px; margin: 0 auto; padding: 32px 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-bottom: 32px; }
.admin-nav { display: flex; gap: 12px; flex-wrap: wrap; }
.admin-nav a { 
  padding: 8px 16px; 
  background: rgba(255,255,255,0.1); 
  color: white; 
  border-radius: var(--radius-md); 
  font-size: 0.875rem; 
  font-weight: 500; 
}
.admin-nav a:hover { background: rgba(255,255,255,0.2); }
.admin-nav a.logout { background: #ef4444; }
.admin-nav a.logout:hover { background: #dc2626; }


/* Admin Dashboard Specifics */
.stat-card.blogs { border-left-color: #8b5cf6; }
.stat-card.ai { border-left-color: #f59e0b; }
.stat-card .icon { font-size: 2.25rem; margin-bottom: 12px; }
.stat-card .label { color: var(--primary-light); font-size: 0.875rem; margin-bottom: 4px; }
.stat-card .value { font-size: 2rem; font-weight: 800; color: var(--primary); }

.features-card {
  background: white;
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.features-card h2 { margin: 0 0 20px; font-size: 1.5rem; color: var(--primary); }
.features-list { list-style: none; padding: 0; margin: 0; }
.features-list li {
  padding: 16px;
  border-left: 3px solid var(--accent);
  background: var(--bg-surface);
  margin-bottom: 12px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.features-list li strong { color: var(--accent-dark); display: block; margin-bottom: 4px; }


/* Admin Login */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.login-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 2;
}


.login-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 36px;
  font-weight: 700;
}
.login-title { text-align: center; margin: 0 0 8px; font-size: 1.75rem; color: var(--primary); font-weight: 700; }
.login-subtitle { text-align: center; margin: 0 0 32px; color: var(--primary-light); font-size: 0.875rem; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--primary-light); font-size: 0.875rem; font-weight: 500; }
.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: border-color 0.3s;
}
.form-group input:focus { border-color: var(--accent); outline: none; }


.login-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.login-btn:hover {
  background: black;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.error-msg {
  background: #fef2f2;
  color: #ef4444;
  padding: 12px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.875rem;
  text-align: center;
  border: 1px solid #fee2e2;
}


/* Admin 2.0 Layout */
.admin-layout { display: flex; min-height: 100vh; background: #f8fafc; }
.admin-sidebar { width: 260px; background: #0f172a; color: white; flex-shrink: 0; display: flex; flex-direction: column; position: fixed; height: 100vh; overflow-y: auto; }
.admin-sidebar-header { padding: 24px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-brand { font-size: 1.25rem; font-weight: 800; color: white; display: flex; align-items: center; gap: 10px; }
.admin-nav { padding: 24px 16px; flex-grow: 1; display: flex; flex-direction: column; gap: 4px; }
.admin-nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: #94a3b8; text-decoration: none; border-radius: 8px; transition: all 0.2s; font-weight: 500; }
.admin-nav-item:hover, .admin-nav-item.active { background: rgba(255,255,255,0.1); color: white; }
.admin-nav-item svg { width: 20px; height: 20px; }
.admin-main { flex-grow: 1; display: flex; flex-direction: column; margin-left: 260px; min-width: 0; }
.admin-topbar { background: white; height: 64px; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; position: sticky; top: 0; z-index: 40; }
.admin-content { padding: 32px; max-width: 1600px; margin: 0 auto; width: 100%; }
.admin-card { background: white; border-radius: 12px; border: 1px solid #e2e8f0; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 24px; }
.admin-page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-page-title { font-size: 1.5rem; font-weight: 700; color: #0f172a; }
@media (max-width: 1024px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s; z-index: 50; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
}


.admin-header h1 { color: white !important; }


/* Slider Styles */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background-color: var(--primary-dark);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide .hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    z-index: 10;
    font-size: 1.5rem;
    transition: background 0.3s;
}

.slider-btn:hover {
    background: rgba(0,0,0,0.8);
}

.prev-slide { left: 0; }
.next-slide { right: 0; }

@media (max-width: 768px) {
    .hero-slider { height: 500px; }
    .slider-btn { padding: 0.5rem; font-size: 1rem; }
}

/* Search Bar Styles */
.search-bar {
  flex-grow: 1;
  margin: 0 24px;
  max-width: 400px;
}

.search-form {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 16px;
  transition: all 0.2s ease;
}

.search-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
  background: white;
}

.search-form input {
  border: none;
  background: transparent;
  padding: 8px 0;
  flex-grow: 1;
  outline: none;
  font-size: 0.95rem;
  color: var(--primary);
  width: 100%;
}

.search-form button {
  background: none;
  border: none;
  color: var(--primary-light);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.search-form button:hover {
  color: var(--accent);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  /* Header Strip - Dark Theme */
  .header {
    height: auto;
    padding: 12px 0;
    background: var(--primary); /* Dark background */
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
  }

  .logo {
    flex-shrink: 0;
    color: white; /* White text */
  }
  
  .logo img, .logo svg {
    height: 32px !important;
    width: auto;
  }
  
  /* Invert logo color if it's an SVG with fill/stroke */
  .logo svg path { stroke: white; }
  .logo svg rect { fill: rgba(255,255,255,0.1); }

  .logo-text {
    display: none;
  }

  .search-bar {
    margin: 0;
    max-width: none;
    width: 100%;
  }
  
  .search-form {
    padding: 4px 12px;
    background: rgba(255,255,255,0.1); /* Semi-transparent on dark */
    border-color: transparent;
  }
  
  .search-form input {
    font-size: 16px;
    padding: 6px 0;
    color: white; /* White text input */
  }
  
  .search-form input::placeholder {
    color: rgba(255,255,255,0.5);
  }
  
  .search-form button {
    color: rgba(255,255,255,0.7);
  }

  /* Product Cards Mobile Fix */
  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 4px;
  }

  .card {
    box-shadow: var(--shadow-sm);
  }

  .card-image {
    height: auto; /* Allow auto height */
    min-height: 200px;
    padding: 20px;
  }

  .card-content {
    padding: 16px;
    /* Ensure no fixed height limits visibility */
    height: auto; 
  }

  .card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    /* Ensure text wraps and is visible */
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    display: block;
  }
  
  .card p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
  }
  
  .btn {
    padding: 12px 20px;
    width: 100%;
    justify-content: center;
  }
  
  .card .btn {
    width: 100%;
  }
}
