/* ============================================================================
   MY SHOP PAGE - The Decorators Association
   Design System CSS - Dark Theme with Orange Accent
   ============================================================================ */

/* 1. RESET & BASE ========================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--warm-black);
  color: var(--offwhite);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Root CSS Variables */
:root {
    --ink: #0D0C0B;
    --warm-black: #141210;
    --offwhite: #F5F2EC;
    --cream: #EAE5DC;
    --volt: #C8F000;
    --orange: #E85A1A;
    --mid-gray: #6B6660;
    --light-gray: #B8B3AB;
    --rule: rgba(255,255,255,0.08);
    --rule-light: rgba(0,0,0,0.1);
}

/* 2. TYPOGRAPHY ============================================================ */

h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--offwhite);
  margin-bottom: 16px;
}

h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--offwhite);
  margin-bottom: 12px;
}

h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--offwhite);
  margin-bottom: 12px;
}

h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--offwhite);
  margin-bottom: 8px;
}

h5 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--offwhite);
}

h6 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--offwhite);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

p {
  margin-bottom: 12px;
}

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

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

/* 3. CONTAINER ============================================================= */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 4. AUTH GATE ============================================================= */

.auth-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-gate-card {
  background: #1A1714;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  max-width: 440px;
  width: 100%;
}

.auth-gate-content {
  padding: 48px;
  text-align: center;
}

.auth-gate-content h2 {
  margin-bottom: 16px;
  color: var(--offwhite);
}

.auth-gate-content p {
  color: var(--light-gray);
  margin-bottom: 24px;
}

.auth-btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  margin: 8px;
}

.auth-btn.primary {
  background: var(--volt);
  color: var(--warm-black);
}

.auth-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: none;
}

.auth-btn.secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--light-gray);
}

.auth-btn.secondary:hover {
  border-color: var(--volt);
  color: var(--volt);
}

/* 5. HERO ================================================================== */

.shop-hero {
  padding: 48px 0 24px;
  text-align: center;
}

.shop-hero h1 {
  margin-bottom: 16px;
}

.shop-hero .subtitle {
  color: var(--light-gray);
  font-size: 1.1rem;
}

/* 6. SHOP TABS ============================================================= */

.shop-tabs {
  display: flex;
  gap: 4px;
  background: #1A1714;
  border-radius: 10px;
  padding: 4px;
  max-width: 700px;
  margin: 0 auto 32px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.shop-tabs button {
  background: transparent;
  color: var(--light-gray);
  padding: 10px 20px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.shop-tabs button:hover {
  color: var(--offwhite);
}

.shop-tabs button.active {
  background: #1C1916;
  color: var(--offwhite);
  box-shadow: none;
}

/* 7. TAB PANELS =========================================================== */

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* 8. SHOP CARDS =========================================================== */

.shop-card {
  background: #1A1714;
  border: 1px solid rgba(255, 255, 255, 0.05);
  
  padding: 28px;
  margin-bottom: 20px;
}

.shop-card h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--offwhite);
}

.shop-card p {
  color: var(--light-gray);
  margin-bottom: 20px;
}

.shop-card p:last-child {
  margin-bottom: 0;
}

/* 9. FORM INPUTS ========================================================== */

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--light-gray);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: #1C1916;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--offwhite);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--volt);
  outline: 2px solid var(--volt); outline-offset: 2px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='rgba(245,240,235,0.6)' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
  font-family: 'DM Sans', sans-serif;
}

.currency-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  left: 14px;
  color: var(--mid-gray);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
}

.currency-input {
  padding-left: 28px;
}

.input-suffix {
  position: absolute;
  right: 14px;
  color: var(--mid-gray);
  font-size: 12px;
}

/* 10. LOGO UPLOAD ========================================================= */

.logo-upload-area {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo-upload-area:hover {
  border-color: var(--volt);
  background: rgba(200, 240, 0, 0.05);
}

.logo-placeholder {
  color: var(--mid-gray);
  font-size: 14px;
}

.logo-preview {
  max-width: 120px;
  max-height: 120px;
  border-radius: 8px;
  margin-bottom: 12px;
  object-fit: contain;
}

.upload-btn {
  background: var(--volt);
  color: var(--warm-black);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s ease;
}

.upload-btn:hover {
  transform: translateY(-1px);
  box-shadow: none;
}

.logo-upload-area small {
  color: var(--mid-gray);
  font-size: 11px;
  margin-top: 4px;
  display: block;
}

/* 11. SAVE BUTTONS ======================================================== */

.save-btn {
  background: var(--volt);
  color: var(--warm-black);
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.save-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: none;
}

.save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.save-btn.saved {
  background: #22C55E;
}

/* 12. STATUS MESSAGES ===================================================== */

.status-msg {
  font-size: 13px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  display: none;
}

.status-msg.show {
  display: block;
}

.status-msg.success {
  color: #22C55E;
  background: rgba(74, 222, 128, 0.1);
}

.status-msg.error {
  color: #FF6B6B;
  background: rgba(255, 107, 107, 0.1);
}

/* 13. ADD BUTTONS ========================================================= */

.add-btn {
  background: transparent;
  border: 1px solid var(--volt);
  color: var(--volt);
  padding: 8px 16px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-btn:hover {
  background: var(--volt);
  color: var(--warm-black);
}

/* 14. DATA TABLES ========================================================= */

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

.data-table thead th {
  padding: 10px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--mid-gray);
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table tbody td {
  padding: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--light-gray);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.table-action-btn {
  font-size: 12px;
  color: var(--volt);
  background: transparent;
  border: 1px solid var(--volt);
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  margin-right: 4px;
  transition: all 0.2s ease;
}

.table-action-btn:hover {
  background: var(--volt);
  color: var(--warm-black);
}

.table-action-btn.delete {
  border-color: #FF6B6B;
  color: #FF6B6B;
}

.table-action-btn.delete:hover {
  background: #FF6B6B;
  color: var(--warm-black);
}

.favorite-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
  transition: all 0.2s ease;
}

.favorite-btn:hover {
  transform: scale(1.2);
}

.status-select {
  background: #1C1916;
  color: var(--offwhite);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.status-select:hover,
.status-select:focus {
  border-color: var(--volt);
}

/* 15. TABLE TOP BAR ======================================================= */

.table-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

/* 16. EMPTY STATES ======================================================== */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--mid-gray);
  font-size: 14px;
}

/* 17. MODALS ============================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  display: none;
}

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

.modal-card {
  background: #1A1714;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 32px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-card h3 {
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.modal-cancel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--light-gray);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  transition: all 0.2s ease;
}

.modal-cancel:hover {
  color: var(--offwhite);
  border-color: rgba(255, 255, 255, 0.12);
}

/* 18. FILTER ROW ========================================================== */

.filter-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-select {
  background: #1C1916;
  color: var(--offwhite);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'DM Sans', sans-serif;
}

.filter-select:hover,
.filter-select:focus {
  border-color: var(--volt);
}

/* 19. TWO-COLUMN LAYOUT ================================================== */

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* 20. RESPONSIVE ========================================================== */

@media (max-width: 768px) {
  .shop-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .shop-tabs button {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px;
    padding: 8px 14px;
  }

  .data-table {
    font-size: 12px;
  }

  .data-table td,
  .data-table th {
    padding: 8px;
  }

  .modal-card {
    padding: 20px;
    margin: 12px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px; /* Prevent iOS zoom on focus */
  }

  .table-top-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.75rem;
  }

  .shop-hero {
    padding: 32px 0 16px;
  }
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .shop-card {
    padding: 20px;
  }

  .auth-gate-content {
    padding: 32px 24px;
  }

  .modal-card {
    padding: 16px;
  }

  .container {
    padding: 0 16px;
  }
}
