/* ============ ARTeefy Mobile Theme (brand blue) ============ */
:root {
  /* Neutrals */
  --pg: #F7F8FB;      /* page background */
  --sf: #FFFFFF;      /* surface */
  --bd: #E5E7EB;      /* border */
  --tx1: #111827;     /* text primary */
  --tx2: #6B7280;     /* text secondary */

  /* Primary — brand blue (from logo) */
  --pr6: #4E7BD7;     /* main brand color */
  --pr5: #6C95E6;     /* hover/active */
  --pr50: #EEF3FF;    /* light background for selected tabs/chips */
  --prFocus: rgba(78,123,215,.35); /* focus ring */

  /* Badges */
  --hot-t: #B45309;   /* HOT text */
  --hot-bg: #FEF3C7;  /* HOT background */
  --new-t: #047857;   /* NEW text */
  --new-bg: #D1FAE5;  /* NEW background */

  /* Shape */
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 6px 16px rgba(17,24,39,.06);
}

/* ============ Base Styles ============ */
body.theme-arteefy {
  background: var(--pg);
  color: var(--tx1);
}

/* ============ Surfaces ============ */


/* ============ Tabs (Style Trending / Upload & Print) ============ */
.theme-arteefy .tab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--bd);
  border-radius: 999px;
  background: var(--sf);
  color: var(--tx2);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-arteefy .tab.is-active,
.theme-arteefy .tab.active {
  background: var(--pr50);
  color: var(--pr6);
  border-color: transparent;
}

/* ============ Chips (filters) ============ */
.theme-arteefy .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--bd);
  background: #F3F4F6;
  color: var(--tx2);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-arteefy .chip.is-active,
.theme-arteefy .chip.active {
  background: var(--pr50);
  color: var(--pr6);
  border-color: var(--pr6);
}

/* ============ Buttons ============ */
.theme-arteefy .btn {
  height: 44px;
  border-radius: 0;
  font-weight: 700;
  padding: 0 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Primary button - Only for "Style" actions */
.theme-arteefy .btn-primary,
.theme-arteefy .btn-style,
.theme-arteefy .btn-view {
  background: var(--pr6);
  color: #fff;
  border: none;
}

.theme-arteefy .btn-primary:hover,
.theme-arteefy .btn-style:hover,
.theme-arteefy .btn-view:hover {
  background: var(--pr5);
}

.theme-arteefy .btn-primary:active,
.theme-arteefy .btn-style:active,
.theme-arteefy .btn-view:active {
  background: var(--pr6);
  transform: scale(0.98);
}

/* Ghost button - For Print, Cart, Logout */
.theme-arteefy .btn-ghost,
.theme-arteefy .btn-print {
  background: white;
  color: var(--tx1);
  border: none;
  box-shadow: none;
  outline: none;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.theme-arteefy .btn-ghost:hover,
.theme-arteefy .btn-print:hover {
  background: #FAFAFA;
  box-shadow: none;
  border: none;
  outline: none;
}

/* Outline button - Secondary actions */
.theme-arteefy .btn-outline {
  background: var(--sf);
  color: var(--pr6);
  border: 1px solid var(--pr6);
}

.theme-arteefy .btn-outline:hover {
  background: var(--pr50);
}

/* Focus state for all buttons */
.theme-arteefy .btn:focus {
  outline: 2px solid var(--prFocus);
  outline-offset: 2px;
}

/* Small button variant */
.theme-arteefy .btn-sm {
  height: 32px;
  font-size: 14px;
  padding: 0 12px;
}

/* ============ Tags & Badges ============ */
.theme-arteefy .tag {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--bd);
  color: var(--tx2);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.theme-arteefy .badge-hot,
.theme-arteefy .badge--hot {
  color: var(--hot-t);
  background: var(--hot-bg);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  border: none;
}

.theme-arteefy .badge-new,
.theme-arteefy .badge--new {
  color: var(--new-t);
  background: var(--new-bg);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  border: none;
}

/* ============ Header ============ */
.theme-arteefy .header {
  background: var(--sf);
  border-bottom: 1px solid var(--bd);
}

.theme-arteefy .header-btn {
  background: transparent;
  color: var(--tx1);
  border: none;
  font-weight: 600;
}

.theme-arteefy .header-btn:hover {
  background: var(--pr50);
}

/* Cart badge */
.theme-arteefy .cart-toggle-badge {
  background: var(--pr6);
  color: #fff;
  border: 2px solid var(--sf);
}

/* ============ Upload & Style Card (V2 Style) ============ */
.theme-arteefy .fake-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  text-align: center;
  transition: box-shadow 0.15s;
  cursor: pointer;
}

.theme-arteefy .fake-card:hover {
  border: none;
  box-shadow: none;
}

.theme-arteefy .fake-card .fake-title {
  color: var(--pr6);
  font-weight: 800;
  font-size: 16px;
}

.theme-arteefy .fake-card .fake-sub {
  font-size: 12px;
  color: var(--tx2);
  margin-top: 4px;
}

/* ============ Search & Visual Match Pages ============ */
/* Upload area for Visual Match */
.theme-arteefy .upload-area {
  background: #FAFBFF;
  border: 2px dashed #C7D2FE;
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}

.theme-arteefy .upload-area:hover {
  border-color: var(--pr6);
  box-shadow: 0 0 0 3px var(--pr50) inset;
}

.theme-arteefy .upload-area.dragover {
  background: var(--pr50);
  border-color: var(--pr6);
}

.theme-arteefy .upload-hint {
  color: var(--pr6);
  font-weight: 600;
}

.theme-arteefy .upload-hint div:last-child {
  color: var(--tx2);
  font-size: 14px;
  margin-top: 4px;
}

/* Search input styling */
.theme-arteefy #inspire-text {
  background: var(--sf);
  border: 1.5px solid var(--bd);
  border-radius: var(--radius);
  color: var(--tx1);
  padding: 12px 16px;
  font-size: 15px;
}

.theme-arteefy #inspire-text:focus {
  outline: none;
  border-color: var(--pr6);
  box-shadow: 0 0 0 3px var(--prFocus);
}

/* Search button */
.theme-arteefy #inspire-btn {
  background: var(--pr6);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 12px 24px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-arteefy #inspire-btn:hover {
  background: var(--pr5);
}

/* Visual Match query preview card */
.theme-arteefy #inspire-query {
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Mode toggle chips */
.theme-arteefy #inspire-mode .chip {
  background: var(--sf);
  border: 1.5px solid var(--bd);
  color: var(--tx2);
  font-weight: 600;
  transition: all 0.2s;
}

.theme-arteefy #inspire-mode .chip.active {
  background: var(--pr6);
  color: white;
  border-color: var(--pr6);
}

.theme-arteefy #inspire-mode .chip:hover:not(.active) {
  background: var(--pr50);
  color: var(--pr6);
  border-color: var(--pr6);
}

/* ============ Progress Bars ============ */
.theme-arteefy .progress-bar {
  background: var(--pr6);
}

.theme-arteefy .progress-track {
  background: #F3F4F6;
  border: 1px solid var(--bd);
}

/* ============ Checkout Overlay ============ */
.theme-arteefy .checkout-modal {
  background: var(--sf);
  border-radius: var(--radius-lg);
}

.theme-arteefy .checkout-progress-bar {
  background: linear-gradient(90deg, var(--pr6) 0%, var(--pr5) 100%);
}

/* ============ Grid Cards ============ */
.theme-arteefy .grid-cards {
  gap: 12px;
}

.theme-arteefy .card {
  background: #f2f4f9;
  border-radius: 0;
  border: none;
  overflow: hidden;
  gap: 12px;
  padding: 14px 16px 16px;
}

.theme-arteefy .card-meta {
  background: transparent;
  padding-top: 10px;
}

.theme-arteefy .card-body {
  gap: 8px;
  background: transparent;
}

.theme-arteefy .card-thumb {
  border-radius: 0;
  overflow: hidden;
  background: #eef2f8;
}

/* ============ Sticky CTA (optional) ============ */
.theme-arteefy .sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  gap: 8px;
  padding: 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--bd);
}

/* ============ Form Elements ============ */
.theme-arteefy input[type="text"],
.theme-arteefy input[type="email"],
.theme-arteefy input[type="password"],
.theme-arteefy textarea {
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: var(--radius);
  color: var(--tx1);
  padding: 10px 12px;
}

.theme-arteefy input:focus,
.theme-arteefy textarea:focus {
  outline: 2px solid var(--prFocus);
  outline-offset: 2px;
  border-color: var(--pr6);
}

/* ============ Modals ============ */
.theme-arteefy .modal {
  background: var(--sf);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

.theme-arteefy .modal-overlay {
  background: rgba(0, 0, 0, 0.5);
}

/* ============ Loading States ============ */
.theme-arteefy .spinner {
  border-color: var(--bd);
  border-top-color: var(--pr6);
}

/* ============ Bug Fixes ============ */
/* Hide orphaned query preview elements */
.theme-arteefy #inspire-query,
.theme-arteefy #inspire-query-preview {
  display: none !important;
}

/* ============ Responsive Adjustments ============ */
@media (max-width: 640px) {
  .theme-arteefy .btn {
    height: 40px;
    border-radius: 8px;
    font-size: 14px;
    padding: 0 16px;
  }

  .theme-arteefy .tab {
    height: 48px;
  }

  .theme-arteefy .chip {
    padding: 8px 12px;
  }

  /* Mobile card styles */
  .theme-arteefy .card {
    border-radius: 12px;
    padding: 8px;
  }

  .theme-arteefy .card-thumb {
    border-radius: 8px;
  }

  .theme-arteefy .card-thumb img {
    border-radius: 8px;
  }

  /* Mobile fake-card styles */
  .theme-arteefy .card.fake-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  /* Reduce grid gaps on mobile */
  .theme-arteefy .grid-cards {
    gap: 8px;
  }

  /* Hide TAG on mobile, only show ID */
  .theme-arteefy .card-meta span:nth-child(2) {
    display: none !important;
  }

  /* Smaller ID text on mobile */
  .theme-arteefy .card-meta .card-id-text {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #94a3b8 !important;
    opacity: 0.8 !important;
  }
}
.theme-arteefy .card {
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--bd);
  border-radius: 0;
  overflow: visible;
  box-shadow: var(--shadow);
}

.theme-arteefy .card.fake-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.theme-arteefy .card-meta {
  background: transparent;
  border: none;
}
