/* Fannen.tn Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --color-terracotta: #D8603B;
  --color-terracotta-hover: #BE5230;
  --color-terracotta-light: #FFF0ED;
  --color-deep-blue: #1A4358;
  --color-sand-beige: #FDFBFA;
  --color-sand-dark: #F2EBE1;
  --color-charcoal: #222222;
  --color-text-light: #555555;
  --color-text-lighter: #888888;
  --color-border: #E8E5E1;
  --color-white: #FFFFFF;
  --color-bg: #FAFAF9;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.08);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --spacing-xs: 0.5rem;   /* 8px */
  --spacing-sm: 1rem;     /* 16px */
  --spacing-md: 1.5rem;   /* 24px */
  --spacing-lg: 2rem;     /* 32px */
  --spacing-xl: 3rem;     /* 48px */
  --spacing-xxl: 5rem;    /* 80px */
}

/* Reset & Base Elements */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--color-charcoal);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-charcoal);
  line-height: 1.2;
}

p {
  color: var(--color-text-light);
}

a {
  color: var(--color-charcoal);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-terracotta);
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  font-family: var(--font-body);
}

ul {
  list-style: none;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; font-weight: 500; }
.text-terracotta { color: var(--color-terracotta); }
.font-bold { font-weight: 700; }
.font-heading { font-family: var(--font-heading); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-terracotta);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-terracotta-hover);
  color: var(--color-white);
}

.btn-outline {
  border-color: var(--color-border);
  background-color: transparent;
  color: var(--color-charcoal);
}

.btn-outline:hover {
  border-color: var(--color-charcoal);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-charcoal);
}

.btn-ghost:hover {
  background-color: var(--color-sand-dark);
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-sm);
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--color-charcoal);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  transition: border-color 0.2s ease;
  background-color: var(--color-white);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-terracotta);
  box-shadow: 0 0 0 3px var(--color-terracotta-light);
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) var(--spacing-lg);
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-logo img {
  height: 5vh;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  font-size: 0.9375rem;
  font-weight: 500;
}

.navbar-search {
  display: flex;
  align-items: center;
  background-color: var(--color-bg);
  border-radius: var(--radius-full);
  padding: 0.375rem 1rem;
  width: 300px;
}
.navbar-search input {
  border: none;
  background: transparent;
  width: 100%;
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
}
.navbar-search input:focus {
  outline: none;
}
.navbar-search svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-lighter);
}

/* Layout Blocks */
.hero-section {
  padding: var(--spacing-xxl) 0;
  text-align: center;
  background-color: var(--color-sand-beige);
}

.hero-section h1 {
  font-size: 3.5rem;
  max-width: 800px;
  margin: 0 auto var(--spacing-md);
}

.hero-section p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto var(--spacing-lg);
}

/* Masonry/Grid Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
}

.artwork-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--color-border);
}

.artwork-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.artwork-img-box {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
}

.artwork-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.artwork-card:hover .artwork-img-box img {
  transform: scale(1.05);
}

.badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--color-terracotta);
  color: var(--color-white);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.artwork-content {
  padding: var(--spacing-sm);
}

.artwork-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.artwork-artisan {
  font-size: 0.875rem;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.artwork-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.kudos-btn {
  background: transparent;
  border: none;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.kudos-btn:hover {
  color: var(--color-terracotta);
}

/* Footer elements */
.site-footer {
  background-color: var(--color-white);
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-xl) 0 var(--spacing-lg);
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-brand h2 {
  font-size: 1.5rem;
  color: var(--color-terracotta);
  margin-bottom: var(--spacing-sm);
}

.footer-brand p {
  font-size: 0.875rem;
}

.footer-col h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--color-charcoal);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  color: var(--color-text-light);
  font-size: 0.875rem;
}

.footer-col a:hover {
  color: var(--color-terracotta);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--color-text-lighter);
}

/* ============================
   Forms & Inputs Extensions
   ============================ */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}
.checkbox-group input {
  accent-color: var(--color-terracotta);
}
.text-link {
  color: var(--color-terracotta);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.875rem;
}

/* ============================
   Auth Screen Layout
   ============================ */
.auth-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--color-white);
}

.auth-hero {
  flex: 1;
  position: relative;
  background-color: var(--color-charcoal);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--spacing-xxl);
  overflow: hidden;
}

.auth-hero img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.auth-hero-overlay {
  position: relative;
  z-index: 10;
  color: var(--color-white);
  max-width: 500px;
  background: rgba(0,0,0,0.3);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(4px);
}

.auth-hero-overlay h1 {
  color: var(--color-white);
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
}

.auth-form-side {
  width: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-xl);
}

.auth-box {
  width: 100%;
  max-width: 380px;
}

.auth-tabs {
  display: flex;
  margin-bottom: var(--spacing-lg);
  background: var(--color-bg);
  border-radius: var(--radius-full);
  padding: 0.25rem;
}

.auth-tab {
  flex: 1;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--color-text-light);
  font-weight: 600;
  cursor: pointer;
}
.auth-tab.active {
  background: var(--color-white);
  color: var(--color-charcoal);
  box-shadow: var(--shadow-sm);
}

.social-auth {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.social-auth .btn {
  flex: 1;
}

/* ============================
   Modal / Inquiry Overlay
   ============================ */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(34, 34, 34, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: var(--spacing-md);
}

.modal-content {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: transparent;
  border: none;
  color: var(--color-text-lighter);
  font-size: 1.5rem;
  cursor: pointer;
}
.modal-close:hover {
  color: var(--color-charcoal);
}

.modal-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-terracotta-light);
  color: var(--color-terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-md);
}

/* ============================
   Dashboard Layout
   ============================ */
.dashboard-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background-color: var(--color-bg);
}

.sidebar {
  width: 250px;
  background-color: var(--color-white);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
}

.sidebar-nav {
  flex: 1;
  padding: var(--spacing-md) 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem var(--spacing-md);
  color: var(--color-text-light);
  font-weight: 500;
}
.sidebar-link:hover, .sidebar-link.active {
  color: var(--color-terracotta);
  background-color: var(--color-terracotta-light);
  border-right: 3px solid var(--color-terracotta);
}

.sidebar-footer {
  padding: var(--spacing-md);
  border-top: 1px solid var(--color-border);
}

.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.dashboard-header {
  padding: var(--spacing-md) var(--spacing-xl);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-content {
  padding: var(--spacing-xl);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.stat-card {
  background: var(--color-white);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-terracotta-light);
  color: var(--color-terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* File Upload Zone */
.upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  text-align: center;
  background: var(--color-white);
  margin-bottom: var(--spacing-xl);
  transition: border-color 0.2s ease;
}
.upload-zone:hover {
  border-color: var(--color-terracotta);
}

/* Data Table */
.data-table-container {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th, .data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  background-color: var(--color-bg);
  color: var(--color-text-light);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
}

.data-table tbody tr:hover {
  background-color: var(--color-bg);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--color-sand-dark);
  color: var(--color-charcoal);
}
.status-badge.published {
  background: #E6F4EA;
  color: #1E8E3E;
}

/* ============================
   Inbox Layout
   ============================ */
.inbox-container {
  display: flex;
  height: calc(100vh - 70px);
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
}

.inbox-list {
  width: 320px;
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}

.inbox-search {
  padding: var(--spacing-sm);
  border-bottom: 1px solid var(--color-border);
}
.inbox-search input {
  width: 100%;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

.conversation-item {
  display: flex;
  gap: 0.75rem;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background 0.2s ease;
}
.conversation-item:hover, .conversation-item.active {
  background-color: var(--color-bg);
  border-left: 3px solid var(--color-terracotta);
}

.avatar {
  width: 48px; height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.chat-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}

.chat-header {
  padding: var(--spacing-sm) var(--spacing-lg);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chat-messages {
  flex: 1;
  padding: var(--spacing-xl);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message-bubble {
  max-width: 70%;
  padding: 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
}
.message-received {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  align-self: flex-start;
  border-bottom-left-radius: 0;
}
.message-sent {
  background: var(--color-terracotta);
  color: var(--color-white);
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.chat-input-area {
  padding: var(--spacing-md);
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: var(--spacing-sm);
}
.chat-input-area input {
  flex: 1;
  padding: 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

/* ============================
   Artwork Detail Page
   ============================ */
.artwork-detail-page {
  background-color: var(--color-sand-light); /* Solid Light Sand */
  min-height: 100vh;
}

.artwork-detail-layout {
  display: flex;
  gap: 4rem; /* High padding */
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .artwork-detail-layout {
    flex-direction: column;
    padding: 2rem var(--spacing-sm);
  }
}

.artwork-left {
  flex: 0 0 60%;
  display: flex;
  justify-content: center;
}

.artwork-left img {
  border-radius: var(--radius-md); /* 8px rounded corners */
  box-shadow: 0 10px 30px rgba(0,0,0,0.08); /* Subtle shadow to make it pop */
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

.artwork-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.artisan-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--color-white);
  padding: var(--spacing-md);
  border-radius: var(--radius-md); /* 8px rounded corners */
  box-shadow: var(--shadow-sm);
}

.artisan-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.artisan-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.artwork-info-card {
  display: flex;
  flex-direction: column;
}

.artwork-info-card h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.artwork-description p {
  margin-bottom: 1rem;
  color: var(--color-charcoal);
}

.kudos-horizontal-card {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background-color: var(--color-white);
  padding: var(--spacing-md);
  border-radius: var(--radius-md); /* 8px rounded corners */
  box-shadow: var(--shadow-sm);
}

.kudos-badge-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-charcoal);
  font-weight: 600;
}

.kudos-badge-item svg {
  color: var(--color-terracotta);
}

.btn-terracotta-solid {
  background-color: #E2725B;
  color: var(--color-white);
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: var(--radius-md); /* 8px rounded corners */
  text-align: center;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-terracotta-solid:hover {
  background-color: #c95c46;
}

