/* ============================================================================
   MOBILE COMPONENTS - PROFESSIONAL STYLING
   Additional polish for commonly used mobile components
   ============================================================================ */

/* ─────────────────────────────────────────────────────────────────────────
   SEARCH & NAVIGATION COMPONENTS
   ───────────────────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
  /* Enhanced search input styling */
  .search-input-wrapper {
    position: relative;
  }

  .search-input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
  }

  .search-input-wrapper input::placeholder {
    color: var(--text-tertiary);
  }

  .search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
  }

  .search-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 1rem;
  }

  /* Tagline hero section */
  .hero-tagline {
    text-align: center;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-50) 0%, rgba(209, 250, 229, 0.5) 100%);
    border-radius: var(--radius-xl);
    margin: 1.25rem 0;
    border: 1px solid var(--primary-200);
  }

  .hero-tagline-main {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--primary-700);
    margin: 0;
    word-spacing: 0.1em;
  }

  .hero-tagline-sub {
    font-size: 0.85rem;
    color: var(--primary-600);
    margin-top: 0.5rem;
    letter-spacing: 0.03em;
  }

  /* ─────────────────────────────────────────────────────────────────────────
     CARD COMPONENTS
     ───────────────────────────────────────────────────────────────────────── */

  /* Product card for listing */
  .product-card {
    background: white;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
  }

  .product-card:active {
    transform: translateY(2px);
    box-shadow: var(--shadow-xs);
  }

  .product-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--bg-secondary);
  }

  .product-card-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .product-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.4rem 0;
    line-height: 1.4;
  }

  .product-card-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0 0 0.6rem 0;
    line-height: 1.4;
    flex: 1;
  }

  .product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .product-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-600);
  }

  .product-card-button {
    padding: 0.5rem 1rem;
    background: var(--primary-500);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .product-card-button:active {
    transform: scale(0.95);
  }

  /* ─────────────────────────────────────────────────────────────────────────
     FORM COMPONENTS
     ───────────────────────────────────────────────────────────────────────── */

  /* Login/Register form styling */
  .auth-form-group {
    margin-bottom: 1.25rem;
  }

  .auth-form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
  }

  .auth-form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    background: white;
    transition: all 0.2s ease;
  }

  .auth-form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
    background: white;
  }

  .auth-form-input:disabled {
    background: var(--bg-secondary);
    cursor: not-allowed;
  }

  .auth-form-error {
    display: block;
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 0.35rem;
    font-weight: 500;
  }

  .auth-form-helper {
    display: block;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: 0.35rem;
  }

  /* Checkbox styling */
  .checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
  }

  .checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-500);
  }

  .checkbox-label {
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
  }

  /* ─────────────────────────────────────────────────────────────────────────
     BUTTON VARIATIONS
     ───────────────────────────────────────────────────────────────────────── */

  /* Primary button */
  .btn-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-500) 100%);
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    border: none;
  }

  .btn-primary:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-sm);
  }

  .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }

  /* Secondary button */
  .btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-primary);
    font-weight: 600;
    transition: all 0.2s ease;
  }

  .btn-secondary:active {
    background: var(--bg-secondary);
    transform: scale(0.98);
  }

  /* Tertiary/Ghost button */
  .btn-ghost {
    background: transparent;
    color: var(--primary-600);
    border: none;
    font-weight: 600;
  }

  .btn-ghost:active {
    background: var(--primary-50);
  }

  /* Danger button */
  .btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    font-weight: 600;
  }

  .btn-danger:active {
    background: #dc2626;
    transform: scale(0.98);
  }

  /* ─────────────────────────────────────────────────────────────────────────
     ALERTS & NOTIFICATIONS
     ───────────────────────────────────────────────────────────────────────── */

  .alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .alert-icon {
    flex-shrink: 0;
    font-size: 1.2rem;
    margin-top: 0.15rem;
  }

  .alert-content {
    flex: 1;
  }

  .alert-title {
    font-weight: 600;
    margin: 0 0 0.25rem 0;
  }

  .alert-message {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.95;
  }

  .alert-success {
    background: #eaf7f0;
    color: #065f46;
    border: 1px solid #a7f3d0;
  }

  .alert-error {
    background: #fff5f5;
    color: #7f1d1d;
    border: 1px solid #fecaca;
  }

  .alert-warning {
    background: #fff8e1;
    color: #78350f;
    border: 1px solid #fcd34d;
  }

  .alert-info {
    background: #e8f2fc;
    color: #003d82;
    border: 1px solid #bfdbfe;
  }

  /* ─────────────────────────────────────────────────────────────────────────
     LOADING & STATES
     ───────────────────────────────────────────────────────────────────────── */

  .loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-primary);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  .skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--bg-tertiary) 50%, var(--bg-secondary) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
  }

  @keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }

  /* ─────────────────────────────────────────────────────────────────────────
     BADGES & TAGS
     ───────────────────────────────────────────────────────────────────────── */

  .badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: var(--primary-100);
    color: var(--primary-700);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
  }

  .badge-success {
    background: #d1fae5;
    color: #065f46;
  }

  .badge-error {
    background: #fee2e2;
    color: #991b1b;
  }

  .badge-warning {
    background: #fef3c7;
    color: #92400e;
  }

  .badge-info {
    background: #dbeafe;
    color: #1e40af;
  }

  /* ─────────────────────────────────────────────────────────────────────────
     DIVIDERS & SEPARATORS
     ───────────────────────────────────────────────────────────────────────── */

  .divider {
    height: 1px;
    background: var(--border-primary);
    margin: 1.5rem 0;
  }

  .divider-text {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    font-weight: 500;
  }

  .divider-text:before,
  .divider-text:after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-primary);
  }

  /* ─────────────────────────────────────────────────────────────────────────
     EMPTY STATES
     ───────────────────────────────────────────────────────────────────────── */

  .empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
  }

  .empty-state-icon {
    font-size: 3.5rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
  }

  .empty-state-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
  }

  .empty-state-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
  }

  .empty-state-action {
    display: inline-block;
  }
}

/* ─────────────────────────────────────────────────────────────────────────
   EXTRA SMALL (≤575px) ADJUSTMENTS
   ───────────────────────────────────────────────────────────────────────── */

@media (max-width: 575px) {
  .hero-tagline {
    padding: 1rem 0.75rem;
    margin: 1rem 0.75rem;
  }

  .hero-tagline-main {
    font-size: 1rem;
  }

  .product-card-image {
    height: 140px;
  }

  .auth-form-group {
    margin-bottom: 1rem;
  }

  .alert {
    padding: 0.85rem;
    font-size: 0.9rem;
  }

  .empty-state {
    padding: 2.5rem 1rem;
  }

  .empty-state-icon {
    font-size: 3rem;
  }
}

/* ─────────────────────────────────────────────────────────────────────────
   VERY SMALL (≤480px) ADJUSTMENTS
   ───────────────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .hero-tagline {
    padding: 0.9rem 0.5rem;
    margin: 0.85rem 0.5rem;
    border-radius: var(--radius-lg);
  }

  .hero-tagline-main {
    font-size: 0.95rem;
  }

  .hero-tagline-sub {
    font-size: 0.8rem;
  }

  .product-card-image {
    height: 130px;
  }

  .product-card-content {
    padding: 0.85rem;
  }

  .product-card-title {
    font-size: 0.9rem;
  }

  .product-card-button {
    padding: 0.45rem 0.85rem;
    font-size: 0.75rem;
  }

  .auth-form-input {
    padding: 0.75rem 0.85rem;
  }

  .alert {
    padding: 0.75rem;
    font-size: 0.85rem;
    gap: 0.5rem;
  }

  .alert-icon {
    font-size: 1.1rem;
  }

  .empty-state {
    padding: 2rem 0.75rem;
  }

  .empty-state-icon {
    font-size: 2.75rem;
    margin-bottom: 0.75rem;
  }

  .empty-state-title {
    font-size: 1rem;
  }

  .empty-state-description {
    font-size: 0.9rem;
  }
}
