/*
Theme Name: RamiApps Studio
Description: A custom WordPress theme for RamiApps Shopify development studio, inspired by Shopify Admin design
Version: 1.0.0
Author: RamiApps
*/

:root {
  /* Shopify Admin color scheme */
  --bg: #f6f6f7;
  --panel: #ffffff;
  --line: #e3e6e8;
  --fg: #202223;
  --muted: #6d7175;
  --accent: #2c6ecb;
  --success: #008060;
  --warning: #ffc453;
  --critical: #d72c0d;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
    "Helvetica Neue", Arial;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Main App Layout */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  font-weight: 700;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 16px;
  color: var(--accent);
}

.nav-title {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 14px;
}

.nav a:hover {
  background: #f1f2f3;
}

.nav a.active {
  background: #eef3fb;
  border: 1px solid #d9e6ff;
  color: var(--accent);
  font-weight: 500;
}

/* Content Area */
.content {
  padding: 18px;
  overflow-y: auto;
}

/* Top Bar */
.topbar {
  position: sticky;
  top: 0;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  margin-bottom: 12px;
  z-index: 100;
}

.toggle {
  display: none;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.toggle:hover {
  background: #f1f2f3;
}

/* Page Content */
.page {
  display: none;
}

.page.active {
  display: block;
}

/* Polaris-like Components */
.polaris-page {
  max-width: 100%;
}

.polaris-section {
  margin-bottom: 24px;
}

.polaris-heading {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--fg);
}

.polaris-text {
  color: var(--fg);
  line-height: 1.5;
  margin: 0 0 16px 0;
}

.polaris-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.polaris-button.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.polaris-button.primary:hover {
  background: #1e4a8c;
  border-color: #1e4a8c;
}

.polaris-button.secondary {
  background: var(--panel);
  color: var(--fg);
  border-color: var(--line);
}

.polaris-button.secondary:hover {
  background: #f1f2f3;
}

.polaris-button.large {
  padding: 12px 24px;
  font-size: 16px;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 40px;
  border-radius: 12px;
  margin-bottom: 32px;
  text-align: center;
}

.hero-section h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 16px 0;
}

.hero-section p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin: 0 0 24px 0;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  transition: all 0.2s ease;
}

.feature-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(44, 110, 203, 0.1);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--fg);
}

.feature-card p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 8px 0;
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* App Showcase */
.app-showcase {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin: 24px 0;
}

.app-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.app-item:last-child {
  border-bottom: none;
}

.app-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
}

.app-info h4 {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.app-info p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.live {
  background: #e3fcef;
  color: var(--success);
}

.badge.beta {
  background: #fff3cd;
  color: #856404;
}

.badge.coming {
  background: #e3f2fd;
  color: var(--accent);
}

/* Contact Section */
.contact-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  margin: 32px 0;
}

.contact-section h2 {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.contact-section p {
  color: var(--muted);
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.contact-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Blog Posts */
.blog-post {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin: 16px 0;
  transition: all 0.2s ease;
}

.blog-post:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(44, 110, 203, 0.1);
}

.blog-post h3 {
  margin: 0 0 12px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg);
}

.blog-post p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 16px 0;
}

.blog-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}

.blog-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Responsive Design */
@media (max-width: 960px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: -260px;
    width: 240px;
    transition: left 0.2s;
    z-index: 1000;
  }

  .sidebar.open {
    left: 0;
  }

  .content {
    padding: 14px;
  }

  .toggle {
    display: inline-block;
  }

  .hero-section {
    padding: 40px 20px;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-buttons {
    flex-direction: column;
    align-items: center;
  }
}

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

  .app-item {
    flex-direction: column;
    text-align: center;
  }
}
