/* ==============================================================================
   PHOTO COMMERCE PLATFORM - CORE STYLESHEET
   Clean, Premium, High-Performance, Mobile-First
   ============================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --accent: #f59e0b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #0f172a;
  --gray-900: #0f172a;
  --gray-800: #1e293b;
  --gray-700: #334155;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50: #f8fafc;
  --white: #ffffff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button, input, select, textarea {
  font: inherit;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* -------------------------------------------------------------
   HEADER & NAVIGATION
   ------------------------------------------------------------- */
.top-notice {
  background: var(--dark);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 8px 15px;
}

.main-header {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 20px;
}

.brand-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
}

.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.header-search input {
  width: 100%;
  height: 44px;
  background: var(--gray-100);
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 0 45px 0 20px;
  font-size: 14px;
  transition: all 0.2s;
}

.header-search input:focus {
  background: #fff;
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.header-search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-700);
  transition: all 0.2s;
}

.header-btn:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.header-btn-cart {
  background: var(--primary-light);
  color: var(--primary);
  position: relative;
}

.cart-badge {
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9999px;
  margin-left: 4px;
}

/* Nav Menu */
.nav-bar {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 30px;
  height: 48px;
  overflow-x: auto;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

/* -------------------------------------------------------------
   BUTTONS & BADGES
   ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-800);
}
.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-lg {
  padding: 15px 32px;
  font-size: 16px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 9999px;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-primary { background: #dbeafe; color: #1e40af; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-secondary { background: #f1f5f9; color: #475569; }

/* -------------------------------------------------------------
   HERO & BANNERS
   ------------------------------------------------------------- */
.hero-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  margin: 30px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  box-shadow: var(--shadow-lg);
}

.hero-content h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-content p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 28px;
  max-width: 540px;
}

/* -------------------------------------------------------------
   PRODUCT & PHOTO CARDS
   ------------------------------------------------------------- */
.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin: 30px 0;
}

.product-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.product-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--gray-100);
}

.product-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.product-card-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.product-old-price {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-400);
  text-decoration: line-through;
}

/* -------------------------------------------------------------
   PHOTO PRINT STUDIO (/fotograf-baski)
   ------------------------------------------------------------- */
.print-studio-header {
  background: #fff;
  padding: 25px 0;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 30px;
}

.size-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.size-card {
  background: #fff;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.size-card:hover {
  border-color: var(--primary);
}

.size-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.size-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-900);
}

.size-card-dim {
  font-size: 13px;
  color: var(--gray-500);
  margin: 4px 0 8px;
}

.size-card-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

/* Upload Dropzone */
.upload-dropzone {
  border: 2px dashed var(--primary);
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 50px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 30px;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
  background: var(--primary-light);
  border-color: var(--primary-hover);
}

.upload-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--primary);
}

/* Photo Grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 100px;
}

.photo-item {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all 0.2s;
}

.photo-item.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.photo-item-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f8fafc;
  cursor: pointer;
}

.photo-item-body {
  padding: 12px;
}

.photo-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.photo-qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.photo-qty-btn {
  background: var(--gray-100);
  border: none;
  width: 28px;
  height: 28px;
  font-weight: 700;
  cursor: pointer;
}

.photo-qty-val {
  width: 32px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
}

/* Sticky Bottom Summary Bar */
.sticky-summary-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--gray-200);
  padding: 16px 30px;
  z-index: 90;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

.summary-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.summary-stats {
  display: flex;
  align-items: center;
  gap: 30px;
}

.summary-stat-label {
  font-size: 12px;
  color: var(--gray-500);
  text-transform: uppercase;
}

.summary-stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-900);
}

/* -------------------------------------------------------------
   MODAL & TOAST
   ------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 24px;
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 14px;
  animation: slideIn 0.3s ease;
  border-left: 4px solid var(--primary);
}
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* -------------------------------------------------------------
   CHATBOT WIDGET
   ------------------------------------------------------------- */
.chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 9999px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xl);
  z-index: 900;
  transition: transform 0.2s;
}

.chat-launcher:hover {
  transform: scale(1.06);
}

.chat-widget {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  height: 540px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  z-index: 900;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.chat-widget.active {
  display: flex;
}

.chat-header {
  background: var(--primary);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--gray-50);
}

.chat-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
}

.chat-msg-bot {
  background: #fff;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  box-shadow: var(--shadow-sm);
}

.chat-msg-user {
  background: var(--primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chat-input-row {
  padding: 12px;
  background: #fff;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 8px;
}

.chat-input-row input {
  flex: 1;
  border: 1px solid var(--gray-300);
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 14px;
  outline: none;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-banner { flex-direction: column; text-align: center; padding: 30px 20px; }
  .hero-content h1 { font-size: 28px; }
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .chat-widget { width: 100%; height: 100%; bottom: 0; right: 0; border-radius: 0; }
  .sticky-summary-bar { padding: 12px 16px; }
}
