/* AH Dev Studio v2 - Base Styles */

/* Base Styles */
:root {
  /* AH Dev Studio v2 - E-commerce Theme Variables */

  /* Light Mode */
  --bg-primary: #f3f4f6;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f8fafc;

  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;

  --brand-primary: #e11d48;
  --brand-secondary: #0ea5e9;

  --border-color: #e5e7eb;
  --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  /* Dark Mode */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --brand-primary: #f43f5e;
  --brand-secondary: #38bdf8;

  --border-color: rgba(255, 255, 255, 0.1);
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);

  color-scheme: dark;
}

/* Global Input/Select Elements Styling */
input,
select,
textarea {
  background-color: var(--bg-tertiary) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  transition: all 0.2s ease !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-secondary) !important;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15) !important;
}

/* Specific fix for select options background in some browsers */
select option {
  background-color: #1e293b;
  color: #f8fafc;
}

/* Input Styling for Dark Mode Visibility */
[data-theme="dark"] input::placeholder {
  color: var(--text-muted);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Utilities & Components */
.bg-main {
  background-color: var(--bg-primary);
}

.bg-card {
  background-color: var(--bg-secondary);
}

.text-main {
  color: var(--text-primary);
}

.text-muted-auto {
  color: var(--text-muted);
}

.border-theme {
  border-color: var(--border-color);
}

/* Primary Premium Button (Purple/Blue Gradient) */
.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #3b82f6) !important;
  color: white !important;
  border: none !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
}

.btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 20px -5px rgba(124, 58, 237, 0.4) !important;
  opacity: 0.9 !important;
}

/* Red E-commerce Button */
.btn-primary-eco {
  background-color: var(--brand-primary);
  color: white;
  transition: all 0.2s ease;
}

.btn-primary-eco:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Blue E-commerce Button */
.btn-secondary-eco {
  background-color: var(--brand-secondary);
  color: white;
  transition: all 0.2s ease;
}

.btn-secondary-eco:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Glassmorphism Card Effect */
.card-gradient {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Custom E-Commerce Components */

/* The Header */
.ecommerce-header {
  background-color: var(--brand-secondary);
  /* Pickaboo style blue header */
  color: white;
}

[data-theme="dark"] .ecommerce-header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.subcategory-nav {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

/* Cards */
.eco-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.eco-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.strikethrough {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.85em;
}

.discount-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: var(--brand-primary);
  color: white;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(225, 29, 72, 0.4);
}

/* Horizontal Scrolling areas */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Specific styling for the Facebook-style Publicity Feed Posts */
.social-post {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

/* Reactions Bar */
.reactions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-top: 12px;
}

.reaction-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  cursor: pointer;
}

.reaction-btn:hover {
  color: var(--brand-secondary);
}

.reaction-btn.active {
  color: var(--brand-secondary);
}

/* Comments Section */
.comments-section {
  padding-top: 16px;
}

.comment-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  flex-shrink: 0;
  overflow: hidden;
  background-color: var(--bg-tertiary);
}

.comment-bubble {
  background-color: var(--bg-tertiary);
  padding: 8px 12px;
  border-radius: 1rem;
  max-width: 85%;
}

/* Media Modal (Facebook Style) */
.media-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.media-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.media-modal-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
  pointer-events: auto !important;
}

.media-modal-content iframe {
  pointer-events: auto !important;
}

.media-modal-close {
  position: absolute;
  top: -40px;
  right: -40px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 100;
}

@media (max-width: 768px) {
  .media-modal {
    padding: 1rem;
  }

  .media-modal-close {
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 4px;
  }
}

/* Top Slider Component */
.top-slider {
  width: 100%;
  height: 40px;
  background-color: var(--bg-tertiary);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.slide-item {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s ease;
}

/* --- Reaction System --- */
.reaction-container {
  position: relative;
  display: inline-block;
}

.reaction-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: rgba(18, 18, 22, 0.9);
  backdrop-filter: blur(12px);
  border: 1px border-white/10;
  border-radius: 50px;
  padding: 6px 12px;
  display: flex;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 50;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.reaction-container:hover .reaction-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(-10px) scale(1);
  margin-bottom: 5px;
}

.reaction-item {
  cursor: pointer;
  transition: transform 0.2s;
  font-size: 20px;
}

.reaction-item:hover {
  transform: scale(1.4) translateY(-5px);
}

.reaction-btn.reacted-like {
  color: var(--brand-secondary) !important;
  font-weight: bold;
}

.reaction-btn.reacted-love {
  color: #ff3b30 !important;
  font-weight: bold;
}

.reaction-btn.reacted-care {
  color: #fcc419 !important;
  font-weight: bold;
}

.reaction-btn.reacted-haha {
  color: #fcc419 !important;
  font-weight: bold;
}

.reaction-btn.reacted-wow {
  color: #fcc419 !important;
  font-weight: bold;
}

.reaction-btn.reacted-sad {
  color: #3b82f6 !important;
  font-weight: bold;
}

.reaction-btn.reacted-angry {
  color: #e11d48 !important;
  font-weight: bold;
}

.reaction-chips {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: -5px;
  margin-bottom: 10px;
  padding: 0 10px;
}

.reaction-chip {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 4px;
}

.reaction-chip i {
  font-size: 11px;
}

/* --- Mobile Responsiveness Overrides --- */
@media (max-width: 768px) {
  .social-post {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
  }

  .reactions-bar {
    gap: 8px;
    justify-content: space-between;
  }

  .reaction-btn span {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .reaction-menu {
    padding: 4px 8px;
    gap: 4px;
  }

  .reaction-item {
    font-size: 18px;
  }
}